[Ffmpeg-devel] MPEG4 streaming over RTP

Luca Abeni lucabe72
Fri Jul 22 09:11:38 CEST 2005


Hello Zoltan,

On Thu, 2005-07-21 at 16:13 +0200, Zoltan NAGY wrote:
> Luca Abeni wrote:
> 
> >4) ./ffplay pippo.sdp (the SDP file is attached to this mail)
> >
> allright, it gives me many errors:
I did some more experiments, with the current CVS code (which includes
the IPV6 fixes). As noted in a previous mail, if you do not disable IPV6
you have to run the program as root.

> plazma3:~/ffmpeg# ./ffplay ../pippo.sdp
> socket: Address family not supported by protocol
> socket: Address family not supported by protocol
These two are ok, I guess... It is just some IPV6 probing code.

> [NULL @ 0xb7e16be8]RTP: PT=60: bad cseq 0000 expected=0001
After looking at the code, I believe this is ok too: the RTP parsing
code does not know with wich value the sequence counter starts, so it
complains about the 1st received packet. A "bad cseq 0000 expected=0001"
at the beginning is ok; the problem is if the message is repeated.

> [NULL @ 0xb7e16be8]hmm, seems the headers are not complete, trying to 
> guess time_increment_bits
> [NULL @ 0xb7e16be8]my guess is 15 bits ;)
> [NULL @ 0xb7e16be8]looks like this file was encoded with 
> (divx4/(old)xvid/opendivx) -> forcing low_delay flag
> [mpeg4 @ 0xb7e16be8]hmm, seems the headers are not complete, trying to 
> guess time_increment_bits
> [mpeg4 @ 0xb7e16be8]my guess is 15 bits ;)
[...]
I guess you started ffmpeg before ffplay, right? If I do so, I get few
errors similar to these ones:
luca at utopia:~/src/tmp/2/ffmpeg
$ ./ffplay ../../../video/vlc-0.7.0/blah.sdp 
socket: Address family not supported by protocol
socket: Address family not supported by protocol
[NULL @ 0x102a6dac]RTP: PT=60: bad cseq 00d4 expected=0000
[NULL @ 0x102a6dac]hmm, seems the headers are not complete, trying to
guess time_increment_bits
[NULL @ 0x102a6dac]my guess is 3 bits ;)
[mpeg4 @ 0x102a6dac]hmm, seems the headers are not complete, trying to
guess time_increment_bits
[mpeg4 @ 0x102a6dac]my guess is 3 bits ;)
[mpeg4 @ 0x102a6dac]Error, header damaged or not MPEG4 header (qscale=0)
[mpeg4 @ 0x102a6dac]Error, header damaged or not MPEG4 header (qscale=0)
[mpeg4 @ 0x102a6dac]header damaged
[mpeg4 @ 0x102a6dac]hmm, seems the headers are not complete, trying to
guess time_increment_bits
[mpeg4 @ 0x102a6dac]my guess is 2 bits ;)
[mpeg4 @ 0x102a6dac]hmm, seems the headers are not complete, trying to
guess time_increment_bits
[mpeg4 @ 0x102a6dac]my guess is 2 bits ;)
[mpeg4 @ 0x102a6dac]warning: first frame is no keyframe

But after few errors the stream plays fine, without giving errors
anymore. I think the errors are caused by the fact that the ffplay
receives a "truncated" stream (since it is started after ffmpeg, the
first part of the stream is lost) and until it is confused until it
receives the "global headers". After receiving such headers, it plays
fine. At least, this is what happens here (unless I remove my patch -
you did apply it, right?)

The solution to avoid these "startup time" errors is to use
CODEC_FLAG_GLOBAL_HEADER and to put the configuration information in the
sdp file. In this way, the decoder has such information immediately and
is not confused by truncated streams (I'll post another example later).

If ffplay still does not work in your configuration, can you send me
your config.* files, and the output of the
./ffmpeg -re -i test.m4v -vcodec copy -f rtp rtp://224.0.10.10:18888
command?

				Luca

 
 
 --
 Email.it, the professional e-mail, gratis per te: http://www.email.it/f
 
 Sponsor:
 Audio, Video, HI-FI...oltre 2.000 prodotti di alta qualit? a prezzi da sogno solo su Visualdream.it 
 Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=2954&d=22-7





More information about the ffmpeg-devel mailing list