AW: AW: [Ffmpeg-devel] Is there any tutorial about RTPfunctions?

Luca Abeni lucabe72
Mon Apr 24 13:03:07 CEST 2006


Hi,

On Mon, 2006-04-24 at 10:57 +0200, Wiese, Hendrik wrote:
[...]
> > If/when I find some time, maybe I'll write a short tutorial about
> > streaming with ffmpeg, and I'll submit it for inclusion in the
> > documentation.
> 
> 
> Perhaps one of you can tell at least me what I have to do to get real
> RTP Payloads out of the data that is pushed into the rtp_callback
> function
Unfortunately, I never used rtp_callback. I used rtp as an output
format. You can find all the details in the emails I cited, but in few
words you can stream MPEG4 video with something like:
ffmpeg -re -i file.m4v -vcodec copy -f rtp rtp://224.0.10.10:18888?multicast=1
where file.m4v is an MPEG4 video ES.
ffmpeg.c contains all the code showing how to do that in your own
application

That said, I _suspect_ (I never tried it) that rtp_callback() provides
you with the video ES, so to obtain a valid RTP payload you will have to
write a proper payload header (to understand how such header is done,
read the proper RFC - every video format needs a different payload).

The rtp output format (see libavformat/rtp.c) is able to write the
payload for MPEG1/2 video (and MPEG4 video too, since for MPEG4 video
the payload is just the ES): see rtp_write_packet(),
rtp_send_mpegvideo(), and rtp_send_raw(). But if you use rtp_callback I
suspect you are not going to use such code.


			Luca
-- 
Proud to be "coglione"





More information about the ffmpeg-devel mailing list