[FFmpeg-user] Problem streaming H.264 over RTP without re-encdoing.

yoda_alex yoda_alex at yahoo.co.uk
Thu May 26 13:32:03 CEST 2011


Hello all,

I have an mp4 file with an H.264 video track, that I'm trying to stream over
RTP, but I don't want to decode and re-encode the video (so I just want to
demux it from the mp4 and re-mux in RTP). 

This is the command I run:
ffmpeg -i day9_trumpets.mp4 -an -vcodec copy -f rtp
rtp://172.18.41.122:10000

But this command returns instantly, and no RTP is sent on the wire (I've
checked this using tcpdump). The output I get from ffmpeg is below. 

The starge thing is that when I decode and reencode the video (using a
command like "ffmpeg -i day9_trumpets.mp4 -an -vcodec libx264 -vpre baseline
-f rtp rtp://172.18.41.122:100002"), the RTP is sent correctly. Any ideas
what I'm doing wrong?

Thanks in advance!

------------------------------------

FFmpeg output:

[root at brie MC 05] /videotools> ffmpeg -y -i day9_trumpets.mp4 -an -vcodec
copy -f rtp rtp://172.18.41.122:10000
ffmpeg version 0.7-rc1, Copyright (c) 2000-2011 the FFmpeg developers
  built on May 25 2011 11:02:15 with gcc 4.1.2 20080704 (Red Hat 4.1.2-48)
  configuration: --enable-gpl --enable-shared --disable-static
--disable-yasm --enable-debug=3 --enable-libx264 --disable-optimizations
--disable-stripping
  libavutil    50. 40. 1 / 50. 40. 1
  libavcodec   52.120. 0 / 52.120. 0
  libavformat  52.108. 0 / 52.108. 0
  libavdevice  52.  4. 0 / 52.  4. 0
  libavfilter   1. 77. 0 /  1. 77. 0
  libswscale    0. 13. 0 /  0. 13. 0

Seems stream 0 codec frame rate differs from container frame rate: 59.83
(29917/500) -> 29.92 (359/12)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'day9_trumpets.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: isommp42
    creation_time   : 2010-10-26 20:01:29
  Duration: 00:01:43.55, start: 0.000000, bitrate: 1968 kb/s
    Stream #0.0(und): Video: h264 (High), yuv420p, 1280x720 [PAR 1:1 DAR
16:9], 1835 kb/s, 29.96 fps, 29.92 tbr, 1k tbn, 59.83 tbc
    Metadata:
      creation_time   : 1970-01-01 00:00:00
    Stream #0.1(und): Audio: aac, 44100 Hz, stereo, s16, 127 kb/s
    Metadata:
      creation_time   : 2010-10-26 20:01:30
Output #0, rtp, to 'rtp://172.18.41.122:10000':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: isommp42
    creation_time   : 2010-10-26 20:01:29
    encoder         : Lavf52.108.0
    Stream #0.0(und): Video: libx264, yuv420p, 1280x720 [PAR 1:1 DAR 16:9],
q=2-31, 1835 kb/s, 90k tbn, 29.92 tbc
    Metadata:
      creation_time   : 1970-01-01 00:00:00
Stream mapping:
  Stream #0.0 -> #0.0
SDP:
v=0
o=- 0 0 IN IP4 127.0.0.1
s=No Name
c=IN IP4 172.18.41.122
t=0 0
a=tool:libavformat 52.108.0
m=video 10000 RTP/AVP 96
b=AS:1835
a=rtpmap:96 H264/90000
a=fmtp:96 packetization-mode=1;
sprop-parameter-sets=Z2QAH6wkiAUAW7ARAAADA+gAAOm6DxgyoA==,aO4yyLA=

Press [q] to stop encoding
frame= 3103 fps=  0 q=-1.0 Lsize=       0kB time=103.56 bitrate=  
0.0kbits/s
video:23199kB audio:0kB global headers:0kB muxing overhead -99.999882%


--
View this message in context: http://ffmpeg-users.933282.n4.nabble.com/Problem-streaming-H-264-over-RTP-without-re-encdoing-tp3552281p3552281.html
Sent from the FFmpeg-users mailing list archive at Nabble.com.


More information about the ffmpeg-user mailing list