[FFmpeg-user] Size of 10-bit 4:2:2 video streams?

Bruchez Olivier olivier.bruchez at epfl.ch
Tue Sep 20 16:11:17 EEST 2022


Hi all,

So I made some further tests and discovered that my original AVI file is simply corrupted. It's supposed to have 88 minutes of video, but it fails after 38 minutes. That's why all the files I generated were smaller than expected.

I didn't notice this for the simple reason that ffmpeg "fails" (?) silently after 38 minutes. It doesn't output any error message. It just stops after 
38 minutes. Example for an AVI-to-AVI copy:

...
frame=57978 fps=154 q=-1.0 size=62615951kB time=00:38:39.12 bitrate=221183.0kbits/s speed=6.14x    
frame=58011 fps=153 q=-1.0 size=62651535kB time=00:38:40.44 bitrate=221182.8kbits/s speed=6.14x    
frame=58047 fps=153 q=-1.0 size=62690447kB time=00:38:41.88 bitrate=221182.9kbits/s speed=6.13x    
frame=58083 fps=153 q=-1.0 size=62729359kB time=00:38:43.32 bitrate=221183.0kbits/s speed=6.13x    
frame=58119 fps=153 q=-1.0 size=62768271kB time=00:38:44.76 bitrate=221183.1kbits/s speed=6.12x    
frame=58133 fps=153 q=-1.0 size=62783375kB time=00:38:45.32 bitrate=221183.1kbits/s speed=6.12x    
frame=58172 fps=153 q=-1.0 size=62825359kB time=00:38:46.88 bitrate=221182.6kbits/s speed=6.11x    
frame=58211 fps=153 q=-1.0 size=62867599kB time=00:38:48.44 bitrate=221183.0kbits/s speed= 6.1x    
frame=58254 fps=152 q=-1.0 Lsize=62915254kB time=00:38:50.12 bitrate=221191.1kbits/s speed=6.08x    
video:62914320kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.001485%

I guess I will have to check the file on our LTO tapes...

Does anybody have any suggestion about how I could retrieve the video stream after 38 minutes? Knowing that it's supposed to be "uncompressed" video (i.e. v210 / yuv422p10l)?

Thanks in advance,
Olivier

    On 9/15/22, Bruchez Olivier via ffmpeg-user <ffmpeg-user at ffmpeg.org> wrote:
    > Hi all,
    >
    > I have a 10-bit 4:2:2 (yuv422p10le) AVI file containing only a video
    > stream:
    >
    > Input #0, avi, from 'test.avi':
    >   Duration: 01:28:00.80, start: 0.000000, bitrate: 221185 kb/s
    >   Stream #0:0: Video: v210 (v210 / 0x30313276), yuv422p10le, 720x576, 25
    > fps, 25 tbr, 25 tbn, 25 tbc
    >
    > The file has a size of 146 GB = 146004770816 bytes.
    >
    > Am I correct to infer that those 10-bit YUV values are grouped into 30-bit
    > packets and encoded into 32-bit/4-byte packets?
    >
    > With 20 bits per pixel (Y + either U or V), that would give a theoretical
    > file size of:
    >
    > 88 * 60 * 25 * 720 * 576 * (10 + 10) / 30 * 32 / 8 = 145981440000 bytes
    >
    > Which seems to more or less match the original file size.
    >
    > Now here's my problem. When I extract the raw video stream:
    >
    > ffmpeg -i test.avi -c:v rawvideo -pix_fmt yuv422p10le -f rawvideo test.raw
    >
    > I get a RAW video file with a size of 96 GB = 96636395520 bytes. I’ve lost
    > one third of the video stream.
    >
    > Another strange thing: if I copy the video stream to another AVI file:
    >
    > ffmpeg -i test.avi -c copy test.copy.avi
    >
    > The resulting file has a size of 64 GB = 64425220302 bytes. This time I’ve
    > lost 56% of the video stream.
    >
    > What's happening here? It seems like I’m missing something obvious.
    >
    > Thanks for any help,
    > Olivier




More information about the ffmpeg-user mailing list