[Live-devel] Unable to proxy mjpeg with live555ProxyServer

Roman Gaufman hackeron at gmail.com
Fri Mar 29 17:41:22 PDT 2013


The MJPEG stream is only 3fps, there is no packet loss, it's a 1gbit
network and nothing else is streaming on the network.

Opening the camera RTSP stream with VLC works fine, no errors, opening the
RTSPRoxy stream with VLC, I get audio only. Opening direct from the camera
with openRTSP works just fine also and I get a playable video-JPEG-1 file
without any errors:

./openRTSP rtsp://192.168.0.221/live2.sdp
Opening connection to 192.168.0.221, port 554...
...remote connection opened
Sending request: OPTIONS rtsp://192.168.0.221/live2.sdp RTSP/1.0
CSeq: 2
User-Agent: ./openRTSP (LIVE555 Streaming Media v2013.03.07)


Received 144 new bytes of response data.
Received a complete OPTIONS response:
RTSP/1.0 200 OK
CSeq: 2
Date: Wed, 21 Jun 1970 8:25:17 GMT
Public: OPTIONS, DESCRIBE, PLAY, SETUP, GET_PARAMETER, SET_PARAMETER,
TEARDOWN


Sending request: DESCRIBE rtsp://192.168.0.221/live2.sdp RTSP/1.0
CSeq: 3
User-Agent: ./openRTSP (LIVE555 Streaming Media v2013.03.07)
Accept: application/sdp


Received 418 new bytes of response data.
Received a complete DESCRIBE response:
RTSP/1.0 200 OK
CSeq: 3
Date: Wed, 21 Jun 1970 8:25:17 GMT
Content-Base: rtsp://192.168.0.221/live2.sdp/
Content-Type: application/sdp
Content-Length: 255

v=0
o=RTSP 1758317 90 IN IP4 0.0.0.0
s=RTSP server
c=IN IP4 0.0.0.0
t=0 0
a=charset:Shift_JIS
a=range:npt=0-
a=control:*
a=etag:1234567890
m=video 0 RTP/AVP 26
a=control:trackID=2
m=audio 0 RTP/AVP 0
a=control:trackID=3
a=rtpmap:0 pcmu/8000

Opened URL "rtsp://192.168.0.221/live2.sdp", returning a SDP description:
v=0
o=RTSP 1758317 90 IN IP4 0.0.0.0
s=RTSP server
c=IN IP4 0.0.0.0
t=0 0
a=charset:Shift_JIS
a=range:npt=0-
a=control:*
a=etag:1234567890
m=video 0 RTP/AVP 26
a=control:trackID=2
m=audio 0 RTP/AVP 0
a=control:trackID=3
a=rtpmap:0 pcmu/8000

Created receiver for "video/JPEG" subsession (client ports 62178-62179)
Created receiver for "audio/PCMU" subsession (client ports 54648-54649)
Sending request: SETUP rtsp://192.168.0.221/live2.sdp/trackID=2 RTSP/1.0
CSeq: 4
User-Agent: ./openRTSP (LIVE555 Streaming Media v2013.03.07)
Transport: RTP/AVP;unicast;client_port=62178-62179


Received 169 new bytes of response data.
Received a complete SETUP response:
RTSP/1.0 200 OK
CSeq: 4
Date: Wed, 21 Jun 1970 8:25:17 GMT
Session: 175832465;timeout=80
Transport: RTP/AVP;unicast;client_port=62178-62179;server_port=5556-5557


Setup "video/JPEG" subsession (client ports 62178-62179)
Sending request: SETUP rtsp://192.168.0.221/live2.sdp/trackID=3 RTSP/1.0
CSeq: 5
User-Agent: ./openRTSP (LIVE555 Streaming Media v2013.03.07)
Transport: RTP/AVP;unicast;client_port=54648-54649
Session: 175832465


Received 169 new bytes of response data.
Received a complete SETUP response:
RTSP/1.0 200 OK
CSeq: 5
Date: Wed, 21 Jun 1970 8:25:17 GMT
Session: 175832465;timeout=80
Transport: RTP/AVP;unicast;client_port=54648-54649;server_port=5558-5559


Setup "audio/PCMU" subsession (client ports 54648-54649)
Created output file: "video-JPEG-1"
Created output file: "audio-PCMU-2"
Sending request: PLAY rtsp://192.168.0.221/live2.sdp/ RTSP/1.0
CSeq: 6
User-Agent: ./openRTSP (LIVE555 Streaming Media v2013.03.07)
Session: 175832465
Range: npt=0.000-


Received 263 new bytes of response data.
Received a complete PLAY response:
RTSP/1.0 200 OK
CSeq: 6
Date: Wed, 21 Jun 1970 8:25:17 GMT
Session: 175832465;timeout=80
RTP-Info: url=rtsp://
192.168.0.221/live2.sdp/trackID=2;seq=0;rtptime=0,url=rtsp://192.168.0.221/live2.sdp/trackID=3;seq=0;rtptime=0
Range: npt=0-
RTCP-Interval: 250


Started playing session
Receiving streamed data (signal with "kill -HUP 14842" or "kill -USR1
14842" to terminate)...


On 30 March 2013 00:05, Ross Finlayson <finlayson at live555.com> wrote:

> I have an IP camera that gives MJPEG over RTSP, I'm trying to proxy the
> stream with:
>
> $ live555ProxyServer rtsp://192.168.0.221/live2.sdp
>
> When I use the openRTSP client like so:
>
> $ ./openRTSP rtsp://127.0.0.1:10110/proxyStream
>
> The output looks like this: http://pastie.org/7167135
>
>
> What happens when you try running "openRTSP" directly on the IP camera
> stream (i.e., without using a proxy server in the middle)?
>
> What happens when you try viewing the stream using VLC - both directly
> from the IP camera, and indirectly, through the proxy?
>
> I suspect that your problem is network packet loss - which is often a
> problem when streaming a low-efficiency codec such as JPEG.  JPEG frames
> are usually *huge*, and each JPEG frame gets packed into many (often
> dozens!) of RTP packets.  If even one of these RTP packets gets lost, the
> entire JPEG frame will get discarded by the receiver.
>
> This situation is worse if you have a proxy server in the middle, because
> it means that - for a complete JPEG frame to make it end-to-end from the IP
> camera to your receiving client - there must be no packet loss either on
> the camera->proxy link, or in the proxy->client link.
>
> Your best solution (especially as appears to be just a hobby for you) is
> to use a better IP camera - one that streams using a better codec (such as
> H.264).  (In 2013, nobody should be streaming MJPEG anymore.)
>
>
> Ross Finlayson
> Live Networks, Inc.
> http://www.live555.com/
>
>
> _______________________________________________
> live-devel mailing list
> live-devel at lists.live555.com
> http://lists.live555.com/mailman/listinfo/live-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20130330/d084a42b/attachment.html>


More information about the live-devel mailing list