Discussion:
[MPlayer-users] amr audio from a 3g2 video -> wav (or anything else)
Eric S. Nagel
2006-02-01 18:21:43 UTC
Permalink
I'm sure you've all seen this one before... I've seen it asked many
times, but never really answered.

I need to convert a 3g2 video to an mpeg. No problem using ffmpeg... if
I ignore the sound. After doing lots of reading, I've seen multiple
references to the fact that ffmpeg can't decode the amr soundtrack of
the 3g2 video file.

So I figure I'd convert the video, extract the sound from the original,
convert the sound, then put it back together. Using mplayer, I'm
dumping the audio track:
/usr/local/bin/mplayer -ao pcm -vo null -vc dummy -dumpaudio -dumpfile
test.amr "0120060935.3g2"

Then trying to use a decoder from 3gpp.org to decode that into a format
I can use:
../3g2/decoder test.amr mytest.raw

However, I get back:
===================================================================
TS 26.104
R99 V3.5.0 2003-03
REL-4 V4.4.0 2003-03
3GPP AMR Floating-point Speech Decoder
===================================================================
Invalid magic number: ֙׆¨


I've taken this direction from
http://www.aquarionics.com/article/name/How_to_convert_AMR_files_to_MP3
And http://xa.bi/mms/

And, of course, I'm looking to do this all via the command-line, because
it's something that's going to be automated.


So while this isn't a direct question about mplayer, I was hoping
someone out there can help.

Thanks in advance,

Eric S. Nagel
***@ericnagel.com
716.200.0922
+44 (0) 20 8432 6139 (London, UK)
716.200.0923 fax
RC
2006-02-02 11:58:33 UTC
Permalink
On Wed, 1 Feb 2006 13:21:43 -0500
Post by Eric S. Nagel
Using mplayer, I'm
/usr/local/bin/mplayer -ao pcm -vo null -vc dummy -dumpaudio -dumpfile
test.amr "0120060935.3g2"
Don't use -dumpaudio, try mencoder with -of rawaudio. And the
options other than "-dump*" aren't doing anything.
Eric S. Nagel
2006-02-02 14:13:47 UTC
Permalink
Thanks for the input... I tried:

/usr/local/bin/mencoder -of rawaudio 0120060935.3g2

With the following results:
-----------------------------------------------------
MEncoder 1.0pre7try2-3.3.2 (C) 2000-2005 MPlayer Team
CPU: Intel Pentium 4/Xeon/Celeron Foster (Family: 8, Stepping: 9)
Detected cache-line size is 64 bytes
CPUflags: Type: 8 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled for x86 CPU with extensions: MMX MMX2 SSE SSE2

File not found: 'frameno.avi'
Failed to open frameno.avi
Option of: Unknown suboption rawaudio

Exiting... (error parsing cmdline)
-----------------------------------------------------

/usr/local/bin/mencoder -of help
Gives back:
-----------------------------------------------------
MEncoder 1.0pre7try2-3.3.2 (C) 2000-2005 MPlayer Team
CPU: Intel Pentium 4/Xeon/Celeron Foster (Family: 8, Stepping: 9)
Detected cache-line size is 64 bytes
CPUflags: Type: 8 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled for x86 CPU with extensions: MMX MMX2 SSE SSE2

File not found: 'frameno.avi'
Failed to open frameno.avi

Available output formats:
avi - Microsoft Audio/Video Interleaved
mpeg - MPEG-1/2 system stream format
rawvideo - (video only, one stream only) raw stream, no muxing


Exiting... (error parsing cmdline)
-----------------------------------------------------

Rawaudio isn't an option with -of (for me, at least). Do I have to add
this somehow?

Thanks again,
Eric
RC
2006-02-03 11:39:16 UTC
Permalink
On Thu, 2 Feb 2006 09:13:47 -0500
Post by Eric S. Nagel
Rawaudio isn't an option with -of (for me, at least). Do I have to
add this somehow?
You need to upgrade to a CVS snapshot.

Loading...