Live data from Hacker News

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

vidds.co

21–30 of 51 posts

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

#21

Earlier quoted context omitted.

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

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!

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

#23
post #22

Its amazing what we can do with modern browsers today. Our app plug: 7 years back we did a quick tool to shrink JPG's in browser (Again needs Chrome or Firefox) without uploading images to server: http://shrinkjpeg.com

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.

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

#24

Earlier quoted context omitted.

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!

I record little screencasts/demos regularly for embedding them on webpages and currently always convert them with the ffmpeg CLI to WEBM, but it's really cumbersome and hard to remember all the command line flags you need to use (especially with 2 passes). I don't really like online cloud converters though because each video needs to both be uploaded and downloaded again and I'm worried they do a lossy compression on the video behind the scenes. A simple to use, trustworthy, client-based webapp to do this would be amazing.

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

#25

Earlier quoted context omitted.

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!

I record little screencasts/demos regularly for embedding them on webpages and currently always convert them with the ffmpeg CLI to WEBM, but it's really cumbersome and hard to remember all the command line flags you need to use (especially with 2 passes). I don't really like online cloud converters though because each video needs to both be uploaded and downloaded again and I'm worried they do a lossy compression on…

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@ and show me a sample command :)

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

#26

Earlier quoted context omitted.

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…

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?

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

#27

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

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

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

#28

Earlier quoted context omitted.

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…

If you send me an e-mail (andrew@), I can dig in a bit more and let you know when I add it :)

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

#29

Earlier quoted context omitted.

I record little screencasts/demos regularly for embedding them on webpages and currently always convert them with the ffmpeg CLI to WEBM, but it's really cumbersome and hard to remember all the command line flags you need to use (especially with 2 passes). I don't really like online cloud converters though because each video needs to both be uploaded and downloaded again and I'm worried they do a lossy compression on…

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@ and show me a sample command :)

I use the very basic:

    ffmpeg -i FILE -codec:v libvpx-vp9 -qscale:v 0 -codec:a libvorbis -qscale:a 0 FILE.webm
And end up with really good results out the other end. When I was rendering with pre-VP9 I needed a few more flags (stuff like crf) to maintain quality, but this works fine for most things. And has been really impressive on the filesize side of things.

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

#30

Earlier quoted context omitted.

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 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) libmp3lame.so.0 => /usr/lib/x86_64-linux-gnu/libmp3lame.so.0 (0x00007ff6036a4000) libx264.so.152 => /usr/lib/x86_64-linux-gnu/libx264.so.152 (0x00007ff6032ff000) libx265.so.146 => /usr/lib/x86_64-linux-gnu/libx265.so.146 (0x00007ff60267e000) libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007ff60245f000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007ff60206e000) /lib64/ld-linux-x86-64.so.2 (0x00007ff605d14000) libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007ff601e6a000) libnuma.so.1 => /usr/lib/x86_64-linux-gnu/libnuma.so.1 (0x00007ff601c5f000) libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007ff6018d6000) libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007ff6016be000)

I guess it depends what you compile in.

Post reply on HN