[MPlayer-users] playing a rtsp stream succeeds, -dumpstream results in an empty file

Ilja Sekler ilja_sekler_ at gmx.de
Wed Sep 8 16:14:38 CEST 2010


On 08.09.2010 14:53, Carl Eugen Hoyos wrote:

> Ilja Sekler <ilja_sekler_ <at> gmx.de> writes:
> 
>> ("Audio format 0x6134706d is incompatible with '-oac copy', please
>> try '-oac pcm' instead or use '-fafmttag' to override it."). Is
>> there a trick to avoid re-encoding audio, as the sound quality
>> becomes really bad?
> 
> With lame (or ac3 or faac) and a sufficient bitrate, I really doubt that.

I used faac with bitrates < 200 kbps, as the final mp4 video should be
playable with quicktime, and the sound quality loss was very audible for
me. This would not be the case if the quality of the original were
sufficient, of course.

> I suspect we are talking about AAC (is that correct?),

Yes.

> it should be possible to remux that,

Attempts like

mplayer -rtsp-stream-over-tcp ${RTSP_URL} -dumpaudio

didn't result in a file MPlayer were able to play or mp4creator were
able to mux into a mp4 container. So the first problem to solve is how
to get a usable dump of the audio part of the rtsp stream.

> and apart from all this, ffmpeg should perfectly support what you 
> want to do.

This would be great, but my first attempt with FFmpeg wasn't successful:


ffmpeg -v 3 -i
rtsp://ondemand.quicktime.zdf.newmedia.nacamar.net/zdf/data/quicktime/3sat/09/10/091019_ueberschallflieger_hitec_h.mp4
-vcodec copy -acodec copy -y ffmpeg-test.mp4
FFmpeg version SVN-r25074, Copyright (c) 2000-2010 the FFmpeg developers
  built on Sep  8 2010 15:32:19 with gcc 4.4.3
  configuration: --enable-gpl --enable-nonfree --enable-libfaac
--enable-libmp3lame --enable-libvpx --enable-libx264 --disable-debug
  libavutil     50.25. 0 / 50.25. 0
  libavcore      0. 9. 0 /  0. 9. 0
  libavcodec    52.87. 4 / 52.87. 4
  libavformat   52.78. 3 / 52.78. 3
  libavdevice   52. 2. 2 / 52. 2. 2
  libavfilter    1.38. 3 /  1.38. 3
  libswscale     0.11. 0 /  0.11. 0
[rtsp @ 0xa575470] Could not find codec parameters (Audio: aac, stereo, s16)
[rtsp @ 0xa575470] Estimating duration from bitrate, this may be inaccurate
Input #0, rtsp, from
'rtsp://ondemand.quicktime.zdf.newmedia.nacamar.net/zdf/data/quicktime/3sat/09/10/091019_ueberschallflieger_hitec_h.mp4':
  Metadata:
    title           :
/zdf/data/quicktime/3sat/09/10/091019_ueberschallflieger_hitec_h.mp4
  Duration: 00:28:56.68, start: 0.000000, bitrate: N/A
    Stream #0.0: Video: h264, yuv420p, 432x240, 90k tbr, 90k tbn, 90k tbc
    Stream #0.1: Audio: aac, stereo, s16
[mp4 @ 0xa57be90] sample rate not set
Output #0, mp4, to 'ffmpeg-test.mp4':
    Stream #0.0: Video: libx264, yuv420p, 432x240, q=2-31, 90k tbn, 90k tbc
    Stream #0.1: Audio: libfaac, stereo
Stream mapping:
  Stream #0.0 -> #0.0
  Stream #0.1 -> #0.1
Could not write header for output file #0 (incorrect codec parameters ?)


The resulting "ffmpeg-test.mp4" is 0 bytes in size. Any suggestions?

-- 
Regards

Ilja


More information about the MPlayer-users mailing list