I have a hikvision camera which has most of the same stream options as Swann.
If I use a similar config I can get the still image loading just fine but the stream keeps trying to load.
ffmpeg -rtsp_transport tcp -i rtsp://view:[email protected]:554/Streaming/Channels/101/ -map 0:0 -vcodec copy -an -f rawvideo -payload_type 99 -ssrc 5046142 -f rtp -srtp_out_suite AES_CM_128_HMAC_SHA1_80 -srtp_out_params Ob1DPKtZgzBBUxPuNrnihxYePW30zEhIRHAwmK18 srtp://192.168.1.129:49916?rtcpport=49916&localrtcpport=49916&pkt_size=1378 -loglevel debug
ffmpeg version 4.2.git-47773f7 Copyright (c) 2000-2020 the FFmpeg developers
built with gcc 6.3.0 (Raspbian 6.3.0-18+rpi1+deb9u1) 20170516
configuration: --pkgconfigdir=/build/workspace/lib/pkgconfig --prefix=/build/workspace --pkg-config-flags=--static --extra-cflags=-I/build/workspace/include --extra-ldflags=-L/build/workspace/lib --extra-libs='-lpthread -lm' --enable-static --disable-debug --disable-shared --disable-ffplay --disable-doc --enable-openssl --enable-gpl --enable-version3 --enable-nonfree --enable-pthreads --enable-libvpx --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libx264 --enable-runtime-cpudetect --enable-libfdk-aac --enable-avfilter --enable-libopencore_amrwb --enable-libopencore_amrnb --enable-filters --enable-decoder=h264 --enable-network --enable-protocol=tcp --enable-demuxer=rtsp --enable-omx-rpi --enable-mmal
libavutil 56. 40.100 / 56. 40.100
libavcodec 58. 68.102 / 58. 68.102
libavformat 58. 38.100 / 58. 38.100
libavdevice 58. 9.103 / 58. 9.103
libavfilter 7. 75.100 / 7. 75.100
libswscale 5. 6.100 / 5. 6.100
libswresample 3. 6.100 / 3. 6.100
libpostproc 55. 6.100 / 55. 6.100
Splitting the commandline.
Reading option '-rtsp_transport' ... matched as AVOption 'rtsp_transport' with argument 'tcp'.
Reading option '-i' ... matched as input url with argument 'rtsp://view:[email protected]:554/Streaming/Channels/101/'.
Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument '0:0'.
Reading option '-vcodec' ... matched as option 'vcodec' (force video codec ('copy' to copy stream)) with argument 'copy'.
Reading option '-an' ... matched as option 'an' (disable audio) with argument '1'.
Reading option '-f' ... matched as option 'f' (force format) with argument 'rawvideo'.
Reading option '-payload_type' ... matched as AVOption 'payload_type' with argument '99'.
Reading option '-ssrc' ... matched as AVOption 'ssrc' with argument '5046142'.
Reading option '-f' ... matched as option 'f' (force format) with argument 'rtp'.
Reading option '-srtp_out_suite' ...
matched as AVOption 'srtp_out_suite' with argument 'AES_CM_128_HMAC_SHA1_80'.
Reading option '-srtp_out_params' ...
matched as AVOption 'srtp_out_params' with argument 'Ob1DPKtZgzBBUxPuNrnihxYePW30zEhIRHAwmK18'.
Reading option 'srtp://192.168.1.129:49916?rtcpport=49916&localrtcpport=49916&pkt_size=1378' ...
matched as output url.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument 'debug'.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option loglevel (set logging level) with argument debug.
Successfully parsed a group of options.
Parsing a group of options: input url rtsp://view:[email protected]:554/Streaming/Channels/101/.
Successfully parsed a group of options.
Opening an input file: rtsp://view:[email protected]:554/Streaming/Channels/101/.
[tcp @ 0x281c550]
No default whitelist set
[tcp @ 0x281c550] Original list of addresses:
[tcp @ 0x281c550] Address 192.168.1.107 port 554
[tcp @ 0x281c550] Interleaved list of addresses:
[tcp @ 0x281c550] Address 192.168.1.107 port 554
[tcp @ 0x281c550] Starting connection attempt to 192.168.1.107 port 554
[tcp @ 0x281c550] Successfully connected to 192.168.1.107 port 554
[rtsp @ 0x281a530]
SDP:
v=0
o=- 1590335352879747 1590335352879747 IN IP6 ::
s=Media Presentation
e=NONE
b=AS:5050
t=0 0
a=control:rtsp://192.168.1.107:554/Streaming/Channels/101/
m=video 0 RTP/AVP 96
c=IN IP6 ::
b=AS:5000
a=recvonly
a=x-dimensions:1280,720
a=control:rtsp://192.168.1.107:554/Streaming/Channels/101/trackID=1
a=rtpmap:96 H264/90000
a=fmtp:96 profile-level-id=420029; packetization-mode=1; sprop-parameter-sets=Z0IAH52oFAFum4CAgIE=,aM48gA==
a=Media_header:MEDIAINFO=494D4B48010200000400000100000000000000000000000000000000000000000000000000000000;
a=appversion:1.0
[rtsp @ 0x281a530]
video codec set to: h264
[rtsp @ 0x281a530] RTP Profile IDC: 42 Profile IOP: 0 Level: 29
[rtsp @ 0x281a530] RTP Packetization Mode: 1
[rtsp @ 0x281a530] Extradata set to 0x281de38 (size: 26)
[rtsp @ 0x281a530] setting jitter buffer size to 0
[rtsp @ 0x281a530] hello state=0
[h264 @ 0x281d920] nal_unit_type: 7(SPS), nal_ref_idc: 3
[h264 @ 0x281d920] nal_unit_type: 8(PPS), nal_ref_idc: 3
[h264 @ 0x281d920] nal_unit_type: 7(SPS), nal_ref_idc: 3
[h264 @ 0x281d920] nal_unit_type: 8(PPS), nal_ref_idc: 3
[h264 @ 0x281d920] unknown SEI type 229
[h264 @ 0x281d920] nal_unit_type: 7(SPS), nal_ref_idc: 3
[h264 @ 0x281d920] nal_unit_type: 8(PPS), nal_ref_idc: 3
[h264 @ 0x281d920] nal_unit_type: 6(SEI), nal_ref_idc: 0
[h264 @ 0x281d920] nal_unit_type: 5(IDR), nal_ref_idc: 3
[h264 @ 0x281d920] unknown SEI type 229
[h264 @ 0x281d920] Format yuvj420p chosen by get_format().
[h264 @ 0x281d920] Reinit context to 1280x720, pix_fmt: yuvj420p
[5/24/2020, 15:49:29] [Camera-Swann] Snapshot from: Camera @ 480:270
ffmpeg -rtsp_transport tcp -i rtsp://view:[email protected]:554/Streaming/Channels/101/ -t 1 -vf scale=480:270 -f image2 -
[5/24/2020, 15:49:29] [Camera-Swann] {"sessionID":"b5bf9b59-b5dc-4c40-b75c-cd84b08e93bb","type":"stop"}
[rtsp @ 0x281a530] interrupted
[rtsp @ 0x281a530] decoding for stream 0 failed
Input #0, rtsp, from 'rtsp://view:[email protected]:554/Streaming/Channels/101/':
Metadata:
title : Media Presentation
Duration: N/A, bitrate: N/A
Stream #0:0, 1, 1/90000: Video: h264 (Baseline), 1 reference frame, yuvj420p(pc, bt709, progressive, left), 1280x720, 0/1, 90k tbr, 90k tbn, 180k tbc
Successfully opened the file.
Parsing a group of options: output url srtp://192.168.1.129:49916?rtcpport=49916&localrtcpport=49916&pkt_size=1378.
Applying option map (set input stream mapping) with argument 0:0.
Applying option vcodec (force video codec ('copy' to copy stream)) with argument copy.
Applying option an (disable audio) with argument 1.
Applying option f (force format) with argument rawvideo.
Applying option f (force format) with argument rtp.
Successfully parsed a group of options.
Opening an output file: srtp://192.168.1.129:49916?rtcpport=49916&localrtcpport=49916&pkt_size=1378.
[srtp @ 0x28384e0] No default whitelist set
[rtp @ 0x286bba0] No default whitelist set
[udp @ 0x283afb0] No default whitelist set
[udp @ 0x283b110] No default whitelist set
Successfully opened the file.
Output #0, rtp, to 'srtp://192.168.1.129:49916?rtcpport=49916&localrtcpport=49916&pkt_size=1378':
Metadata:
title : Media Presentation
encoder : Lavf58.38.100
Stream #0:0
, 0, 1/90000: Video: h264 (Baseline), 1 reference frame, yuvj420p(pc, bt709, progressive, left), 1280x720 (0x0), 0/1, q=2-31, 90k tbr, 90k tbn, 90k tbc
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
frame= 0 fps=0.0 q=-1.0 Lsize= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
Input file #0 (rtsp://view:[email protected]:554/Streaming/Channels/101/):
Input stream #0:0 (video): 0 packets read (0 bytes);
Total: 0 packets (0 bytes) demuxed
Output file #0 (srtp://192.168.1.129:49916?rtcpport=49916&localrtcpport=49916&pkt_size=1378):
Output stream #0:0 (video): 0 packets muxed (0 bytes);
Total: 0 packets (0 bytes) muxed
0 frames successfully decoded, 0 decoding errors
[AVIOContext @ 0x283b1c0] Statistics: 0 seeks, 0 writeouts
Exiting normally, received signal 15.
[5/24/2020, 15:49:30] [Camera-Swann] Stopped streaming
{
"platform": "Camera-Swann",
"cameras": [
{
"name": "Camera",
"videoConfig": {
"mainStream": "-rtsp_transport tcp -i rtsp://view:[email protected]:554/Streaming/Channels/101/",
"subStream": "-rtsp_transport tcp -i rtsp://[email protected]:554/Streaming/Channels/102/",
"maxStreams": 1,
"bitrateThreshold": 299,
"videoPacketSize": 1378,
"audioPacketSize": 188,
"mapvideo": "0:0",
"mapaudio": "0:1",
"audio": false,
"debug": true
}
}
]
}