[MPlayer-users] Bug report - mencoder incorrectly handles some FLV files

Liran Zvibel liranz at audish.com
Tue Sep 4 17:22:17 CEST 2012


On 3 Sep 2012, at 18:58, Carl Eugen Hoyos wrote:
>> I'm currently using ffmpeg to decode the frames from flv 
>> files and reencode them later on. I've tried switching to 
>> mencoder, as it processes the files much faster.
> 
> This makes absolutely no sense (MEncoder is using FFmpeg 
> to decode files and it is mostly using the same encoders 
> as FFmpeg).

> Please elaborate, Carl Eugen

FLV files are encoded using variable frame-rate. FFMPEG usually recognizes it as frame-rate of 1000, 
so when just using ffmpeg to decode the frames it runs for ages and you get huge files with over-resampling of the data.

What I'm doing with ffmpeg then is :
	ffmpeg -i <FLV_FILE> -an -r 25 -f rawvideo -vcodec rawvideo -pix_fmt yuv420p -
The comparable mencoder command line is:
	mencoder <FLV_FILE> -nosound -ovc raw -of rawvideo -really-quiet  -mc 0 -noskip -o -

The ffmpeg command forces resampling of frames, and the mencoder command simply decodes the FLV Sorenson Park codec.
The mencoder command runs significantly faster than the ffmpeg command. I pick '-r 25' for the ffmpeg line as many videos approach that quality (though some have average of 15 or even 6 frames per second)

I get the number of frames in the mencoder by dividing the size of the output by the size of a single frame, and thus deduct average frame rate to use later (since I know the duration).
My method with mencoder produces adequate results and for large number of files finishes significantly faster.

Hopefully now you better understand my situation.

Thanks,
Liran Zvibel.




More information about the MPlayer-users mailing list