[FFmpeg-user] Number of frames decreased
Gavino L. Maddau
d.maddau at tiscali.it
Thu May 19 17:05:09 CEST 2011
When i try to encode a yv12 file into a compressed one (i'm using mpeg1video, mpeg2video and x264), the number of frames of the encoded file is smaller than that of the original one.
In fact, the number of frames of the yv12 file is 29, the other one is 27, whichever coder i use.
Usually i write, in the mpeg1 case:
ffmpeg -s qcif -pix_fmt yuv420p -i in.yuv -vcodec mpeg1video -f mpeg out.mpg
I also tried to set the input and output framerate, the number of frames to code (-vframes 29), the output bit rate (-b), the buffer size and the maximum bit rate, but nothing changed.
I have to calculate the psnr between the original video and the encoded one, but if the number of frames is different, i can't know which frame in the original file originate a coded one, because there's not a one-to-one correspondence.
How can i solve this problem?
Sorry for my bad english.
More information about the ffmpeg-user