Hello Dave,

I tried it on ubuntu. It works.

But, can you explain me:

Why it is the last 2 bits of the first byte? Shouldnt it be the first 2 bits of the last byte? In my understanding, 8 bit are 8 digits -> first byte should be always full. (?)
But maybe this only is for RGB correct and not for YUV?

br
Christoph

Am 16.01.2015 um 16:40 schrieb Dave Rice:
Hi Christoph,

On Jan 16, 2015, at 10:03 AM, Moritz Barsnick <barsn...@gmx.net> wrote:
On Fri, Jan 16, 2015 at 14:10:38 +0100, Christoph Gerstbauer wrote:
I am searching for a possibility to check if a 10bit 4:2:2 videofile
(v210 codec or ffvhuff codec) has
a) 8bit+2empty bits or
b) full 10bit data
in the video stream.
You'll probably need to export it to raw YUV or RGB (depending on the
input color space) and inspect the least significant bits. This might
be easier with a small libav* program than ffmpeg. My first shot would
be trying to understand the raw output formats, and to parse them with
a pipe to a perl one-liner using unpack(). ;-)
I pipe the data to xxd for this, such as:
ffmpeg -i v210.mov -c:v rawvideo -f rawvideo - | xxd -c 2 -b

Since the rawvideo of v210 is 16 bits, I use -c 2 to show the output in 2 bytes 
per row (-c 2). You’ll get an output that looks like this:

008322e: 11011101 00000001
0083230: 01001000 00000010

In the case I’ll see the last two (right most) bits of the first byte toggling 
indicated that it is actually using 10 bits of detail. If the v210 was 8 plus 
two zeros then the last two bits of the first byte would always be zero. 
Unfortunately there is a lot of video hardware that works as 8 bits so often 
those who are intending to digitize analog video to 10 bit are actually 
creating 10 bit files with the least significant bits simply being padding. 
Some digital videotapes also decode to 8 bit but are received over 10 bit SDI 
so this same process can be used to verify if the SDI contains actual 10 bit 
video or some amount of padding.
Best Regards,
Dave Rice

_______________________________________________
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

_______________________________________________
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

Reply via email to