[streaming] Re: [vlc] Variable Resolution Streaming

Bryan Willman willman at drexel.edu
Tue Feb 15 20:49:21 CET 2005


Nirnimesh,

Did you use multiple copies of a file at different bit rates, such that you
would read from a different file to essentially change the rate at the
server?  Or did you have the client switch to requesting a different
bit-rate version of the same file, starting at the time where you left off
in the original file?  I would be interested in the portions of code that
you hacked/modified; it would be very instructive for my purposes.

As for the reporting, I believe you could easily write a module to capture
results from the server or client side.  Open a log file, write to it, then
close it when exiting.  I'm pretty sure you would have access to the payload
size of a packet, or the bit-rate at minimum in VLC.

Thanks,

Bryan
Willman at drexel.edu

-----Original Message-----
From: streaming-bounce at videolan.org [mailto:streaming-bounce at videolan.org]
On Behalf Of Nirnimesh
Sent: Tuesday, February 15, 2005 7:48 AM
To: streaming at videolan.org
Subject: [streaming] Re: [vlc] Variable Resolution Streaming


AFAIK, VLC doesn't support on-the-fly changing the bitrate changes in 
the stream. So I had to hack into the vlc code to identify the place 
where I could plug in _my_ custom code to effect the change in the bitrate.
Now the prob is how should the bitrate change be communicated/notified 
to the vlc? There the vlc's telnet interface comes handy

(http://www.videolan.org/doc/streaming-howto/en/ch05.html)

Once the server is up and running, the client connects to the server and 
issues the input MRL, output MRL. I added extra control commands to the 
vlm module. These are control commands like (specified by the client):-

telnet> control <stream-name> vb 256
	(to change video bitrate to 256)

The parts in the VLC server where things need to be changed to 
accommodate the variable bitrate include the transcoding process. My 
work involved mpeg4 videos only. I changed portions where the ffmpeg 
encoder is called during the encoding process of transcoding so as to 
re-init the target bitrate, and thereby for subsequent encoding, the 
changed bitrate is used.

I have this server working but presently it's all of a hack work. I 
intend to submit this functionality back to the VLC, if this is useful 
for others as well, but that'll require re-factoring of the code :-) 
(You can however let me know if you can make use of my "hacked" VLC code 
itself).


For generating the reports, well.. there doesn't appear to be a direct 
way to measure the bitrate (it's not an instantaneous measure but an 
average). I used ethereal, etc to capture the packets and the I/O graphs 
drawn by it were pretty impressive for my work.

regards
Nirnimesh

http://students.iiit.ac.in/~nirnimesh


Siphiwe Nelwamondo wrote:
> Hi
>  
> I am also interested in changing the bit rate of the stream on a fly as 
> it is part of my project but my problem is that I have no idea what are 
> the procedures to follow in order to do this.
>  
> Please help with the following:
>  
> 1. Can you tell me a step-by-step procedure of how to do this, like for 
> example in the  VideoLAN-howto, they tell you that use these commands to 
> do this. (You talk about control it thru Telnet and hacking VLC but how 
> exactly can I do that).
>  
> 2. How can I gather reports when the stream is playing,  to review later 
> that the bit rate was reduced/increased to x Kbit/s because of an 
> increase/decrease in x number of errors.
>  
> Thank you in advance
>  
> Regards
> Siphiwe
>  
> 
> 
> */Nirnimesh <nirnimesh at students.iiit.net>/* wrote:
> 
>     I too had to stream at bitrate which could be changed on the fly (when
>     the stream is still being played). VLC provides all the environment to
>     allow you to do this but it wasn't implemented. So all I can tell
>     you is
>     that it IS possible with vlc (to be able to change the streaming
>     bitrate
>     on the fly) [control it thru telnet interface]. I had to make several
>     hacks to vlc-0.7.2 to allow me to do all this. See
>     modules/stream_out/transcode.c
> 
> 
>     Nirnimesh
> 
>     http://students.iiit.ac.in/~nirnimesh
> 
> 
>     Bryan Willman wrote:
>      > Hello all,
>      >
>      >
>      >
>      > I'm interested in implementing a multi-rate streaming media
>     mechanism on
>      > videolan. I have done so using Real Media's Helix platform, but for
>      > various reasons I am interested in doing this here as well. Could
>      > someone tell me what would be required as far as implementation
>     to have
>      > videolan increase and decrease the bit rate for a stream based on
>     the
>      > packet loss or delay at the current resolution? By stream, it is
>      > desired that the audio and video be separated and the bit rate
>     for these
>      > streams be modulated independently.
>      >
>      >
>      >
>      > I envision that a media file would need to be encoded at several
bit
>      > rates, for example one high resolution, and another low
>     resolution. The
>      > client starts off subscribing for a file at the highest
>     resolution. At
>      > the onset of congestion it notifies the server to decrease its
>      > resolution via an RTSP message. The server would then start
>     streaming
>      > the lower resolution file to the client. I'm trying to get
>     started in
>      > the right direction; if someone could give me an idea of what
>     would be
>      > required to implement the said mechanism, or what sections of the
>     code
>      > this would involve, that would be great.
>      >
>      >
>      >
>      > Thanks,
>      >
>      >
>      >
>      > Bryan Willman
>      >
>      > Drexel University
>      >
> 
>     -- 
>     This is the streaming mailing-list, see
>     http://www.videolan.org/streaming/
>     To unsubscribe, please read http://www.videolan.org/support/lists.html
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
> 

-- 
This is the streaming mailing-list, see http://www.videolan.org/streaming/
To unsubscribe, please read http://www.videolan.org/support/lists.html

-- 
This is the streaming mailing-list, see http://www.videolan.org/streaming/
To unsubscribe, please read http://www.videolan.org/support/lists.html



More information about the streaming mailing list