[Live-devel] Fwd: Recording rtsp over tcp, file is corrupt.

Belitskiy Gennadiy Aleksandrovich bgal at tehnologia.com
Thu Aug 11 01:40:56 PDT 2016



$ openRTSP -K -b 1000000 -4 -P 15
-c -t -v -F ./test rtsp://192.168.0.7/live/ch00_0
Warning: The -q, -4 or -i option was used, but not -w.  Assuming a video
width of 240 pixels
Warning: The -q, -4 or -i option was used, but not -h.  Assuming a video
height of 180 pixels
Warning: The -q, -4 or -i option was used, but not -f.  Assuming a video
frame rate of 15 frames-per-second
Opening connection to 192.168.0.7, port 554...
...remote connection opened
Sending request: OPTIONS rtsp://192.168.0.7/live/ch00_0 RTSP/1.0
CSeq: 2
User-Agent: ../openRTSP (LIVE555 Streaming Media v2015.11.09)


Received 105 new bytes of response data.
Received a complete OPTIONS response:
RTSP/1.0 200 OK
CSeq: 2
Server: UBNT Streaming Server v1.2
Public: DESCRIBE, SETUP, TEARDOWN, PLAY


Sending request: DESCRIBE rtsp://192.168.0.7/live/ch00_0 RTSP/1.0
CSeq: 3
User-Agent: ../openRTSP (LIVE555 Streaming Media v2015.11.09)
Accept: application/sdp


Received 556 new bytes of response data.
Received a complete DESCRIBE response:
RTSP/1.0 200 OK
CSeq: 3
Server: UBNT Streaming Server v1.2
Content-Base: rtsp://192.168.0.7/live/ch00_0/
Content-Type: application/sdp
Content-Length: 393

v=0
o=- 1 1 IN IP4 127.0.0.1
s=Ubiquiti Live
i=UBNT Streaming Media
c=IN IP4 0.0.0.0
t=0 0
m=video 0 RTP/AVP 99
b=AS:50000
a=framerate:25
a=x-dimensions:1280,720
a=x-vendor-id:ubnt,a521
a=x-rtp-ts:4617405454576779984
a=rtpmap:99 H264/90000
a=fmtp:99
profile-level-id=42A01E;packetization-mode=1;sprop-parameter-sets=Z0IAKOkAoAt1xIAG3dAAzf5gDYgQlA==,aM4xUg==
a=control:trackID=0

Opened URL "rtsp://192.168.0.7/live/ch00_0", returning a SDP description:
v=0
o=- 1 1 IN IP4 127.0.0.1
s=Ubiquiti Live
i=UBNT Streaming Media
c=IN IP4 0.0.0.0
t=0 0
m=video 0 RTP/AVP 99
b=AS:50000
a=framerate:25
a=x-dimensions:1280,720
a=x-vendor-id:ubnt,a521
a=x-rtp-ts:4617405454576779984
a=rtpmap:99 H264/90000
a=fmtp:99
profile-level-id=42A01E;packetization-mode=1;sprop-parameter-sets=Z0IAKOkAoAt1xIAG3dAAzf5gDYgQlA==,aM4xUg==
a=control:trackID=0

Created receiver for "video/H264" subsession (client ports 49382-49383)
Sending request: SETUP rtsp://192.168.0.7/live/ch00_0/trackID=0 RTSP/1.0
CSeq: 4
User-Agent: ../openRTSP (LIVE555 Streaming Media v2015.11.09)
Transport: RTP/AVP/TCP;unicast;interleaved=0-1


Received 107 new bytes of response data.
Received a complete SETUP response:
RTSP/1.0 200 OK
CSeq: 4
Transport: RTP/AVP/TCP;unicast;interleaved=0-1
Session: 2B38EA3D4BD26EE64076


Setup "video/H264" subsession (client ports 49382-49383)
Outputting to the file: "./test-00000-00015.mp4"
Sending request: PLAY rtsp://192.168.0.7/live/ch00_0/ RTSP/1.0
CSeq: 5
User-Agent: ../openRTSP (LIVE555 Streaming Media v2015.11.09)
Session: 2B38EA3D4BD26EE64076
Range: npt=0.000-


Received a complete PLAY response:
RTSP/1.0 200 OK
CSeq: 5
Session: 2B38EA3D4BD26EE64076
Range: npt=now-
RTP-Info: url=rtsp://192.168.0.7/live/ch00_0//trackID=0;seq=21632;rtptime=0


Started playing session
Receiving streamed data (signal with "kill -HUP 9662" or "kill -USR1
9662" to terminate)...
Outputting to the file: "./test-00015-00030.mp4"



$  mplayer test-00000-00015.mp4
MPlayer -5 (C) 2000-2015 MPlayer Team
do_connect: could not connect to socket
connect: No such file or directory
Failed to open LIRC support. You will not be able to use your remote
control.

Playing test-00000-00015.mp4.
libavformat version 56.40.101 (external)
Mismatching header version 56.36.100
libavformat file format detected.
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7ffff33ee920]Protocol name not provided,
cannot determine if input is local or a network protocol, buffers and
access patterns cannot be configured optimally without knowing the protocol
[h264 @ 0x7ffff2969460]no frame!
[h264 @ 0x7ffff2969460]no frame!
[lavf] stream 0: video (h264), -vid 0
VIDEO:  [H264]  1280x720  24bpp  25.000 fps  1965.9 kbps (240.0 kbyte/s)
Clip info:
  major_brand: mp42
  minor_version: 0
  compatible_brands: mp42isom
  creation_time: 2016-07-27 07:01:25
Load subtitles in ./
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
libavcodec version 56.60.100 (external)
Mismatching header version 56.41.100
Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
==========================================================================
Audio: no sound
Starting playback...
[h264 @ 0x7ffff2969460]no frame!
Error while decoding frame!
[h264 @ 0x7ffff2969460]no frame!
Error while decoding frame!
Movie-Aspect is undefined - no prescaling applied.
VO: [xv] 1280x720 => 1280x720 Planar YV12  [zoom]
V:   2.0   0/  0  9%  2%  0.0% 0 0
[h264 @ 0x7ffff2969460]no frame!
Error while decoding frame!
[h264 @ 0x7ffff2969460]no frame!
Error while decoding frame!
V:   4.1   0/  0  8%  1%  0.0% 0 0
[h264 @ 0x7ffff2969460]no frame!
Error while decoding frame!
[h264 @ 0x7ffff2969460]no frame!
Error while decoding frame!
V:   6.2   0/  0  7%  1%  0.0% 0 0
[h264 @ 0x7ffff2969460]no frame!
Error while decoding frame!
[h264 @ 0x7ffff2969460]no frame!
Error while decoding frame!
V:   8.2   0/  0  7%  1%  0.0% 0 0
[h264 @ 0x7ffff2969460]no frame!
Error while decoding frame!



If you open in Firefox, then error message "Video can't be played
because the file is corrupt". If you open in Chromium, then not playing.
But if you record over UDP, then all is well. All played. But I need
over TCP.



$ openRTSP -K -b 1000000 -4 -P 15 -c -v  -F ./test rtsp://10.0.1.249/11
Warning: The -q, -4 or -i option was used, but not -w. Assuming a video
width of 240 pixels
Warning: The -q, -4 or -i option was used, but not -h. Assuming a video
height of 180 pixels
Warning: The -q, -4 or -i option was used, but not -f. Assuming a video
frame rate of 15 frames-per-second
Opening connection to 10.0.1.249, port 554...
...remote connection opened
Sending request: OPTIONS rtsp://10.0.1.249/11 RTSP/1.0
CSeq: 2
User-Agent: ../openRTSP (LIVE555 Streaming Media v2015.11.09)


Received 120 new bytes of response data.
Received a complete OPTIONS response:
RTSP/1.0 200 OK
Server: HiIpcam/V100R003 VodServer/1.0.0
Cseq: 2
Public: OPTIONS, DESCRIBE, SETUP, TEARDOWN, PLAY


Sending request: DESCRIBE rtsp://10.0.1.249/11 RTSP/1.0
CSeq: 3
User-Agent: ../openRTSP (LIVE555 Streaming Media v2015.11.09)
Accept: application/sdp


Received 607 new bytes of response data.
Received a complete DESCRIBE response:
RTSP/1.0 200 OK
Server: HiIpcam/V100R003 VodServer/1.0.0
Cseq: 3
Content-Type: application/sdp
Content-length: 411
Date: Mon, 23 May 2012 06:51:26 GMT
Content-Base: rtsp://10.0.1.249/11/

v=0
o=StreamingServer 3331435948 1116907222000 IN IP4 10.0.1.249
s=\11
c=IN IP4 0.0.0.0
b=AS:4100
t=0 0
a=control:*
m=video 0 RTP/AVP 96
b=AS:4000
a=framerate:15
a=control:trackID=0
a=rtpmap:96 H264/90000
a=fmtp:96 packetization-mode=1;profile-level-id=420029;
sprop-parameter-sets=Z00AKpWoHgCJ+VA=,aO48gA==
a=framesize:96 1920-1080
m=audio 0 RTP/AVP 8
a=control:trackID=1
a=rtpmap:8 PCMA/8000

Opened URL "rtsp://10.0.1.249/11", returning a SDP description:
v=0
o=StreamingServer 3331435948 1116907222000 IN IP4 10.0.1.249
s=\11
c=IN IP4 0.0.0.0
b=AS:4100
t=0 0
a=control:*
m=video 0 RTP/AVP 96
b=AS:4000
a=framerate:15
a=control:trackID=0
a=rtpmap:96 H264/90000
a=fmtp:96 packetization-mode=1;profile-level-id=420029;
sprop-parameter-sets=Z00AKpWoHgCJ+VA=,aO48gA==
a=framesize:96 1920-1080
m=audio 0 RTP/AVP 8
a=control:trackID=1
a=rtpmap:8 PCMA/8000

Created receiver for "video/H264" subsession (client ports 49134-49135)
Ignoring "audio/PCMA" subsession, because we've asked to receive a
single video session only
Sending request: SETUP rtsp://10.0.1.249/11/trackID=0 RTSP/1.0
CSeq: 4
User-Agent: ../openRTSP (LIVE555 Streaming Media v2015.11.09)
Transport: RTP/AVP;unicast;client_port=49134-49135


Received 245 new bytes of response data.
Received a complete SETUP response:
RTSP/1.0 200 OK
Server: HiIpcam/V100R003 VodServer/1.0.0
Cseq: 4
Session: 320700976301209; timeout=60
Date: Mon, 23 May 2012 06:51:26 GMT
Transport:
RTP/AVP;unicast;client_port=49134-49135;server_port=5100-5101;ssrc=39c0fd61;mode="PLAY"


Setup "video/H264" subsession (client ports 49134-49135)
Outputting to the file: "./test-00000-00015.mp4"
Sending request: PLAY rtsp://10.0.1.249/11/ RTSP/1.0
CSeq: 5
User-Agent: ../openRTSP (LIVE555 Streaming Media v2015.11.09)
Session: 320700976301209
Range: npt=0.000-


Received 222 new bytes of response data.
Received a complete PLAY response:
RTSP/1.0 200 OK
Server: HiIpcam/V100R003 VodServer/1.0.0
Cseq: 5
Session: 320700976301209
Range: npt=0-
RTP-Info: url=rtsp://10.0.1.249/11/trackID=0;seq=0;rtptime=163978725431
Date: Mon, 23 May 2012 06:51:26 GMT


Started playing session
Receiving streamed data (signal with "kill -HUP 9827" or "kill -USR1
9827" to terminate)...
Outputting to the file: "./test-00015-00030.mp4"


$ mplayer test-00000-00015.mp4
MPlayer -5 (C) 2000-2015 MPlayer Team
do_connect: could not connect to socket
connect: No such file or directory
Failed to open LIRC support. You will not be able to use your remote 
control.

Playing test-00000-00015.mp4.
libavformat version 56.40.101 (external)
Mismatching header version 56.36.100
libavformat file format detected.
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7ffff33ee920]Protocol name not provided, 
cannot determine if input is local or a network protocol, buffers and 
access patterns cannot be configured optimally without knowing the protocol
Invalid UE golomb code
[lavf] stream 0: video (h264), -vid 0
VIDEO:  [H264]  1920x1080  24bpp  15.000 fps  4341.2 kbps (529.9 kbyte/s)
Clip info:
  major_brand: mp42
  minor_version: 0
  compatible_brands: mp42isom
  creation_time: 2016-08-11 00:39:50
Load subtitles in ./
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
libavcodec version 56.60.100 (external)
Mismatching header version 56.41.100
Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
==========================================================================
Audio: no sound
Starting playback...
Invalid UE golomb code
Movie-Aspect is undefined - no prescaling applied.
VO: [xv] 1920x1080 => 1920x1080 Planar YV12  [zoom]
V:   1.6   0/  0 22%  3%  0.0% 0 0
Invalid UE golomb code
V:   3.3   0/  0 21%  2%  0.0% 0 0
Invalid UE golomb code
V:   4.9   0/  0 21%  2%  0.0% 0 0
Invalid UE golomb code
V:   5.3   0/  0 21%  2%  0.0% 0 0

Exiting... (Quit)




More information about the live-devel mailing list