[x264-devel] x264 reports n frames but outputs only n-1

Phil Rutschman phil.rutschman at modsystems.com
Tue Mar 24 19:26:23 CET 2009


I noticed that the x264 command line utility, when presented with an input file of length N, claims to have encoded N frames but actually emits only N-1.

I did a git pull, git reset --hard, make clean, configure, etc

$ ./x264 --version
x264 0.67.1129 c109c8e
built on Mar 24 2009, gcc: 4.1.2 20071124 (Red Hat 4.1.2-42)

$ y4mblack -n 2 | x264 - --y4m-input -q 10 -o foo.264
yuv4mpeg: 640x480 at 30000/1001fps, 1:1
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 Cache64
x264 [info]: profile Main, level 3.0
x264 [info]: slice I:1     Avg QP: 7.00  size:    96  PSNR Mean Y:100.00 U:100.00 V:100.00 Avg:100.00 Global:100.00
x264 [info]: slice P:1     Avg QP:10.00  size:    21  PSNR Mean Y:100.00 U:100.00 V:100.00 Avg:100.00 Global:100.00
x264 [info]: mb I  I16..4: 100.0%  0.0%  0.0%
x264 [info]: mb P  I16..4:  0.0%  0.0%  0.0%  P16..4:  0.0%  0.0%  0.0%  0.0%  0.0%    skip:100.0%
x264 [info]: SSIM Mean Y:1.0000000
x264 [info]: PSNR Mean Y:100.000 U:100.000 V:100.000 Avg:100.000 Global:100.000 kb/s:14.03

encoded 2 frames, 104.49 fps, 71.69 kb/s
$

I used h264_parse from the mpeg4ip package to examine the structure of the output file.
 
$ h264_parse foo.264 | grep -c "Coded slice"
1

Changing the number of frames emitted by y4mblack by changing the -n parameter shows consistently that x264 reports the correct number of frames encoded but emits one fewer.

If --pass 1 is supplied, the stats file has an entry for each of the input frames.

foo.264 is extraordinarily small (598 bytes), so I've attached it along with the output of h264_parse.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: foo.parse.txt
URL: <http://mailman.videolan.org/pipermail/x264-devel/attachments/20090324/2b009b17/attachment.txt>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: foo.264
Type: application/octet-stream
Size: 598 bytes
Desc: foo.264
URL: <http://mailman.videolan.org/pipermail/x264-devel/attachments/20090324/2b009b17/attachment.obj>


More information about the x264-devel mailing list