Live data from Hacker News

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

vidds.co

31–40 of 51 posts

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

#32
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'…

[deleted]

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

#33

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…

Have you tried running this as a fastly worker?

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

#34

Earlier quoted context omitted.

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

This is super cool, love to see more people working in this space! Would love to chat about what you guys doing.Potentially collab and improve both our products! Reach out rahul@modfy.video

Emailing you now :)

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

#35
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'…

The main reason why I use ffmpeg/edit videos is to take my 3440x1440 screen recordings and crop+resize them in a format friendly for twitter, otherwise twitter will do its own (additional?) resizing and compression which just destroys videos

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

#36
post #30

Earlier quoted context omitted.

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

You're not adding the size of the ffmpeg binary itself with that. My ffmpeg which I compiled as follows (with my own filter) --enable-gpl --enable-version3 --enable-nonfree --enable-libx264 --enable-libx265 --enable-libmp3lame is 21,387,880 bytes Running with your command reports an additional 18,273,624 bytes linux-vdso.so.1 (0x00007ffcbcdfd000) libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007ff60391b000) libmp…

This is a slightly more correct command I think:

    du -cb $(ldd $(which ffmpeg) | egrep -o "/[^ ]+" | cat 
I think this is what the ffmpeg.wasm-core project is compiling in:

https://github.com/ffmpegwasm/ffmpeg.wasm-core/blob/n4.3.1-w...

Overall I think the wasm size is pretty good, maybe even smaller than the non-wasm binaries to a first approximation.

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

#37
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'…

Amy advice for someone trying to write code against the ffmpeg api for the first time? It's...esoteric and the "correct" way seems to be reading a bunch of ten year old blog posts by random uncertain people. Even the python binding devs have a disclaimer they aren't confident they understand everything they document, despite doing their best to read the source.

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

#38
"You might have come across .mov while working with Apple softwares such as QuickTime, it was introduced in 1998 and uses a top secret compression algorithm. It is often quoted as the catalyst to Apple bringing feature length movie quality to their devices."

This description is absolutely killing me.

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

#39
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'…

Amy advice for someone trying to write code against the ffmpeg api for the first time? It's...esoteric and the "correct" way seems to be reading a bunch of ten year old blog posts by random uncertain people. Even the python binding devs have a disclaimer they aren't confident they understand everything they document, despite doing their best to read the source.

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

Post reply on HN