[vlc-devel] Re: streaming with vlc

Rafael Canato Luiz rafael.luiz at poli.usp.br
Fri Mar 19 15:39:10 CET 2004

Thanks a lot for your answer! =) Then it goes another....

After vlc receives the ts packet, vlc demux it in es packets (audio and
video) and send the es packets to the decoders, right?? After vlc choose
which module will decode the es video, (libmpeg2 in my case)... How vlc
transform this ts packets in es packets? Is vlc using libdvbpsi to do
this transformation? if so, where is the code of this process? All I
want its to take the es stream to run my decoder... more directly where
does vlc put the es stream?

Thanks again, rcluiz

On Fri, 2004-03-19 at 10:26, Jean-Paul Saman wrote:
> Rafael Canato Luiz wrote:
> >Hi, 
> >I'm trying to do a streamer of mpeg video studying the sources of vlc...
> >
> >Could you tell me how to open a mpeg file (ES) and packetizer it (TS)? 
> >
> >Or teach me how vlc decode this TS stream to an ES mpeg file... all I
> >know is that vlc use the libmpeg2 library as a module, which I used
> >before to obtain the pictures of a mpeg video, but I can't figure out
> >the way vlc does it!!! 
> >  
> >
> I'll try to explain the way VLC handles a stream in a very general way 
> using ASCII pictures ;-)
> Legenda:
>    [ text ]      is a VLC module
>                                                    [ video decoder  ] -- 
> [ filter ] -- [ video output ] --> video device
> input <- [ access ]--[ demux 
> ]__/                                               
> file,                                            \ [ audio decoder ] -- 
> [ filter ] -- [ audio output ] --> audio device
> network,                                              
> etc       <----------------------- VLC 
> --------------------------------------------------------->
> In the drawing above I ommited the interface modules and some others for 
> simplicity reasons. Here is what happens:
> 1) an imput is examined by VLC access modules if they are know to a 
> module, then it will claim it can read the stream and tell VLC core.
> 2) next a demux is choosen in much of the same way. The demux will 
> separate audio and video tracks from the stream (even multiple ones)
> 3) the video stream is going to a matching video decoder (the demux 
> detected which video decoder is needed).
> 4) the audio stream is going to a matching audio decoder (the demux 
> detected which audio decoder is needed).
> 5) after the video decoder several filters can be applied (think of 
> crop, scaling, etc.)
> 6) after the audio decoder several filters can be applied (think of 
> audio downscaling, conversion of audio format to system native formats, 
> etc.)
> 7) the video is going to the video device of choice for the platform of 
> the one that the user requested
> 8) the audio is going to the audio device of choice for the platform of 
> the one that the user requested
> This is all that is too it.
> I cannot teach you all about MPEG TS/PS/ES, because it is a very large 
> specification. Get your self a book to get acquinted with that.
> Now about libmpeg2, that is an implementation of the MPEG specification 
> and is used by VLC as a video decoder module in the above picture.
> Hopefully this short overview gave you some idea of what is happening 
> when decoding an Audio/Video stream.

This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://developers.videolan.org/lists.html
If you are in trouble, please contact <postmaster at videolan.org>

More information about the vlc-devel mailing list