How can VLC Streaming (sout) Multiple Bitrates?

About encoding, codec settings, muxers and filter usage
bdk907
New Cone
New Cone
Posts: 7
Joined: 10 Mar 2008 22:21
VLC version: 0.9.3
Operating System: ˈlɪnəks
Location: Anchorage, AK

How can VLC Streaming (sout) Multiple Bitrates?

Postby bdk907 » 20 Oct 2008 03:20

Does VLC support streaming of different bit-rates. I found a viewtopic.php?f=14&t=29430&p=91181&hili ... ate#p91181 that VLC doesn't support multiple bit-rates, but I think they're referring to it rebroadcasting multiple bit-rates vs. creating those different bit rates.

What I have that works:

vlc -I dummy v4l:// :v4l-vdev="/dev/video0" :v4l-adev="/dev/adsp1" :v4l-norm=1 :v4l-channel=1 --sout '#transcode{vcodec=h264,vb=1024,scale=1,acodec=mpga,ab=64,channels=2}:duplicate{dst=display,dst=std{access=file,mux=ts,dst="/home/bdk/Desktop/test_1.mpg"},dst=std{access=http,mux=ts,dst=:8080}}'

I'd like to add a 2nd stream but at 256kbps and maybe even an audio only stream. I've tried lots of combinations using the various commands that I found http://www.videolan.org/doc/streaming-h ... /ch03.html and in the chapter before it that gives examples.

When I try:

vlc -I dummy -vvv v4l:// :v4l-vdev="/dev/video0" :v4l-adev="/dev/adsp1" :v4l-norm=1 :v4l-channel=1 --sout '#transcode{vcodec=h264,vb=512,scale=1,acodec=mpga,ab=32,channels=1}:duplicate{dst=std{access=http,mux=ts,dst=:8080/high}}' --sout '#transcode{vcodec=h264,vb=256,scale=1,acodec=mpga,ab=16,channels=1}:duplicate{dst=std{access=http,mux=ts,dst=:8080/low}}'

I get only the 8080/low stream.

When I try:

vlc -I dummy -vvv v4l:// :v4l-vdev="/dev/video0" :v4l-adev="/dev/adsp1" :v4l-norm=1 :v4l-channel=1 --sout '{#transcode{vcodec=h264,vb=512,scale=1,acodec=mpga,ab=32,channels=1}:duplicate{dst=std{access=http,mux=ts,dst=:8080/high}}:transcode{vcodec=h264,vb=256,scale=1,acodec=mpga,ab=16,channels=1}:duplicate{dst=std{access=http,mux=ts,dst=:8080/low}}}'

I only get the 8080/high stream.

Ultimate I'd like to capture the video/stream at 1024k to a file for later viewing and to rebroadcast a high (512k) & a low (256k) bandwidth stream. I just can't figure out how to glue it all together. I've tried putting quotes around everything and even putting the modules all in one big curly bracket, nothing seems to be making the difference.

Using VLC 0.8.6e (default Ubuntu install).

TIA

-bdk

aegyssus
Blank Cone
Blank Cone
Posts: 28
Joined: 21 Mar 2008 21:50
VLC version: latest
Operating System: Windows / Linux
Location: Montréal, Canada
Contact:

Re: How can VLC Streaming (sout) Multiple Bitrates?

Postby aegyssus » 20 Oct 2008 16:48

Hi,
I did not try it but I would suggest you to give VLM a try and simply define two broadcast streams using the same source.

bkuehner
New Cone
New Cone
Posts: 2
Joined: 11 Jun 2008 00:34

Re: How can VLC Streaming (sout) Multiple Bitrates?

Postby bkuehner » 22 Oct 2008 20:42

After a few hours of messing with the command syntax in endless combinations, I got something that works:
vlc mms://online.ntdtvcast.com/Stream-Live --sout #duplicate{dst=display,
dst={transcode{vcodec=MJPG,vb=1024,width=320,height=240,acodec=mpga,ab=192,channels=2}:standard{access=udp,mux=ts,dst=239.192.1.1}},
dst={transcode{vcodec=MJPG,vb=512,width=160,height=120,acodec=mpga,ab=192,channels=2}:standard{access=udp,mux=ts,dst=239.192.1.101}}}

I've broken it into multiple lines for the post, but to make it work I put it all on one line, in a batch file. It takes one input stream and duplicates it to three places:
1) display
2) a transcoded 320x240 MJPG stream UDP multicast on 239.192.1.1
3) a transcoded 160x120 MJPG stream UDP multicast on 239.192.1.101

The key thing seemed to be using {} around the dst= section for each transcode. This is with 0.8.6h

If you can't get it to work, let me know and I'll see if I can help, but the disclaimer is that I'm just starting to use VLC myself.
(this is reposted from an old thread: viewtopic.php?f=4&t=35849&p=151130&hili ... am#p151130 )

karapetyan
Blank Cone
Blank Cone
Posts: 64
Joined: 17 May 2010 14:48

Re: How can VLC Streaming (sout) Multiple Bitrates?

Postby karapetyan » 18 May 2010 20:41

Bkuehner, thank you!
:-)


Return to “VLC stream-output (sout)”

Who is online

Users browsing this forum: No registered users and 10 guests