[MPlayer-users] mixed ac3 5.1 and 2 channel
Ariel
asmplayer at dsgml.com
Sun Oct 2 09:36:20 CEST 2005
Since no one else replied I guess I have to hack it myself. This patch
(included below) worked nicely. It basically forces the resampling code to
always assume everything has 6 channels. (If you ask for 6 channels on the
command line.) It works perfectly.
I don't understand the point of the resampling code! It certainly doesn't
seem to be doing anything useful.
Patch:
diff -u -r mplayer-1.0-pre7.orig/liba52/resample_c.c mplayer-1.0-pre7/liba52/resample_c.c
--- mplayer-1.0-pre7.orig/liba52/resample_c.c 2005-10-02 03:27:44.000000000 -0400
+++ mplayer-1.0-pre7/liba52/resample_c.c 2005-10-02 03:28:48.000000000 -0400
@@ -179,5 +179,6 @@
if(ch==6) return a52_resample_3F_2R_LFE_to_6_C;
break;
}
+ if(ch==6) return a52_resample_3F_2R_LFE_to_6_C;
return NULL;
}
diff -u -r mplayer-1.0-pre7.orig/liba52/resample_mmx.c mplayer-1.0-pre7/liba52/resample_mmx.c
--- mplayer-1.0-pre7.orig/liba52/resample_mmx.c 2005-10-02 03:28:02.000000000 -0400
+++ mplayer-1.0-pre7/liba52/resample_mmx.c 2005-10-02 03:19:11.000000000 -0400
@@ -512,5 +512,6 @@
if(ch==6) return a52_resample_3F_2R_LFE_to_6_MMX;
break;
}
+ if(ch==6) return a52_resample_3F_2R_LFE_to_6_MMX;
return NULL;
}
-Ariel
On Fri, 23 Sep 2005, Ariel wrote:
>
> I have a mixed ac3 stereo and 5.1 stream (from an HDTV capture).
>
> Once MPlayer sees that it starts with a stereo stream, it refuses to play the
> rest in 5.1 (the audio gets quieter at the transition point - so it noticed
> something, but it's stereo).
>
> If I use avi tools to add in a 1 second 5.1 stream before the avi, and then
> play that: MPlayer starts with 5.1, then switches to stereo with hissing from
> the other speakers, then switches back to 5.1.
>
> (Obviously I use -channels 6 it both cases.)
>
> It looks like it needs to see at least a little 5.1 at the start to enable
> channels 6, otherwise it's forced off.
>
> I would like instead that with channels 6 it's always on. If the stream
> happens to be stereo, then just play stereo.
>
> As a point of comparison xine does it properly.
>
> With an mpeg MPlayer says:
> Unimplemented resampler for mode 0x2 -> 6 channels conversion - Contact
> MPlayer developers!
> Unimplemented resampler for mode 0x2 -> 5 channels conversion - Contact
> MPlayer developers!
> Unimplemented resampler for mode 0x2 -> 4 channels conversion - Contact
> MPlayer developers!
> Unimplemented resampler for mode 0x2 -> 3 channels conversion - Contact
> MPlayer developers!
>
> With an avi it seems to look at the avi header - which is wrong, since the
> file is mixed, and just plays in stereo with no messages. If I edit the avi
> header to change 2 channels to 6, then MPlayer says the same thing it says
> with the mpeg.
>
> So basically don't trust the avi header as far as ac3 channels goes.
>
> -Ariel
>
> _______________________________________________
> MPlayer-users mailing list
> MPlayer-users at mplayerhq.hu
> http://mplayerhq.hu/mailman/listinfo/mplayer-users
>
More information about the MPlayer-users
mailing list