[prev in list] [next in list] [prev in thread] [next in thread]
List: mplayer-dev-eng
Subject: Re: [MPlayer-dev-eng] [patch] Support EAC3 in MKV container
From: Andrew de Quincey <adq_dvb () lidskialf ! net>
Date: 2009-01-26 2:25:58
Message-ID: 20090126022558.15223ek5u7bkqc00 () lidskialf ! net
[Download RAW message or body]
This message is in MIME format.
Quoting Andrew de Quincey <adq_dvb@lidskialf.net>:
> Hi, I've just tried muxing an EAC3 track into an MKV using
> mvktoolsnix 2.4.1. It muxed it ok, but mplayer rejects it with an
> unknown codec "A_EAC3". The support for this codec was added to
> mkvtoolsnix on 2007-03-02 (see
> http://www.bunkus.org/videotools/mkvtoolnix/doc/ChangeLog).
>
> The attached patch adds support for new "EAC3" stream type in the
> mkv container. Note: I originally tried simply setting it to the
> mplayer standard AC3 a_formattag 0x2000, but this does not work, so
> I have used the EAC3 fourcc instead.
>
> Unfortunately the channel ordering is /definitely/ screwed (all
> dialogue is coming from the rear left + front right speakers); I'll
> investigate this issue later by comparing with a player under windows.
I've now figured out the channel ordering issue; the old missing
support in libmpcodec/ad_ffmpeg.c problem. Updated patch attached!
["eac3-in-mkv-2.patch" (text/x-patch)]
Index: libmpcodecs/ad_ffmpeg.c
===================================================================
--- libmpcodecs/ad_ffmpeg.c (revision 28344)
+++ libmpcodecs/ad_ffmpeg.c (working copy)
@@ -166,7 +166,8 @@
if (((AVCodecContext *)sh_audio->context)->channels >= 5) {
int src_ch_layout = AF_CHANNEL_LAYOUT_MPLAYER_DEFAULT;
const char *codec=((AVCodecContext*)sh_audio->context)->codec->name;
- if (!strcasecmp(codec, "ac3"))
+ if (!strcasecmp(codec, "ac3")
+ || !strcasecmp(codec, "eac3"))
src_ch_layout = AF_CHANNEL_LAYOUT_LAVC_AC3_DEFAULT;
else if (!strcasecmp(codec, "dca"))
src_ch_layout = AF_CHANNEL_LAYOUT_LAVC_DCA_DEFAULT;
Index: libmpdemux/matroska.h
===================================================================
--- libmpdemux/matroska.h (revision 28344)
+++ libmpdemux/matroska.h (working copy)
@@ -18,6 +18,7 @@
#define MKV_A_AAC_4LTP "A_AAC/MPEG4/LTP"
#define MKV_A_AAC "A_AAC"
#define MKV_A_AC3 "A_AC3"
+#define MKV_A_EAC3 "A_EAC3"
#define MKV_A_DTS "A_DTS"
#define MKV_A_MP2 "A_MPEG/L2"
#define MKV_A_MP3 "A_MPEG/L3"
Index: libmpdemux/demux_mkv.c
===================================================================
--- libmpdemux/demux_mkv.c (revision 28344)
+++ libmpdemux/demux_mkv.c (working copy)
@@ -1707,6 +1707,8 @@
track->a_formattag = 0x0055;
else if (!strncmp(track->codec_id, MKV_A_AC3, strlen(MKV_A_AC3)))
track->a_formattag = 0x2000;
+ else if (!strncmp(track->codec_id, MKV_A_EAC3, strlen(MKV_A_EAC3)))
+ track->a_formattag = mmioFOURCC('E', 'A', 'C', '3');
else if (!strcmp(track->codec_id, MKV_A_DTS))
track->a_formattag = 0x2001;
else if (!strcmp(track->codec_id, MKV_A_PCM) ||
@@ -1789,7 +1791,8 @@
sh_a->wf->nBlockAlign = 1152;
}
else if ((track->a_formattag == 0x2000) || /* AC3 */
- (track->a_formattag == 0x2001)) /* DTS */
+ (track->a_formattag == 0x2001) || /* DTS */
+ (track->a_formattag == mmioFOURCC('E', 'A', 'C', '3')))
{
free(sh_a->wf);
sh_a->wf = NULL;
_______________________________________________
MPlayer-dev-eng mailing list
MPlayer-dev-eng@mplayerhq.hu
https://lists.mplayerhq.hu/mailman/listinfo/mplayer-dev-eng
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic