Live data from Hacker News

FFmpeg 8.0

ffmpeg.org

161–170 of 207 posts

Re: FFmpeg 8.0

#161
post #73

Earlier quoted context omitted.

nope, that would be handling tar balls ffmpeg right after

Tough crowd. fwiw, `tar xzf foobar.tgz` = "_x_tract _z_e _f_iles!" has been burned into my brain. It's "extract the files" spoken in a Dr. Strangelove German accent Better still, I recently discovered `dtrx` ( https://github.com/dtrx-py/dtrx ) and it's great if you have the ability to install it on the host. It calls the right commands and also always extracts into a subdir, so no more tar-bombs. If you want to creat…

> tar xzf foobar.tgz

You don't need the z, as xf will detect which compression was used, if any.

Creating is no harder, just use c for create instead, and specify z for gzip compression:

  tar czf archive.tar.gz [filename(s)]
Same with listing contents, with t for tell:

  tar tf archive.tar.gz

Re: FFmpeg 8.0

#162

Earlier quoted context omitted.

Personally I never understood the problem with tar balls. The only options you ever need are tar -x, tar -c (x for extract and c for create). tar -l if you wanna list, l for list. That's really it, -v for verbose just like every other tool if you wish. Examples: tar -c project | gzip > backup.tar.gz cat backup.tar.gz | gunzip | tar -l cat backup.tar.gz | gunzip | tar -x You never need anything else for the 99% case.

For anyone curious, unless you are running a 'tar' binary from the stone ages, just skip the gunzip and cat invocations. Replace .gz with .xz or other well known file ending for different compression. Examples: tar -cf archive.tar.gz foo bar # Create archive.tar.gz from files foo and bar. tar -tvf archive.tar.gz # List all files in archive.tar.gz verbosely. tar -xf archive.tar.gz # Extract all files from archive.tar.…

> tar -cf archive.tar.gz foo bar

This will create an uncompressed .tar with the wrong name. You need a z option to specify gzip.

Re: FFmpeg 8.0

#163

Earlier quoted context omitted.

Shotcut is an open source Video production toolkit that is basically just a really nice interface for generating ffmpeg commands. https://www.shotcut.org/

Shotcut uses the MLT Multimedia Framework. It is not just a "really nice interface for generating ffmpeg commands" https://www.mltframework.org/

That framework seems to based on ffmpeg: https://www.mltframework.org/faq/

Re: FFmpeg 8.0

#164
Tangentially, 50% of effort goes into assembling long complex CLI commands, and 50% fighting with escaping for the shell. Adding text to a video adds it’s own escaping hell for the text.

Has anyone found a bulletproof recipe for calling ffmpeg with many args (filters) from python? Use r-strings? Heredocs?

Re: FFmpeg 8.0

#165
post #55

Has anyone made a good GUI frontend for accessing the various features of FFMPEG? Sometimes you just want to remux a video without doing any transcoding, or join several video and audio streams together (same codecs).

Joining videos together sounds easy, but there's tons of ways it can go wrong! You've got time bases to consider, start offsets, frame/overscan crops, fps differences (constant vs variable), etc. And even though your videos might both be h264, one might be encoded with B frames and open GOP, and the other not, and that might cause playback issues in certain circumstances. Similarly, both could be AAC audio, but one is 48kHz sample rate, the other 44.1kHz.

Someone else mentioned Lossless-Cut program, which is pretty good. It has a merge feature that has a compatibility checker ability that can detect a few issues. But I find transcoding the separate videos to MPEG-TS before joining them can get around many problems. If you fire up a RAM-Disk, it's a fast task.

  ffmpeg -i video1.mp4 -c copy -start_at_zero -fflags +genpts R:\video1.ts;
  ffmpeg -i video2.mp4 -c copy -start_at_zero -fflags +genpts R:\video2.ts;
  ffmpeg -i "concat:R:\video1.ts|R:\video2.ts" -c copy -movflags +faststart R:\merged.mp4

Re: FFmpeg 8.0

#166
post #156

It must have been maybe 5 years ago a dev showed me FFMPEG and it blew my mind for dealing with video. When I later wound up managing video post production workflows my CMD line or terminal use dropped a few jaws. I've since been relying on LLM's to make FFMPEG commands so I don't even think about it.

I had a bad experience with chatgpt think maybe 3 and stopped trying. My thought was the training examples were sparse given how hard a time I had finding what I needed via search. You’ve encouraged me to revisit (and yes I know models have made big gains since then).

Well. Obviously if you have the attention span it probably makes most sense to actually learn the flags and teach yourself to write FFMPEG commands. That's the serious way to do it if you have a serious workflow.

But I've found it easier to brute force with LLM's because, like, every time I had to do video work it'd be something different. Prompts like 'I need to remove this and this and change the resultion from this to that', 'I need it to be this fps or that, or even I want this file to weigh this much. Or I 'need to split these two' or 'combine those three'. It'll usually get you a chunk of the way there. Another prompt or two of double-checking, copy paste into CMD line or terminal and either brr or error copy paste what does this mean. 3 minutes later it's doing the thing you wanted, and you're more or less understanding what's it giving you.

But I keep an Obsidian file with a bunch commands that made me happy before. Dumping that I to the context window helps.

Another one has been multi camera, multi screen recordings with OBS. I discovered it was easier to do the math, make a big canvas, record all the feeds onto those so I don't have to think about syncing anything later. Then brr an FFMPEG command to output that 1920x1080 and that 3840x2160

Whisper is great with that too - raw recording, output just the audio. 'give me whisper command to get this as srt'. Then 'now render subtitles onto this video'

There was an experiment I tried that kinda almost worked where I had this boring recording of some conversation but needed to extract scattered bits. Used whisper to get transcript, put that into LLM, used that to zero in on the actual bits that were important, then got it to spit out the timecodes. Then hobbled together this janky script that cut out those bits and stitched them together. That was faster than taking the time to do it with a GUI and listening it all through.

Of course there are tools like opus clip that spit that out for you now so...

Although to be honest, when the stakes go high and you're doing something serious that requires quality you do it slow.

The point at which I was doing this most was when I was doing video UX/UI research on a hardware/software product. We would set up multi-cams, set and forget so we could talk to subjects and not think about what's being captured.

Dozens of hours of footage, little clips that would end up as insights on the Product Discovery Jira for the thing. So quality wasn't really important.

Re: FFmpeg 8.0

#167
ffmpeg is one of the backbones of so many tools that people don’t even realize how much it has contributed to the media landscape. It’s my go to tool for any kind of audio/video automation.

Re: FFmpeg 8.0

#168
post #26

Is anyone else on the opinion that ffmpeg now ranks 4th as the most used lib after ssl, zlib, and sqlite... given video is like omnipresent in 2025?

FFMpeg is probably not as up high since video processing only needs to be done on the servers that receive media. I doubt most phones are running FFMpeg on video.

Chrome and Firefox use FFmpeg libraries to decode media, so it's in more places than you might think! (But also, ChatGPT said it's not used in Android browser apps because they would use Android's "native" media stack).

Re: FFmpeg 8.0

#169
post #162

Earlier quoted context omitted.

For anyone curious, unless you are running a 'tar' binary from the stone ages, just skip the gunzip and cat invocations. Replace .gz with .xz or other well known file ending for different compression. Examples: tar -cf archive.tar.gz foo bar # Create archive.tar.gz from files foo and bar. tar -tvf archive.tar.gz # List all files in archive.tar.gz verbosely. tar -xf archive.tar.gz # Extract all files from archive.tar.…

> tar -cf archive.tar.gz foo bar This will create an uncompressed .tar with the wrong name. You need a z option to specify gzip.

Apparently this is now automatically determined by the file name, but I still habitually add the flag. 30 years of muscle memory is hard to break!

Re: FFmpeg 8.0

#170
post #133

Happy to hear that they've introduced video encoders and decoders based on compute shaders. The only video codecs widely supported in hardware are H.264, H.265 and AV1, so cross-platform acceleration for other codecs will be very nice to have, even if it's less efficient than fixed-function hardware. The new ProRes encoder already looks useful for a project I'm working on. > Only codecs specifically designed for para…

These release notes are very interesting! I spent a couple of weeks recently writing a ProRes decoder using WebGPU compute shaders, and it runs plenty fast enough (although I suspect Apple has some special hardware they make use of for their implementation). I can imagine this path also working well for the new Android APV codec, if it ever becomes popular. The ProRes bitstream spec was given to SMPTE [1], but I neve…

Pretty much reverse engineered: https://mk.pars.ee/notes/a9ihgynpvdo6003w
Post reply on HN