Log in

View Full Version : MPayer and 6 channels wav file -> buggy ?


Guilllo
25th August 2007, 21:18
Hi all !

I'm tryng to extract soundtrack from a dvd with mplayer in order to encode it in He-AAC 5.1

I'm using latest svn version of mplayer to achieve AC3 to WAV conversion.

If I try to transcode from to WAV in a fifo (for the aac encoder to use this fifo), mplayer crashes at 3608.8 seconds whereas the movie last nearly 8200 seconds :


mplayer dvd:// -vc dummy -vo null -ao pcm:file=/home/guilo/encodefifo -channels 6 -alang en -aid 128
MPlayer dev-SVN-r24142-4.1.2 (C) 2000-2007 MPlayer Team
CPU: Intel(R) Pentium(R) 4 CPU 3.20GHz (Family: 15, Model: 3, Stepping: 4)
CPUflags: MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled for x86 CPU with extensions: MMX MMX2 SSE SSE2
mplayer: could not connect to socket
mplayer: Connection refused
Failed to open LIRC support. You will not be able to use your remote control.

Playing dvd://.
There are 25 titles on this DVD.
There are 51 chapters in this DVD title.
There are 2 angles in this DVD title.
audio stream: 0 format: ac3 (5.1) language: en aid: 128.
audio stream: 1 format: ac3 (5.1) language: fr aid: 129.
audio stream: 2 format: ac3 (stereo) language: en aid: 130.
number of audio channels on disk: 3.
subtitle ( sid ): 1 language: en
subtitle ( sid ): 3 language: fr
subtitle ( sid ): 5 language: nl
subtitle ( sid ): 9 language: fr
subtitle ( sid ): 7 language: en
subtitle ( sid ): 11 language: en
subtitle ( sid ): 13 language: fr
number of subtitles on disk: 7
MPEG-PS file format detected.
VIDEO: MPEG2 720x576 (aspect 3) 25.000 fps 9800.0 kbps (1225.0 kbyte/s)
==========================================================================
Forced video codec: dummy
Cannot find codec matching selected -vo and video format 0x10000002.
Read DOCS/HTML/en/codecs.html!
==========================================================================
==========================================================================
Opening audio decoder: [liba52] AC3 decoding with liba52
Using SSE optimized IMDCT transform
Using MMX optimized resampler
AUDIO: 48000 Hz, 6 ch, s16le, 448.0 kbit/9.72% (ratio: 56000->576000)
Selected audio codec: [a52] afm: liba52 (AC3-liba52)
==========================================================================
[AO PCM] File: /home/guilo/encodefifo (WAVE)
PCM: Samplerate: 48000Hz Channels: Stereo Format s16le
[AO PCM] Info: Faster dumping is achieved with -vc null -vo null -ao pcm:fast
[AO PCM] Info: To write WAVE files use -ao pcm:waveheader (default).
AO: [pcm] 48000Hz 6ch s16le (2 bytes per sample)
Video: no video
Starting playback...
A:3608.6 ( 1:00:08.5) of 8201.0 ( 2:16:41.0) 2.3%

MPlayer interrupted by signal 13 in module: play_audio
- MPlayer crashed. This shouldn't happen.
It can be a bug in the MPlayer code _or_ in your drivers _or_ in your
gcc version. If you think it's MPlayer's fault, please read
DOCS/HTML/en/bugreports.html and follow the instructions there. We can't and
won't help unless you provide this information when reporting a possible bug.


So I extracted AC3 to HDD and decided to convert to 6 channels wave file before encoding in He-AAC.

mplayer lang-en.ac3 -ao pcm:file=/windows/XP/eng.wav -channels 6 -alang en -aid 0
MPlayer dev-SVN-r24202-4.1.2 (C) 2000-2007 MPlayer Team
CPU: Intel(R) Pentium(R) 4 CPU 3.20GHz (Family: 15, Model: 3, Stepping: 4)
CPUflags: MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled for x86 CPU with extensions: MMX MMX2 SSE SSE2
mplayer: could not connect to socket
mplayer: Connection refused
Failed to open LIRC support. You will not be able to use your remote control.

Playing lang-en.ac3.
libavformat file format detected.
[lavf] Audio stream found, -aid 0
==========================================================================
Opening audio decoder: [liba52] AC3 decoding with liba52
Using SSE optimized IMDCT transform
Using MMX optimized resampler
AUDIO: 48000 Hz, 6 ch, s16le, 448.0 kbit/9.72% (ratio: 56000->576000)
Selected audio codec: [a52] afm: liba52 (AC3-liba52)
==========================================================================
[AO PCM] File: /windows/XP/eng.wav (WAVE)
PCM: Samplerate: 48000Hz Channels: Stereo Format s16le
[AO PCM] Info: Faster dumping is achieved with -vc null -vo null -ao pcm:fast
[AO PCM] Info: To write WAVE files use -ao pcm:waveheader (default).
AO: [pcm] 48000Hz 6ch s16le (2 bytes per sample)
Video: no video
Starting playback...
A:8201.0 ( 2:16:41.0) of 8201.0 ( 2:16:41.0) 1.0%

Exiting... (End of file)


The resulting file is 4.4G sized but only lasts 12minutes !!

I don't understand anything !

Thanks to help me.

EDIT after investigation : Transcoding the AC3 file with Besweet through wine gives the same 12minutes long file....

nm
25th August 2007, 23:10
WAV files generally have a file size limit of 4 GB, or 2 GB for some programs. Maybe you can use raw PCM output (-ao pcm:nowaveheader)?

Guilllo
25th August 2007, 23:35
with nowaveheader I've got a file which is played as a video by mplayer.

Moreover neroaacenc cannot open this wave file. Need i to convert my raw pcm to wav pcm ?

Thanks for your help

Everything works great when choosing -channels 2 .....

Guilllo
25th August 2007, 23:56
Seems to work well with mplayer noheaders.wav -rawaudio format=0x0000:channels=6:rate=48000 -demuxer rawaudio
I can play the file with mplayer. But what about neroaacenc ? How to encode a raw pcm with it ? Or how to bypass the wave size limit ?

nm
26th August 2007, 09:38
Seems that the key is to use parameter -ignorelength and feed it with WAV data (even if it is >4GB):
http://forum.doom9.org/showpost.php?p=824196&postcount=112
http://forum.doom9.org/showpost.php?p=824219&postcount=116

There are probably other useful tips in that thread too.

Guilllo
26th August 2007, 19:14
MUCH better !! thanks a lot for your help

Guilllo
26th August 2007, 22:43
Well I've got my he-aac 5.1 file. But when I play it with mplayer in stereo mode, voices are only heard on left channel ? Is there a known problem with channel mapping ?

nm
27th August 2007, 00:01
If the default mapping doesn't work, you'll need to tweak the channel order with -af channels. I think latest MPlayer versions should have a correct channel map for the AC-3->6ch WAV conversion, but I haven't tried it myself.