Live data from Hacker News

FFmpeg 6.0

ffmpeg.org

51–60 of 210 posts

Re: FFmpeg 6.0

#51
post #16

I absolutely love ffmpeg, but for the life of me I cannot understand how its pipeline system works. Each time I need to use it, I attempt to construct the command myself, but end up giving up and consulting StackOverflow. Amazingly, someone has usually done the exact thing I need to do and posted their command line to StackOverflow, so I'm never out of luck! How do I actually start understanding how ffmpeg works? I w…

Use ChatGPT, prompt: ffmpeg pipeline capture webcam to mp4 ChatGPT: >>> ffmpeg -f v4l2 -framerate 30 -video_size 640x480 -i /dev/video0 -c:v libx264 -preset veryfast -crf 28 -pix_fmt yuv420p output.mp4 Here's a brief explanation of what each part of the command does: - `f v4l2`: specifies that the input device is a V4L2 (Video for Linux 2) device, which is typically what webcams use. - `framerate 30`: sets the framer…

crf: "Constant Rate Factor" for x264 among other encoders. Think it like a output quality (higher = lower quality). I'd say 28 is way too high especially when you're using preset=veryfast (too bad quality). Since it's only 640-480, most of computers can handle fast or even medium in real-time. If not sure, I'd say just use default (by not giving anything).

pix_fmt: pixel format. 99% videos use this format, and it has best compatibility. FFMPEG will try to keep the original format when do transcoding, so in most of time you don't need to specify. However, in this very case, since the input is from a webcam, the chance it uses some weird format is high. And you don't want to keep that in your final result. So it's good to specify it out here.

My 2c: ChatGPT is great, but I recommend to read the comments it gives about each parameter, try to understand their purposes, and adjust accordingly if needed.

Also having a rough idea about how FFMPEG pipeline works (mainly the order of input, output and their associated switches in arguments) helps a lot.

Video process is a very complex thing and lots of time it relies on experience. Just be prepared sometimes your "typically works" command would break.

Re: FFmpeg 6.0

#52
post #36

Earlier quoted context omitted.

Use ChatGPT, prompt: ffmpeg pipeline capture webcam to mp4 ChatGPT: >>> ffmpeg -f v4l2 -framerate 30 -video_size 640x480 -i /dev/video0 -c:v libx264 -preset veryfast -crf 28 -pix_fmt yuv420p output.mp4 Here's a brief explanation of what each part of the command does: - `f v4l2`: specifies that the input device is a V4L2 (Video for Linux 2) device, which is typically what webcams use. - `framerate 30`: sets the framer…

You need `-pix_fmt yuv420p` for an iPhone to recognize a ffmpeg-encoded video file.

and if you're encoding an x265 file, it needs

-tag:v hvc1

for iphone/quicktime to recognize it.

Re: FFmpeg 6.0

#53
post #2

Changelog: * Radiance HDR image support * ddagrab (Desktop Duplication) video capture filter * ffmpeg -shortest_buf_duration option * ffmpeg now requires threading to be built * ffmpeg now runs every muxer in a separate thread * Add new mode to cropdetect filter to detect crop-area based on motion vectors and edges * VAAPI decoding and encoding for 10/12bit 422, 10/12bit 444 HEVC and VP9 * WBMP (Wireless Application…

This mostly looks like they're adding support for new codecs, there's only 4 new options in there, which seems rather paltry for a dot zero version release. Should we consider ffmpeg feature complete?

Dot zero releases basically signify major bumps of the core libs, and are not really synced with user-facing feature changes.

Re: FFmpeg 6.0

#54
post #6

Fun fact of the day: ffmpeg is written by Fabrice Bellard, who among other impressive things, wrote the JS PC emulator capable of running windows 2000 in a browser over 10 years ago that got me fascinated with emulators in general. https://bellard.org/jslinux/tech.html

ffmpeg is largely written by Michael Niedermayer if it's anyone.

Re: FFmpeg 6.0

#55
post #6

Fun fact of the day: ffmpeg is written by Fabrice Bellard, who among other impressive things, wrote the JS PC emulator capable of running windows 2000 in a browser over 10 years ago that got me fascinated with emulators in general. https://bellard.org/jslinux/tech.html

He also wrote QEMU, which is probably far more impressive.

Also LZEXE back in time...

Re: FFmpeg 6.0

#56
post #40

Earlier quoted context omitted.

They do, they say so here: https://support.google.com/youtube/answer/1722171#zippy=%2Cc... > YouTube does not recommend the RGB color matrix on uploads. In this case, YouTube initially sets the color matrix to unspecified before the standardization. It will then infer the color matrix using the color primaries during standardization. Note that sRGB TRC will convert to BT.709 TRC. YouTube re-tags the color primaries/m…

> Since FFmpeg is gpl2.1 I thought they had to make it easier to know they're using this Precisely, I doubt youtube just brazenly ignored this, but their legal might have buried it under some obscure link. I wonder if there's a license that require it to be "highly visible" in some sort of way.

Isn't it that they're not actually distributing FFmpeg, just using it themself, so they don't need to do anything?

Re: FFmpeg 6.0

#57
ffmpeg has got to be my favorite media tool ever. :)

It has replaced all kinds of various programs I used to use, such as netpbm and imagemagick. It's just better.

Re: FFmpeg 6.0

#58
post #22

If you want to know a bit more about what is important in this major release, you can watch my presentation about FFmpeg 6.0 at Fosdem: https://fosdem.org/2023/schedule/event/om_vlc/ (Video + Slides) It’s a bit less dry than the changelog, notably for the evolutions of the APIs. What’s also important is the changes about the release schedule that we’ve been pushing with the community. Major version every year at the…

Gracias!

Re: FFmpeg 6.0

#59
post #46

Earlier quoted context omitted.

It’s bad at counting because counting relies on a stateful O(N) algorithm you run in your brain. GPT is trained to reproduce human text, which tends to simply have the output of this O(N) counting process, but not the process itself. So GPT “thinks” it should be able to just spit out the number just like human text implies we do. It doesn’t know we are relying on an offline O(N) algorithm. If you have it emit a numbe…

That’s very interesting. I assumed it was something about the fact that it is a language model rather than a calculating machine. So printing 44 asterisks instead of 40 is kind of close. I wonder if would it be possible to teach the machine to recognise situations it’s better at and be less confident other answers? Or does it need to be confident about everything in order to produce good answers where it does. It’s k…

> here is definitely the correct answer this time and then it gives you another wrong answer.

My favorite is when it gets into some weird context loop, apologizes and claims to have corrected an issue, but gives you literally, character-for-character, the same answer it gave before.

Fortunately, it mostly happens to me when I am asking particularly ambiguous or weird questions -- e.g., asking for any assembly in AT&T/GAS syntax seems to always go wrong, not necessarily in terms of the logic itself, but rather that it ends up mixing Intel and AT&T, or asking explicitly for POSIX-compliant shell often gives weird Bash/GNUisms, presumably since so many StackOverflow posts seem to conflate all shells with Bash and always expect GNU coreutils.

Re: FFmpeg 6.0

#60
post #6

Fun fact of the day: ffmpeg is written by Fabrice Bellard, who among other impressive things, wrote the JS PC emulator capable of running windows 2000 in a browser over 10 years ago that got me fascinated with emulators in general. https://bellard.org/jslinux/tech.html

Fabrice is superhuman for sure, but in 20 years the urban legend will go like ...

Fabrice Bellard once read all of TAOCP in 20 minutes before being absorbed into his own AI and is now ascended in the ethereal ethernet silently fixing bugs in your code. Blessed be the bits.

Post reply on HN