Problem with a onvif camera
Hi. With this command line I can capture the video stream from my personal onvif camera using my linux machine and the official already built ffmpeg executable from the ffmpeg website. *./ffmpeg -i rtsp://192.168.1.162:554/onvif1 a.avi* But I can't capture the video stream from another onvif camera, the command line is *./ffmpeg -i rtsp://admin:admin@172.30.153.33:554/1 a.avi* The ffmpeg output is denis@tomcat:~/Scaricati/ffmpeg-3.4.2-64bit-static$ ./ffmpeg -i rtsp:// admin:admin@172.30.153.33:554/1 a.avi ffmpeg version 3.4.2-static https://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2018 the FFmpeg developers built with gcc 6.3.0 (Debian 6.3.0-18) 20170516 [rtsp @ 0x43a4bc0] UDP timeout, retrying with TCP [rtsp @ 0x43a4bc0] method PAUSE failed: 455 Method Not Valid In This State [rtsp @ 0x43a4bc0] Could not find codec parameters for stream 0 (Video: h264, none): unspecified size *Consider increasing the value for the 'analyzeduration' and 'probesize' options* Guessed Channel Layout for Input Stream #0.1 : mono Input #0, rtsp, from 'rtsp://admin:admin@172.30.153.33:554/1': Metadata: title : h264.mp4 Duration: N/A, bitrate: 64 kb/s Stream #0:0: Video: h264, *none*, 90k tbr, 90k tbn, 180k tbc Stream #0:1: Audio: pcm_mulaw, 8000 Hz, mono, s16, 64 kb/s Stream mapping: Stream #0:1 -> #0:0 (pcm_mulaw (native) -> mp3 (libmp3lame)) Press [q] to stop, [?] for help [rtsp @ 0x43a4bc0] UDP timeout, retrying with TCP [rtsp @ 0x43a4bc0] method PAUSE failed: 455 Method Not Valid In This State rtsp://admin:admin@172.30.153.33:554/1: Operation not permitted Finishing stream 0:0 without any data written to it. Output #0, avi, to 'a.avi': Metadata: INAM : h264.mp4 ISFT : Lavf57.83.100 Stream #0:0: Audio: mp3 (libmp3lame) (U[0][0][0] / 0x0055), 8000 Hz, mono, s16p Metadata: encoder : Lavc57.107.100 libmp3lame size= 6kB 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 Output file is empty, nothing was encoded (check -ss / -t / -frames parameters if used) denis@tomcat:~/Scaricati/ffmpeg-3.4.2-64bit-static$ I have already tried to increase the value of analyzeduration and probesize I can watch the camera using *vlc* with the same command line. Can someone suggest me how to resolve? Is ffmpeg not fully compatible with all video cameras? Regards. +39.347.4070897 www.labcsp.com[1] www.denisgottardello.it[2] GMT+1 Skype: mrdebug -------- [1] http://www.labcsp.com [2] http://www.denisgottardello.it
2018-04-15 15:04 GMT+02:00, Denis <info@denisgottardello.it>:
Hi. With this command line I can capture the video stream from my personal onvif camera using my linux machine
and the official already built ffmpeg executable from the ffmpeg website.
(There are no official binaries, the FFmpeg project only provides source code.)
*./ffmpeg -i rtsp://192.168.1.162:554/onvif1 a.avi*
But I can't capture the video stream from another onvif camera, the command line is *./ffmpeg -i rtsp://admin:admin@172.30.153.33:554/1 a.avi*
The ffmpeg output is denis@tomcat:~/Scaricati/ffmpeg-3.4.2-64bit-static$ ./ffmpeg -i rtsp:// admin:admin@172.30.153.33:554/1 a.avi ffmpeg version 3.4.2-static https://johnvansickle.com/ffmpeg/
Please test current FFmpeg git head, nothing else is supported here. If the camera cannot be reached from the internet, please provide the console output for "ffmpeg -loglevel 99 -i rtsp...". Carl Eugen
In data domenica 15 aprile 2018 23:29:57 CEST, Carl Eugen Hoyos ha scritto:
If the camera cannot be reached from the internet, please provide the console output for "ffmpeg -loglevel 99 -i rtsp...".
Carl Eugen
Hi and many thanks for your reply. This is the output of ffmpeg build from git. [rtsp @ 0x5629da83b400] ret=1 c=45 [E] [rtsp @ 0x5629da83b400] ret=1 c=54 [T] [rtsp @ 0x5629da83b400] ret=1 c=45 [E] [rtsp @ 0x5629da83b400] ret=1 c=52 [R] ]rtsp @ 0x5629da83b400] ret=1 c=0d [ [rtsp @ 0x5629da83b400] ret=1 c=0a [ ] [rtsp @ 0x5629da83b400] line='Public: OPTIONS, DESCRIBE, SETUP, PLAY, TEARDOWN, SET_PARAMETER' ]rtsp @ 0x5629da83b400] ret=1 c=0d [ [rtsp @ 0x5629da83b400] ret=1 c=0a [ ] [rtsp @ 0x5629da83b400] line='' [rtsp @ 0x5629da83b400] Sending: DESCRIBE rtsp://172.30.153.33:554/1 RTSP/1.0 Accept: application/sdp CSeq: 2 User-Agent: Lavf58.11.101 -- [rtsp @ 0x5629da83b400] ret=1 c=52 [R] [rtsp @ 0x5629da83b400] ret=1 c=54 [T] [rtsp @ 0x5629da83b400] ret=1 c=53 [S] [rtsp @ 0x5629da83b400] ret=1 c=50 [P] [rtsp @ 0x5629da83b400] ret=1 c=2f [/] [rtsp @ 0x5629da83b400] ret=1 c=31 [1] [rtsp @ 0x5629da83b400] ret=1 c=2e [.] [rtsp @ 0x5629da83b400] ret=1 c=30 [0] [rtsp @ 0x5629da83b400] ret=1 c=20 [ ] [rtsp @ 0x5629da83b400] ret=1 c=32 [2] [rtsp @ 0x5629da83b400] ret=1 c=30 [0] Last message repeated 1 times [rtsp @ 0x5629da83b400] ret=1 c=20 [ ] [rtsp @ 0x5629da83b400] ret=1 c=4f [O] [rtsp @ 0x5629da83b400] ret=1 c=4b [K] ]rtsp @ 0x5629da83b400] ret=1 c=0d [ [rtsp @ 0x5629da83b400] ret=1 c=0a [ ] [rtsp @ 0x5629da83b400] line='RTSP/1.0 200 OK' [rtsp @ 0x5629da83b400] ret=1 c=43 [C] [rtsp @ 0x5629da83b400] ret=1 c=73 [s] [rtsp @ 0x5629da83b400] ret=1 c=65 [e] [rtsp @ 0x5629da83b400] ret=1 c=71 [q] [rtsp @ 0x5629da83b400] ret=1 c=3a [:] [rtsp @ 0x5629da83b400] ret=1 c=20 [ ] [rtsp @ 0x5629da83b400] ret=1 c=32 [2] ]rtsp @ 0x5629da83b400] ret=1 c=0d [ [rtsp @ 0x5629da83b400] ret=1 c=0a [ ] [rtsp @ 0x5629da83b400] line='Cseq: 2' [rtsp @ 0x5629da83b400] ret=1 c=53 [S] [rtsp @ 0x5629da83b400] ret=1 c=65 [e] [rtsp @ 0x5629da83b400] ret=1 c=72 [r] [rtsp @ 0x5629da83b400] ret=1 c=76 [v] [rtsp @ 0x5629da83b400] ret=1 c=65 [e] [rtsp @ 0x5629da83b400] ret=1 c=72 [r] [rtsp @ 0x5629da83b400] ret=1 c=3a [:] [rtsp @ 0x5629da83b400] ret=1 c=20 [ ] [rtsp @ 0x5629da83b400] ret=1 c=52 [R] [rtsp @ 0x5629da83b400] ret=1 c=74 [t] [rtsp @ 0x5629da83b400] ret=1 c=73 [s] [rtsp @ 0x5629da83b400] ret=1 c=70 [p] [rtsp @ 0x5629da83b400] ret=1 c=20 [ ] [rtsp @ 0x5629da83b400] ret=1 c=53 [S] [rtsp @ 0x5629da83b400] ret=1 c=65 [e] [rtsp @ 0x5629da83b400] ret=1 c=72 [r] [rtsp @ 0x5629da83b400] ret=1 c=76 [v] [rtsp @ 0x5629da83b400] ret=1 c=65 [e] [rtsp @ 0x5629da83b400] ret=1 c=72 [r] [rtsp @ 0x5629da83b400] ret=1 c=20 [ ] [rtsp @ 0x5629da83b400] ret=1 c=37 [7] [rtsp @ 0x5629da83b400] ret=1 c=32 [2] [rtsp @ 0x5629da83b400] ret=1 c=30 [0] [rtsp @ 0x5629da83b400] ret=1 c=2a [*] [rtsp @ 0x5629da83b400] ret=1 c=35 [5] [rtsp @ 0x5629da83b400] ret=1 c=37 [7] [rtsp @ 0x5629da83b400] ret=1 c=36 [6] [rtsp @ 0x5629da83b400] ret=1 c=2a [*] [rtsp @ 0x5629da83b400] ret=1 c=33 [3] [rtsp @ 0x5629da83b400] ret=1 c=30 [0] [rtsp @ 0x5629da83b400] ret=1 c=2a [*] [rtsp @ 0x5629da83b400] ret=1 c=34 [4] [rtsp @ 0x5629da83b400] ret=1 c=30 [0] [rtsp @ 0x5629da83b400] ret=1 c=39 [9] [rtsp @ 0x5629da83b400] ret=1 c=36 [6] ]rtsp @ 0x5629da83b400] ret=1 c=0d [ [rtsp @ 0x5629da83b400] ret=1 c=0a [ ] [rtsp @ 0x5629da83b400] line='Server: Rtsp Server 720*576*30*4096' [rtsp @ 0x5629da83b400] ret=1 c=43 [C] [rtsp @ 0x5629da83b400] ret=1 c=6f [o] [rtsp @ 0x5629da83b400] ret=1 c=6e [n] [rtsp @ 0x5629da83b400] ret=1 c=74 [t] [rtsp @ 0x5629da83b400] ret=1 c=65 [e] [rtsp @ 0x5629da83b400] ret=1 c=6e [n] [rtsp @ 0x5629da83b400] ret=1 c=74 [t] [rtsp @ 0x5629da83b400] ret=1 c=2d [-] [rtsp @ 0x5629da83b400] ret=1 c=54 [T] [rtsp @ 0x5629da83b400] ret=1 c=79 [y] [rtsp @ 0x5629da83b400] ret=1 c=70 [p]
[rtsp @ 0x5629da83b400] line='Accept: OPTIONS, SETUP, PLAY, TEARDOWN' ]rtsp @ 0x5629da83b400] ret=1 c=0d [ [rtsp @ 0x5629da83b400] ret=1 c=0a [ ] [rtsp @ 0x5629da83b400] line='' [rtsp @ 0x5629da83b400] method PAUSE failed: 455 Method Not Valid In This State [rtsp @ 0x5629da83b400] CSeq: 6 Server: Rtsp Server Accept: OPTIONS, SETUP, PLAY, TEARDOWN [h264 @ 0x5629da83ea80] nal_unit_type: 7, nal_ref_idc: 3 [h264 @ 0x5629da83ea80] nal_unit_type: 8, nal_ref_idc: 3 [rtsp @ 0x5629da83b400] stream 0: start_time: -102481911520608.625 duration: -102481911520608.625 [rtsp @ 0x5629da83b400] stream 1: start_time: -1152921504606847.000 duration: -1152921504606847.000 [rtsp @ 0x5629da83b400] format: start_time: -9223372036854.775 duration: -9223372036854.775 bitrate=64 kb/s [rtsp @ 0x5629da83b400] Could not find codec parameters for stream 0 (Video: h264, 1 reference frame, none(left)): unspecified size Consider increasing the value for the 'analyzeduration' and 'probesize' options Guessed Channel Layout for Input Stream #0.1 : mono Input #0, rtsp, from 'rtsp://admin:admin@172.30.153.33:554/1': Metadata: title : h264.mp4 Duration: N/A, bitrate: 64 kb/s Stream #0:0, 0, 1/90000: Video: h264, 1 reference frame, none(left), 90k tbr, 90k tbn, 180k tbc Stream #0:1, 0, 1/8000: Audio: pcm_mulaw, 8000 Hz, mono, s16, 64 kb/s Successfully opened the file. Parsing a group of options: output url a.avi. Successfully parsed a group of options. Opening an output file: a.avi. [file @ 0x5629da892d80] Setting default whitelist 'file,crypto' Successfully opened the file. Stream mapping: Stream #0:1 -> #0:0 (pcm_mulaw (native) -> ac3 (native)) Press [q] to stop, [?] for help cur_dts is invalid (this is harmless if it occurs once at the start per stream) [rtsp @ 0x5629da83b400] UDP timeout, retrying with TCP [rtsp @ 0x5629da83b400] Sending: PAUSE rtsp://172.30.153.33/1 RTSP/1.0 CSeq: 7 User-Agent: Lavf58.11.101 Session: 10211118 Server: Rtsp Server Accept: OPTIONS, SETUP, PLAY, TEARDOWN rtsp://admin:admin@172.30.153.33:554/1: Operation not permitted cur_dts is invalid (this is harmless if it occurs once at the start per stream) detected 4 logical cores [graph_0_in_0_1 @ 0x5629da895200] Setting 'time_base' to value '1/8000' [graph_0_in_0_1 @ 0x5629da895200] Setting 'sample_rate' to value '8000' [graph_0_in_0_1 @ 0x5629da895200] Setting 'sample_fmt' to value 's16' [graph_0_in_0_1 @ 0x5629da895200] Setting 'channel_layout' to value '0x4' [graph_0_in_0_1 @ 0x5629da895200] tb:1/8000 samplefmt:s16 samplerate:8000 chlayout:0x4 [format_out_0_0 @ 0x5629da894400] Setting 'sample_fmts' to value 'fltp' [format_out_0_0 @ 0x5629da894400] Setting 'channel_layouts' to value '0x4|0x3|0x103| 0x7|0x603|0x33|0x107|0x607|0x37|0xc|0xb|0x10b|0xf|0x60b|0x3b|0x10f|0x60f|0x3f' [format_out_0_0 @ 0x5629da894400] auto-inserting filter 'auto_resampler_0' between the filter 'Parsed_anull_0' and the filter 'format_out_0_0' [AVFilterGraph @ 0x5629da894300] query_formats: 4 queried, 6 merged, 3 already done, 0 delayed [auto_resampler_0 @ 0x5629da897cc0] [SWR @ 0x5629da8b6bc0] Using s16p internally between filters [auto_resampler_0 @ 0x5629da897cc0] ch:1 chl:mono fmt:s16 r:8000Hz -> ch:1 chl:mono fmt:fltp r:8000Hz [avi @ 0x5629da88f840] reserve_index_space:0 master_index_max_size:256 [avi @ 0x5629da88f840] duration_est:36000.000, filesize_est:0.4GiB, master_index_max_size: 256 Output #0, avi, to 'a.avi': Metadata: INAM : h264.mp4 ISFT : Lavf58.11.101 Stream #0:0, 0, 24/125: Audio: ac3 ([0] [0][0] / 0x2000), 8000 Hz, mono, fltp, delay 256, 96 kb/ s Metadata: encoder : Lavc58.17.100 ac3 [out_0_0 @ 0x5629da896240] EOF on sink link out_0_0:default. No more output streams to write to, finishing.peed= 0x size= 6kB 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://admin:admin@172.30.153.33:554/1): Input stream #0:0 (video): 0 packets read (0 bytes); Input stream #0:1 (audio): 0 packets read (0 bytes); 0 frames decoded (0 samples); Total: 0 packets (0 bytes) demuxed Output file #0 (a.avi): Output stream #0:0 (audio): 0 frames encoded (0 samples); 0 packets muxed (0 bytes); Total: 0 packets (0 bytes) muxed Output file is empty, nothing was encoded (check -ss / -t / -frames parameters if used) 0 frames successfully decoded, 0 decoding errors [AVIOContext @ 0x5629da892c00] Statistics: 8 seeks, 7 writeouts [rtsp @ 0x5629da83b400] Sending: TEARDOWN rtsp://172.30.153.33/1 RTSP/1.0 CSeq: 8 User-Agent: Lavf58.11.101 Session: 10211118 -- denis@tomcat:~/Scaricati/aaa/ffmpeg$
_______________________________________________ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user
[rtsp @ 0x5629da83b400] line='Accept: OPTIONS, SETUP, PLAY, TEARDOWN' ]rtsp @ 0x5629da83b400] ret=1 c=0d [ [rtsp @ 0x5629da83b400] ret=1 c=0a [ ] [rtsp @ 0x5629da83b400] line='' [rtsp @ 0x5629da83b400] method PAUSE failed: 455 Method Not Valid In This State [rtsp @ 0x5629da83b400] CSeq: 6 Server: Rtsp Server Accept: OPTIONS, SETUP, PLAY, TEARDOWN [h264 @ 0x5629da83ea80] nal_unit_type: 7, nal_ref_idc: 3 [h264 @ 0x5629da83ea80] nal_unit_type: 8, nal_ref_idc: 3 [rtsp @ 0x5629da83b400] stream 0: start_time: -102481911520608.625 duration: -102481911520608.625 [rtsp @ 0x5629da83b400] stream 1: start_time: -1152921504606847.000 duration: -1152921504606847.000 [rtsp @ 0x5629da83b400] format: start_time: -9223372036854.775 duration: -9223372036854.775 bitrate=64 kb/s [rtsp @ 0x5629da83b400] Could not find codec parameters for stream 0 (Video: h264, 1 reference frame, none(left)): unspecified size Consider increasing the value for the 'analyzeduration' and 'probesize' options Guessed Channel Layout for Input Stream #0.1 : mono Input #0, rtsp, from 'rtsp://admin:admin@172.30.153.33:554/1': Metadata: title : h264.mp4 Duration: N/A, bitrate: 64 kb/s Stream #0:0, 0, 1/90000: Video: h264, 1 reference frame, none(left), 90k tbr, 90k tbn, 180k tbc Stream #0:1, 0, 1/8000: Audio: pcm_mulaw, 8000 Hz, mono, s16, 64 kb/s Successfully opened the file. Parsing a group of options: output url a.avi. Successfully parsed a group of options. Opening an output file: a.avi. [file @ 0x5629da892d80] Setting default whitelist 'file,crypto' Successfully opened the file. Stream mapping: Stream #0:1 -> #0:0 (pcm_mulaw (native) -> ac3 (native)) Press [q] to stop, [?] for help cur_dts is invalid (this is harmless if it occurs once at the start per stream) [rtsp @ 0x5629da83b400] UDP timeout, retrying with TCP [rtsp @ 0x5629da83b400] Sending: PAUSE rtsp://172.30.153.33/1 RTSP/1.0 CSeq: 7 User-Agent: Lavf58.11.101 Session: 10211118 Server: Rtsp Server Accept: OPTIONS, SETUP, PLAY, TEARDOWN rtsp://admin:admin@172.30.153.33:554/1: Operation not permitted cur_dts is invalid (this is harmless if it occurs once at the start per stream) detected 4 logical cores [graph_0_in_0_1 @ 0x5629da895200] Setting 'time_base' to value '1/8000' [graph_0_in_0_1 @ 0x5629da895200] Setting 'sample_rate' to value '8000' [graph_0_in_0_1 @ 0x5629da895200] Setting 'sample_fmt' to value 's16' [graph_0_in_0_1 @ 0x5629da895200] Setting 'channel_layout' to value '0x4' [graph_0_in_0_1 @ 0x5629da895200] tb:1/8000 samplefmt:s16 samplerate:8000 chlayout:0x4 [format_out_0_0 @ 0x5629da894400] Setting 'sample_fmts' to value 'fltp' [format_out_0_0 @ 0x5629da894400] Setting 'channel_layouts' to value '0x4|0x3|0x103| 0x7|0x603|0x33|0x107|0x607|0x37|0xc|0xb|0x10b|0xf|0x60b|0x3b|0x10f|0x60f|0x3f' [format_out_0_0 @ 0x5629da894400] auto-inserting filter 'auto_resampler_0' between the filter 'Parsed_anull_0' and the filter 'format_out_0_0' [AVFilterGraph @ 0x5629da894300] query_formats: 4 queried, 6 merged, 3 already done, 0 delayed [auto_resampler_0 @ 0x5629da897cc0] [SWR @ 0x5629da8b6bc0] Using s16p internally between filters [auto_resampler_0 @ 0x5629da897cc0] ch:1 chl:mono fmt:s16 r:8000Hz -> ch:1 chl:mono fmt:fltp r:8000Hz [avi @ 0x5629da88f840] reserve_index_space:0 master_index_max_size:256 [avi @ 0x5629da88f840] duration_est:36000.000, filesize_est:0.4GiB, master_index_max_size: 256 Output #0, avi, to 'a.avi': Metadata: INAM : h264.mp4 ISFT : Lavf58.11.101 Stream #0:0, 0, 24/125: Audio: ac3 ([0] [0][0] / 0x2000), 8000 Hz, mono, fltp, delay 256, 96 kb/ s Metadata: encoder : Lavc58.17.100 ac3 [out_0_0 @ 0x5629da896240] EOF on sink link out_0_0:default. No more output streams to write to, finishing.peed= 0x size= 6kB 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://admin:admin@172.30.153.33:554/1): Input stream #0:0 (video): 0 packets read (0 bytes); Input stream #0:1 (audio): 0 packets read (0 bytes); 0 frames decoded (0 samples); Total: 0 packets (0 bytes) demuxed Output file #0 (a.avi): Output stream #0:0 (audio): 0 frames encoded (0 samples); 0 packets muxed (0 bytes); Total: 0 packets (0 bytes) muxed Output file is empty, nothing was encoded (check -ss / -t / -frames parameters if used) 0 frames successfully decoded, 0 decoding errors [AVIOContext @ 0x5629da892c00] Statistics: 8 seeks, 7 writeouts [rtsp @ 0x5629da83b400] Sending: TEARDOWN rtsp://172.30.153.33/1 RTSP/1.0 CSeq: 8 User-Agent: Lavf58.11.101 Session: 10211118 -- denis@tomcat:~/Scaricati/aaa/ffmpeg$
_______________________________________________ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user
participants (2)
-
Carl Eugen Hoyos -
Denis