[Ffmpeg-devel] [Ffmpeg-devel-old] rtp mpeg4 packetize problem

Luca Abeni lucabe72
Wed Jul 20 15:21:46 CEST 2005


Hello,

On Wed, 2005-07-20 at 12:57 +0200, Zoltan NAGY wrote:
> after av_read_frame(), split the frame into packets, put the rtp header 
> on them, and send them over the network.
> 
> it sounds very simple, but.. does it work? :)
Yes, it can work... Provided that you properly fill the RTP header :)
Anyway, as I said in my previous mail I think the RTP code in
libavformat is in a good shape, and it should not be difficult to use it
for sending MPEG4 video (I suspect rtp_send_raw should be fixed to set
the M bit in the last packet, but this should be simple...). However, I
did not test it.

> and is it enough if I mark the payload time in the header for vlc to 
> recognize that it's a video stream?
It depends by the video type... For example, MPEG1, MPEG2, and some
other codecs have a fixed payload type assigned to them, whereas MPEG4
uses a dynamic payload type assignment... You can use a "free" payload
type, and you have to describe it in the SDP (see the rtpmap line).

> and how do I stream audio also? send sometimes audio sometimes video 
> packets on the same port,
No, you generally should use two different ports (described in the SDP)
for audio and video.

Also, audio is generally incapsulated in RTP in a more complex way (I do
not remember the RFC right now... Look at mpeg4ip or at the live.com
libraries for more info).

				Luca

 
 
 --
 Email.it, the professional e-mail, gratis per te: http://www.email.it/f
 
 Sponsor:
 Digitalpix stampa le tue migliori foto digitali 
* su vera carta fotografica professionale.
 Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=1532&d=20-7





More information about the ffmpeg-devel mailing list