[FFmpeg-user] a -vf for broadcast safe
dave at dericed.com
Wed Dec 30 20:04:29 CET 2015
> On Dec 30, 2015, at 1:40 PM, Carl Eugen Hoyos <cehoyos at ag.or.at> wrote:
> Dave Rice <dave <at> dericed.com> writes:
>> Responding late, as I find myself in need of this
>> filter as well.
> Instead, please explain your real-world reason why
> you need the filter:
> Do you have input that does not conform to broadcast?
I have video material in yuv422p pixel format that includes sample values that are outside of broadcast range. I have to deliver a version of the video where no sample values are outside of broadcast range and would like to not affect the contrast of decoded image in the process.
> What does other "professional" software do with that
FFmpeg is the most “professional” software that I am familiar with. ;)
> Or does FFmpeg take input that conforms and produces
> output that does not conform? In this case you have
> (likely) found a bug that we should try to fix…
I’m not sure this is a bug. The input file appears to be in broadcast range (yuv422p or yuv444p) but contains values that are not in broadcast range. When processed with FFmpeg those values are maintained, this is the behavior I expect; however in this case I want to adjust the process to lower or raise samples that are out-of-broadcast-range so that all samples of the output are within broadcast range.
>> A sample that needs the filter can be generated via:
>> ffmpeg -f lavfi -i color=gray:s=256x256
>> -vf format=yuv444p,geq=lum=X,scale=out_range=tv
> You created a formula that does not produce
> tv range as output (as indicated by the pix_fmt)
> but jpeg range. The scaler cannot know this, you
> have to tell it:
> -vf format=yuv444p,geq=lum=X,scale=in_range=jpeg:out_range=tv
This isn’t exactly what I want, since this would also change the values that are within broadcast range and change the contrast of the image.
>> ffmpeg version 2.8.4 Copyright (c) 2000-2015 the FFmpeg developers
> For future questions, please understand that only
> current FFmpeg git head is supported on this
> mailing list.
>> built with Apple LLVM version 7.0.2 (clang-700.1.81)
>> configuration: --prefix=/usr/local/Cellar/ffmpeg/2.8.4
>> --enable-pthreads --enable-ffplay --enable-vda
> These have no effect, please remove them.
>> --enable-gpl --enable-version3 --enable-hardcoded-tables
>> --enable-avresample --cc=clang
> These should not be needed.
>> --host-cflags= --host-ldflags=
> These just make reading the configure line more difficult.
>> --enable-opencl --enable-libx264 --enable-libmp3lame
> This was never useful together with libfaac and is now
> obsolete. (No runtime warning possible!)
> This was never needed.
That installation was based on the installer from homebrew, https://github.com/Homebrew/homebrew/blob/master/Library/Formula/ffmpeg.rb. I’ve since recompiled from git master in order to test Paul’s suggestion with zscale.
More information about the ffmpeg-user