[FFmpeg-user] Using RTP format for H264 streaming

Mahmut Akcay mahakcay at gmail.com
Tue May 3 02:11:28 CEST 2011


I'm having problem to re-stream H264 with RTP format. Below is the command
line params and output.

./ffmpeg -i rtmp://flashmedia.nic.in:80/live/dd1 -vcodec copy -an -f rtp
 rtp:localhost:9000
ffmpeg version git-N-29571-g7d70d19, Copyright (c) 2000-2011 the FFmpeg
developers
  built on May  3 2011 00:51:01 with gcc 4.2.1 (Apple Inc. build 5664)
  configuration: --enable-libfaac --enable-libmp3lame --enable-libx264
--enable-nonfree --enable-gpl
  libavutil    51.  2. 0 / 51.  2. 0
  libavcodec   53.  3. 0 / 53.  3. 0
  libavformat  53.  0. 3 / 53.  0. 3
  libavdevice  53.  0. 0 / 53.  0. 0
  libavfilter   2.  4. 0 /  2.  4. 0
  libswscale    0. 14. 0 /  0. 14. 0
[flv @ 0x101012400] Estimating duration from bitrate, this may be inaccurate
Input #0, flv, from 'rtmp://flashmedia.nic.in:80/live/dd1':
  Duration: N/A, start: 0.000000, bitrate: 64 kb/s
    Stream #0.0: Video: h264 (Baseline), yuv420p, 400x300 [PAR 1:1 DAR 4:3],
24 tbr, 1k tbn, 48 tbc
    Stream #0.1: Audio: mp3, 22050 Hz, stereo, s16, 64 kb/s
Output #0, rtp, to 'rtp:localhost:9000':
  Metadata:
    encoder         : Lavf53.0.3
    Stream #0.0: Video: libx264, yuv420p, 400x300 [PAR 1:1 DAR 4:3], q=2-31,
90k tbn, 24 tbc
Stream mapping:
  Stream #0.0 -> #0.0
SDP:
v=0
o=- 0 0 IN IP6 ::1
s=No Name
c=IN IP6 ::1
t=0 0
a=tool:libavformat 53.0.3
m=video 9000 RTP/AVP 96
a=rtpmap:96 H264/90000
a=fmtp:96 packetization-mode=1;
sprop-parameter-sets=Z0KAH5ZSAyE/3gKhAAADAAEAAAMAMOBgAVXAABGMP8Y4wMACq4AAIxh/jHDtChUk,aMuNSA==

Press [q] to stop encoding
frame= 1540 fps= 27 q=-1.0 size=       6kB time=59.14 bitrate=   0.8kbits/s



When I play the sdp file printed above I've got following:

./ffplay ./test.sdp -debug 5
ffplay version git-N-29571-g7d70d19, Copyright (c) 2003-2011 the FFmpeg
developers
  built on May  3 2011 00:51:01 with gcc 4.2.1 (Apple Inc. build 5664)
  configuration: --enable-libfaac --enable-libmp3lame --enable-libx264
--enable-nonfree --enable-gpl
  libavutil    51.  2. 0 / 51.  2. 0
  libavcodec   53.  3. 0 / 53.  3. 0
  libavformat  53.  0. 3 / 53.  0. 3
  libavdevice  53.  0. 0 / 53.  0. 0
  libavfilter   2.  4. 0 /  2.  4. 0
  libswscale    0. 14. 0 /  0. 14. 0
[NULL @ 0x10203b200] Format sdp probed with size=2048 and score=50
[sdp @ 0x10203b200] video codec set to: h264
[NULL @ 0x101863e00] RTP Packetization Mode: 1
[NULL @ 0x101863e00] Extradata set to 0x10102af80 (size: 58)!Unsupported bit
depth: 0
[sdp @ 0x10203b200] Could not find codec parameters (Video: h264)
[sdp @ 0x10203b200] Estimating duration from bitrate, this may be inaccurate
./test.sdp: could not find codec parameters

I've tried to transcode the stream to mpeg4 and it's working, but with h264
it doesn't work.
Am I missing anything?

Thanks in advance
mahmut


More information about the ffmpeg-user mailing list