Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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?

share|improve this question
    
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... –  run Jul 23 '12 at 20:16
add comment

1 Answer

up vote 1 down vote accepted

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.

share|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 –  run 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 –  run 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. –  run Jul 23 '12 at 20:27
show 1 more comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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