Live data from Hacker News

FFmpeg 4.3

ffmpeg.org

161–170 of 226 posts

Re: FFmpeg 4.3

#161

ffmpeg is amazing, but it’s like tar on steroids: I can never remember the right incantation. Google is required for even the simplest of things. I don’t know if it’s their goal, but I’d love a more user friendly set of command line arguments.

`ffmpeg` reminds me of `convert` from ImageMagick, it's complex because there's a lot of media formats and the command lets you do a lot things to the media as well. I liked using WinFF a time ago for simple conversion jobs though where I didn't care too much about tweaking all the knobs.

ImageMagick's convert is much friendlier than ffmpeg:

  convert image.png image.jpg 
Does what it's suppose to and it's as simple as possible. Sure, you can get really fancy with resizing proportions but easy stuff should be easy.

Re: FFmpeg 4.3

#162

ffmpeg is amazing, but it’s like tar on steroids: I can never remember the right incantation. Google is required for even the simplest of things. I don’t know if it’s their goal, but I’d love a more user friendly set of command line arguments.

This is where GUI's shine, as opposed to command-line. Perhaps this is slightly off-topic, but my dream is an interface that combines the best of both worlds. Kind of an automated GUI-builder for command-line tools, that analyzes the combinations of options used most, breaks them down into workflows with options (that can be manually named), and you can thus execute one-off commands easily and quickly without having…

That's interesting, but I'm aiming for something much simpler. Sensible defaults (faststart, for instance) and easy arguments:

  ffmpeg mymovie.mov -w 720 mymovie.mp4
Should do what you expect

Re: FFmpeg 4.3

#163

Earlier quoted context omitted.

If you're converting .aax files you should consider using .m4b as the output, since it preserves chapters and remembers your last listened timestamp [0]: > Audiobook and podcast files, which also contain metadata including chapter markers, images, and hyperlinks, can use the extension .m4a, but more commonly use the .m4b extension. An .m4a audio file cannot "bookmark" (remember the last listening spot), whereas .m4b…

So it writes the timestamp to the file metadata? That would cause issues with syncing, backups, running from a read-only filesystem, etc. My audiobook app already keeps track of current timestamp for me.

it sounds like .m4b is just a flag that tells the player "treat this as a book, not a music file"

Re: FFmpeg 4.3

#164
post #47

I wanted to create a slideshow a couple weeks ago and came across this article [0] on creating a Ken Burns Effect Slideshow. Very cool and is a great demo of some of ffmpeg's functionality. However, the final command is a little crazy: ffmpeg -i 1.jpg -i 2.jpg -i 3.jpg -filter_complex "color=c=black:r=60:size=1280x800:d=10[black];[0:v]format=pix_fmts=yuva420p,crop=w=2*floor(iw/2):h=2*floor(ih/2),zoompan=z='if(eq(on,1…

Just so you know, FFMPEG has a long-standing bug (reported 8 years ago) [1] that affects precisely the type of work you're doing, converting static images to video.

The gist of it is that if your static image is in bgr24 (most of BMP images) format, when converting to typical video pixel format (like yuv420p), the color will be distorted.

This can be worked around by converting to rgb24 first (which is exactly why this bug is bizarre, since the two should be practically identical.)

(There is also the BT601/BT709 conversion thing, but that's not a bug, just something need to be taken care of.)

[1] https://trac.ffmpeg.org/ticket/979

Edit: small correction: I said PNG before, but it's actually BMPs that are usually in bgr24.

Re: FFmpeg 4.3

#165
post #60

Earlier quoted context omitted.

https://ytdl-org.github.io/youtube-dl/index.html is the gold standard.

And back on topic youtube-dl uses system ffmpeg for converting youtube's .webm and other weird discrete formats into proper video (or audio) files.

Just a reminder, depending on your installation method of youtube-dl , you may have to manually install ffmpeg globally on your system in order to download/mux highest quality videos.

Re: FFmpeg 4.3

#166
post #85
post #37

As a little side project, I've been trying to automate creation of those "1 second everyday" style videos [1], and used FFmpeg to achieve this. For things like trimming and concatenating videos, one thing that surprised me was that it was slower than using a tool like ScreenFlow. Note, we're talking about hundreds of gigabytes worth of 4K videos. slower = When I say slower, I mean, if I manually performed the same op…

> The slow way is free of quirks, whereas the fast way introduces something unexpected to the video, like a half a second of a black screen with audio continue playing like normal. The reason here is the the "fast way" and the "slow way" work very differently behind the scenes. The "fast way" looks only needs to look at the container, the bits of metadata that tell a player which bits of data need to be given to the…

Agree overall, but a couple nits:

> The "slow way" actually decodes the frames, that is, it takes the blobs of compressed data and turns them into actual pixels, which especially in the case of 4K video, is very slow.

The "slow way" decodes and re-encodes the frames. Decoding is a little slow. Encoding is very very slow if done at high quality. (And even high quality is still lossy.)

> The reason the "fast way" might be less accurate is that the frame you're asking for might not be possible to obtain without decoding the video.

This is often possible to solve with an .mp4 "edit list". You include more data than is expected to be displayed along with instructions for the player to skip part of it. One obvious caveat is that the person you send the video from can remove the edit list, so the hidden frames shouldn't be anything you want to redact for privacy.

Re: FFmpeg 4.3

#167
post #143

Earlier quoted context omitted.

This is where GUI's shine, as opposed to command-line. Perhaps this is slightly off-topic, but my dream is an interface that combines the best of both worlds. Kind of an automated GUI-builder for command-line tools, that analyzes the combinations of options used most, breaks them down into workflows with options (that can be manually named), and you can thus execute one-off commands easily and quickly without having…

I had a similar idea (if not the same), while learning about ffmpeg a year or two ago, and quickly put together a small prototype of it. At least, for the GUI command builder part of it. Here's the demo: https://jonbo.github.io/project/simply/ There's also a small ffmpeg example. (If you click the fetch button, on the demo.) The schema "recipes" for it are just a basic JSON format and can be seen here https://gist.gi…

That looks awesome, what a great idea. Then just have to turn man pages/help info into JSON..

Re: FFmpeg 4.3

#168

Earlier quoted context omitted.

SoX is amazing. http://sox.sourceforge.net/ It’s not perfect but it’s way easier to use for audio stuff than FFmpeg is. I have a bunch of scripts I reuse that do basic stuff like high-pass, normalize, automatically trim audio files, add fade-in or fade-out, downmix to mono, and then resample / dither to the right depth and size. It also will spit out spectrograms. Generally when I need to record a ton of sound clips,…

I hadn't even thought about SOX 'till your comment in about 10 years. And looking at the page, there hasn't been a new release since 2015. From what I recall, it only worked on wav files back in the day, but now it supports OGG. But a lot has changed in even 5 years - does it even support MP3, as patents expired since then?

according to https://github.com/chirlu/sox/commit/af261dcc91071cafd7d8305..., sox added support for Ogg Vorbis files in 2001, which is a little more than 5 years ago. since sox didn't exist until 1999 and vorbis didn't exist until 2000, that seems like pretty solid format support to me.

Re: FFmpeg 4.3

#169
post #47

I wanted to create a slideshow a couple weeks ago and came across this article [0] on creating a Ken Burns Effect Slideshow. Very cool and is a great demo of some of ffmpeg's functionality. However, the final command is a little crazy: ffmpeg -i 1.jpg -i 2.jpg -i 3.jpg -filter_complex "color=c=black:r=60:size=1280x800:d=10[black];[0:v]format=pix_fmts=yuva420p,crop=w=2*floor(iw/2):h=2*floor(ih/2),zoompan=z='if(eq(on,1…

> However, the final command is a little crazy

Someone could make a million dollars by making a blog that just writes about ffmpeg incantations for use-cases like this.

Re: FFmpeg 4.3

#170
post #64

Huge thank you to FFmpeg for making my Video Hub App possible: extracting screenshots from all videos in your video collection to create an easy to browse/search library. https://github.com/whyboris/Video-Hub-App https://videohubapp.com/

That's a great idea, looks awesome.

If I understand the pricing, it's free for up to 50 files in each folder/hub; for more it's $3.50, which you donate 100% to an anti-malaria charity!

Post reply on HN