Log in

View Full Version : dump audio with mencoder, impossible?


Sirber
19th December 2006, 16:11
mencoder.exe E001.avi -of rawaudio -oac pcm -novideo -o au
dio.wav
MEncoder Sherpya-r21000-MinGW-4.1.1 (C) 2000-2006 MPlayer Team
CPU: Intel(R) Pentium(R) 4 CPU 2.80GHz (Family: 15, Model: 2, Stepping: 9)
CPUflags: Type: 15 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled for x86 CPU with extensions: MMX MMX2 SSE SSE2

success: format: 0 data: 0x0 - 0x888000
AVI file format detected.
AVI_NI: No video stream found.
Audio file file format detected.
Video stream is mandatory!

Exiting...

Sirber
19th December 2006, 16:14
Nice! Found it:

mencoder.exe E001.avi -of rawaudio -oac pcm -ovc copy -o audio.wav
MEncoder Sherpya-r21000-MinGW-4.1.1 (C) 2000-2006 MPlayer Team
CPU: Intel(R) Pentium(R) 4 CPU 2.80GHz (Family: 15, Model: 2, Stepping: 9)
CPUflags: Type: 15 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled for x86 CPU with extensions: MMX MMX2 SSE SSE2

success: format: 0 data: 0x0 - 0x888000
AVI file format detected.
VIDEO: [DIVX] 640x480 12bpp 23.976 fps 2853.3 kbps (348.3 kbyte/s)
[V] filefmt:3 fourcc:0x58564944 size:640x480 fps:23.98 ftime:=0.0417
==========================================================================
Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
AUDIO: 48000 Hz, 2 ch, s16le, 128.0 kbit/8.33% (ratio: 16000->192000)
Selected audio codec: [mp3] afm: mp3lib (mp3lib MPEG layer-2, layer-3)
==========================================================================
Ignoring video stream!
videocodec: framecopy (640x480 12bpp fourcc=58564944)
Pos: 23.0s 552f (95%) 0.00fps Trem: 0min 4mb A-V:0.060 [2819:1536]
Broken frame at 0x5D480
Pos: 23.9s 573f (100%) 0.00fps Trem: 0min 4mb A-V:0.061 [2853:1536]
Video stream: 2853.327 kbit/s (356665 B/s) size: 8523923 bytes 23.899 secs 5
73 frames

Audio stream: 1536.000 kbit/s (192000 B/s) size: 4584960 bytes 23.880 secs

Sirber
30th December 2006, 21:47
seems to write PCM, not WAVE.

Gusar
31st December 2006, 13:23
Why don't you use mplayer? This will produce a wav:mplayer -vo null -vc null -ao pcm:fast:file=audio.wav E001.avi

Sirber
2nd January 2007, 03:01
can't set a path for the .wav...

Gusar
2nd January 2007, 13:39
can't set a path for the .wav...
What's the problem? The ':' in 'c:\some_path\audio.wav'? Does enclosing the path in "" not work? If not, there is another solution in the mplayer manpage:
NOTE: The suboption parser (used for example for -ao pcm suboptions) supports a special kind of string-escaping intended for use with external GUIs.
It has the following format:
%n%string_of_length_n
EXAMPLES:
mplayer -ao pcm:file=%10%C:test.wav test.avi
Or in a script:
mplayer -ao pcm:file=%`expr length "$NAME"`%"$NAME" test.avi

Not sure how the "expr length" part works in a windows environment, but there is probably some other way to get the length of the expression automatically.

blizard
8th December 2007, 22:13
What's the problem? The ':' in 'c:\some_path\audio.wav'? Does enclosing the path in "" not work? If not, there is another solution in the mplayer manpage:
NOTE: The suboption parser (used for example for -ao pcm suboptions) supports a special kind of string-escaping intended for use with external GUIs.
It has the following format:
%n%string_of_length_n
EXAMPLES:
mplayer -ao pcm:file=%10%C:test.wav test.avi
Or in a script:
mplayer -ao pcm:file=%`expr length "$NAME"`%"$NAME" test.avi

Not sure how the "expr length" part works in a windows environment, but there is probably some other way to get the length of the expression automatically.

I had some trouble to understand how to use this on windows, but managed after some trial and error to see how to use it.

mplayer -ao pcm:file=%1%C:\test.wav test.avi

That part in bold is the string which is called up on by %1 (in this case a path for audio option "file"). It is rather simple for a batch file to do.

Hope this explanation will help other user of mplayer to create a wave PCM and save some time on how to do this as I had a hard time to find out a way too set a patch to store my uncompressed wave for further use in Nero AAC encoder.

Could anybody say how one will make this process automatic for batch files, so when you have a input file that must be uncompressed during transcoding that the same wave is stored in that folder or to set an permanent place to store wave file as those can get rather large? MPlayer and MEncoder are small and I keep them on a relative small partition on my hard disk.

I suspect you can use config (text file in folder for MPlayer/MEncoder - extension ".conf") to set those path in way, but don't know where and how.