[FFmpeg-user] Reading M4V files from UDP

Wernam Wer wernam at hotmail.com
Wed Jun 1 12:30:40 CEST 2011


Hi all,

I'm trying to read a livestream video from a camera, that send it trough UDP, the format is m4v (mpeg4 raw).
If I use a program to read this stream and write into a pipe, ffmpeg can read it without problem, but ffmpeg can't read it directly, what I'm doing wrong?

This is the command to read from a pipe:
ffmpeg -vcodec copy -i pipe -an -f rtp rtp://224.52.52.22:7000 -sameq
FFmpeg version 0.6.3, Copyright (c) 2000-2010 the FFmpeg developers
  built on May 31 2011 12:39:29 with gcc 4.4.3
  configuration: 
  libavutil     50.15. 1 / 50.15. 1
  libavcodec    52.72. 2 / 52.72. 2
  libavformat   52.64. 2 / 52.64. 2
  libavdevice   52. 2. 0 / 52. 2. 0
  libswscale     0.11. 0 /  0.11. 0
[m4v @ 0x9bf4420]max_analyze_duration reached
[m4v @ 0x9bf4420]Estimating duration from bitrate, this may be inaccurate
Input #0, m4v, from 'pipe:':
  Duration: N/A, bitrate: N/A
    Stream #0.0: Video: mpeg4, yuv420p, 352x288 [PAR 1:1 DAR 11:9], 25 fps, 25 tbr, 1200k tbn, 25 tbc
Output #0, rtp, to 'rtp://224.52.52.22:7004':
  Metadata:
    encoder         : Lavf52.64.2
    Stream #0.0: Video: mpeg4, yuv420p, 352x288 [PAR 1:1 DAR 11:9], q=2-31, 90k tbn, 25 tbc
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 224.52.52.22
t=0 0
a=tool:libavformat 52.64.2
m=video 7004 RTP/AVP 96
a=rtpmap:96 MP4V-ES/90000
a=fmtp:96 profile-level-id=1; config=000001B003000001B50900000100000001200086C400668582120A31

^Cframe= 1462 fps= 23 q=-1.0 Lsize=    3249kB time=58.48 bitrate= 455.1kbits/s    
video:3212kB audio:0kB global headers:0kB muxing overhead 1.137337%
Received signal 2: terminating.


And its work fine, to read directly from udp I use those:
ffmpeg -vcodec copy -i udp://172.16.16.128:3000?localport=3000 -an -f rtp rtp://224.52.52.22:7000 -sameq
ffmpeg -vcodec copy -f m4v -i udp://172.16.16.128:3000?localport=3000 -an -f rtp rtp://224.52.52.22:7004 -sameq 

And I get this errors:
FFmpeg version 0.6.3, Copyright (c) 2000-2010 the FFmpeg developers
  built on May 31 2011 12:39:29 with gcc 4.4.3
  configuration: 
  libavutil     50.15. 1 / 50.15. 1
  libavcodec    52.72. 2 / 52.72. 2
  libavformat   52.64. 2 / 52.64. 2
  libavdevice   52. 2. 0 / 52. 2. 0
  libswscale     0.11. 0 /  0.11. 0
[mpeg4 @ 0xa4f2d40]hmm, seems the headers are not complete, trying to guess time_increment_bits
[mpeg4 @ 0xa4f2d40]my guess is 5 bits ;)
[mpeg4 @ 0xa4f2d40]hmm, seems the headers are not complete, trying to guess time_increment_bits
[mpeg4 @ 0xa4f2d40]my guess is 5 bits ;)
[mpeg4 @ 0xa4f2d40]looks like this file was encoded with (divx4/(old)xvid/opendivx) -> forcing low_delay flag
[mpeg4 @ 0xa4f2d40]picture size invalid (0x0)
[mpeg4 @ 0xa4f2d40]get_buffer() failed (-1 0 0 (nil))
[m4v @ 0xa4f1420]Could not find codec parameters (Video: mpeg4, yuv420p)
[m4v @ 0xa4f1420]Estimating duration from bitrate, this may be inaccurate

 		 	   		  


More information about the ffmpeg-user mailing list