Page 1 of 1

Streaming webcam - VLC ignores bitrate and framerate setting

Posted: 07 Aug 2013 20:02
by moeburn
Hello! I'm trying to stream a webcam from my Lubuntu Linux netbook to my Windows 8 desktop PC, using cvlc to stream, and VLC to view the stream. I downloaded the latest version of each about a week ago, so I believe they are both up to date.

I'm using the following command line to stream the webcam:

Code: Select all

cvlc v4l2:///dev/video0:size=640x480 --sout '#transcode{vcodec=MJPG,vb=400,scale=1,fps=10}:duplicate{dst=std{access=http{mime=multipart/x-mixed-replace;boundary=--7b3cc56e5f51db803f790dad720ed50a},mux=mpjpeg,dst=:1234/webcam.mjpg}}'
I stole it from a website guide on streaming webcams, so it might not be the ideal solution for what I'm doing. For example, I don't need the http access, or the multiple jpeg mux, because I'm not viewing it in a web browser, but mux=ts and mux=ps didn't work at all, so I just stuck with what worked.

Now even though I have vb=400, if I don't set fps=10, it streams at about 32000kbit/s, uses pretty much all the available wireless bandwidth, and heats up the CPU quite a bit. If I set FPS=10, I manage to get it down to 8000kbit/s, but still nowhere near the 400kbit/s I have set it to. It seems to completely ignore the vb setting, I could set it to 50 or 50000, it makes no difference.

It also seems to partially ignore the framerate setting. fps=10 works, and fps=15 works. But fps=5, fps=8, anything under 10, doesn't work, and defaults back to 30fps, and uses all of the network bandwidth again. Is this because of the streaming/encoding/muxing method I'm using?

Re: Streaming webcam - VLC ignores bitrate and framerate set

Posted: 13 Aug 2013 10:37
by Jean-Baptiste Kempf
Unfortunately, you need to modify some other arguments, like qscale in the libavcodec options.