Log in

View Full Version : Problem with Mencoder


maxfu
4th September 2006, 12:22
I used commend line as below:
mencoder.exe "D:\Video\Movie\End Game\[游戏终结].End.Game.2006.XviD.AC3.iNT.Rerip.CD1-MoMo.avi" -of mpeg -mpegopts format=dvd:telecine -vf-add scale=720:480,harddup -ofps 24000/1001 -ovc lavc -lavcopts vcodec=mpeg2video:vbitrate=2000:trell:mbd=2:keyint=15:aspect=16/9:vrc_buf_size=1835:vrc_maxrate=9800:vpass=1 -nosound -endpos 10 -o NUL: 2> 2.txt
mencoder.exe "D:\Video\Movie\End Game\[游戏终结].End.Game.2006.XviD.AC3.iNT.Rerip.CD1-MoMo.avi" -of mpeg -mpegopts format=dvd:telecine -vf-add scale=720:480,harddup -ofps 24000/1001 -ovc lavc -lavcopts vcodec=mpeg2video:vbitrate=2000:trell:mbd=2:keyint=15:aspect=16/9:vrc_buf_size=1835:vrc_maxrate=9800:vpass=2 -nosound -endpos 10 -o "D:\[游戏终结].End.Game.2006.XviD.AC3.iNT.Rerip.CD1-MoMo.mpeg2.mpg" 2>> 2.txt

Got problem at Second Pass.
The message is down below:

Limiting audio preload to 0.4s.
Increasing audio density to 4.
SwScaler: reducing / aligning filtersize 5 -> 4
SwScaler: reducing / aligning filtersize 5 -> 4
SwScaler: reducing / aligning filtersize 5 -> 4
SwScaler: reducing / aligning filtersize 5 -> 4

SwScaler: BICUBIC scaler, from 0x32315659 (21VY) to 0x32315659 (21VY) using MMX2
SwScaler: using 4-tap MMX scaler for horizontal luminance scaling
SwScaler: using 4-tap MMX scaler for horizontal chrominance scaling
SwScaler: using n-tap MMX scaler for vertical scaling (YV12 like)
SwScaler: 640x352 -> 720x480

1 duplicate frame(s)!

Limiting audio preload to 0.4s.
Increasing audio density to 4.
SwScaler: reducing / aligning filtersize 5 -> 4
SwScaler: reducing / aligning filtersize 5 -> 4
SwScaler: reducing / aligning filtersize 5 -> 4
SwScaler: reducing / aligning filtersize 5 -> 4

SwScaler: BICUBIC scaler, from 0x32315659 (21VY) to 0x32315659 (21VY) using MMX2
SwScaler: using 4-tap MMX scaler for horizontal luminance scaling
SwScaler: using 4-tap MMX scaler for horizontal chrominance scaling
SwScaler: using n-tap MMX scaler for vertical scaling (YV12 like)
SwScaler: 640x352 -> 720x480
[mpeg2video @ 00BF0F10]Error: 2pass curve failed to converge
Could not open codec.
FATAL: Cannot initialize video driver.

hellfred
4th September 2006, 16:54
Hi maxfu
On the ffmpeg mailing list (http://thread.gmane.org/gmane.comp.video.ffmpeg.devel/36082/focus=36082) there is a discussion going on concerning this message. As far as I understood, the problem arises when you command libavcodec to encode to a higher bitrate than libavcodec needs for preserving best quality. Normally this should end in a warning (bitrate set too high, will undersize), but lately this scenario triggers a fatal error.
So I suggest you to observe the svn logs of ffmpeg, wait for the fix to be commited and then get a brand new binary that uses the fix.

Hellfred

EDIT: Deleted some superfluous words

maxfu
5th September 2006, 03:47
I'v got an older binary. It works. But the quality of the output file is not good enough. I set the vbitrate to 5000 ,but the length of the output file of an 90 minites cartoon film is only 1.8G.

hellfred
5th September 2006, 08:12
I'v got an older binary. It works. But the quality of the output file is not good enough. I set the vbitrate to 5000 ,but the length of the output file of an 90 minites cartoon film is only 1.8G.
To get a idea, what quality is possible with your filtering and lavc encoding options, do a one pass encode of parts or your cartoon with constant quanticer: vqsclae=2 Than you can try to optimize the other parameters used like bframes, mbd, dia, predia etc. somewhat, but as I am not into mpeg2 encoding, I do not know what you can archive by tweaking those settings.
Other possible sources for bad quality are interlaced or poorly deinterlaced source and changing framerates in anime. But I am definitly not firm enought to help you with those problems.

Hellfred

hellfred
5th September 2006, 23:45
ratecontrol.c is fixed! See revision 6176 (http://svn.mplayerhq.hu/cgi-bin/viewcvs.cgi/ffmpeg?rev=6176&sortby=date&view=rev) of ffmpeg

Hellfred