vlc streaming question

About encoding, codec settings, muxers and filter usage
foruok
Blank Cone
Blank Cone
Posts: 18
Joined: 20 Mar 2008 06:34

vlc streaming question

Postby foruok » 15 Jul 2008 12:36

Hi.
I want to know the streaming process of VLC.
As an example, we streaming from a media file.
Can anyone explain the procedures which VLC takes?
Such as: read file, get codec information, split video and audio, construct a TOC of the file, ...
And as a server, VLC send data block to the clients, follow the example above, the data VLC transfer to the client is raw data with a file offset(just like ftp or http download) or decoded frame data? And if seek is supported, how does VLC implement?

A streaming relative sources file list or function list is also fine, I can read the source code of VLC to get more information. Before the source code digging, I want to get a basic guide.

Thanks.
Best regards.
foruok

olegkirillov
Blank Cone
Blank Cone
Posts: 46
Joined: 29 Jun 2008 21:04

Re: vlc streaming question

Postby olegkirillov » 16 Jul 2008 09:29

Please clarify what do you want to achieve. For now your question too general, there's no marketing people to make PowerPoint presentations on VLC design. :)
In two words the scheme is simple: for each input VLC creates the separate thread which takes care of driving the data from input down to output. The thread (TIMER) picks up the source (input access module), demuxes it (demuxer), and forwards data to decoder (and then to encoder) if transcoding has to be done, then sets the bit rate and muxes the stream (mux module), and, at last, forwards the stream to output access module.

foruok
Blank Cone
Blank Cone
Posts: 18
Joined: 20 Mar 2008 06:34

Re: vlc streaming question

Postby foruok » 17 Jul 2008 03:20

Thanks olegkirillov.
Sorry for my poor English, I can't exactly express myself.
Your explain is close to what I want to know.
In fact, I want to know that the data type VLC stream out to clients. There are several forms:
First, a few video streams and an audio stream . So the raw media file must be split before stream out to clients, just split, no need to decode to the RGB or YUV data(which can be render directly). And the clients handle the decode and synchronization.
Second, just raw data of file, nothing is pretreatment. In this case, the server can prepare a metafile for clients, such as file length, movie duration, video codec, audio codec, etc. For example, I put a .wmv file in my web station, then use vlc to play it via http. vlc work right, seek, pause, all action are right, but my web station do nothing, just feeds data to vlc.
Third, Create the TOC of the media file, construct the map between file offet(relative to the beginning of the file) and the movie duration. For example, 00:00:09 --> 10240 (bytes offset), 00:020:32 -->20480000 (bytes offset). Then the file can be split to many data blocks, every block corresponds to a certain duration. So the clients can seek the movie.

I wonder whether you can understand what I said above.
Thanks.

olegkirillov
Blank Cone
Blank Cone
Posts: 46
Joined: 29 Jun 2008 21:04

Re: vlc streaming question

Postby olegkirillov » 21 Jul 2008 10:30

I think I can understand what you wrote, but still I cannot understand what you are trying to do. You need to allow users select files and play them with possibility to seek? Then you don't need streaming, you're just need progressive download. This can be done without using vlc for server, any http server can be used.


Return to “VLC stream-output (sout)”

Who is online

Users browsing this forum: No registered users and 9 guests