HackerTrans
TopNewTrendsCommentsPastAskShowJobs

Andrew_W

no profile record

Submissions

Show HN: WebAssembly and ffmpeg = Quick clip, overlay, resize and GIF-ize videos

vidds.co
104 points·by Andrew_W·5 лет назад·49 comments

comments

Andrew_W
·2 года назад·discuss
Man, with all of the anti-user "features" of social sharing apps, your interface is a breath of fresh air!

I'll be trying out the open source version this weekend so I can share links with my nerdy friends more easily, but trying out the saas version really showed how horrible social share sites are these days.
Andrew_W
·5 лет назад·discuss
I also took a peak at your code and saw the manifest. This would be a pretty awesome PWA :)

I hope you keep at it!
Andrew_W
·5 лет назад·discuss
This is awesome! Good job on it :) Wish you had a mailing list signup - I don't want to forget about this!

I took a one month Spanish class in Mexico a few years ago. It was amazing for giving me a solid base, and your tool would be perfect for getting regular practice in and learning new things.

Definitely agree with the other comments that a more modern book would be better. For me, probably a children's book haha. I can't imagine how much time it takes to translate though!

Idea:

- Create a list of a few books you could translate.

- Allow users to donate and select the book it would go towards.

- When donations reach the threshold, they're charged and you write it.

Like Kickstarter for book translations haha. Or maybe Patreon or something has that feature.
Andrew_W
·5 лет назад·discuss
Yeah, and Spectre/Meltdown haven't helped.

There are some pretty crazy security restrictions (no external scripts!) just to get ffmpeg running. I can't imagine the additional security precautions that would prevent exploits for WebGPU.
Andrew_W
·5 лет назад·discuss
Definitely a performance hit! Probably a combination of the lack of hardware acceleration and running in a JS virtual machine.

I haven't checked the exact hit, but that's mostly because our focus for this tool was on people who would never touch ffmpeg or a command line.

Also, the alternative for us would've been to upload remotely and run on Lambda or similar, which I think would lack hardware acceleration as well.
Andrew_W
·5 лет назад·discuss
Sorry for not responding sooner.

That sounds like a great use case for us to handle! Although I think ffmpeg in the browser loses some efficiency over the command line.

I think we added cropping as a possible future feature. I'll bet ffmpeg makes that really easy to do.

I think we should also work on optimizing the output size. I think we use a pretty high (err, low) -crf, which can result in ridiculous file sizes.

Thanks for the comment! Appreciate hearing use cases :)
Andrew_W
·5 лет назад·discuss
Nope! It's all running client-side, so it uses a bit more bandwidth, but there's no way a serverless platform can compete with the cost :)

If the tool is popular long term, we might do a serverless option to make it accessible to Safari users or something though.
Andrew_W
·5 лет назад·discuss
Interesting idea, like append the video to itself but reversed for a clean loop? I like this idea :)
Andrew_W
·5 лет назад·discuss
True! When I first started building a video creation app, I was flailing around with google searches to find snippets to use. It was such a relief to spend an hour reading ffmpeg docs to understand how it works.

And I'm still learning a ton :)
Andrew_W
·5 лет назад·discuss
Oh, no, I have nothing there, sorry! haha

I'm using ffmpeg.wasm, it's basically ffmpeg compiled for the browser, and it's a simple layer where you basically treat it like the ffmpeg command, eg:

ffmpeg.run(['-i', 'input.gif', ..., 'output.gif').then(() => { // handle output file })
Andrew_W
·5 лет назад·discuss
Emailing you now :)
Andrew_W
·5 лет назад·discuss
If you send me an e-mail (andrew@<domain in link>), I can dig in a bit more and let you know when I add it :)
Andrew_W
·5 лет назад·discuss
Hey, this feedback is great! And it isn't even too difficult to add - we have live clipped playback in our main app.

When it failed to load the video, did it show a convert option that failed to load it as well? I think there are some limitations to the ffmpeg.wasm compile. Do you know the extension, or any details of the codecs, etc?
Andrew_W
·5 лет назад·discuss
That's awesome! Do you have an example ffmpeg command you run?

We're trying to keep this tool super simple for our end users, but I think we might be able to add a webm preset.

If you'd like me to look into it, drop me an email: andrew@<domain in link> and show me a sample command :)
Andrew_W
·5 лет назад·discuss
Seriously! We were trying to build our video editor in the same style (eg like tinypng and GIF optimizers).

It's so cool to do it all in the browser!

I even built a simple landing page creator that let you change text and images, then created a zip file that you could extract to your web host - no backend needed!

I think for me, CORS is the biggest hindrance to some of my ideas, esp. around editing, creation, and working with the content.
Andrew_W
·5 лет назад·discuss
Yeah. My biggest question when I started building this was whether there was enough in the wasm to support the features we wanted to build.

I've been really happy with the results so far!
Andrew_W
·5 лет назад·discuss
Yeah, webm is already built in to ffmpeg, we just had a pretty limited focus for our initial release.

Even our mp4s aren't very well-optimized right now.

If you work with video a bit and think this tool might be helpful to you, let me know!
Andrew_W
·5 лет назад·discuss
Yeah, that's definitely an issue!

We had to "optimize" loading it twice.

The first time, I moved it from auto-loading to when the user clicks convert to save on bandwidth.

The second time, I moved it to after a file is selected. That gives it time to load while users are presented with options before converting.

It's definitely a trade-off. For us, the choice was easy-ish because we want to keep the budget down as Indie Hackers, so we can't just offer a free tool that costs a ton in backend/serverless charges.
Andrew_W
·5 лет назад·discuss
Oh that tool is neat, and they have a super slick UI!

Our tool definitely isn't as slick, but I think that has its benefits too. Like our trim interface doesn't look as nice, but shows a live preview of where you're at in the video.

I want their UI and style haha
Andrew_W
·5 лет назад·discuss
Yeah, SharedArrayBuffers have been back and forth!

- First they were disabled due to Spectre. - Chrome reenabled them. - New HTTP headers were added for cross-origin resource partitioning. - FF/Chrome are both requiring those headers (FF now, Chrome next month)

That's awesome that you've played around with this, too. It was quite a bit of fun :)