I would like to stream my webcam through network,

I'm using the following command

vlc v4l2:// :v4l2-dev=/dev/video0 :v4l2-width=640 :v4l2-height=480 --sout="#transcode{vcodec=h264,vb=800,scale=1,acodec=mp4a,ab=128,channels=2,samplerate=44100}:rtp{sdp=rtsp://:8554/live.ts}" -I dummy

I tested in the same network and I have around 10s delay. For me is acceptable the 1,2s delay. Is there any other solution which is faster? If I'm using two VLC(in the same computer) one for streaming one for playing still I have the same delay. Is it possible to reduce this delay using vlc or other solution?

  • if you lower the bitrate, it might very well be faster. try changing the "800" to "300" and the "128" to "48" – Janus Troelsen Jul 23 '12 at 20:08
  • I tried, but I'm getting the same delay... – OHLÁLÁ Jul 23 '12 at 20:16

if you are streaming over LAN, you could try using the networked X11 protocol directly instead. Try connecting from the remote machine with "ssh -C -X user@remotehost" ("C" for compression, consider removing if your network is fast). Now, in the remote shell session, you can show the webcam by i.e. "mplayer -vo x11 v4l2://". A lower resolution over networked X11 will probably get you less delay.

| improve this answer | |
  • This is a good idea, but for me it's not good because I'm using the live stream to display on an Android system – OHLÁLÁ Jul 23 '12 at 20:15
  • What are you using on the Android to display the stream? – Janus Troelsen Jul 23 '12 at 20:16
  • I'm using VideoView to play the stream, on the phone I have more delay, around 14-15s – OHLÁLÁ Jul 23 '12 at 20:21
  • And what are you using on the computer to play it? – Janus Troelsen Jul 23 '12 at 20:24
  • I'm using VLC on the PC to play the stream. – OHLÁLÁ Jul 23 '12 at 20:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.