[Live-devel] MPEG2 raw-UDP streaming

Alex Sadovsky alex_sad at list.ru
Thu Apr 7 13:29:19 PDT 2005


> >I have MPEG2 audio and video encoder which deliver discrete mpeg2 video 
> >frames and mpeg layer II audio frames. I nees to streams this to a set-top 
> >box like device by raw UDP and RTSP. I looked at testOnDemandRTSPServer 
> >example, but it streams from file. How is it possible to set up RTSP 
> >server for live source?
> 
> If, however, your 'live source' is *not* accessible as a file (e.g., 
> because you're running some brain-damaged OS like Windows), then you will 

I'm grabbing DV25 from IEEE1394 device and transcode it to MPEG2 with ffmpeg's avcodec library

> need to write a new "ServerMediaSession" class that gets its input from 
> your live source, rather than from a file.  In particular, you will need to 
> write a new subclass of "OnDemandServerMediaSubsession" that defines the 
> two virtual functions
>          createNewStreamSource()
> and
>          createNewRTPSink()
> 
> "createNewStreamSource()" will be similar to the version that was 
> implemented for "MPEG2TransportFileServerMediaSubsession", except that it 
> will read from your live input source instead of from a "ByteStreamFileSource".

I see. As I understand it, I need properly muxed transport stream. Can I use MPEG2TransportStreamFromPESSource for this? 

> 
> "createNewRTPSink()" can be *identical* to the version that was implemented 
> for "MPEG2TransportFileServerMediaSubsession".  (If you are streaming raw 
> UDP rather than RTP, then this function won't actually get called, but it 
> needs to be defined.)
> 

>From the testOnDemandRTSPServer example, I can not see why it will stream using raw UDP rather than RTP. Where is it specified?






More information about the live-devel mailing list