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

L. Lee llee040 at sbcglobal.net
Sat Mar 16 20:38:59 CET 2013



On 3/15/13 7:59 PM, "L. Lee" <llee040 at sbcglobal.net> wrote:

>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:thre
>a
> 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
>

If .mp4 is acceptable, you may want to try substituting something like
this:

mencoder -demuxer lavf -vf
filmdint=fast=0/sad_thres=512,fspp,softskip,crop=720:352:0:66,scale=720:352
 -nosub -mc 0.1 -noskip -of lavf -lavfopts format=mp4 -aspect 16/9 -oac
faac -faacopts br=192:mpeg=4:object=2:raw -channels 6 -fps 30000/1001
-ofps 24000/1001 -ovc x264 -x264encopts
preset=veryslow:tune=film:crf=28:bitrate=1800:bframes=0:global_header:threa
ds=auto:frameref=3 -o Underworld_Evolution2.mp4
Underworld_Evolution.mkv

You need faac support, and the audio change may necessitate visiting the
-mc value again (-mc 0). Channels may need to be 2 instead of 6. You can
use something other than faac, but I don't think you can keep mp3lame with
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
>
>
>_______________________________________________
>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