[MEncoder-users] Can encode from mkv with -oac lavc but not with -oac copy

Dominique Dumont domi.dumont at free.fr
Sun Jun 10 16:22:55 CEST 2007


Dominik 'Rathann' Mierzejewski <dominik at rangers.eu.org> writes:

> On Saturday, 09 June 2007 at 19:56, Trent Piepho wrote:
>> On Sat, 9 Jun 2007, Dominique Dumont wrote:
>> >
>> > I've tried to encode a mkv file with -oac copy.
>> >
>> > The command is :
>> >
>> > $ mencoder 'Test.mkv' -oac copy -vf scale=1280:534,crop=1280:528:0:3 -ofps 24000/1001 -ovc x264 -x264encopts subq=1:frameref=1:bframes=3:b_pyramid:weight_b:bitrate=4000:threads=2:pass=1 -o /dev/null
>> >
>> > [snip]
>> > [mkv] Track ID 1: video (V_MPEG4/ISO/AVC), -vid 0
>> > [mkv] Track ID 2: audio (A_AC3), -aid 0, -alang eng
>> >
>> 
>> The mkv demuxer is simply completely broken for ac3 audio.  I posted a
>> patch to fix it, but it didn't get merged.  I'll try again:
>
> When sending patches for demux_mkv, it's advisable to Cc: its maintainer,
> because he doesn't follow this list, but he reacts to direct mails.

Trent Piepho's patch indeed fixes the problem I've seen. (Thanks)

Aurelien, could you apply his patch ? (included below)

Thanks 


Index: libmpdemux/demux_mkv.c
===================================================================
--- libmpdemux/demux_mkv.c	(revision 23424)
+++ libmpdemux/demux_mkv.c	(working copy)
@@ -2023,8 +2023,8 @@
   else if ((track->a_formattag == 0x2000) || /* AC3 */
            (track->a_formattag == 0x2001)) /* DTS */
     {
-      sh_a->wf->nAvgBytesPerSec = 16000;
-      sh_a->wf->nBlockAlign = 1536;
+      free(sh_a->wf);
+      sh_a->wf = NULL;
     }
   else if (track->a_formattag == 0x0001)  /* PCM || PCM_BE */
     {




More information about the MEncoder-users mailing list