Optimal settings for a live webcam feed at 720p

About encoding, codec settings, muxers and filter usage
ensnare
New Cone
New Cone
Posts: 2
Joined: 29 Nov 2011 21:09

Optimal settings for a live webcam feed at 720p

Postby ensnare » 29 Nov 2011 21:13

Hi -- I'm using the Logitech C910 and am trying to set up a real-time feed over my local gigabit network in 720p. Here's the configuration I'm using from the console:

vlc v4l2:///dev/video0 \
:v4l2-aspect-ratio=16\:9 :v4l2-width=1280 :v4l2-height=720 :v4l2-fps=30 \
:v4l2-set-ctrls={video_bitrate_mode=1,video_bitrate=4000000,video_peak_bitrate=4000000} \
-d -vvv \
--sout '#transcode{venc=x264{subme=7, ref=3, bframes=16, b-adapt=1, bpyramid=none, weightp=0}, vcodec=h264, vb=1300, width=1280, height=720, threads=4}:std{access=http, mux=asf, dst=:8080}'

This seems to work with good quality but there are some problems:

1. The stream has a 10-second delay. I'd like to get this as close to realtime as possible.
2. The stream has no audio. I'd like to include audio (aac 192kbps if possible)
3. The stream does not play back at constant time. Some parts are played at 1x, others at 2x, and others at 0.5x.
4. The stream plays at what appears to be 5-6fps. I'd like as close to 30fps as possible.

Any suggestions to modify? Thanks for your help!

Greg
Cone that earned his stripes
Cone that earned his stripes
Posts: 316
Joined: 24 Feb 2009 00:37

Re: Optimal settings for a live webcam feed at 720p

Postby Greg » 30 Nov 2011 01:15

@2
Include your audio device into the input string. The default input devices would be
vlc v4l2:// :input-slave=alsa:// :v4l2-standard=0
And add your audio settings in the output string

@1,3,4
You need more cpu or less pixel area for most of this.
Try 640x360 or less to start with, this should allow more fps. H/X 264 is very cpu intensive

Increase vb=xx value will help if possible in your case
Also mux=flv might help with the delay

The default settings (input/output strings)in the GUI are a reasonably optimised startpoint. Tinkering with settings may help, but CPU, pixel area and vb (bandwidth target) are the major factors.

ensnare
New Cone
New Cone
Posts: 2
Joined: 29 Nov 2011 21:09

Re: Optimal settings for a live webcam feed at 720p

Postby ensnare » 30 Nov 2011 12:21

Thanks -- I'll try those settings.

How could I simultaneously stream in 720p uncompressed, and 640x360 H/X264? This way users on the local network could get to the 720p feed, and internet users could view the compressed but more efficiently processed smaller feed?

Would this work?

Thanks!

Greg
Cone that earned his stripes
Cone that earned his stripes
Posts: 316
Joined: 24 Feb 2009 00:37

Re: Optimal settings for a live webcam feed at 720p

Postby Greg » 01 Dec 2011 02:24

1280x720 processing is going to consume a deal of CPU whatever.
Suggest you experiment to get the best trade off between expected quality vs hardware & bandwidth available (lan and/or wan)


Return to “VLC stream-output (sout)”

Who is online

Users browsing this forum: No registered users and 14 guests