Ken69267 wrote:Perhaps this?
Code: Select all
mplayer -quiet -vc dummy -vo null -ao pcm:waveheader:file="audiodump.wav" foo.flv
Going back to pcm is an absolute no-no for me (it would require reencoding resulting in a quality loss). I already have a good aac encoding in the flv file. I want to use that.
salahx wrote:I've run into the before (with DVD). Many players cannot handle raw AAC frames (previous version of mplayer had problem with this but the current version seems to do just fine).
It didn't handle this. The mplayer -dumpaudio command produces absolutely no headers for aac, so (for example) the "file" command can't identify it ("data"), and mplayer has absolutely no idea what it is (I did see that the raw data matched the original file, though).
salahx wrote:You might have better luck if you wrap it into something:
Code: Select all
ffmpeg -vn -acodec copy -f aac -i file.flv file.m4a
This will (loselessly) put the resulting AAC file in an appropriate container (the same one iTunes uses).
That didn't work (although it certainly didn't destroy any data :) ).
I actually looked inside the file before I tried to play it, but let me show you what happened when I tried to play it first:
Code: Select all
$ mplayer file.m4a
MPlayer SVN-r29463-4.3.2 (C) 2000-2009 MPlayer Team
Can't open joystick device /dev/input/js0: No such file or directory
Can't init input joystick
Playing file.m4a.
libavformat file format detected.
[lavf] Audio stream found, -aid 0
==========================================================================
Opening audio decoder: [faad] AAC (MPEG2/4 Advanced Audio Coding)
Unsupported LATM configuration: 4 programs/ 6 subframes, 4 layers, allstreams: 0
Unsupported LATM configuration: 11 programs/ 27 subframes, 3 layers, allstreams: 1
FAAD: compressed input bitrate missing, assuming 128kbit/s!
AUDIO: 32000 Hz, 2 ch, s16le, 128.0 kbit/12.50% (ratio: 16000->128000)
Selected audio codec: [faad] afm: faad (FAAD AAC (MPEG-2/MPEG-4 Audio))
==========================================================================
AO: [alsa] 48000Hz 2ch s16le (2 bytes per sample)
Video: no video
Starting playback...
FAAD: error: Channel coupling not yet implemented, trying to resync!
FAAD: error: Channel coupling not yet implemented, trying to resync!
FAAD: error: Channel coupling not yet implemented, trying to resync!
FAAD: error: Gain control not yet implemented, trying to resync!
FAAD: error: Gain control not yet implemented, trying to resync!
FAAD: error: Gain control not yet implemented, trying to resync!
FAAD: error: Quantised value out of range, trying to resync!
FAAD: error: Gain control not yet implemented, trying to resync!
FAAD: error: Maximum number of scalefactor bands exceeded, trying to resync!
FAAD: error: Scalefactor out of range, trying to resync!
FAAD: Failed to decode frame: Scalefactor out of range
A: 0.6 (00.5) of 236.2 (03:56.2) ??,?% ^MFAAD: error: Maximum number of scalefactor bands exceeded, trying to resync!
FAAD: error: Unexpected channel configuration change, trying to resync!
FAAD: error: Gain control not yet implemented, trying to resync!
FAAD: error: Channel coupling not yet implemented, trying to resync!
FAAD: error: Scalefactor out of range, trying to resync!
FAAD: error: Gain control not yet implemented, trying to resync!
FAAD: error: Unexpected channel configuration change, trying to resync!
FAAD: error: Scalefactor out of range, trying to resync!
FAAD: error: Maximum number of scalefactor bands exceeded, trying to resync!
FAAD: error: Gain control not yet implemented, trying to resync!
FAAD: Failed to decode frame: Gain control not yet implemented
FAAD: error: Unexpected channel configuration change, trying to resync!
[...]
What the command you suggested did was add forty bytes to the front of the .flv file, then copy the entire .flv file byte for byte, then add about 21k to the end of the .flv file. I was not surprised when mplayer could not play aac audio inside a flv container inside an m4a container.