Posts: 2
Joined: Mon Feb 18, 2013 7:55 pm

Streaming Video Freezes (mjpg-streamer/gstreamer)

Mon Feb 18, 2013 8:20 pm

Hello everybody,

I'm relatively new to the Raspberry and Linux and this is my first post here.

Yesterday I finally started experimenting with RPi and in particular, with the video streaming.
Firstly, I used mjpg-streamer, and everything was just fine (320x240, ~1 sec latency).
Today, I encoutered a problem where both images either with mjpg-streamer and gstreamer are freezing with the first frames displayed.
I am using cheap Genius Facecam 320X (hope to obtain better one soon). YUYV only (from v4l2-ctl --list-fomats). I am using WiFi adapter with the Realtek RTL8192SU.

Commands I used for launching:

Code: Select all

sudo mjpg_streamer -i "/usr/lib/input_uvc.so -y -d /dev/video0  -r 320x240 -f 25" -o "/usr/lib/output_http.so -p 8090 -w /var/www/mjpg_streamer"
The picture changes approximately each 30 seconds.

Code: Select all

sudo gst-launch-0.10 v4l2src device=/dev/video0 ! 'video/x-raw-yuv,width=320,height=240, framerate=20/1'! ffmpegcolorspace ! rtpvrawpay ! udpsink host= port=4000 sync=false
At the receiving site:

Code: Select all

gst-launch-0.10 udpsrc caps="application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)RAW, sampling=(string)YCbCr-4:2:0, depth=(string)8, width=(string)320, height=(string)240, ssrc=(uint)1825678493, payload=(int)96, clock-base=(uint)4068866987, seqnum-base=(uint)24582" port=4000 ! queue ! rtpvrawdepay ! queue ! ffmpegcolorspace ! autovideosink
The video freezes with both wired and wireless connections. The load indicator o the RPi doesn't show any activity. Latency between the computers and RPi is fine (<1ms for wired and 5-30ms for wireless).

Ideally, I would like to achieve 720p streaming with as low latency as possible.

Any help would be appreciated.

Posts: 177
Joined: Tue Oct 16, 2012 3:03 pm
Location: The East of England

Re: Streaming Video Freezes (mjpg-streamer/gstreamer)

Tue Feb 19, 2013 11:09 am

Drac wrote:Firstly, I used mjpg-streamer, and everything was just fine (320x240, ~1 sec latency).
There's another thread, albeit for MJPEG streams, which might help
http://www.raspberrypi.org/phpBB3/viewt ... 42#p286442

For me, using the latest 2013-02-19 image, and with MJPEG from the camera, the best consistant regular stream I get is by setting 1 fps (640x480 or any smaller). MJPG-streamer accepts faster fps settings, but the display (on a Fujitsu Siemens Pocket LOOX PDA running WM5 and using the TCPMP multimedia player) is bursty in terms of number of frames played in a burst and the variable amount of time between bursts.

I too had hoped for better.

Posts: 2
Joined: Mon Feb 18, 2013 7:55 pm

Re: Streaming Video Freezes (mjpg-streamer/gstreamer)

Tue Feb 19, 2013 12:20 pm

Thank you for your answer.

Today I bought a new camera (Logitech C270), and this seem to have resolved the issue.
The old camera still produces the freezy images and seems to be broken.

Code: Select all

sudo mjpg_streamer -i "/usr/lib/input_uvc.so -d /dev/video0  -r 1280x720 -f 25" -o "/usr/lib/output_http.so -p 8090 -w /var/www/mjpg_streamer"
This is working relatively good with about 1 second latency

Return to “Graphics, sound and multimedia”