Live data from Hacker News

FFmpeg is 20 years old today

twitter.com

41–50 of 99 posts

Re: FFmpeg is 20 years old today

#41
post #34

Literally just used it today to re-sync the audio and video in some movies I recorded where I needed to add a 210ms delay to the audio. There's no better tool that I know of for doing this, even on macOS: ffmpeg \ -i "$input" -itsoffset "$offset" \ -i "$input" \ -map 0:0 \ -map 1:1 \ -acodec copy \ -vcodec copy \ "$output"

I'm curious as to how you figured out the audio was 210ms ahead of the video.

Re: FFmpeg is 20 years old today

#42
post #41
post #34

Literally just used it today to re-sync the audio and video in some movies I recorded where I needed to add a 210ms delay to the audio. There's no better tool that I know of for doing this, even on macOS: ffmpeg \ -i "$input" -itsoffset "$offset" \ -i "$input" \ -map 0:0 \ -map 1:1 \ -acodec copy \ -vcodec copy \ "$output"

I'm curious as to how you figured out the audio was 210ms ahead of the video.

Players like vlc and mpv allow you to dynamically shift the audio wrt the video while playing, so one can just play around a bit until the perfect setting is found.

Re: FFmpeg is 20 years old today

#43
post #17

Earlier quoted context omitted.

Yeah I just make bunch of bash files (which also contains comment) for specific scenarios.

What's the difference with selecting different config files then?

You don't need a config file for simple cases. There's no firm boundary between simple cases and cases where you'd want to use a config file; it's partly a quantity thing, partly familiarity.

It could probably be nicer with a way to specify a file to read options from, but it's not as if there aren't plenty of ways to represent an argv as a text file already, so it doesn't seem like a high priority.

Re: FFmpeg is 20 years old today

#44

The creator of ffmpeg Fabrice Bellard(1) is truly a genius and has created so many amazing software that have been an amazing benefit to the world. (1) https://bellard.org/

How much of it is genius and how much of it is just an amazingly productive work ethic?

Or maybe it requires genius to be this productive?

I'm just amazed at what some people are able to build. Especially open source. Does he make money from ffmpeg? Or just do it as a side gig?

Reminds me of the photopea guy. He has basically built a browser based clone of photoshop. Something that took Adobe thousands of engineers and decades to build up over time.

Re: FFmpeg is 20 years old today

#45

Some might have commented that FFmpeg is a very complex software but in its defence codecs are complex - especially in the encoding side where you basically have the whole control on the parameters. If you somehow work at a media company (on the engineering side, not the creative side which usually does not know (and care) what is the difference between P and B frames) the switches are important especially in one-way…

Complex is a boon in this case, is it not? It -can- do everything. You need to invest some time into understanding it. There’s no fancy UI, no modern branding. It’s a work horse. It’s so powerful, I love it! Amazing piece of software.

Re: FFmpeg is 20 years old today

#46
post #14

Ffmpeg is an unusual piece of software. It’s CLI arguments (to me) are baffling. But it’s been around so long that there’s so many answered questions online for virtually anything you want it to do. Don’t bother reading the man page, go to google first.

There are also tools with a GUI that make use of ffmpeg (calling them a GUI-wrapper is probably not fair). And ofc, they likely can't do everything ffmpeg CLI can. One I know is https://handbrake.fr Are there more?

Closer to the underlying originals CLI: https://www.videohelp.com/software/FFmpeg-Batch

Re: FFmpeg is 20 years old today

#47
post #14

Ffmpeg is an unusual piece of software. It’s CLI arguments (to me) are baffling. But it’s been around so long that there’s so many answered questions online for virtually anything you want it to do. Don’t bother reading the man page, go to google first.

There are also tools with a GUI that make use of ffmpeg (calling them a GUI-wrapper is probably not fair). And ofc, they likely can't do everything ffmpeg CLI can. One I know is https://handbrake.fr Are there more?

Something I've been working on lately. Not really a GUI wrapper, but more a command generator for some of the common operations.

https://alfg.github.io/ffmpeg-commander/

Re: FFmpeg is 20 years old today

#48
post #41
post #34

Literally just used it today to re-sync the audio and video in some movies I recorded where I needed to add a 210ms delay to the audio. There's no better tool that I know of for doing this, even on macOS: ffmpeg \ -i "$input" -itsoffset "$offset" \ -i "$input" \ -map 0:0 \ -map 1:1 \ -acodec copy \ -vcodec copy \ "$output"

I'm curious as to how you figured out the audio was 210ms ahead of the video.

So I had recorded my son playing keyboard for a recital. The audio was recorded via MIDI into GarageBand into QuickTime Player. The video was off my iPhone via EpocCam over USB also into QuickTime Player. I was able to get the audio routing setup via a Multi-Output Device I configured in Audio MIDI Setup.

The video had a slight delay which I didn’t quite notice till after I’d recorded it.

I basically wrote a quick script to generate variations of the recorded movies with delays from 50ms to 500ms in 50ms increments and then just watched each of them to see which appeared most correct for his hands playing the keys and the sound of the notes. It was slightly over 200ms and less than 250ms. 210ms seemed the best.

I have now learned the importance of a clapperboard.

(Originally I was going to record the audio in GarageBand and the video on my phone and join them later, but I was learning as I went and I wanted to see if I could record the two streams together.)

Re: FFmpeg is 20 years old today

#49
ffmpeg is a true swiss army knife. I used it last week to add subtitles to interviews I recorded (via SRT files generated from Amazon Transcription JSON). I also upscaled, so-mo‘d and blurred a video background with some X-Massy theme for some video calls. All literally within minutes and a bit of Google. A true lifesaver!

Re: FFmpeg is 20 years old today

#50
post #34

Literally just used it today to re-sync the audio and video in some movies I recorded where I needed to add a 210ms delay to the audio. There's no better tool that I know of for doing this, even on macOS: ffmpeg \ -i "$input" -itsoffset "$offset" \ -i "$input" \ -map 0:0 \ -map 1:1 \ -acodec copy \ -vcodec copy \ "$output"

Another one I used to merge subtitles into their respective mkv video files:

    find . -name "*.mkv" -exec ffmpeg -i "{}" -i "{}.srt" -map 0 -map 1 -c copy "{}_merged.mkv" \;
Post reply on HN