Hi all, just some test cases:
[EMAIL PROTECTED] ~/s/ffmpeg>
./ffmpeg -i ~/test2.flv -f rtp -vcodec h263p "rtp://localhost:5004"
FFmpeg version SVN-r14138, Copyright (c) 2000-2008 Fabrice Bellard, et al.
configuration: --prefix=/home/stefano --disable-shared
--enable-libschroedinger --enable-libx264 --enable-pthreads --enable-gpl
--enable-debug=3 --enable-libtheora --enable-libvorbis --enable-avfilter
--enable-libamr-nb --enable-libamr-wb --enable-nonfree --enable-libfaad
--enable-libfaac --enable-x11grab --enable-libmp3lame --disable-optimizations
--disable-mmx
libavutil version: 49.7.0
libavcodec version: 51.58.0
libavformat version: 52.16.0
libavdevice version: 52.0.0
libavfilter version: 0.0.0
built on Jul 9 2008 10:29:35, gcc: 4.2.3 20071014 (prerelease) (Debian
4.2.2-3)
Seems stream 0 codec frame rate differs from container frame rate: 1000.00
(1000/1) -> 25.00 (25/1)
Input #0, flv, from '/home/stefano/test2.flv':
Duration: 00:00:30.01, start: 0.000000, bitrate: 96 kb/s
Stream #0.0: Video: vp6f, yuv420p, 320x240, 25.00 tb(r)
Stream #0.1: Audio: mp3, 44100 Hz, mono, 96 kb/s
Output #0, rtp, to 'rtp://localhost:5004':
Stream #0.0: Video: h263p, yuv420p, 320x240, q=2-31, 200 kb/s, 25.00 tb(c)
Stream #0.1: Audio: pcm_mulaw, 44100 Hz, mono, 352 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Stream #0.1 -> #0.1
Could not write header for output file #0 (incorrect codec parameters ?)
This fails in rpt_write_header since the number of streams is greter
than 1.
[EMAIL PROTECTED] ~/s/ffmpeg>
./ffmpeg -i ~/test2.flv -f rtp -vcodec mpeg4 -an "rtp://localhost:5004"
FFmpeg version SVN-r14138, Copyright (c) 2000-2008 Fabrice Bellard, et al.
[...]
Seems stream 0 codec frame rate differs from container frame rate: 1000.00
(1000/1) -> 25.00 (25/1)
Input #0, flv, from '/home/stefano/test2.flv':
Duration: 00:00:30.01, start: 0.000000, bitrate: 96 kb/s
Stream #0.0: Video: vp6f, yuv420p, 320x240, 25.00 tb(r)
Stream #0.1: Audio: mp3, 44100 Hz, mono, 96 kb/s
Output #0, rtp, to 'rtp://localhost:5004':
Stream #0.0: Video: mpeg4, yuv420p, 320x240, q=2-31, 200 kb/s, 25.00 tb(c)
Stream mapping:
Stream #0.0 -> #0.0
SDP:
v=0
o=- 0 0 IN IPV4 127.0.0.1
t=0 0
s=No Name
a=tool:libavformat 52.16.0
c=IN IP4 localhost
m=video 5004 RTP/AVP 96
b=AS:200
a=rtpmap:96 MP4V-ES/90000
a=fmtp:96 profile-level-id=1
Press [q] to stop encoding
frame= 751 fps= 66 q=7.1 Lsize= 920kB time=30.04 bitrate= 250.9kbits/s
video:905kB audio:0kB global headers:0kB muxing overhead 1.680058%
It seems to works fine, the number of streams to write in the header
is just one due to -an, the strange thing is that the Payload type as
shown by wireshark is always 96, the same with -vocodec h263p.
If I try instead:
[EMAIL PROTECTED] ~/s/ffmpeg>
./ffmpeg -i ~/test2.flv -f rtp -vn "rtp://localhost:5004"
FFmpeg version SVN-r14138, Copyright (c) 2000-2008 Fabrice Bellard, et al.
[...]
Seems stream 0 codec frame rate differs from container frame rate: 1000.00
(1000/1) -> 25.00 (25/1)
Input #0, flv, from '/home/stefano/test2.flv':
Duration: 00:00:30.01, start: 0.000000, bitrate: 96 kb/s
Stream #0.0: Video: vp6f, yuv420p, 320x240, 25.00 tb(r)
Stream #0.1: Audio: mp3, 44100 Hz, mono, 96 kb/s
Output #0, rtp, to 'rtp://localhost:5004':
Stream #0.0: Audio: pcm_mulaw, 44100 Hz, mono, 352 kb/s
Stream mapping:
Stream #0.1 -> #0.0
SDP:
v=0
o=- 0 0 IN IPV4 127.0.0.1
t=0 0
s=No Name
a=tool:libavformat 52.16.0
c=IN IP4 localhost
m=audio 5004 RTP/AVP 0
b=AS:64
Press [q] to stop encoding
size= 1291kB time=29.68 bitrate= 356.5kbits/s
video:0kB audio:1278kB global headers:0kB muxing overhead 1.043806%
the PT is correctly recognized.
I also tried to use RTP as a file format in this way, I don't know if
it makes sense, anyway what I get is:
[EMAIL PROTECTED] ~/s/ffmpeg> ./ffmpeg -i ~/test2.flv -f rtp -vn -y test2.rtp
FFmpeg version SVN-r14138, Copyright (c) 2000-2008 Fabrice Bellard, et al.
configuration: --prefix=/home/stefano --disable-shared
--enable-libschroedinger --enable-libx264 --enable-pthreads --enable-gpl
--enable-debug=3 --enable-libtheora --enable-libvorbis --enable-avfilter
--enable-libamr-nb --enable-libamr-wb --enable-nonfree --enable-libfaad
--enable-libfaac --enable-x11grab --enable-libmp3lame --disable-optimizations
--disable-mmx
[...]
Seems stream 0 codec frame rate differs from container frame rate: 1000.00
(1000/1) -> 25.00 (25/1)
Input #0, flv, from '/home/stefano/test2.flv':
Duration: 00:00:30.01, start: 0.000000, bitrate: 96 kb/s
Stream #0.0: Video: vp6f, yuv420p, 320x240, 25.00 tb(r)
Stream #0.1: Audio: mp3, 44100 Hz, mono, 96 kb/s
Output #0, rtp, to 'test2.rtp':
Stream #0.0: Audio: pcm_mulaw, 44100 Hz, mono, 352 kb/s
Stream mapping:
Stream #0.1 -> #0.0
Could not write header for output file #0 (incorrect codec parameters ?)
In this case gdb shows that the problem is always in rtp_write_header:
max_packet_size = url_fget_max_packet_size(s1->pb);
if (max_packet_size <= 12)
return AVERROR(EIO);
max_packet_size is 0.
Please note that in all these cases it seems the -re option isn't
working, and a runnning ffplay process launched like this:
[EMAIL PROTECTED] ~> ffplay "rtp://localhost?localport=5004"
FFplay version SVN-r14117, Copyright (c) 2003-2008 Fabrice Bellard, et al.
configuration: --prefix=/home/stefano --disable-shared
--enable-libschroedinger --enable-libx264 --enable-pthreads --enable-gpl
--enable-debug=3 --enable-libtheora --enable-libvorbis --enable-avfilter
--enable-libamr-nb --enable-libamr-wb --enable-nonfree --enable-libfaad
--enable-libfaac --enable-x11grab --enable-libmp3lame --disable-optimizations
--disable-mmx
libavutil version: 49.7.0
libavcodec version: 51.58.0
libavformat version: 52.16.0
libavdevice version: 52.0.0
libavfilter version: 0.0.0
built on Jul 8 2008 16:08:58, gcc: 4.2.3 20071014 (prerelease) (Debian
4.2.2-3)
seems to hangs.
The only case when I can actually see something working, and only
apparently randomly, is this:
[EMAIL PROTECTED] ~/s/ffmpeg>
./ffmpeg -i ~/test2.flv -f rtp -acodec libmp3lame "rtp://localhost:5004"
FFmpeg version SVN-r14138, Copyright (c) 2000-2008 Fabrice Bellard, et al.
[...]
Seems stream 0 codec frame rate differs from container frame rate: 1000.00
(1000/1) -> 25.00 (25/1)
Input #0, flv, from '/home/stefano/test2.flv':
Duration: 00:00:30.01, start: 0.000000, bitrate: 96 kb/s
Stream #0.0: Video: vp6f, yuv420p, 320x240, 25.00 tb(r)
Stream #0.1: Audio: mp3, 44100 Hz, mono, 96 kb/s
Output #0, rtp, to 'rtp://localhost:5004':
Stream #0.0: Audio: libmp3lame, 44100 Hz, mono, 64 kb/s
Stream mapping:
Stream #0.1 -> #0.0
SDP:
v=0
o=- 0 0 IN IPV4 127.0.0.1
t=0 0
s=No Name
a=tool:libavformat 52.16.0
c=IN IP4 localhost
m=audio 5004 RTP/AVP 14
b=AS:64
Press [q] to stop encoding
size= 234kB time=29.73 bitrate= 64.6kbits/s
video:0kB audio:232kB global headers:0kB muxing overhead 0.931805%
in this case I can actually hear something on the ffplay process, but
the sound is severely distorted (kind of a metallic sound), and I got
a lot of messages like these:
overread, skip -5 enddists: -1 -1
mdb:466, lastbuf:462 skipping granule 0
overread, skip -9 enddists: -5 -5
bits_left=-2
bits_left=-5
bits_left=-3
overread, skip -8 enddists: -7 -7
overread, skip -6 enddists: -1 -1
mdb:475, lastbuf:464 skipping granule 0
overread, skip -8 enddists: -7 -7
overread, skip -7 enddists: -5 -5
overread, skip -9 enddists: -4 -4
overread, skip -7 enddists: -6 -6
overread, skip -7 enddists: -2 -2
overread, skip -7 enddists: -5 -5
overread, skip -6 enddists: -2 -2
overread, skip -8 enddists: -7 -7
mdb:466, lastbuf:460 skipping granule 0
overread, skip -7 enddists: -2 -2
overread, skip -7 enddists: -1 -1
bits_left=-4
overread, skip -7 enddists: -5 -5
bits_left=-3
bits_left=-3
bits_left=-3
overread, skip -7 enddists: -4 -4
bits_left=-5
mdb:470, lastbuf:466 skipping granule 0
overread, skip -5 enddists: -3 -3
overread, skip -6 enddists: -3 -3
overread, skip -9 enddists: -5 -5
mdb:484, lastbuf:469 skipping granule 0
bits_left=-3
overread, skip -8 enddists: -7 -7
bits_left=-2
overread, skip -6 enddists: -5 -5
overread, skip -6 enddists: -4 -4
overread, skip -7 enddists: -5 -5
mdb:476, lastbuf:471 skipping granule 0
overread, skip -7 enddists: -5 -5
bits_left=-6
overread, skip -7 enddists: -4 -4
overread, skip -7 enddists: -2 -2
overread, skip -7 enddists: -6 -6
bits_left=-2
overread, skip -6 enddists: -5 -5
bits_left=-3
mdb:471, lastbuf:463 skipping granule 0
overread, skip -9 enddists: -1 -1
bits_left=-1
mdb:463, lastbuf:461 skipping granule 0
overread, skip -8 enddists: -1 -1
overread, skip -8 enddists: -4 -4
overread, skip -8 enddists: -5 -5
overread, skip -6 enddists: -4 -4
Also note that *in every case tested* the ffmpeg option -re isn't
properly working (RTP packets are sent as soon as possible).
My question is:
is all this severely borken or am I simply badly misusing/misunderstanding
all this?
Can you hint something in the latter case?
Also (sorry for the possibly dumb question) is there a particular
reason for which there is an RTP muxer (libavf/rtpenc.c) but not a
demuxer?
I'll really appreciate any help.
Best regards.
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user