Log in

View Full Version : Video not transcodable using Mencoder


Guilllo
1st December 2009, 21:58
Hi all!

I have a very annoying problem because I can't really see why it does NOT work as it should.

I have a video which comes from Adobe Premiere Pro (edited from a JVC hd camera). It has been exported in Microsoft DV at 29.97 fps, interlaced.

I am trying to transcode it with mencoder but the output has a "hanging problem". Let me explain :

There is a fading in of a text, than a fading out. everything is smooth in the source file. But when I encode it in xvid or x264 or mpeg4 with libavcodec, the fade-out hangs for 1 second. An exception though : the first pass of x264 shows smooth playback but the second one has the same problem as xvid.

Moreover the next scene shows smoke. Even at 2500kbps with xvid the video out is highly blocky. I am sure what I am saying is not clear at all so :

here are my commands :

mencoder Séquence\ 02.avi -ovc x264 -x264encopts pass=2:bitrate=1500:turbo=1:bframes=3:b_adapt:cabac:weight_b:partitions=all:8x8dct:me=umh:subq=9:chroma_me:trellis=1 -oac mp3lame -lameopts cbr:br=128 -o test.avi for x264 and :

mencoder Séquence\ 02.avi -ovc xvid -xvidencopts pass=1:bitrate=1500:me_quality=6:qpel:gmc:trellis:chroma_me:chroma_opt:hq_ac:vhq=4 -oac mp3lame -lameopts cbr:br=128 -o test.avi for xvid.

I don't know what's not goàd in my parameters or in the source video but it works great with both x264 and xvid are smooth after encoding with avidemux2.

I would like to get a deinterlaced file with good quality at ~1500kbps

And as an example is better than words, please try these samples files :

source file (http://perso.numericable.fr/guilo/source.avi)

xvid encoded (http://perso.numericable.fr/guilo/xvid.avi)

Note : - mencoder warns me about a lot of duplicate frames where it hangs in playback.
- I have tried with -vf kerndeint to deinterlace but output is not smooth neither

MatLz
2nd December 2009, 01:22
Hi Guillo, I don't know mencoder. But if it can help you, it seems your source is a true 29.97fps so for deinterlace it, I think a simple selecteven(bob()) (if you can use Avisynth with mencoder?)
For the quality, if you experience block artifacts even with X264, that mean your source is difficult to compress, so if you want keep your 1500kbps, reduce the resolution. Or simply raise the bitrate.

(OOT: I can also see a lot of orthographic mistakes...)

henryho_hk
2nd December 2009, 05:57
Why is there only the 2nd pass commandline for x264 and the 1st pass one for xvid?

To vastly improve the compressibility of your HD DV clip, you can add "-vf pp=ha:c/va:c/dr/fd" which means deblocking+deringing+deinterlacing(simple). Also, since homemade DV footages are usually rather unstable and noisy, try omitting "qpel" and "gmc" for xvid. But then, if your footage is really 1280x720@29.97fps, 1500kbps is never sufficient.

For x264 encoding, you'd better use x264.exe.

Guilllo
2nd December 2009, 10:38
Why is there only the 2nd pass commandline for x264 and the 1st pass one for xvid?

I only pasted the firts one I found in my bash history that's all.

My video has been resized at 720*480 so bitrate should be enough. Ans quality is not a problem with x264, only with xvid so I will try your settings.

Is 29.29 fps a problem or can i let it as is ?
I will also try your vf -pp..... I used kerndeint to deinterlace because I didn't know which one to used. Which one is the better ?

Thanks

PS : I am aware about the mistakes but I am not the one who made the video, I am just trying to encode it for him and it is not definitive. :o

Guilllo
4th December 2009, 16:48
I have tried your settings but it is still has not smooth playback.

Guilllo
5th December 2009, 23:41
I have nearly solved the problem with the help of mencoder mailing lists. With -mc 0 - noskip I have no more hangs on the ouptut. But doing so, mencoder cuts the 2 first seconds of the file which were black frames. Doing so it gives me a A/V desync.


Any idea ?