Live data from Hacker News

FFMPEG from Zero to Hero

ffmpegfromzerotohero.com

101–110 of 140 posts

Re: FFMPEG from Zero to Hero

#101
post #95

Earlier quoted context omitted.

You don't want to necessarily use it by default.

You you do want to explain why and not just tell people not to.

As below, the quality of the hardware encoder can be different from something you can get otherwise. So I don't see a problem not making it a default for ffmpeg.

Re: FFMPEG from Zero to Hero

#102

Something weird (IMO) about ffmpeg is that it doesn't do hardware-accelerated encoding or decoding by default unless you compile it with support and pass it some extra command line flags. If you are using ffmpeg with hardware-accelerated codecs like H.264, remember to take the free 10x speed boost!

Accelerated encode in particular is very likely to give inferior quality and a more limited range of encoding options, and also introduce a situation where those factors change from machine to machine (say, based on which codecs and options your particular GPU supports). Of course, if speed and resource consumption are the key factors then it can definitely make sense to use them, but probably not as a default.

Re: FFMPEG from Zero to Hero

#103

Something weird (IMO) about ffmpeg is that it doesn't do hardware-accelerated encoding or decoding by default unless you compile it with support and pass it some extra command line flags. If you are using ffmpeg with hardware-accelerated codecs like H.264, remember to take the free 10x speed boost!

The boost is not free though. You lose some quality, gain some vendor-specific artifacts, lose the ability to adapt to content, and the ability to trade time for compression ratio or quality.

Re: FFMPEG from Zero to Hero

#104

This book looks great. I'm looking for some easy and beautiful way to generate audio visualization; the books' TOC doesn't seem show much. Can someone please tell me a bit more what I may get from that chapter? Thanks

Perhaps https://processing.org/ might be interesting to you.

Re: FFMPEG from Zero to Hero

#105
A well-meaning advice: it's great when TOC and a sample chapter is there (it's almost mandatory for me to consider a self-published book from an author I don't already know).

But that chapter shouldn't simply be the first n pages covering "what is ffmpeg", "where do I download ffmpeg" and "how do I install ffmpeg".

Show us a practical example what cool things I can do with ffmpeg. Your TOC is enticing, pick one of those things (OPUS or audio from waveform or whatever) and show that! Including the command line and your explanation up to it.

So far I have no idea whether you explain anything, or whether you're just listing "100 cool one-liners".

(The latter may also be fine, but I don't know what I'm buying here)

Re: FFMPEG from Zero to Hero

#106
post #78

Earlier quoted context omitted.

I feel like it's better to embed the tool in a language, or many community supported languages than embed a programming language in the tool.

Per the docs on zfs program: The entire script is executed atomically, with no other administrative operations taking effect concurrently. Which would be somewhat hard to ensure with an external language.

This just sounds like when the script is run, a lock is taken. It seems like a pretty fast and loose definition of "atomic" (as in, not the ACID sense), as it says below:

     If a fatal error is returned, the channel program may have not executed at all, may have partially executed, or may have fully executed but failed to pass a return value back to userland. 
If an external tool is allowed to acquire this kind of exclusive lock, I don't see the difference.

Re: FFMPEG from Zero to Hero

#107

This book looks great. I'm looking for some easy and beautiful way to generate audio visualization; the books' TOC doesn't seem show much. Can someone please tell me a bit more what I may get from that chapter? Thanks

Perhaps https://processing.org/ might be interesting to you.

Thanks for your information. I have found that [1] may be relevant to my requirements. A bit more work, let's see how far I go with that.

[1] https://processing.org/tutorials/sound/

Re: FFMPEG from Zero to Hero

#108

Earlier quoted context omitted.

x264 encoded streams have the original encoding parameters included by default.

Encoding settings metatag can be striped. Regardless, I don't think these software are "matching" anything. TMPGEnc for example has settings to choose what quality you want for these re-encoded frames.

The parameters being matched would be those that maintain decoder config. Usually, bitrate/quantizer values don't come into that.

Re: FFMPEG from Zero to Hero

#109
post #106
post #78

Earlier quoted context omitted.

Per the docs on zfs program: The entire script is executed atomically, with no other administrative operations taking effect concurrently. Which would be somewhat hard to ensure with an external language.

This just sounds like when the script is run, a lock is taken. It seems like a pretty fast and loose definition of "atomic" (as in, not the ACID sense), as it says below: If a fatal error is returned, the channel program may have not executed at all, may have partially executed, or may have fully executed but failed to pass a return value back to userland. If an external tool is allowed to acquire this kind of exclus…

> If an external tool is allowed to acquire this kind of exclusive lock, I don't see the difference.

That's the whole point, as I understand it. The channel programs are executed in the kernel, in a way that cannot be done by external programs. Some more details here[1].

edit: I also think you should have included the note, which says

Note: ZFS API functions do not generate Fatal Errors when correctly invoked, they return an error code and the channel program continues executing.

So while it's not quite ACID-level, its not as bad as it sounds without that note.

[1]: https://openzfs.org/wiki/Projects/ZFS_Channel_Programs

Re: FFMPEG from Zero to Hero

#110
post #45

Earlier quoted context omitted.

I have a $HOME/bin folder full of bash scripts invoking imagemagick or ffmpeg one liners.

care to share? :D

This one for instance to grab my desktop quickly without starting another program when I want to make a quick demo for a colleague:

  #!/bin/bash

  size=${1:-"1920x1080"}
  offset=${2:-"0,0"}
  name=${3:-"video"}

  ffmpeg -video_size $size -framerate 25 -f x11grab -i :0.0+$offset -c:v libx264 -crf 0 -preset ultrafast "$name.mkv"
  ffmpeg -i "$name.mkv" -movflags faststart -pix_fmt yuv420p "$name.mp4"
Post reply on HN