Live data from Hacker News

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

vidds.co

11–20 of 51 posts

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

#11
post #5

sounds cool. wonder in practice how this will work out with patent encumbered video formats.

Don't the patent holders want the creation / manipulation of patent encumbered videos?

Unfortunately, of course, they then want to get paid during playback, but that's the reality for everyone already.

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

#12
post #2

* VM is upgraded - we're back :) * Hi HN, I love new web tech, and was excited to see ffmpeg ported to WebAssembly so decided to build a free tool that uses it to: - Clip/trim videos - Overlay text and images - Resize - Create GIFs or convert to a web-friendly MP4 All of this done in your browser, without ever uploading a file to a web server! (* Except Safari, it doesn't support SharedArrayBuffers) A little more: I'…

Very cool! I see that SharedArrayBuffers are enabled again, after they were disable due to spectre!? I have previously tinkered with ffmpeg in the browser and implemented a workaround[1] for the (then) missing pthread support. It turned out quite clunky, but worked. [1] https://phoboslab.org/files/ffmpeg-mt-fixed/

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 :)

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

#14
post #2

* VM is upgraded - we're back :) * Hi HN, I love new web tech, and was excited to see ffmpeg ported to WebAssembly so decided to build a free tool that uses it to: - Clip/trim videos - Overlay text and images - Resize - Create GIFs or convert to a web-friendly MP4 All of this done in your browser, without ever uploading a file to a web server! (* Except Safari, it doesn't support SharedArrayBuffers) A little more: I'…

It is a really good idea. My #1 question with this type approach was how big the WASM would end up -- 24MB in this case.

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

#15

This is great! Another neat project that comes to mind is https://modfy.video

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

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

#16
post #2

* VM is upgraded - we're back :) * Hi HN, I love new web tech, and was excited to see ffmpeg ported to WebAssembly so decided to build a free tool that uses it to: - Clip/trim videos - Overlay text and images - Resize - Create GIFs or convert to a web-friendly MP4 All of this done in your browser, without ever uploading a file to a web server! (* Except Safari, it doesn't support SharedArrayBuffers) A little more: I'…

It is a really good idea. My #1 question with this type approach was how big the WASM would end up -- 24MB in this case.

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.

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

#17
post #2

* VM is upgraded - we're back :) * Hi HN, I love new web tech, and was excited to see ffmpeg ported to WebAssembly so decided to build a free tool that uses it to: - Clip/trim videos - Overlay text and images - Resize - Create GIFs or convert to a web-friendly MP4 All of this done in your browser, without ever uploading a file to a web server! (* Except Safari, it doesn't support SharedArrayBuffers) A little more: I'…

Any plans to support WEBM? Files are even smaller than MP4, which makes them perfect for replacing GIFs

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

#18
post #2

* VM is upgraded - we're back :) * Hi HN, I love new web tech, and was excited to see ffmpeg ported to WebAssembly so decided to build a free tool that uses it to: - Clip/trim videos - Overlay text and images - Resize - Create GIFs or convert to a web-friendly MP4 All of this done in your browser, without ever uploading a file to a web server! (* Except Safari, it doesn't support SharedArrayBuffers) A little more: I'…

Any plans to support WEBM? Files are even smaller than MP4, which makes them perfect for replacing GIFs

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!

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

#19

Earlier quoted context omitted.

It is a really good idea. My #1 question with this type approach was how big the WASM would end up -- 24MB in this case.

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 In…

I agree it makes a lot of sense for stuff that could never be offered as a free back-end service. FFmpeg is a complex app as well, I tried to measure the the size of the binary + all shared libraries on my linux system and I came up with almost 180MB. I couldn't tell if the .WASM file was being transferred compressed either, it should compress more than 2x.

(This is how I tried to measure FFmpeg binary size, I have no idea if it is correct:

    ldd $(which ffmpeg) | egrep -o "/[^ ]+" | \
      xargs readlink -f | xargs stat -c '%s' | \
      python3 -c 'import sys; print(sum(map(lambda s: int(s.strip(), 10), sys.stdin.read().split())))'
178092232

)

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

#20
post #9

Awesome idea, it is hard to try for now but it could be very useful. I especially like simple clip and resize feature but can't try them right now...

Sorry if you were having trouble because the website was down. We upgraded the server and it seems to be doing a little better! But also get it if you mean you're not in a good place to test the tool at the moment haha

I have managed to try it now, and indeed it is almost perfect for my use case : Often I find videos on youtube for example which I want to show snippet to someone or save it. So I download it easily with youtube-dl but then clipping is never really easy (especially on linux).

To improve the tool it would be nice to play the part clipped with the sound to check if it's ok. Also the tool failed to load one video.

Good job !

Post reply on HN