[MEncoder-users] Converting mkv from MakeMKV to avi with mencoder

L. Lee llee040 at sbcglobal.net
Sat Mar 16 01:59:46 CET 2013


On 3/14/13 3:54 PM, "securehell at hushmail.com" <securehell at hushmail.com>

wrote:

>-----BEGIN PGP SIGNED MESSAGE-----
>Hash: SHA1
>
># mencoder -ffourcc divx -ovc lavc -lavcopts
>vcodec=mpeg4:vhq:vbitrate=6000 -oac mp3lame -aid 0 -fps 30000/1001 -
>ofps 24000/1001 -vf crop=720:352:0:66,filmdint=fast=0,softskip -
>nosub -mc 0.1 -noskip -lameopts vbr=3 -o Underworld_Evolution2.avi
>Underworld_Evolution.mkv
>
>This so far is by far the best. Got a complete output file though a
>bit larger than I normally get when converting DVD to AVI. This
>one's about 1.7 GB which isn't a deal breaker.
>
>Sound is almost synced in this one - only off by a fraction of a
>second, just enough to be annoying.
>
>What setting should I tinker with to get the sound matched up
>perfectly?
>
>Tried first with "-mc 0 -noskip" but output file was truncated and
>corrupt :(
>
>Jack


I'm not very good with the .avi container. Can you use x264 in your
mencoder build, and does it work for .avi? Maybe you could make use of
.mp4 with aac instead. I use something like


-lavfopts format=mp4 -ovc x264 -x264encopts
preset=veryslow:tune=film:crf=28:bitrate=1800:bframes=0:global_header:threa
 ds=auto:frameref=3


You may love/hate this. I've got two sync offset commands for ffmpeg. One
works with 720 and the other with 1080, and I can't explain how that is
possible, so you may need both. I'm including the one I use the most
(1080). You may also need to try toggling input value between positive and
negative. If you had a Mac, I could give you AppleScript droplets to make
it very easy. But as you probably don't, try this. It makes the audio half
a second later in relation to the video. Make the offset value negative
(-00:00:00.5) if the audio needs to be earlier instead of later. You may
have to reverse that strategy. I don't know why the the input file has to
be specified twice. I don't know why I sometimes have to use a different
command when I'm performing the operation on a video that has been
converted from a 720p source.


ffmpeg -i infile.mp4 -itsoffset 00:00:00.5 -i infile.mp4 -vcodec copy
-acodec copy -map 0:0 -map 1:1 outfile.mp4



Laine Lee


>
>On Thu, 14 Mar 2013 09:51:30 -0400 "L. Lee" <llee040 at sbcglobal.net>
>wrote:
>>On 3/13/13 3:00 PM, "securehell at hushmail.com"
>><securehell at hushmail.com>
>>wrote:
>>
>>># mencoder Underworld_Evolution.mkv -oac mp3lame -ovc copy -o
>>>Underworld_Evolution.avi
>>>
>>># mencoder -ffourcc divx -ovc lavc -lavcopts
>>>vcodec=mpeg4:vhq:vbitrate=6000 -audiofile audio.wav -oac mp3lame -
>>
>>>vf crop=720:352:0:62,yadif -nosub -lameopts vbr=3 -o
>>>Underworld_Evolution.avi Underworld_Evolution.mkv
>>>
>>># mencoder -ovc copy -oac mp3lame -lameopts br=192:cbr:mode=0 -
>>aid
>>>0 -alang eng -vf crop=720:352:0:62,yadif -lameopts vol=3 -nosub -
>>o
>>>Underworld_Evolution.avi Underworld_Evolution.mkv
>>
>>I don't think any robust conversion of any commercial title can be
>>accomplished without some method of pullup. I would prefer to work
>>on the
>>full-size MakeMKV rip if it's Blu-ray. Anyway, what happens if you
>>use
>>Reimar's suggestion along with removing yadif and including the
>>following
>>at the beginning of the filter chain along with "-fps 30000/1001 -
>>ofps
>>24000/1001" for i/o?
>>
>>filmdint=fast=0,softskip
>>
>>
>>If you see a bunch of bottom frame warnings you can add this
>>before the
>>first comma:
>>
>>/sad_thres=512
>>
>>
>>
>>Also, before giving up, I would make one more attempt substituting
>>"-mc
>>0.1" for "-mc 0". I haven't been able to precisely predict which
>>of the
>>two of those will work, but often if 0 won't work, 0.1 will.
>>
>>You may also want to try the above variations both with and
>>without
>>-noskip.
>>
>>If you get smooth 24 fps but the audio is still off, try to
>>determine
>>whether the audio sync problem is progressive or whether it's
>>simply a
>>result of incorrect offset. If it's just early or late, you can
>>fix it
>>quickly with ffmpeg. If it's progressive within the range of a
>>second or
>>so, you'll have to stretch or compress the duration of the audio,
>>which
>>can be done with a sox and ffmpeg pipe that has been explained on
>>this
>>list before.
>>
>>Laine Lee
>>
>>
>>_______________________________________________
>>MEncoder-users mailing list
>>MEncoder-users at mplayerhq.hu
>>https://lists.mplayerhq.hu/mailman/listinfo/mencoder-users
>-----BEGIN PGP SIGNATURE-----
>Charset: UTF8
>Note: This signature can be verified at https://www.hushtools.com/verify
>Version: Hush 3.0
>
>wkYEARECAAYFAlFCORAACgkQRBFe1uc9INrLTQCdFxRBcG49p7/I6ja4xuYjRMX/QToA
>n0sxGZcaKC89SJEzgHNGBBEyGGOw
>=2rr/
>-----END PGP SIGNATURE-----
>
>_______________________________________________
>MEncoder-users mailing list
>MEncoder-users at mplayerhq.hu
>https://lists.mplayerhq.hu/mailman/listinfo/mencoder-users




More information about the MEncoder-users mailing list