[FFmpeg-devel] Splitting an MPEG{1,2} frame in slices

Michael Niedermayer michaelni
Mon Aug 20 14:04:31 CEST 2007


Hi

On Mon, Aug 20, 2007 at 01:42:57PM +0200, Luca Abeni wrote:
> Hi all,
> 
> I am working on fixing MPEG{1,2} video RTP streaming...
> The RFC requires to split each video frame in slices, and to set the 
> "MPEG Video-specific header" (first 4 or 8 bytes of the RTP payload) 
> accordingly (there are bits to set at the beginning of a slice, at the 
> end of a slice, etc...).
> 
> I can parse the video frame "by hand", searching for "0x000001" 
> sequences, but I want to avoid replicating some already existing code, 
> so I am wondering if libavcodec already provides functions for splitting 
> MPEG{1,2} video frames in slices.

ff_find_start_code() could come in handy

also AVCodecContext.rtp_callback() should be called at the begin of
slices by the encoder, but that obviously wont work if you want to
stream an existing mpeg compared to encode+stream

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

It is dangerous to be right in matters on which the established authorities
are wrong. -- Voltaire
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070820/f454f73f/attachment.pgp>



More information about the ffmpeg-devel mailing list