“Error while opening decoder for input stream #0:0 : Invalid data found when processing input”
I am using ffmpeg to convert a RTSP stream to a RTMP stream. The RMTP stream will then be feeded into Wowza Streaming Engine. I have no ideas why it works very good in one server but fails in another server. Both servers are in different networks but both are Window Server 2012 ,have the same ffmpeg version, convert a same RTSP stream , but one fails with the error message Error while opening decoder for input stream #0:0 : Invalid data found when processing input
The ffmpeg command I used is :
ffmpeg -v debug -r 7 -i "rtsp://rtsp-stream-source-server/someRtspStream" -frame rate 7 -video_size 800x592 -vcodec libx264 -preset veryfast -maxrate 750k -bufsize 1500k -tune zerolatency -g 14 -an -r 7 -f flv rtmp://wowza-server:1935/app/stream1
I compare both ffmpeg debug messages in both cases and notice the followings differences / behaviours :
For the success case, ffmpeg first open RTSP stream using UDP, but UDP timeout, then it retries with TCP .For the failure case , it seems that it success with UDP and no need to retry with TCP.
When ffmpeg successfully open a RTSP stream ,the following information is printed out for the success case
Input #0, rtsp, from 'rtsp://rtsp-stream-source-server/someRtspStream':
Metadata:
title : Unnamed
comment : N/A
Duration: N/A, start: 0.151889, bitrate: N/A
Stream #0:0, 53, 1/90000: Video: h264 (Main), 1 reference frame, yuvj420p(pc, bt709, progressive, center), 800x600 (800x608) [SAR 1:1 DA
R 4:3], 0/1, 6.58 tbr, 90k tbn, 180k tbc
Successfully opened the file.
And for the failure case , the following information is printed out :
Input #0, rtsp, from 'rtsp://rtsp-stream-source-server/someRtspStream':
Metadata:
title : Unnamed
comment : N/A
Duration: N/A, start: 0.151944, bitrate: N/A
Stream #0:0, 28, 1/90000: Video: h264 (Main), 1 reference frame, yuvj420p(pc, bt709, progressive, center), 800x600 (800x608) [SAR 1:1 DA
R 4:3], 0/1, 6.67 tbr, 90k tbn, 180k tbc
Successfully opened the file.
Please note that the number after "Stream #0:0" is different.
- In the "Stream mapping" process , the failure case has the following error messages .Then ffmpeg process stops:
detected 4 logical cores
[h264 @ 0000000001c2a9a0] nal_unit_type: 8, nal_ref_idc: 3
[h264 @ 0000000001c2a9a0] nal_unit_type: 7, nal_ref_idc: 3
[h264 @ 0000000001c2a9a0] nal_unit_type: 8, nal_ref_idc: 3
[h264 @ 0000000001c2a9a0] sps_id 0 out of range
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
Error while opening decoder for input stream #0:0 : Invalid data found when processing input
Do you have any ideas for the failure cases and how can I troubleshoot it?
Below is the debug message for both cases for the information
Failure Case
Opening an input file: rtsp://rtsp-stream-source-server/someRtspStream.
[tcp @ 00000000004b8740] No default whitelist set
[rtsp @ 0000000001c2ba00] SDP:
v=0
o=- 1509095634684735 1 IN IP4 192.168.63.139
s=Unnamed
i=N/A
t=0 0
a=tool:LIVE555 Streaming Media v2011.08.20
a=type:broadcast
a=control:*
a=range:npt=0-
a=x-qt-text-nam:Unnamed
a=x-qt-text-inf:N/A
m=video 0 RTP/AVP 96
c=IN IP4 0.0.0.0
b=AS:15000
a=rtpmap:96 H264/90000
a=control:track1
Failed to parse interval end specification ''
[rtsp @ 0000000001c2ba00] video codec set to: h264
[rtp @ 00000000004b8b40] No default whitelist set
[udp @ 00000000004ba420] No default whitelist set
[udp @ 00000000004ba420] 'circular_buffer_size' option was set but it is not supported on this build (pthread support is required)
[udp @ 00000000004ba420] end receive buffer size reported is 65536
[udp @ 0000000001c3d160] No default whitelist set
[udp @ 0000000001c3d160] 'circular_buffer_size' option was set but it is not supported on this build (pthread support is required)
[udp @ 0000000001c3d160] end receive buffer size reported is 65536
[rtsp @ 0000000001c2ba00] setting jitter buffer size to 500
[rtsp @ 0000000001c2ba00] hello state=0
Failed to parse interval end specification ''
[h264 @ 00000000004b8d40] sps_id 0 out of range
[AVBSFContext @ 00000000004bd160] nal_unit_type: 0, nal_ref_idc: 0
[AVBSFContext @ 00000000004bd160] nal_unit_type: 8, nal_ref_idc: 3
[AVBSFContext @ 00000000004bd160] nal_unit_type: 0, nal_ref_idc: 0
[AVBSFContext @ 00000000004bd160] nal_unit_type: 7, nal_ref_idc: 3
[AVBSFContext @ 00000000004bd160] nal_unit_type: 0, nal_ref_idc: 0
[AVBSFContext @ 00000000004bd160] nal_unit_type: 8, nal_ref_idc: 3
[AVBSFContext @ 00000000004bd160] nal_unit_type: 0, nal_ref_idc: 0
[AVBSFContext @ 00000000004bd160] nal_unit_type: 5, nal_ref_idc: 3
[AVBSFContext @ 00000000004bd160] nal_unit_type: 0, nal_ref_idc: 0
[h264 @ 00000000004b8d40] nal_unit_type: 0, nal_ref_idc: 0
[h264 @ 00000000004b8d40] nal_unit_type: 8, nal_ref_idc: 3
[h264 @ 00000000004b8d40] nal_unit_type: 0, nal_ref_idc: 0
[h264 @ 00000000004b8d40] nal_unit_type: 7, nal_ref_idc: 3
[h264 @ 00000000004b8d40] nal_unit_type: 0, nal_ref_idc: 0
[h264 @ 00000000004b8d40] nal_unit_type: 8, nal_ref_idc: 3
[h264 @ 00000000004b8d40] nal_unit_type: 0, nal_ref_idc: 0
[h264 @ 00000000004b8d40] nal_unit_type: 5, nal_ref_idc: 3
[h264 @ 00000000004b8d40] nal_unit_type: 0, nal_ref_idc: 0
[h264 @ 00000000004b8d40] Unknown NAL code: 0 (0 bits)
[h264 @ 00000000004b8d40] sps_id 0 out of range
[h264 @ 00000000004b8d40] Unknown NAL code: 0 (0 bits)
Last message repeated 2 times
[h264 @ 00000000004b8d40] Reinit context to 800x608, pix_fmt: yuvj420p
[h264 @ 00000000004b8d40] Unknown NAL code: 0 (0 bits)
[h264 @ 00000000004b8d40] nal_unit_type: 1, nal_ref_idc: 2
[h264 @ 00000000004b8d40] nal_unit_type: 0, nal_ref_idc: 0
[h264 @ 00000000004b8d40] Unknown NAL code: 0 (0 bits)
[h264 @ 00000000004b8d40] nal_unit_type: 1, nal_ref_idc: 2
[h264 @ 00000000004b8d40] nal_unit_type: 0, nal_ref_idc: 0
[h264 @ 00000000004b8d40] Unknown NAL code: 0 (0 bits)
[h264 @ 00000000004b8d40] nal_unit_type: 1, nal_ref_idc: 2
[h264 @ 00000000004b8d40] nal_unit_type: 0, nal_ref_idc: 0
[h264 @ 00000000004b8d40] Unknown NAL code: 0 (0 bits)
[h264 @ 00000000004b8d40] nal_unit_type: 1, nal_ref_idc: 2
[h264 @ 00000000004b8d40] nal_unit_type: 0, nal_ref_idc: 0
[h264 @ 00000000004b8d40] Unknown NAL code: 0 (0 bits)
[h264 @ 00000000004b8d40] nal_unit_type: 1, nal_ref_idc: 2
[h264 @ 00000000004b8d40] nal_unit_type: 0, nal_ref_idc: 0
[h264 @ 00000000004b8d40] Unknown NAL code: 0 (0 bits)
[h264 @ 00000000004b8d40] nal_unit_type: 1, nal_ref_idc: 2
[h264 @ 00000000004b8d40] nal_unit_type: 0, nal_ref_idc: 0
[h264 @ 00000000004b8d40] Unknown NAL code: 0 (0 bits)
[rtsp @ 0000000001c2ba00] All info found
[rtsp @ 0000000001c2ba00] rfps: 6.500000 0.018292
[rtsp @ 0000000001c2ba00] rfps: 6.583333 0.006178
Last message repeated 1 times
[rtsp @ 0000000001c2ba00] rfps: 6.666667 0.004542
[rtsp @ 0000000001c2ba00] rfps: 6.750000 0.013386
[rtsp @ 0000000001c2ba00] rfps: 13.250000 0.016201
[rtsp @ 0000000001c2ba00] rfps: 13.333333 0.018170
Input #0, rtsp, from 'rtsp://rtsp-stream-source-server/someRtspStream':
Metadata:
title : Unnamed
comment : N/A
Duration: N/A, start: 0.151944, bitrate: N/A
Stream #0:0, 28, 1/90000: Video: h264 (Main), 1 reference frame, yuvj420p(pc, bt709, progressive, center), 800x600 (800x608) [SAR 1:1 DA
R 4:3], 0/1, 6.67 tbr, 90k tbn, 180k tbc
Successfully opened the file.
Parsing a group of options: output url rtmp://wowza-server:1935/app/stream1.
Applying option vcodec (force video codec ('copy' to copy stream)) with argument libx264.
Applying option an (disable audio) with argument 1.
Applying option r (set frame rate (Hz value, fraction or abbreviation)) with argument 7.
Applying option f (force format) with argument flv.
Successfully parsed a group of options.
Opening an output file: rtmp://wowza-server:1935/app/stream1.
[rtmp @ 00000000023c0ec0] No default whitelist set
Parsing...
Parsed protocol: 0
Parsed host : 127.0.0.1
Parsed app : vdc
RTMP_Connect1, ... connected, handshaking
HandShake: Type Answer : 03
HandShake: Server Uptime : 96850052
HandShake: FMS Version : 3.0.1.1
HandShake: Handshaking finished....
RTMP_Connect1, handshaked
RTMP_SendPacket: fd=516, size=88
0000: 03 00 00 00 00 00 58 14 00 00 00 00 ......X.....
0000: 02 00 07 63 6f 6e 6e 65 63 74 00 3f f0 00 00 00 ...connect.?....
0010: 00 00 00 03 00 03 61 70 70 02 00 03 76 64 63 00 ......app...vdc.
0020: 04 74 79 70 65 02 00 0a 6e 6f 6e 70 72 69 76 61 .type...nonpriva
0030: 74 65 00 05 74 63 55 72 6c 02 00 19 72 74 6d 70 te..tcUrl...rtmp
0040: 3a 2f 2f 31 32 37 2e 30 2e 30 2e 31 3a 31 39 33 ://127.0.0.1:193
0050: 35 2f 76 64 63 00 00 09 5/vdc...
Invoking connect
RTMP_ReadPacket: fd=516
0000: 02 00 00 00 00 00 04 05 00 00 00 00 ............
0000: 00 26 25 a0 .&%.
HandleServerBW: server BW = 2500000
RTMP_ReadPacket: fd=516
0000: 02 00 00 00 00 00 05 06 00 00 00 00 ............
0000: 00 26 25 a0 02 .&%..
HandleClientBW: client BW = 2500000 2
RTMP_ReadPacket: fd=516
0000: 02 00 00 00 00 00 06 04 00 00 00 00 ............
0000: 00 00 00 00 00 00 ......
HandleCtrl, received ctrl. type: 0, len: 6
HandleCtrl, Stream Begin 0
RTMP_ReadPacket: fd=516
0000: 02 00 00 00 00 00 04 01 00 00 00 00 ............
0000: 00 00 02 00 ....
HandleChangeChunkSize, received: chunk size change to 512
RTMP_ReadPacket: fd=516
0000: 03 00 00 00 00 01 05 14 00 00 00 00 ............
0000: 02 00 07 5f 72 65 73 75 6c 74 00 3f f0 00 00 00 ..._result.?....
0010: 00 00 00 03 00 06 66 6d 73 56 65 72 02 00 0e 46 ......fmsVer...F
0020: 4d 53 2f 33 2c 35 2c 37 2c 37 30 30 39 00 0c 63 MS/3,5,7,7009..c
0030: 61 70 61 62 69 6c 69 74 69 65 73 00 40 3f 00 00 apabilities.@?..
0040: 00 00 00 00 00 04 6d 6f 64 65 00 3f f0 00 00 00 ......mode.?....
0050: 00 00 00 00 00 09 03 00 05 6c 65 76 65 6c 02 00 .........level..
0060: 06 73 74 61 74 75 73 00 04 63 6f 64 65 02 00 1d .status..code...
0070: 4e 65 74 43 6f 6e 6e 65 63 74 69 6f 6e 2e 43 6f NetConnection.Co
0080: 6e 6e 65 63 74 2e 53 75 63 63 65 73 73 00 0b 64 nnect.Success..d
0090: 65 73 63 72 69 70 74 69 6f 6e 02 00 15 43 6f 6e escription...Con
00a0: 6e 65 63 74 69 6f 6e 20 73 75 63 63 65 65 64 65 nection succeede
00b0: 64 2e 00 04 64 61 74 61 08 00 00 00 00 00 07 76 d...data.......v
00c0: 65 72 73 69 6f 6e 02 00 0a 33 2c 35 2c 37 2c 37 ersion...3,5,7,7
00d0: 30 30 39 00 00 09 00 08 63 6c 69 65 6e 74 69 64 009.....clientid
00e0: 00 41 d6 2d 2b 68 80 00 00 00 0e 6f 62 6a 65 63 .A.-+h.....objec
00f0: 74 45 6e 63 6f 64 69 6e 67 00 00 00 00 00 00 00 tEncoding.......
0100: 00 00 00 00 09 .....
RTMP_ClientPacket, received: invoke 261 bytes
(object begin)
Property:
Property:
Property:
(object begin)
Property:
Property:
Property:
(object end)
Property:
(object begin)
Property:
Property:
Property:
Property:
(object begin)
Property:
(object end)
Property:
Property:
(object end)
(object end)
HandleInvoke, server invoking
HandleInvoke, received result for method call
RTMP_SendPacket: fd=516, size=33
0000: 43 00 00 00 00 00 21 14 C.....!.
0000: 02 00 0d 72 65 6c 65 61 73 65 53 74 72 65 61 6d ...releaseStream
0010: 00 40 00 00 00 00 00 00 00 05 02 00 04 6e 74 74 .@...........ntt
0020: 31 1
Invoking releaseStream
RTMP_SendPacket: fd=516, size=29
0000: 43 00 00 00 00 00 1d 14 C.......
0000: 02 00 09 46 43 50 75 62 6c 69 73 68 00 40 08 00 ...FCPublish.@..
0010: 00 00 00 00 00 05 02 00 04 6e 74 74 31 .........ntt1
Invoking FCPublish
RTMP_SendPacket: fd=516, size=25
0000: 43 00 00 00 00 00 19 14 C.......
0000: 02 00 0c 63 72 65 61 74 65 53 74 72 65 61 6d 00 ...createStream.
0010: 40 10 00 00 00 00 00 00 05 @........
Invoking createStream
RTMP_ReadPacket: fd=516
0000: 03 00 00 00 00 00 88 14 00 00 00 00 ............
0000: 02 00 0b 6f 6e 46 43 50 75 62 6c 69 73 68 00 00 ...onFCPublish..
0010: 00 00 00 00 00 00 00 05 03 00 05 6c 65 76 65 6c ...........level
0020: 02 00 06 73 74 61 74 75 73 00 04 63 6f 64 65 02 ...status..code.
0030: 00 17 4e 65 74 53 74 72 65 61 6d 2e 50 75 62 6c ..NetStream.Publ
0040: 69 73 68 2e 53 74 61 72 74 00 0b 64 65 73 63 72 ish.Start..descr
0050: 69 70 74 69 6f 6e 02 00 19 46 43 50 75 62 6c 69 iption...FCPubli
0060: 73 68 20 74 6f 20 73 74 72 65 61 6d 20 6e 74 74 sh to stream ntt
0070: 31 2e 00 08 63 6c 69 65 6e 74 69 64 00 41 d6 2d 1...clientid.A.-
0080: 2b 68 80 00 00 00 00 09 +h......
RTMP_ClientPacket, received: invoke 136 bytes
(object begin)
Property:
Property:
Property: NULL
Property:
(object begin)
Property:
Property:
Property:
Property:
(object end)
(object end)
HandleInvoke, server invoking
RTMP_ReadPacket: fd=516
0000: 03 00 00 00 00 00 1d 14 00 00 00 00 ............
0000: 02 00 07 5f 72 65 73 75 6c 74 00 40 10 00 00 00 ..._result.@....
0010: 00 00 00 05 00 3f f0 00 00 00 00 00 00 .....?.......
RTMP_ClientPacket, received: invoke 29 bytes
(object begin)
Property:
Property:
Property: NULL
Property:
(object end)
HandleInvoke, server invoking
HandleInvoke, received result for method call
RTMP_SendPacket: fd=516, size=34
0000: 04 00 00 00 00 00 22 14 01 00 00 00 ......".....
0000: 02 00 07 70 75 62 6c 69 73 68 00 40 14 00 00 00 ...publish.@....
0010: 00 00 00 05 02 00 04 6e 74 74 31 02 00 04 6c 69 .......ntt1...li
0020: 76 65 ve
Invoking publish
RTMP_ReadPacket: fd=516
0000: 02 00 00 00 00 00 06 04 00 00 00 00 ............
0000: 00 00 00 00 00 01 ......
HandleCtrl, received ctrl. type: 0, len: 6
HandleCtrl, Stream Begin 1
RTMP_ReadPacket: fd=516
0000: 03 00 00 00 00 00 7c 14 01 00 00 00 ......|.....
0000: 02 00 08 6f 6e 53 74 61 74 75 73 00 00 00 00 00 ...onStatus.....
0010: 00 00 00 00 05 03 00 05 6c 65 76 65 6c 02 00 06 ........level...
0020: 73 74 61 74 75 73 00 04 63 6f 64 65 02 00 17 4e status..code...N
0030: 65 74 53 74 72 65 61 6d 2e 50 75 62 6c 69 73 68 etStream.Publish
0040: 2e 53 74 61 72 74 00 0b 64 65 73 63 72 69 70 74 .Start..descript
0050: 69 6f 6e 02 00 10 50 75 62 6c 69 73 68 69 6e 67 ion...Publishing
0060: 20 6e 74 74 31 2e 00 08 63 6c 69 65 6e 74 69 64 ntt1...clientid
0070: 00 41 d6 2d 2b 68 80 00 00 00 00 09 .A.-+h......
RTMP_ClientPacket, received: invoke 124 bytes
(object begin)
Property:
Property:
Property: NULL
Property:
(object begin)
Property:
Property:
Property:
Property:
(object end)
(object end)
HandleInvoke, server invoking
HandleInvoke, onStatus: NetStream.Publish.Start
Successfully opened the file.
detected 4 logical cores
[h264 @ 0000000001c2a9a0] nal_unit_type: 8, nal_ref_idc: 3
[h264 @ 0000000001c2a9a0] nal_unit_type: 7, nal_ref_idc: 3
[h264 @ 0000000001c2a9a0] nal_unit_type: 8, nal_ref_idc: 3
[h264 @ 0000000001c2a9a0] sps_id 0 out of range
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
Error while opening decoder for input stream #0:0 : Invalid data found when processing input
[AVIOContext @ 000000000239a360] Statistics: 0 seeks, 0 writeouts
RTMP_SendPacket: fd=516, size=31
0000: 43 00 00 00 00 00 1f 14 C.......
0000: 02 00 0b 46 43 55 6e 70 75 62 6c 69 73 68 00 40 ...FCUnpublish.@
0010: 18 00 00 00 00 00 00 05 02 00 04 6e 74 74 31 ...........ntt1
Invoking FCUnpublish
RTMP_SendPacket: fd=516, size=34
0000: 43 00 00 00 00 00 22 14 C.....".
0000: 02 00 0c 64 65 6c 65 74 65 53 74 72 65 61 6d 00 ...deleteStream.
0010: 40 1c 00 00 00 00 00 00 05 00 3f f0 00 00 00 00 @.........?.....
0020: 00 00 ..
Invoking deleteStream
ffmpeg streaming video-streaming
add a comment |
I am using ffmpeg to convert a RTSP stream to a RTMP stream. The RMTP stream will then be feeded into Wowza Streaming Engine. I have no ideas why it works very good in one server but fails in another server. Both servers are in different networks but both are Window Server 2012 ,have the same ffmpeg version, convert a same RTSP stream , but one fails with the error message Error while opening decoder for input stream #0:0 : Invalid data found when processing input
The ffmpeg command I used is :
ffmpeg -v debug -r 7 -i "rtsp://rtsp-stream-source-server/someRtspStream" -frame rate 7 -video_size 800x592 -vcodec libx264 -preset veryfast -maxrate 750k -bufsize 1500k -tune zerolatency -g 14 -an -r 7 -f flv rtmp://wowza-server:1935/app/stream1
I compare both ffmpeg debug messages in both cases and notice the followings differences / behaviours :
For the success case, ffmpeg first open RTSP stream using UDP, but UDP timeout, then it retries with TCP .For the failure case , it seems that it success with UDP and no need to retry with TCP.
When ffmpeg successfully open a RTSP stream ,the following information is printed out for the success case
Input #0, rtsp, from 'rtsp://rtsp-stream-source-server/someRtspStream':
Metadata:
title : Unnamed
comment : N/A
Duration: N/A, start: 0.151889, bitrate: N/A
Stream #0:0, 53, 1/90000: Video: h264 (Main), 1 reference frame, yuvj420p(pc, bt709, progressive, center), 800x600 (800x608) [SAR 1:1 DA
R 4:3], 0/1, 6.58 tbr, 90k tbn, 180k tbc
Successfully opened the file.
And for the failure case , the following information is printed out :
Input #0, rtsp, from 'rtsp://rtsp-stream-source-server/someRtspStream':
Metadata:
title : Unnamed
comment : N/A
Duration: N/A, start: 0.151944, bitrate: N/A
Stream #0:0, 28, 1/90000: Video: h264 (Main), 1 reference frame, yuvj420p(pc, bt709, progressive, center), 800x600 (800x608) [SAR 1:1 DA
R 4:3], 0/1, 6.67 tbr, 90k tbn, 180k tbc
Successfully opened the file.
Please note that the number after "Stream #0:0" is different.
- In the "Stream mapping" process , the failure case has the following error messages .Then ffmpeg process stops:
detected 4 logical cores
[h264 @ 0000000001c2a9a0] nal_unit_type: 8, nal_ref_idc: 3
[h264 @ 0000000001c2a9a0] nal_unit_type: 7, nal_ref_idc: 3
[h264 @ 0000000001c2a9a0] nal_unit_type: 8, nal_ref_idc: 3
[h264 @ 0000000001c2a9a0] sps_id 0 out of range
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
Error while opening decoder for input stream #0:0 : Invalid data found when processing input
Do you have any ideas for the failure cases and how can I troubleshoot it?
Below is the debug message for both cases for the information
Failure Case
Opening an input file: rtsp://rtsp-stream-source-server/someRtspStream.
[tcp @ 00000000004b8740] No default whitelist set
[rtsp @ 0000000001c2ba00] SDP:
v=0
o=- 1509095634684735 1 IN IP4 192.168.63.139
s=Unnamed
i=N/A
t=0 0
a=tool:LIVE555 Streaming Media v2011.08.20
a=type:broadcast
a=control:*
a=range:npt=0-
a=x-qt-text-nam:Unnamed
a=x-qt-text-inf:N/A
m=video 0 RTP/AVP 96
c=IN IP4 0.0.0.0
b=AS:15000
a=rtpmap:96 H264/90000
a=control:track1
Failed to parse interval end specification ''
[rtsp @ 0000000001c2ba00] video codec set to: h264
[rtp @ 00000000004b8b40] No default whitelist set
[udp @ 00000000004ba420] No default whitelist set
[udp @ 00000000004ba420] 'circular_buffer_size' option was set but it is not supported on this build (pthread support is required)
[udp @ 00000000004ba420] end receive buffer size reported is 65536
[udp @ 0000000001c3d160] No default whitelist set
[udp @ 0000000001c3d160] 'circular_buffer_size' option was set but it is not supported on this build (pthread support is required)
[udp @ 0000000001c3d160] end receive buffer size reported is 65536
[rtsp @ 0000000001c2ba00] setting jitter buffer size to 500
[rtsp @ 0000000001c2ba00] hello state=0
Failed to parse interval end specification ''
[h264 @ 00000000004b8d40] sps_id 0 out of range
[AVBSFContext @ 00000000004bd160] nal_unit_type: 0, nal_ref_idc: 0
[AVBSFContext @ 00000000004bd160] nal_unit_type: 8, nal_ref_idc: 3
[AVBSFContext @ 00000000004bd160] nal_unit_type: 0, nal_ref_idc: 0
[AVBSFContext @ 00000000004bd160] nal_unit_type: 7, nal_ref_idc: 3
[AVBSFContext @ 00000000004bd160] nal_unit_type: 0, nal_ref_idc: 0
[AVBSFContext @ 00000000004bd160] nal_unit_type: 8, nal_ref_idc: 3
[AVBSFContext @ 00000000004bd160] nal_unit_type: 0, nal_ref_idc: 0
[AVBSFContext @ 00000000004bd160] nal_unit_type: 5, nal_ref_idc: 3
[AVBSFContext @ 00000000004bd160] nal_unit_type: 0, nal_ref_idc: 0
[h264 @ 00000000004b8d40] nal_unit_type: 0, nal_ref_idc: 0
[h264 @ 00000000004b8d40] nal_unit_type: 8, nal_ref_idc: 3
[h264 @ 00000000004b8d40] nal_unit_type: 0, nal_ref_idc: 0
[h264 @ 00000000004b8d40] nal_unit_type: 7, nal_ref_idc: 3
[h264 @ 00000000004b8d40] nal_unit_type: 0, nal_ref_idc: 0
[h264 @ 00000000004b8d40] nal_unit_type: 8, nal_ref_idc: 3
[h264 @ 00000000004b8d40] nal_unit_type: 0, nal_ref_idc: 0
[h264 @ 00000000004b8d40] nal_unit_type: 5, nal_ref_idc: 3
[h264 @ 00000000004b8d40] nal_unit_type: 0, nal_ref_idc: 0
[h264 @ 00000000004b8d40] Unknown NAL code: 0 (0 bits)
[h264 @ 00000000004b8d40] sps_id 0 out of range
[h264 @ 00000000004b8d40] Unknown NAL code: 0 (0 bits)
Last message repeated 2 times
[h264 @ 00000000004b8d40] Reinit context to 800x608, pix_fmt: yuvj420p
[h264 @ 00000000004b8d40] Unknown NAL code: 0 (0 bits)
[h264 @ 00000000004b8d40] nal_unit_type: 1, nal_ref_idc: 2
[h264 @ 00000000004b8d40] nal_unit_type: 0, nal_ref_idc: 0
[h264 @ 00000000004b8d40] Unknown NAL code: 0 (0 bits)
[h264 @ 00000000004b8d40] nal_unit_type: 1, nal_ref_idc: 2
[h264 @ 00000000004b8d40] nal_unit_type: 0, nal_ref_idc: 0
[h264 @ 00000000004b8d40] Unknown NAL code: 0 (0 bits)
[h264 @ 00000000004b8d40] nal_unit_type: 1, nal_ref_idc: 2
[h264 @ 00000000004b8d40] nal_unit_type: 0, nal_ref_idc: 0
[h264 @ 00000000004b8d40] Unknown NAL code: 0 (0 bits)
[h264 @ 00000000004b8d40] nal_unit_type: 1, nal_ref_idc: 2
[h264 @ 00000000004b8d40] nal_unit_type: 0, nal_ref_idc: 0
[h264 @ 00000000004b8d40] Unknown NAL code: 0 (0 bits)
[h264 @ 00000000004b8d40] nal_unit_type: 1, nal_ref_idc: 2
[h264 @ 00000000004b8d40] nal_unit_type: 0, nal_ref_idc: 0
[h264 @ 00000000004b8d40] Unknown NAL code: 0 (0 bits)
[h264 @ 00000000004b8d40] nal_unit_type: 1, nal_ref_idc: 2
[h264 @ 00000000004b8d40] nal_unit_type: 0, nal_ref_idc: 0
[h264 @ 00000000004b8d40] Unknown NAL code: 0 (0 bits)
[rtsp @ 0000000001c2ba00] All info found
[rtsp @ 0000000001c2ba00] rfps: 6.500000 0.018292
[rtsp @ 0000000001c2ba00] rfps: 6.583333 0.006178
Last message repeated 1 times
[rtsp @ 0000000001c2ba00] rfps: 6.666667 0.004542
[rtsp @ 0000000001c2ba00] rfps: 6.750000 0.013386
[rtsp @ 0000000001c2ba00] rfps: 13.250000 0.016201
[rtsp @ 0000000001c2ba00] rfps: 13.333333 0.018170
Input #0, rtsp, from 'rtsp://rtsp-stream-source-server/someRtspStream':
Metadata:
title : Unnamed
comment : N/A
Duration: N/A, start: 0.151944, bitrate: N/A
Stream #0:0, 28, 1/90000: Video: h264 (Main), 1 reference frame, yuvj420p(pc, bt709, progressive, center), 800x600 (800x608) [SAR 1:1 DA
R 4:3], 0/1, 6.67 tbr, 90k tbn, 180k tbc
Successfully opened the file.
Parsing a group of options: output url rtmp://wowza-server:1935/app/stream1.
Applying option vcodec (force video codec ('copy' to copy stream)) with argument libx264.
Applying option an (disable audio) with argument 1.
Applying option r (set frame rate (Hz value, fraction or abbreviation)) with argument 7.
Applying option f (force format) with argument flv.
Successfully parsed a group of options.
Opening an output file: rtmp://wowza-server:1935/app/stream1.
[rtmp @ 00000000023c0ec0] No default whitelist set
Parsing...
Parsed protocol: 0
Parsed host : 127.0.0.1
Parsed app : vdc
RTMP_Connect1, ... connected, handshaking
HandShake: Type Answer : 03
HandShake: Server Uptime : 96850052
HandShake: FMS Version : 3.0.1.1
HandShake: Handshaking finished....
RTMP_Connect1, handshaked
RTMP_SendPacket: fd=516, size=88
0000: 03 00 00 00 00 00 58 14 00 00 00 00 ......X.....
0000: 02 00 07 63 6f 6e 6e 65 63 74 00 3f f0 00 00 00 ...connect.?....
0010: 00 00 00 03 00 03 61 70 70 02 00 03 76 64 63 00 ......app...vdc.
0020: 04 74 79 70 65 02 00 0a 6e 6f 6e 70 72 69 76 61 .type...nonpriva
0030: 74 65 00 05 74 63 55 72 6c 02 00 19 72 74 6d 70 te..tcUrl...rtmp
0040: 3a 2f 2f 31 32 37 2e 30 2e 30 2e 31 3a 31 39 33 ://127.0.0.1:193
0050: 35 2f 76 64 63 00 00 09 5/vdc...
Invoking connect
RTMP_ReadPacket: fd=516
0000: 02 00 00 00 00 00 04 05 00 00 00 00 ............
0000: 00 26 25 a0 .&%.
HandleServerBW: server BW = 2500000
RTMP_ReadPacket: fd=516
0000: 02 00 00 00 00 00 05 06 00 00 00 00 ............
0000: 00 26 25 a0 02 .&%..
HandleClientBW: client BW = 2500000 2
RTMP_ReadPacket: fd=516
0000: 02 00 00 00 00 00 06 04 00 00 00 00 ............
0000: 00 00 00 00 00 00 ......
HandleCtrl, received ctrl. type: 0, len: 6
HandleCtrl, Stream Begin 0
RTMP_ReadPacket: fd=516
0000: 02 00 00 00 00 00 04 01 00 00 00 00 ............
0000: 00 00 02 00 ....
HandleChangeChunkSize, received: chunk size change to 512
RTMP_ReadPacket: fd=516
0000: 03 00 00 00 00 01 05 14 00 00 00 00 ............
0000: 02 00 07 5f 72 65 73 75 6c 74 00 3f f0 00 00 00 ..._result.?....
0010: 00 00 00 03 00 06 66 6d 73 56 65 72 02 00 0e 46 ......fmsVer...F
0020: 4d 53 2f 33 2c 35 2c 37 2c 37 30 30 39 00 0c 63 MS/3,5,7,7009..c
0030: 61 70 61 62 69 6c 69 74 69 65 73 00 40 3f 00 00 apabilities.@?..
0040: 00 00 00 00 00 04 6d 6f 64 65 00 3f f0 00 00 00 ......mode.?....
0050: 00 00 00 00 00 09 03 00 05 6c 65 76 65 6c 02 00 .........level..
0060: 06 73 74 61 74 75 73 00 04 63 6f 64 65 02 00 1d .status..code...
0070: 4e 65 74 43 6f 6e 6e 65 63 74 69 6f 6e 2e 43 6f NetConnection.Co
0080: 6e 6e 65 63 74 2e 53 75 63 63 65 73 73 00 0b 64 nnect.Success..d
0090: 65 73 63 72 69 70 74 69 6f 6e 02 00 15 43 6f 6e escription...Con
00a0: 6e 65 63 74 69 6f 6e 20 73 75 63 63 65 65 64 65 nection succeede
00b0: 64 2e 00 04 64 61 74 61 08 00 00 00 00 00 07 76 d...data.......v
00c0: 65 72 73 69 6f 6e 02 00 0a 33 2c 35 2c 37 2c 37 ersion...3,5,7,7
00d0: 30 30 39 00 00 09 00 08 63 6c 69 65 6e 74 69 64 009.....clientid
00e0: 00 41 d6 2d 2b 68 80 00 00 00 0e 6f 62 6a 65 63 .A.-+h.....objec
00f0: 74 45 6e 63 6f 64 69 6e 67 00 00 00 00 00 00 00 tEncoding.......
0100: 00 00 00 00 09 .....
RTMP_ClientPacket, received: invoke 261 bytes
(object begin)
Property:
Property:
Property:
(object begin)
Property:
Property:
Property:
(object end)
Property:
(object begin)
Property:
Property:
Property:
Property:
(object begin)
Property:
(object end)
Property:
Property:
(object end)
(object end)
HandleInvoke, server invoking
HandleInvoke, received result for method call
RTMP_SendPacket: fd=516, size=33
0000: 43 00 00 00 00 00 21 14 C.....!.
0000: 02 00 0d 72 65 6c 65 61 73 65 53 74 72 65 61 6d ...releaseStream
0010: 00 40 00 00 00 00 00 00 00 05 02 00 04 6e 74 74 .@...........ntt
0020: 31 1
Invoking releaseStream
RTMP_SendPacket: fd=516, size=29
0000: 43 00 00 00 00 00 1d 14 C.......
0000: 02 00 09 46 43 50 75 62 6c 69 73 68 00 40 08 00 ...FCPublish.@..
0010: 00 00 00 00 00 05 02 00 04 6e 74 74 31 .........ntt1
Invoking FCPublish
RTMP_SendPacket: fd=516, size=25
0000: 43 00 00 00 00 00 19 14 C.......
0000: 02 00 0c 63 72 65 61 74 65 53 74 72 65 61 6d 00 ...createStream.
0010: 40 10 00 00 00 00 00 00 05 @........
Invoking createStream
RTMP_ReadPacket: fd=516
0000: 03 00 00 00 00 00 88 14 00 00 00 00 ............
0000: 02 00 0b 6f 6e 46 43 50 75 62 6c 69 73 68 00 00 ...onFCPublish..
0010: 00 00 00 00 00 00 00 05 03 00 05 6c 65 76 65 6c ...........level
0020: 02 00 06 73 74 61 74 75 73 00 04 63 6f 64 65 02 ...status..code.
0030: 00 17 4e 65 74 53 74 72 65 61 6d 2e 50 75 62 6c ..NetStream.Publ
0040: 69 73 68 2e 53 74 61 72 74 00 0b 64 65 73 63 72 ish.Start..descr
0050: 69 70 74 69 6f 6e 02 00 19 46 43 50 75 62 6c 69 iption...FCPubli
0060: 73 68 20 74 6f 20 73 74 72 65 61 6d 20 6e 74 74 sh to stream ntt
0070: 31 2e 00 08 63 6c 69 65 6e 74 69 64 00 41 d6 2d 1...clientid.A.-
0080: 2b 68 80 00 00 00 00 09 +h......
RTMP_ClientPacket, received: invoke 136 bytes
(object begin)
Property:
Property:
Property: NULL
Property:
(object begin)
Property:
Property:
Property:
Property:
(object end)
(object end)
HandleInvoke, server invoking
RTMP_ReadPacket: fd=516
0000: 03 00 00 00 00 00 1d 14 00 00 00 00 ............
0000: 02 00 07 5f 72 65 73 75 6c 74 00 40 10 00 00 00 ..._result.@....
0010: 00 00 00 05 00 3f f0 00 00 00 00 00 00 .....?.......
RTMP_ClientPacket, received: invoke 29 bytes
(object begin)
Property:
Property:
Property: NULL
Property:
(object end)
HandleInvoke, server invoking
HandleInvoke, received result for method call
RTMP_SendPacket: fd=516, size=34
0000: 04 00 00 00 00 00 22 14 01 00 00 00 ......".....
0000: 02 00 07 70 75 62 6c 69 73 68 00 40 14 00 00 00 ...publish.@....
0010: 00 00 00 05 02 00 04 6e 74 74 31 02 00 04 6c 69 .......ntt1...li
0020: 76 65 ve
Invoking publish
RTMP_ReadPacket: fd=516
0000: 02 00 00 00 00 00 06 04 00 00 00 00 ............
0000: 00 00 00 00 00 01 ......
HandleCtrl, received ctrl. type: 0, len: 6
HandleCtrl, Stream Begin 1
RTMP_ReadPacket: fd=516
0000: 03 00 00 00 00 00 7c 14 01 00 00 00 ......|.....
0000: 02 00 08 6f 6e 53 74 61 74 75 73 00 00 00 00 00 ...onStatus.....
0010: 00 00 00 00 05 03 00 05 6c 65 76 65 6c 02 00 06 ........level...
0020: 73 74 61 74 75 73 00 04 63 6f 64 65 02 00 17 4e status..code...N
0030: 65 74 53 74 72 65 61 6d 2e 50 75 62 6c 69 73 68 etStream.Publish
0040: 2e 53 74 61 72 74 00 0b 64 65 73 63 72 69 70 74 .Start..descript
0050: 69 6f 6e 02 00 10 50 75 62 6c 69 73 68 69 6e 67 ion...Publishing
0060: 20 6e 74 74 31 2e 00 08 63 6c 69 65 6e 74 69 64 ntt1...clientid
0070: 00 41 d6 2d 2b 68 80 00 00 00 00 09 .A.-+h......
RTMP_ClientPacket, received: invoke 124 bytes
(object begin)
Property:
Property:
Property: NULL
Property:
(object begin)
Property:
Property:
Property:
Property:
(object end)
(object end)
HandleInvoke, server invoking
HandleInvoke, onStatus: NetStream.Publish.Start
Successfully opened the file.
detected 4 logical cores
[h264 @ 0000000001c2a9a0] nal_unit_type: 8, nal_ref_idc: 3
[h264 @ 0000000001c2a9a0] nal_unit_type: 7, nal_ref_idc: 3
[h264 @ 0000000001c2a9a0] nal_unit_type: 8, nal_ref_idc: 3
[h264 @ 0000000001c2a9a0] sps_id 0 out of range
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
Error while opening decoder for input stream #0:0 : Invalid data found when processing input
[AVIOContext @ 000000000239a360] Statistics: 0 seeks, 0 writeouts
RTMP_SendPacket: fd=516, size=31
0000: 43 00 00 00 00 00 1f 14 C.......
0000: 02 00 0b 46 43 55 6e 70 75 62 6c 69 73 68 00 40 ...FCUnpublish.@
0010: 18 00 00 00 00 00 00 05 02 00 04 6e 74 74 31 ...........ntt1
Invoking FCUnpublish
RTMP_SendPacket: fd=516, size=34
0000: 43 00 00 00 00 00 22 14 C.....".
0000: 02 00 0c 64 65 6c 65 74 65 53 74 72 65 61 6d 00 ...deleteStream.
0010: 40 1c 00 00 00 00 00 00 05 00 3f f0 00 00 00 00 @.........?.....
0020: 00 00 ..
Invoking deleteStream
ffmpeg streaming video-streaming
It looks like the RTSP stream contains different data in UDP compared to TCP, for whatever reason, and the UDP data seems to be bad. You can try to force always TCP, and see if that fixes it.
– dirkt
Nov 8 '17 at 6:16
add a comment |
I am using ffmpeg to convert a RTSP stream to a RTMP stream. The RMTP stream will then be feeded into Wowza Streaming Engine. I have no ideas why it works very good in one server but fails in another server. Both servers are in different networks but both are Window Server 2012 ,have the same ffmpeg version, convert a same RTSP stream , but one fails with the error message Error while opening decoder for input stream #0:0 : Invalid data found when processing input
The ffmpeg command I used is :
ffmpeg -v debug -r 7 -i "rtsp://rtsp-stream-source-server/someRtspStream" -frame rate 7 -video_size 800x592 -vcodec libx264 -preset veryfast -maxrate 750k -bufsize 1500k -tune zerolatency -g 14 -an -r 7 -f flv rtmp://wowza-server:1935/app/stream1
I compare both ffmpeg debug messages in both cases and notice the followings differences / behaviours :
For the success case, ffmpeg first open RTSP stream using UDP, but UDP timeout, then it retries with TCP .For the failure case , it seems that it success with UDP and no need to retry with TCP.
When ffmpeg successfully open a RTSP stream ,the following information is printed out for the success case
Input #0, rtsp, from 'rtsp://rtsp-stream-source-server/someRtspStream':
Metadata:
title : Unnamed
comment : N/A
Duration: N/A, start: 0.151889, bitrate: N/A
Stream #0:0, 53, 1/90000: Video: h264 (Main), 1 reference frame, yuvj420p(pc, bt709, progressive, center), 800x600 (800x608) [SAR 1:1 DA
R 4:3], 0/1, 6.58 tbr, 90k tbn, 180k tbc
Successfully opened the file.
And for the failure case , the following information is printed out :
Input #0, rtsp, from 'rtsp://rtsp-stream-source-server/someRtspStream':
Metadata:
title : Unnamed
comment : N/A
Duration: N/A, start: 0.151944, bitrate: N/A
Stream #0:0, 28, 1/90000: Video: h264 (Main), 1 reference frame, yuvj420p(pc, bt709, progressive, center), 800x600 (800x608) [SAR 1:1 DA
R 4:3], 0/1, 6.67 tbr, 90k tbn, 180k tbc
Successfully opened the file.
Please note that the number after "Stream #0:0" is different.
- In the "Stream mapping" process , the failure case has the following error messages .Then ffmpeg process stops:
detected 4 logical cores
[h264 @ 0000000001c2a9a0] nal_unit_type: 8, nal_ref_idc: 3
[h264 @ 0000000001c2a9a0] nal_unit_type: 7, nal_ref_idc: 3
[h264 @ 0000000001c2a9a0] nal_unit_type: 8, nal_ref_idc: 3
[h264 @ 0000000001c2a9a0] sps_id 0 out of range
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
Error while opening decoder for input stream #0:0 : Invalid data found when processing input
Do you have any ideas for the failure cases and how can I troubleshoot it?
Below is the debug message for both cases for the information
Failure Case
Opening an input file: rtsp://rtsp-stream-source-server/someRtspStream.
[tcp @ 00000000004b8740] No default whitelist set
[rtsp @ 0000000001c2ba00] SDP:
v=0
o=- 1509095634684735 1 IN IP4 192.168.63.139
s=Unnamed
i=N/A
t=0 0
a=tool:LIVE555 Streaming Media v2011.08.20
a=type:broadcast
a=control:*
a=range:npt=0-
a=x-qt-text-nam:Unnamed
a=x-qt-text-inf:N/A
m=video 0 RTP/AVP 96
c=IN IP4 0.0.0.0
b=AS:15000
a=rtpmap:96 H264/90000
a=control:track1
Failed to parse interval end specification ''
[rtsp @ 0000000001c2ba00] video codec set to: h264
[rtp @ 00000000004b8b40] No default whitelist set
[udp @ 00000000004ba420] No default whitelist set
[udp @ 00000000004ba420] 'circular_buffer_size' option was set but it is not supported on this build (pthread support is required)
[udp @ 00000000004ba420] end receive buffer size reported is 65536
[udp @ 0000000001c3d160] No default whitelist set
[udp @ 0000000001c3d160] 'circular_buffer_size' option was set but it is not supported on this build (pthread support is required)
[udp @ 0000000001c3d160] end receive buffer size reported is 65536
[rtsp @ 0000000001c2ba00] setting jitter buffer size to 500
[rtsp @ 0000000001c2ba00] hello state=0
Failed to parse interval end specification ''
[h264 @ 00000000004b8d40] sps_id 0 out of range
[AVBSFContext @ 00000000004bd160] nal_unit_type: 0, nal_ref_idc: 0
[AVBSFContext @ 00000000004bd160] nal_unit_type: 8, nal_ref_idc: 3
[AVBSFContext @ 00000000004bd160] nal_unit_type: 0, nal_ref_idc: 0
[AVBSFContext @ 00000000004bd160] nal_unit_type: 7, nal_ref_idc: 3
[AVBSFContext @ 00000000004bd160] nal_unit_type: 0, nal_ref_idc: 0
[AVBSFContext @ 00000000004bd160] nal_unit_type: 8, nal_ref_idc: 3
[AVBSFContext @ 00000000004bd160] nal_unit_type: 0, nal_ref_idc: 0
[AVBSFContext @ 00000000004bd160] nal_unit_type: 5, nal_ref_idc: 3
[AVBSFContext @ 00000000004bd160] nal_unit_type: 0, nal_ref_idc: 0
[h264 @ 00000000004b8d40] nal_unit_type: 0, nal_ref_idc: 0
[h264 @ 00000000004b8d40] nal_unit_type: 8, nal_ref_idc: 3
[h264 @ 00000000004b8d40] nal_unit_type: 0, nal_ref_idc: 0
[h264 @ 00000000004b8d40] nal_unit_type: 7, nal_ref_idc: 3
[h264 @ 00000000004b8d40] nal_unit_type: 0, nal_ref_idc: 0
[h264 @ 00000000004b8d40] nal_unit_type: 8, nal_ref_idc: 3
[h264 @ 00000000004b8d40] nal_unit_type: 0, nal_ref_idc: 0
[h264 @ 00000000004b8d40] nal_unit_type: 5, nal_ref_idc: 3
[h264 @ 00000000004b8d40] nal_unit_type: 0, nal_ref_idc: 0
[h264 @ 00000000004b8d40] Unknown NAL code: 0 (0 bits)
[h264 @ 00000000004b8d40] sps_id 0 out of range
[h264 @ 00000000004b8d40] Unknown NAL code: 0 (0 bits)
Last message repeated 2 times
[h264 @ 00000000004b8d40] Reinit context to 800x608, pix_fmt: yuvj420p
[h264 @ 00000000004b8d40] Unknown NAL code: 0 (0 bits)
[h264 @ 00000000004b8d40] nal_unit_type: 1, nal_ref_idc: 2
[h264 @ 00000000004b8d40] nal_unit_type: 0, nal_ref_idc: 0
[h264 @ 00000000004b8d40] Unknown NAL code: 0 (0 bits)
[h264 @ 00000000004b8d40] nal_unit_type: 1, nal_ref_idc: 2
[h264 @ 00000000004b8d40] nal_unit_type: 0, nal_ref_idc: 0
[h264 @ 00000000004b8d40] Unknown NAL code: 0 (0 bits)
[h264 @ 00000000004b8d40] nal_unit_type: 1, nal_ref_idc: 2
[h264 @ 00000000004b8d40] nal_unit_type: 0, nal_ref_idc: 0
[h264 @ 00000000004b8d40] Unknown NAL code: 0 (0 bits)
[h264 @ 00000000004b8d40] nal_unit_type: 1, nal_ref_idc: 2
[h264 @ 00000000004b8d40] nal_unit_type: 0, nal_ref_idc: 0
[h264 @ 00000000004b8d40] Unknown NAL code: 0 (0 bits)
[h264 @ 00000000004b8d40] nal_unit_type: 1, nal_ref_idc: 2
[h264 @ 00000000004b8d40] nal_unit_type: 0, nal_ref_idc: 0
[h264 @ 00000000004b8d40] Unknown NAL code: 0 (0 bits)
[h264 @ 00000000004b8d40] nal_unit_type: 1, nal_ref_idc: 2
[h264 @ 00000000004b8d40] nal_unit_type: 0, nal_ref_idc: 0
[h264 @ 00000000004b8d40] Unknown NAL code: 0 (0 bits)
[rtsp @ 0000000001c2ba00] All info found
[rtsp @ 0000000001c2ba00] rfps: 6.500000 0.018292
[rtsp @ 0000000001c2ba00] rfps: 6.583333 0.006178
Last message repeated 1 times
[rtsp @ 0000000001c2ba00] rfps: 6.666667 0.004542
[rtsp @ 0000000001c2ba00] rfps: 6.750000 0.013386
[rtsp @ 0000000001c2ba00] rfps: 13.250000 0.016201
[rtsp @ 0000000001c2ba00] rfps: 13.333333 0.018170
Input #0, rtsp, from 'rtsp://rtsp-stream-source-server/someRtspStream':
Metadata:
title : Unnamed
comment : N/A
Duration: N/A, start: 0.151944, bitrate: N/A
Stream #0:0, 28, 1/90000: Video: h264 (Main), 1 reference frame, yuvj420p(pc, bt709, progressive, center), 800x600 (800x608) [SAR 1:1 DA
R 4:3], 0/1, 6.67 tbr, 90k tbn, 180k tbc
Successfully opened the file.
Parsing a group of options: output url rtmp://wowza-server:1935/app/stream1.
Applying option vcodec (force video codec ('copy' to copy stream)) with argument libx264.
Applying option an (disable audio) with argument 1.
Applying option r (set frame rate (Hz value, fraction or abbreviation)) with argument 7.
Applying option f (force format) with argument flv.
Successfully parsed a group of options.
Opening an output file: rtmp://wowza-server:1935/app/stream1.
[rtmp @ 00000000023c0ec0] No default whitelist set
Parsing...
Parsed protocol: 0
Parsed host : 127.0.0.1
Parsed app : vdc
RTMP_Connect1, ... connected, handshaking
HandShake: Type Answer : 03
HandShake: Server Uptime : 96850052
HandShake: FMS Version : 3.0.1.1
HandShake: Handshaking finished....
RTMP_Connect1, handshaked
RTMP_SendPacket: fd=516, size=88
0000: 03 00 00 00 00 00 58 14 00 00 00 00 ......X.....
0000: 02 00 07 63 6f 6e 6e 65 63 74 00 3f f0 00 00 00 ...connect.?....
0010: 00 00 00 03 00 03 61 70 70 02 00 03 76 64 63 00 ......app...vdc.
0020: 04 74 79 70 65 02 00 0a 6e 6f 6e 70 72 69 76 61 .type...nonpriva
0030: 74 65 00 05 74 63 55 72 6c 02 00 19 72 74 6d 70 te..tcUrl...rtmp
0040: 3a 2f 2f 31 32 37 2e 30 2e 30 2e 31 3a 31 39 33 ://127.0.0.1:193
0050: 35 2f 76 64 63 00 00 09 5/vdc...
Invoking connect
RTMP_ReadPacket: fd=516
0000: 02 00 00 00 00 00 04 05 00 00 00 00 ............
0000: 00 26 25 a0 .&%.
HandleServerBW: server BW = 2500000
RTMP_ReadPacket: fd=516
0000: 02 00 00 00 00 00 05 06 00 00 00 00 ............
0000: 00 26 25 a0 02 .&%..
HandleClientBW: client BW = 2500000 2
RTMP_ReadPacket: fd=516
0000: 02 00 00 00 00 00 06 04 00 00 00 00 ............
0000: 00 00 00 00 00 00 ......
HandleCtrl, received ctrl. type: 0, len: 6
HandleCtrl, Stream Begin 0
RTMP_ReadPacket: fd=516
0000: 02 00 00 00 00 00 04 01 00 00 00 00 ............
0000: 00 00 02 00 ....
HandleChangeChunkSize, received: chunk size change to 512
RTMP_ReadPacket: fd=516
0000: 03 00 00 00 00 01 05 14 00 00 00 00 ............
0000: 02 00 07 5f 72 65 73 75 6c 74 00 3f f0 00 00 00 ..._result.?....
0010: 00 00 00 03 00 06 66 6d 73 56 65 72 02 00 0e 46 ......fmsVer...F
0020: 4d 53 2f 33 2c 35 2c 37 2c 37 30 30 39 00 0c 63 MS/3,5,7,7009..c
0030: 61 70 61 62 69 6c 69 74 69 65 73 00 40 3f 00 00 apabilities.@?..
0040: 00 00 00 00 00 04 6d 6f 64 65 00 3f f0 00 00 00 ......mode.?....
0050: 00 00 00 00 00 09 03 00 05 6c 65 76 65 6c 02 00 .........level..
0060: 06 73 74 61 74 75 73 00 04 63 6f 64 65 02 00 1d .status..code...
0070: 4e 65 74 43 6f 6e 6e 65 63 74 69 6f 6e 2e 43 6f NetConnection.Co
0080: 6e 6e 65 63 74 2e 53 75 63 63 65 73 73 00 0b 64 nnect.Success..d
0090: 65 73 63 72 69 70 74 69 6f 6e 02 00 15 43 6f 6e escription...Con
00a0: 6e 65 63 74 69 6f 6e 20 73 75 63 63 65 65 64 65 nection succeede
00b0: 64 2e 00 04 64 61 74 61 08 00 00 00 00 00 07 76 d...data.......v
00c0: 65 72 73 69 6f 6e 02 00 0a 33 2c 35 2c 37 2c 37 ersion...3,5,7,7
00d0: 30 30 39 00 00 09 00 08 63 6c 69 65 6e 74 69 64 009.....clientid
00e0: 00 41 d6 2d 2b 68 80 00 00 00 0e 6f 62 6a 65 63 .A.-+h.....objec
00f0: 74 45 6e 63 6f 64 69 6e 67 00 00 00 00 00 00 00 tEncoding.......
0100: 00 00 00 00 09 .....
RTMP_ClientPacket, received: invoke 261 bytes
(object begin)
Property:
Property:
Property:
(object begin)
Property:
Property:
Property:
(object end)
Property:
(object begin)
Property:
Property:
Property:
Property:
(object begin)
Property:
(object end)
Property:
Property:
(object end)
(object end)
HandleInvoke, server invoking
HandleInvoke, received result for method call
RTMP_SendPacket: fd=516, size=33
0000: 43 00 00 00 00 00 21 14 C.....!.
0000: 02 00 0d 72 65 6c 65 61 73 65 53 74 72 65 61 6d ...releaseStream
0010: 00 40 00 00 00 00 00 00 00 05 02 00 04 6e 74 74 .@...........ntt
0020: 31 1
Invoking releaseStream
RTMP_SendPacket: fd=516, size=29
0000: 43 00 00 00 00 00 1d 14 C.......
0000: 02 00 09 46 43 50 75 62 6c 69 73 68 00 40 08 00 ...FCPublish.@..
0010: 00 00 00 00 00 05 02 00 04 6e 74 74 31 .........ntt1
Invoking FCPublish
RTMP_SendPacket: fd=516, size=25
0000: 43 00 00 00 00 00 19 14 C.......
0000: 02 00 0c 63 72 65 61 74 65 53 74 72 65 61 6d 00 ...createStream.
0010: 40 10 00 00 00 00 00 00 05 @........
Invoking createStream
RTMP_ReadPacket: fd=516
0000: 03 00 00 00 00 00 88 14 00 00 00 00 ............
0000: 02 00 0b 6f 6e 46 43 50 75 62 6c 69 73 68 00 00 ...onFCPublish..
0010: 00 00 00 00 00 00 00 05 03 00 05 6c 65 76 65 6c ...........level
0020: 02 00 06 73 74 61 74 75 73 00 04 63 6f 64 65 02 ...status..code.
0030: 00 17 4e 65 74 53 74 72 65 61 6d 2e 50 75 62 6c ..NetStream.Publ
0040: 69 73 68 2e 53 74 61 72 74 00 0b 64 65 73 63 72 ish.Start..descr
0050: 69 70 74 69 6f 6e 02 00 19 46 43 50 75 62 6c 69 iption...FCPubli
0060: 73 68 20 74 6f 20 73 74 72 65 61 6d 20 6e 74 74 sh to stream ntt
0070: 31 2e 00 08 63 6c 69 65 6e 74 69 64 00 41 d6 2d 1...clientid.A.-
0080: 2b 68 80 00 00 00 00 09 +h......
RTMP_ClientPacket, received: invoke 136 bytes
(object begin)
Property:
Property:
Property: NULL
Property:
(object begin)
Property:
Property:
Property:
Property:
(object end)
(object end)
HandleInvoke, server invoking
RTMP_ReadPacket: fd=516
0000: 03 00 00 00 00 00 1d 14 00 00 00 00 ............
0000: 02 00 07 5f 72 65 73 75 6c 74 00 40 10 00 00 00 ..._result.@....
0010: 00 00 00 05 00 3f f0 00 00 00 00 00 00 .....?.......
RTMP_ClientPacket, received: invoke 29 bytes
(object begin)
Property:
Property:
Property: NULL
Property:
(object end)
HandleInvoke, server invoking
HandleInvoke, received result for method call
RTMP_SendPacket: fd=516, size=34
0000: 04 00 00 00 00 00 22 14 01 00 00 00 ......".....
0000: 02 00 07 70 75 62 6c 69 73 68 00 40 14 00 00 00 ...publish.@....
0010: 00 00 00 05 02 00 04 6e 74 74 31 02 00 04 6c 69 .......ntt1...li
0020: 76 65 ve
Invoking publish
RTMP_ReadPacket: fd=516
0000: 02 00 00 00 00 00 06 04 00 00 00 00 ............
0000: 00 00 00 00 00 01 ......
HandleCtrl, received ctrl. type: 0, len: 6
HandleCtrl, Stream Begin 1
RTMP_ReadPacket: fd=516
0000: 03 00 00 00 00 00 7c 14 01 00 00 00 ......|.....
0000: 02 00 08 6f 6e 53 74 61 74 75 73 00 00 00 00 00 ...onStatus.....
0010: 00 00 00 00 05 03 00 05 6c 65 76 65 6c 02 00 06 ........level...
0020: 73 74 61 74 75 73 00 04 63 6f 64 65 02 00 17 4e status..code...N
0030: 65 74 53 74 72 65 61 6d 2e 50 75 62 6c 69 73 68 etStream.Publish
0040: 2e 53 74 61 72 74 00 0b 64 65 73 63 72 69 70 74 .Start..descript
0050: 69 6f 6e 02 00 10 50 75 62 6c 69 73 68 69 6e 67 ion...Publishing
0060: 20 6e 74 74 31 2e 00 08 63 6c 69 65 6e 74 69 64 ntt1...clientid
0070: 00 41 d6 2d 2b 68 80 00 00 00 00 09 .A.-+h......
RTMP_ClientPacket, received: invoke 124 bytes
(object begin)
Property:
Property:
Property: NULL
Property:
(object begin)
Property:
Property:
Property:
Property:
(object end)
(object end)
HandleInvoke, server invoking
HandleInvoke, onStatus: NetStream.Publish.Start
Successfully opened the file.
detected 4 logical cores
[h264 @ 0000000001c2a9a0] nal_unit_type: 8, nal_ref_idc: 3
[h264 @ 0000000001c2a9a0] nal_unit_type: 7, nal_ref_idc: 3
[h264 @ 0000000001c2a9a0] nal_unit_type: 8, nal_ref_idc: 3
[h264 @ 0000000001c2a9a0] sps_id 0 out of range
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
Error while opening decoder for input stream #0:0 : Invalid data found when processing input
[AVIOContext @ 000000000239a360] Statistics: 0 seeks, 0 writeouts
RTMP_SendPacket: fd=516, size=31
0000: 43 00 00 00 00 00 1f 14 C.......
0000: 02 00 0b 46 43 55 6e 70 75 62 6c 69 73 68 00 40 ...FCUnpublish.@
0010: 18 00 00 00 00 00 00 05 02 00 04 6e 74 74 31 ...........ntt1
Invoking FCUnpublish
RTMP_SendPacket: fd=516, size=34
0000: 43 00 00 00 00 00 22 14 C.....".
0000: 02 00 0c 64 65 6c 65 74 65 53 74 72 65 61 6d 00 ...deleteStream.
0010: 40 1c 00 00 00 00 00 00 05 00 3f f0 00 00 00 00 @.........?.....
0020: 00 00 ..
Invoking deleteStream
ffmpeg streaming video-streaming
I am using ffmpeg to convert a RTSP stream to a RTMP stream. The RMTP stream will then be feeded into Wowza Streaming Engine. I have no ideas why it works very good in one server but fails in another server. Both servers are in different networks but both are Window Server 2012 ,have the same ffmpeg version, convert a same RTSP stream , but one fails with the error message Error while opening decoder for input stream #0:0 : Invalid data found when processing input
The ffmpeg command I used is :
ffmpeg -v debug -r 7 -i "rtsp://rtsp-stream-source-server/someRtspStream" -frame rate 7 -video_size 800x592 -vcodec libx264 -preset veryfast -maxrate 750k -bufsize 1500k -tune zerolatency -g 14 -an -r 7 -f flv rtmp://wowza-server:1935/app/stream1
I compare both ffmpeg debug messages in both cases and notice the followings differences / behaviours :
For the success case, ffmpeg first open RTSP stream using UDP, but UDP timeout, then it retries with TCP .For the failure case , it seems that it success with UDP and no need to retry with TCP.
When ffmpeg successfully open a RTSP stream ,the following information is printed out for the success case
Input #0, rtsp, from 'rtsp://rtsp-stream-source-server/someRtspStream':
Metadata:
title : Unnamed
comment : N/A
Duration: N/A, start: 0.151889, bitrate: N/A
Stream #0:0, 53, 1/90000: Video: h264 (Main), 1 reference frame, yuvj420p(pc, bt709, progressive, center), 800x600 (800x608) [SAR 1:1 DA
R 4:3], 0/1, 6.58 tbr, 90k tbn, 180k tbc
Successfully opened the file.
And for the failure case , the following information is printed out :
Input #0, rtsp, from 'rtsp://rtsp-stream-source-server/someRtspStream':
Metadata:
title : Unnamed
comment : N/A
Duration: N/A, start: 0.151944, bitrate: N/A
Stream #0:0, 28, 1/90000: Video: h264 (Main), 1 reference frame, yuvj420p(pc, bt709, progressive, center), 800x600 (800x608) [SAR 1:1 DA
R 4:3], 0/1, 6.67 tbr, 90k tbn, 180k tbc
Successfully opened the file.
Please note that the number after "Stream #0:0" is different.
- In the "Stream mapping" process , the failure case has the following error messages .Then ffmpeg process stops:
detected 4 logical cores
[h264 @ 0000000001c2a9a0] nal_unit_type: 8, nal_ref_idc: 3
[h264 @ 0000000001c2a9a0] nal_unit_type: 7, nal_ref_idc: 3
[h264 @ 0000000001c2a9a0] nal_unit_type: 8, nal_ref_idc: 3
[h264 @ 0000000001c2a9a0] sps_id 0 out of range
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
Error while opening decoder for input stream #0:0 : Invalid data found when processing input
Do you have any ideas for the failure cases and how can I troubleshoot it?
Below is the debug message for both cases for the information
Failure Case
Opening an input file: rtsp://rtsp-stream-source-server/someRtspStream.
[tcp @ 00000000004b8740] No default whitelist set
[rtsp @ 0000000001c2ba00] SDP:
v=0
o=- 1509095634684735 1 IN IP4 192.168.63.139
s=Unnamed
i=N/A
t=0 0
a=tool:LIVE555 Streaming Media v2011.08.20
a=type:broadcast
a=control:*
a=range:npt=0-
a=x-qt-text-nam:Unnamed
a=x-qt-text-inf:N/A
m=video 0 RTP/AVP 96
c=IN IP4 0.0.0.0
b=AS:15000
a=rtpmap:96 H264/90000
a=control:track1
Failed to parse interval end specification ''
[rtsp @ 0000000001c2ba00] video codec set to: h264
[rtp @ 00000000004b8b40] No default whitelist set
[udp @ 00000000004ba420] No default whitelist set
[udp @ 00000000004ba420] 'circular_buffer_size' option was set but it is not supported on this build (pthread support is required)
[udp @ 00000000004ba420] end receive buffer size reported is 65536
[udp @ 0000000001c3d160] No default whitelist set
[udp @ 0000000001c3d160] 'circular_buffer_size' option was set but it is not supported on this build (pthread support is required)
[udp @ 0000000001c3d160] end receive buffer size reported is 65536
[rtsp @ 0000000001c2ba00] setting jitter buffer size to 500
[rtsp @ 0000000001c2ba00] hello state=0
Failed to parse interval end specification ''
[h264 @ 00000000004b8d40] sps_id 0 out of range
[AVBSFContext @ 00000000004bd160] nal_unit_type: 0, nal_ref_idc: 0
[AVBSFContext @ 00000000004bd160] nal_unit_type: 8, nal_ref_idc: 3
[AVBSFContext @ 00000000004bd160] nal_unit_type: 0, nal_ref_idc: 0
[AVBSFContext @ 00000000004bd160] nal_unit_type: 7, nal_ref_idc: 3
[AVBSFContext @ 00000000004bd160] nal_unit_type: 0, nal_ref_idc: 0
[AVBSFContext @ 00000000004bd160] nal_unit_type: 8, nal_ref_idc: 3
[AVBSFContext @ 00000000004bd160] nal_unit_type: 0, nal_ref_idc: 0
[AVBSFContext @ 00000000004bd160] nal_unit_type: 5, nal_ref_idc: 3
[AVBSFContext @ 00000000004bd160] nal_unit_type: 0, nal_ref_idc: 0
[h264 @ 00000000004b8d40] nal_unit_type: 0, nal_ref_idc: 0
[h264 @ 00000000004b8d40] nal_unit_type: 8, nal_ref_idc: 3
[h264 @ 00000000004b8d40] nal_unit_type: 0, nal_ref_idc: 0
[h264 @ 00000000004b8d40] nal_unit_type: 7, nal_ref_idc: 3
[h264 @ 00000000004b8d40] nal_unit_type: 0, nal_ref_idc: 0
[h264 @ 00000000004b8d40] nal_unit_type: 8, nal_ref_idc: 3
[h264 @ 00000000004b8d40] nal_unit_type: 0, nal_ref_idc: 0
[h264 @ 00000000004b8d40] nal_unit_type: 5, nal_ref_idc: 3
[h264 @ 00000000004b8d40] nal_unit_type: 0, nal_ref_idc: 0
[h264 @ 00000000004b8d40] Unknown NAL code: 0 (0 bits)
[h264 @ 00000000004b8d40] sps_id 0 out of range
[h264 @ 00000000004b8d40] Unknown NAL code: 0 (0 bits)
Last message repeated 2 times
[h264 @ 00000000004b8d40] Reinit context to 800x608, pix_fmt: yuvj420p
[h264 @ 00000000004b8d40] Unknown NAL code: 0 (0 bits)
[h264 @ 00000000004b8d40] nal_unit_type: 1, nal_ref_idc: 2
[h264 @ 00000000004b8d40] nal_unit_type: 0, nal_ref_idc: 0
[h264 @ 00000000004b8d40] Unknown NAL code: 0 (0 bits)
[h264 @ 00000000004b8d40] nal_unit_type: 1, nal_ref_idc: 2
[h264 @ 00000000004b8d40] nal_unit_type: 0, nal_ref_idc: 0
[h264 @ 00000000004b8d40] Unknown NAL code: 0 (0 bits)
[h264 @ 00000000004b8d40] nal_unit_type: 1, nal_ref_idc: 2
[h264 @ 00000000004b8d40] nal_unit_type: 0, nal_ref_idc: 0
[h264 @ 00000000004b8d40] Unknown NAL code: 0 (0 bits)
[h264 @ 00000000004b8d40] nal_unit_type: 1, nal_ref_idc: 2
[h264 @ 00000000004b8d40] nal_unit_type: 0, nal_ref_idc: 0
[h264 @ 00000000004b8d40] Unknown NAL code: 0 (0 bits)
[h264 @ 00000000004b8d40] nal_unit_type: 1, nal_ref_idc: 2
[h264 @ 00000000004b8d40] nal_unit_type: 0, nal_ref_idc: 0
[h264 @ 00000000004b8d40] Unknown NAL code: 0 (0 bits)
[h264 @ 00000000004b8d40] nal_unit_type: 1, nal_ref_idc: 2
[h264 @ 00000000004b8d40] nal_unit_type: 0, nal_ref_idc: 0
[h264 @ 00000000004b8d40] Unknown NAL code: 0 (0 bits)
[rtsp @ 0000000001c2ba00] All info found
[rtsp @ 0000000001c2ba00] rfps: 6.500000 0.018292
[rtsp @ 0000000001c2ba00] rfps: 6.583333 0.006178
Last message repeated 1 times
[rtsp @ 0000000001c2ba00] rfps: 6.666667 0.004542
[rtsp @ 0000000001c2ba00] rfps: 6.750000 0.013386
[rtsp @ 0000000001c2ba00] rfps: 13.250000 0.016201
[rtsp @ 0000000001c2ba00] rfps: 13.333333 0.018170
Input #0, rtsp, from 'rtsp://rtsp-stream-source-server/someRtspStream':
Metadata:
title : Unnamed
comment : N/A
Duration: N/A, start: 0.151944, bitrate: N/A
Stream #0:0, 28, 1/90000: Video: h264 (Main), 1 reference frame, yuvj420p(pc, bt709, progressive, center), 800x600 (800x608) [SAR 1:1 DA
R 4:3], 0/1, 6.67 tbr, 90k tbn, 180k tbc
Successfully opened the file.
Parsing a group of options: output url rtmp://wowza-server:1935/app/stream1.
Applying option vcodec (force video codec ('copy' to copy stream)) with argument libx264.
Applying option an (disable audio) with argument 1.
Applying option r (set frame rate (Hz value, fraction or abbreviation)) with argument 7.
Applying option f (force format) with argument flv.
Successfully parsed a group of options.
Opening an output file: rtmp://wowza-server:1935/app/stream1.
[rtmp @ 00000000023c0ec0] No default whitelist set
Parsing...
Parsed protocol: 0
Parsed host : 127.0.0.1
Parsed app : vdc
RTMP_Connect1, ... connected, handshaking
HandShake: Type Answer : 03
HandShake: Server Uptime : 96850052
HandShake: FMS Version : 3.0.1.1
HandShake: Handshaking finished....
RTMP_Connect1, handshaked
RTMP_SendPacket: fd=516, size=88
0000: 03 00 00 00 00 00 58 14 00 00 00 00 ......X.....
0000: 02 00 07 63 6f 6e 6e 65 63 74 00 3f f0 00 00 00 ...connect.?....
0010: 00 00 00 03 00 03 61 70 70 02 00 03 76 64 63 00 ......app...vdc.
0020: 04 74 79 70 65 02 00 0a 6e 6f 6e 70 72 69 76 61 .type...nonpriva
0030: 74 65 00 05 74 63 55 72 6c 02 00 19 72 74 6d 70 te..tcUrl...rtmp
0040: 3a 2f 2f 31 32 37 2e 30 2e 30 2e 31 3a 31 39 33 ://127.0.0.1:193
0050: 35 2f 76 64 63 00 00 09 5/vdc...
Invoking connect
RTMP_ReadPacket: fd=516
0000: 02 00 00 00 00 00 04 05 00 00 00 00 ............
0000: 00 26 25 a0 .&%.
HandleServerBW: server BW = 2500000
RTMP_ReadPacket: fd=516
0000: 02 00 00 00 00 00 05 06 00 00 00 00 ............
0000: 00 26 25 a0 02 .&%..
HandleClientBW: client BW = 2500000 2
RTMP_ReadPacket: fd=516
0000: 02 00 00 00 00 00 06 04 00 00 00 00 ............
0000: 00 00 00 00 00 00 ......
HandleCtrl, received ctrl. type: 0, len: 6
HandleCtrl, Stream Begin 0
RTMP_ReadPacket: fd=516
0000: 02 00 00 00 00 00 04 01 00 00 00 00 ............
0000: 00 00 02 00 ....
HandleChangeChunkSize, received: chunk size change to 512
RTMP_ReadPacket: fd=516
0000: 03 00 00 00 00 01 05 14 00 00 00 00 ............
0000: 02 00 07 5f 72 65 73 75 6c 74 00 3f f0 00 00 00 ..._result.?....
0010: 00 00 00 03 00 06 66 6d 73 56 65 72 02 00 0e 46 ......fmsVer...F
0020: 4d 53 2f 33 2c 35 2c 37 2c 37 30 30 39 00 0c 63 MS/3,5,7,7009..c
0030: 61 70 61 62 69 6c 69 74 69 65 73 00 40 3f 00 00 apabilities.@?..
0040: 00 00 00 00 00 04 6d 6f 64 65 00 3f f0 00 00 00 ......mode.?....
0050: 00 00 00 00 00 09 03 00 05 6c 65 76 65 6c 02 00 .........level..
0060: 06 73 74 61 74 75 73 00 04 63 6f 64 65 02 00 1d .status..code...
0070: 4e 65 74 43 6f 6e 6e 65 63 74 69 6f 6e 2e 43 6f NetConnection.Co
0080: 6e 6e 65 63 74 2e 53 75 63 63 65 73 73 00 0b 64 nnect.Success..d
0090: 65 73 63 72 69 70 74 69 6f 6e 02 00 15 43 6f 6e escription...Con
00a0: 6e 65 63 74 69 6f 6e 20 73 75 63 63 65 65 64 65 nection succeede
00b0: 64 2e 00 04 64 61 74 61 08 00 00 00 00 00 07 76 d...data.......v
00c0: 65 72 73 69 6f 6e 02 00 0a 33 2c 35 2c 37 2c 37 ersion...3,5,7,7
00d0: 30 30 39 00 00 09 00 08 63 6c 69 65 6e 74 69 64 009.....clientid
00e0: 00 41 d6 2d 2b 68 80 00 00 00 0e 6f 62 6a 65 63 .A.-+h.....objec
00f0: 74 45 6e 63 6f 64 69 6e 67 00 00 00 00 00 00 00 tEncoding.......
0100: 00 00 00 00 09 .....
RTMP_ClientPacket, received: invoke 261 bytes
(object begin)
Property:
Property:
Property:
(object begin)
Property:
Property:
Property:
(object end)
Property:
(object begin)
Property:
Property:
Property:
Property:
(object begin)
Property:
(object end)
Property:
Property:
(object end)
(object end)
HandleInvoke, server invoking
HandleInvoke, received result for method call
RTMP_SendPacket: fd=516, size=33
0000: 43 00 00 00 00 00 21 14 C.....!.
0000: 02 00 0d 72 65 6c 65 61 73 65 53 74 72 65 61 6d ...releaseStream
0010: 00 40 00 00 00 00 00 00 00 05 02 00 04 6e 74 74 .@...........ntt
0020: 31 1
Invoking releaseStream
RTMP_SendPacket: fd=516, size=29
0000: 43 00 00 00 00 00 1d 14 C.......
0000: 02 00 09 46 43 50 75 62 6c 69 73 68 00 40 08 00 ...FCPublish.@..
0010: 00 00 00 00 00 05 02 00 04 6e 74 74 31 .........ntt1
Invoking FCPublish
RTMP_SendPacket: fd=516, size=25
0000: 43 00 00 00 00 00 19 14 C.......
0000: 02 00 0c 63 72 65 61 74 65 53 74 72 65 61 6d 00 ...createStream.
0010: 40 10 00 00 00 00 00 00 05 @........
Invoking createStream
RTMP_ReadPacket: fd=516
0000: 03 00 00 00 00 00 88 14 00 00 00 00 ............
0000: 02 00 0b 6f 6e 46 43 50 75 62 6c 69 73 68 00 00 ...onFCPublish..
0010: 00 00 00 00 00 00 00 05 03 00 05 6c 65 76 65 6c ...........level
0020: 02 00 06 73 74 61 74 75 73 00 04 63 6f 64 65 02 ...status..code.
0030: 00 17 4e 65 74 53 74 72 65 61 6d 2e 50 75 62 6c ..NetStream.Publ
0040: 69 73 68 2e 53 74 61 72 74 00 0b 64 65 73 63 72 ish.Start..descr
0050: 69 70 74 69 6f 6e 02 00 19 46 43 50 75 62 6c 69 iption...FCPubli
0060: 73 68 20 74 6f 20 73 74 72 65 61 6d 20 6e 74 74 sh to stream ntt
0070: 31 2e 00 08 63 6c 69 65 6e 74 69 64 00 41 d6 2d 1...clientid.A.-
0080: 2b 68 80 00 00 00 00 09 +h......
RTMP_ClientPacket, received: invoke 136 bytes
(object begin)
Property:
Property:
Property: NULL
Property:
(object begin)
Property:
Property:
Property:
Property:
(object end)
(object end)
HandleInvoke, server invoking
RTMP_ReadPacket: fd=516
0000: 03 00 00 00 00 00 1d 14 00 00 00 00 ............
0000: 02 00 07 5f 72 65 73 75 6c 74 00 40 10 00 00 00 ..._result.@....
0010: 00 00 00 05 00 3f f0 00 00 00 00 00 00 .....?.......
RTMP_ClientPacket, received: invoke 29 bytes
(object begin)
Property:
Property:
Property: NULL
Property:
(object end)
HandleInvoke, server invoking
HandleInvoke, received result for method call
RTMP_SendPacket: fd=516, size=34
0000: 04 00 00 00 00 00 22 14 01 00 00 00 ......".....
0000: 02 00 07 70 75 62 6c 69 73 68 00 40 14 00 00 00 ...publish.@....
0010: 00 00 00 05 02 00 04 6e 74 74 31 02 00 04 6c 69 .......ntt1...li
0020: 76 65 ve
Invoking publish
RTMP_ReadPacket: fd=516
0000: 02 00 00 00 00 00 06 04 00 00 00 00 ............
0000: 00 00 00 00 00 01 ......
HandleCtrl, received ctrl. type: 0, len: 6
HandleCtrl, Stream Begin 1
RTMP_ReadPacket: fd=516
0000: 03 00 00 00 00 00 7c 14 01 00 00 00 ......|.....
0000: 02 00 08 6f 6e 53 74 61 74 75 73 00 00 00 00 00 ...onStatus.....
0010: 00 00 00 00 05 03 00 05 6c 65 76 65 6c 02 00 06 ........level...
0020: 73 74 61 74 75 73 00 04 63 6f 64 65 02 00 17 4e status..code...N
0030: 65 74 53 74 72 65 61 6d 2e 50 75 62 6c 69 73 68 etStream.Publish
0040: 2e 53 74 61 72 74 00 0b 64 65 73 63 72 69 70 74 .Start..descript
0050: 69 6f 6e 02 00 10 50 75 62 6c 69 73 68 69 6e 67 ion...Publishing
0060: 20 6e 74 74 31 2e 00 08 63 6c 69 65 6e 74 69 64 ntt1...clientid
0070: 00 41 d6 2d 2b 68 80 00 00 00 00 09 .A.-+h......
RTMP_ClientPacket, received: invoke 124 bytes
(object begin)
Property:
Property:
Property: NULL
Property:
(object begin)
Property:
Property:
Property:
Property:
(object end)
(object end)
HandleInvoke, server invoking
HandleInvoke, onStatus: NetStream.Publish.Start
Successfully opened the file.
detected 4 logical cores
[h264 @ 0000000001c2a9a0] nal_unit_type: 8, nal_ref_idc: 3
[h264 @ 0000000001c2a9a0] nal_unit_type: 7, nal_ref_idc: 3
[h264 @ 0000000001c2a9a0] nal_unit_type: 8, nal_ref_idc: 3
[h264 @ 0000000001c2a9a0] sps_id 0 out of range
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
Error while opening decoder for input stream #0:0 : Invalid data found when processing input
[AVIOContext @ 000000000239a360] Statistics: 0 seeks, 0 writeouts
RTMP_SendPacket: fd=516, size=31
0000: 43 00 00 00 00 00 1f 14 C.......
0000: 02 00 0b 46 43 55 6e 70 75 62 6c 69 73 68 00 40 ...FCUnpublish.@
0010: 18 00 00 00 00 00 00 05 02 00 04 6e 74 74 31 ...........ntt1
Invoking FCUnpublish
RTMP_SendPacket: fd=516, size=34
0000: 43 00 00 00 00 00 22 14 C.....".
0000: 02 00 0c 64 65 6c 65 74 65 53 74 72 65 61 6d 00 ...deleteStream.
0010: 40 1c 00 00 00 00 00 00 05 00 3f f0 00 00 00 00 @.........?.....
0020: 00 00 ..
Invoking deleteStream
ffmpeg streaming video-streaming
ffmpeg streaming video-streaming
edited Oct 29 '17 at 19:43
user37135
asked Oct 29 '17 at 19:34
user37135user37135
1701310
1701310
It looks like the RTSP stream contains different data in UDP compared to TCP, for whatever reason, and the UDP data seems to be bad. You can try to force always TCP, and see if that fixes it.
– dirkt
Nov 8 '17 at 6:16
add a comment |
It looks like the RTSP stream contains different data in UDP compared to TCP, for whatever reason, and the UDP data seems to be bad. You can try to force always TCP, and see if that fixes it.
– dirkt
Nov 8 '17 at 6:16
It looks like the RTSP stream contains different data in UDP compared to TCP, for whatever reason, and the UDP data seems to be bad. You can try to force always TCP, and see if that fixes it.
– dirkt
Nov 8 '17 at 6:16
It looks like the RTSP stream contains different data in UDP compared to TCP, for whatever reason, and the UDP data seems to be bad. You can try to force always TCP, and see if that fixes it.
– dirkt
Nov 8 '17 at 6:16
add a comment |
1 Answer
1
active
oldest
votes
Taking a step back, I'm wondering if there is an alternative to using FFmpeg that would avoid this problem. I am probably missing something that is obvious to you, but could you just ingest the RTSP streaming directly with Wowza Streaming Engine and eliminate the need for FFmpeg in this workflow?
Possible resources...
- https://stackoverflow.com/questions/34917461/feed-an-rtsp-stream-to-wowza-streaming-engine
- https://www.wowza.com/docs/how-to-re-stream-video-from-an-ip-camera-rtsp-rtp-re-streaming
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1263570%2ferror-while-opening-decoder-for-input-stream-00-invalid-data-found-when-pro%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Taking a step back, I'm wondering if there is an alternative to using FFmpeg that would avoid this problem. I am probably missing something that is obvious to you, but could you just ingest the RTSP streaming directly with Wowza Streaming Engine and eliminate the need for FFmpeg in this workflow?
Possible resources...
- https://stackoverflow.com/questions/34917461/feed-an-rtsp-stream-to-wowza-streaming-engine
- https://www.wowza.com/docs/how-to-re-stream-video-from-an-ip-camera-rtsp-rtp-re-streaming
add a comment |
Taking a step back, I'm wondering if there is an alternative to using FFmpeg that would avoid this problem. I am probably missing something that is obvious to you, but could you just ingest the RTSP streaming directly with Wowza Streaming Engine and eliminate the need for FFmpeg in this workflow?
Possible resources...
- https://stackoverflow.com/questions/34917461/feed-an-rtsp-stream-to-wowza-streaming-engine
- https://www.wowza.com/docs/how-to-re-stream-video-from-an-ip-camera-rtsp-rtp-re-streaming
add a comment |
Taking a step back, I'm wondering if there is an alternative to using FFmpeg that would avoid this problem. I am probably missing something that is obvious to you, but could you just ingest the RTSP streaming directly with Wowza Streaming Engine and eliminate the need for FFmpeg in this workflow?
Possible resources...
- https://stackoverflow.com/questions/34917461/feed-an-rtsp-stream-to-wowza-streaming-engine
- https://www.wowza.com/docs/how-to-re-stream-video-from-an-ip-camera-rtsp-rtp-re-streaming
Taking a step back, I'm wondering if there is an alternative to using FFmpeg that would avoid this problem. I am probably missing something that is obvious to you, but could you just ingest the RTSP streaming directly with Wowza Streaming Engine and eliminate the need for FFmpeg in this workflow?
Possible resources...
- https://stackoverflow.com/questions/34917461/feed-an-rtsp-stream-to-wowza-streaming-engine
- https://www.wowza.com/docs/how-to-re-stream-video-from-an-ip-camera-rtsp-rtp-re-streaming
answered Nov 8 '17 at 5:46
redmondChrisredmondChris
12
12
add a comment |
add a comment |
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1263570%2ferror-while-opening-decoder-for-input-stream-00-invalid-data-found-when-pro%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
It looks like the RTSP stream contains different data in UDP compared to TCP, for whatever reason, and the UDP data seems to be bad. You can try to force always TCP, and see if that fixes it.
– dirkt
Nov 8 '17 at 6:16