Gstreamer streaming issue- video is laggy and choppy (=succession of short freezings)

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
Report Content as Inappropriate

Gstreamer streaming issue- video is laggy and choppy (=succession of short freezings)

This post was updated on .
I'm using Gstreamer to stream video shot with a digital camera with a phone through a server to a PC app.

■ About the hard configuration:
Windows PC and Android are connected through LAN.
Android connects  WiFi to router.  PC connects thorugh wire to router.

■  Programs installed:
- On PC:  1. A streaming server app.
      2. Gstreamer player
      3. A user program that connects to the server, and uses the player (Gstreamer); it has a GUI and can display the streamed video in full screen.
- On Android: the streaming app. It sends mjpeg stream through LAN to the server program on PC.  

■  Camera streams video to LAN.  Android app connects to camera, captures the video streamed by the camera and re-streams it to a server app installed on PC.
The server sends video to a program installed on same PC, which displays it.

■  Technology used:
- Streamed data format is movie jpeg (this is the only one that cannot be changed).
- Streaming protocol is RTSP over UDP.

■  Gstreamer command is:
 -v udpsrc caps="application/x-rtp,encoding-name=JPEG,payload=26" port=6000 ! rtpjpegdepay ! jpegdec ! videoconvert ! queue !  x264enc ! rtph264pay config-interval=10 pt=96 ! udpsink host= port=5000 sync=false

 and configuration for VLC in SDP file:
 m=video 5000 RTP/AVP 96
 c=IN IP4
 a=rtpmap:96 JPEG/90000

■  The problem is that streaming is laggy and choppy, far from being smooth; I get freezings on both Android and PC. There is a succession of these short freezings/unfreezings, sometimes PC/Android in the same time and sometime unrelated.
I shot a movie with the screens of both PC and Android, it can be downloaded from here:

I assume some packets may be lost or order is not kept right.
Any hint how this issue should be corrected? I welcome any suggestions about where I should look into and how to deal with this.