[FFmpeg-user] How to output video with only specific Y/U/V bit planes

Dave Rice dave at dericed.com
Wed Jul 1 00:58:18 CEST 2015


Hi,

> On Jun 30, 2015, at 6:14 PM, Kieran O'Leary <kieran.oleary at irishfilm.ie> wrote:
> 
> Hello,
> 
> I have been playing around with the bit plane filter in QCTools. More info here: http://htmlpreview.github.io/?https://github.com/bavc/qctools/blob/master/Source/Resource/Help/Playback%20Filters/Playback%20Filters.html
> 
> From what I understand, QCtools is using ffmpeg to generate all these filters.

This is true.

> Is it possible to harness this bit plane filter via ffmpeg.exe and export a video with it? For example, enable bit 1 of Y, bit 4 of U, bit 5 of V? Is there another way of doing this?

Here is the code containing the filterchain you mention:

https://github.com/bavc/qctools/blob/master/Source/GUI/BigDisplay.cpp#L283

"lutyuv=y=if(eq(${1}\\,-1)\\,128\\,if(eq(${1}\\,0)\\,val\\,bitand(val\\,pow(2\\,8-${1}))*pow(2\\,${1}))):u=if(eq(${2}\\,-1)\\,128\\,if(eq(${2}\\,0)\\,val\\,bitand(val\\,pow(2\\,8-${2}))*pow(2\\,${2}))):v=if(eq(${3}\\,-1)\\,128\\,if(eq(${3}\\,0)\\,val\\,bitand(val\\,pow(2\\,8-${3}))*pow(2\\,${3}))),format=yuv444p|rgb24",

You can use this if you replace $1 with the bit you want to Y, $2 for U and $3 for V. Note: playing back only bit 1 of Y, bit 4 of U and bit 5 of V is an unusual thing to do.

> I've tried to find information on this but I've been coming up short.

It’s all in here: https://github.com/bavc/qctools/blob/master/Source/GUI/BigDisplay.cpp though I should probably comment this better.

Best Regards,
Dave Rice



More information about the ffmpeg-user mailing list