[Live-devel] Live Streaming of FFMPEG Encoded Video

Ross Finlayson finlayson at live555.com
Wed Nov 30 15:24:23 PST 2005


>Reading through the list and attempting the suggestions that Ross 
>Finlayson has given, I just can't seem to get a feed working. I 
>setup the RTPSink RTSPServer et all correctly and can stream a 
>sample .m4v file, therefore my issue is in linking FFMPEG to LiveMedia.
>
>I have subclassed the FramedSource class and implemented 
>doGetNextFrame(). As well I am using the 
>MPEG4VideoStreamDiscreteFramer. I believe my issue is in converting 
>from an AVPacket to fTo.

Be sure to *copy* your new frame data to the address pointed to by 
"fTo".  You can do this using (for example) "memmove()" - e.g.
         if (yourFrameSize > fMaxSize) {
                 fNumTruncatedBytes = yourFrameSize - fMaxSize;
                 fFrameSize = fMaxSize;
         } else {
                 fFrameSize = yourFrameSize;
         }
         memmove(fTo, yourFrameData, fFrameSize);

In other words, "fTo" is a pointer to a buffer that was supplied by 
the downstream object.  You need to copy your frame data into this buffer.

>Would it be possible to help me solve this problem by either 
>directing me in a correct direction or supplying a small sample piece of code.

If you haven't already done so, see "DeviceSource.cpp".  Note also 
the various "*FileSource" classes; you may find those useful.


	Ross Finlayson
	Live Networks, Inc. (LIVE555.COM)
	<http://www.live555.com/>



More information about the live-devel mailing list