[FFmpeg-user] Size of 10-bit 4:2:2 video streams?
Paul B Mahol
onemda at gmail.com
Thu Sep 15 15:15:36 EEST 2022
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.
>
Can not guess without access to the file in question.
> Thanks for any help,
> Olivier
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".
>
More information about the ffmpeg-user
mailing list