[MEncoder-users] sync problem while encoding bluray with dts audio to avi then to mkv

Alexander Schwarzkopf Schwarzkopf.Alexander at web.de
Sat Apr 4 07:31:40 CEST 2009


Hi,

I am building a script to make conversion of HD content from BluRay, HDDVD, HDTV, ... in linux as simple as possible. 

I use mencoder to convert (and optionally downsize, add black borders to meet 16/9 aspect ratio, ...) video and recode to x264 in AVI container. Audio is processed with -oac copy by default, but I did also try to reencode. Then I use mkvmerge to repackage the results to Matroska. 

Now I encountered a sync problem when converting sources containing DTS audio. The AVI seems o.k., at least it plays correct using mplayer or vlc. But as soon as I convert it to Matroska the DTS stream is way out of sync (most of the time the audio gets stretched by MINUTES, making the result much longer than the original video). This does not happen at all when the source has AC3 audio and it even works for approx. 50 % of the sources with dts audio in .TS format. Sources with dts in Matroska container almost always fail. 

I've been trying for weeks now (still long runtimes per movie, even with a Core i7 ;-) ), trying every tip I could find (using -vf harddup , -mc 0 -noskip, encoding to raw formats, reencoding audio to mp3, aac, 6ch aac, ...) but nothing did solve the problem. 

As it works sometimes (even if it are rare occasions) I think it does not have much to do with mkvmerge. More likely it has something to do with erroneous source streams.

Is there a known problem witch -oac copy / DTS audio / maybe inconsistent source streams? 

If there isn't, how can I help in resolving this issue? If it would fail in 10% of the cases I'd say: "get another source", but it's more like 90%, so it seems to me to be a more fundamental problem. 

I'm using the following commands for twopass encoding:
/usr/bin/mencoder xxx_1080p.mkv -alang ger -oac copy -ovc x264 \
-x264encopts subq=4:bframes=4:b_pyramid:weight_b:pass=1:psnr:bitrate=6000:vbv_maxrate=9500:vbv_bufsize=2000:direct_pred=auto:keyint=100:turbo=1:threads=auto\
-passlogfile xxx_1080p_2pass.log -vf expand=1920:1080,harddup -fps 23.976 -ofps 23.976 -o /dev/null
/usr/bin/mencoder xxx_1080p.mkv -alang ger -oac copy -ovc x264 -x264encopts \
frameref=6:analyse=all:me=umh:subme=7:trellis=2:bframes=4:b_pyramid:subq=6:mixed_refs:weight_b:no_fast_pskip:direct_pred=auto:mixed_refs:keyint=100:nr=200:vbv_maxrate=9500:vbv_bufsize=2000:bitrate=6000:threads=auto:pass=2\
 -passlogfile xxx_1080p_2pass.log -vf expand=1920:1080,harddup -fps 23.976 -ofps 23.976 -o xxx_1080p.avi

Thanks for reading this rather long text, and thanks in advance for any hints,
Alexander Schwarzkopf

attached is the most recent version of my scripts if it is of any interest to anyone.
________________________________________________________________________
Neu bei WEB.DE: Kostenlose maxdome Movie-FLAT!
https://register.maxdome.de/xml/order/LpWebDe?ac=OM.MD.MD008K15726T7073a

-------------- next part --------------
A non-text attachment was scrubbed...
Name: blu2mkv
Type: application/octet-stream
Size: 11711 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mencoder-users/attachments/20090404/e92f8b1f/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: avi2mkv
Type: application/octet-stream
Size: 6959 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mencoder-users/attachments/20090404/e92f8b1f/attachment-0003.obj>


More information about the MEncoder-users mailing list