ffmpegはRTSPストリームを記録しません

ffmpegはRTSPストリームを記録しません

10.10.10.10にあるDahua IPカメラからRTSPストリーム(目的など)を記録しようとしています。 Windowsではうまく機能し、以前のUbuntuバージョン(18)でもうまく機能しました。ただし、Ubuntu Server 22.04では実行されますが、エラーなしで終了します。

ffmpeg -loglevel debug -i rtsp://admin:[email protected]:554/cam/realmonitor?channel=1"&"subtype=1 -movflags +frag_keyframe+separate_moof+omit_tfhd_offset+empty_moov -acodec copy -vcodec copy out.mp4

ffmpegのデバッグ出力は次のとおりです。

ffmpeg version 4.4.2-0ubuntu0.22.04.1 Copyright (c) 2000-2021 the FFmpeg developers
  built with gcc 11 (Ubuntu 11.2.0-19ubuntu1)
[...]
Successfully parsed a group of options.
Opening an input file: rtsp://admin:[email protected]:554/cam/realmonitor?channel=1&subtype=1.
[tcp @ 0x55c812986800] No default whitelist set
[tcp @ 0x55c812986800] Original list of addresses:
[tcp @ 0x55c812986800] Address 10.10.10.10 port 554
[tcp @ 0x55c812986800] Interleaved list of addresses:
[tcp @ 0x55c812986800] Address 10.10.10.10 port 554
[tcp @ 0x55c812986800] Starting connection attempt to 10.10.10.10 port 554
[tcp @ 0x55c812986800] Successfully connected to 10.10.10.10 port 554
[rtsp @ 0x55c812983740] SDP:
v=0
o=- 2252669512 2252669512 IN IP4 0.0.0.0
s=Media Server
c=IN IP4 0.0.0.0
t=0 0
a=control:*
a=packetization-supported:DH
a=rtppayload-supported:DH
a=range:npt=now-
m=video 0 RTP/AVP 98
a=control:trackID=0
a=framerate:25.000000
a=rtpmap:98 H265/90000
a=fmtp:98 profile-id=1;sprop-sps=QgEBAUAAAAMAAAMAAAMAAAMAmaAFggCQf5a7kbBrlUE=;sprop-pps=RAHAc8BMkA==;sprop-vps=QAEMAf//AUAAAAMAAAMAAAMAAAMAmawJ
a=recvonly

[rtsp @ 0x55c812983740] video codec set to: hevc
[rtp @ 0x55c8129899c0] No default whitelist set
[udp @ 0x55c81298a480] No default whitelist set
[udp @ 0x55c81298a480] end receive buffer size reported is 425984
[udp @ 0x55c812989e00] No default whitelist set
[udp @ 0x55c812989e00] end receive buffer size reported is 425984
[rtsp @ 0x55c812983740] setting jitter buffer size to 500
[rtsp @ 0x55c812983740] hello state=0
Failed to parse interval end specification ''
[hevc @ 0x55c812989100] nal_unit_type: 32(VPS), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x55c812989100] nal_unit_type: 33(SPS), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x55c812989100] nal_unit_type: 34(PPS), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x55c812989100] Decoding VPS
[hevc @ 0x55c812989100] Main profile bitstream
[hevc @ 0x55c812989100] Decoding SPS
[hevc @ 0x55c812989100] Main profile bitstream
[hevc @ 0x55c812989100] Decoding PPS
[hevc @ 0x55c812989100] nal_unit_type: 32(VPS), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x55c812989100] nal_unit_type: 33(SPS), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x55c812989100] nal_unit_type: 34(PPS), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x55c812989100] Decoding VPS
[hevc @ 0x55c812989100] Main profile bitstream
[hevc @ 0x55c812989100] Decoding SPS
[hevc @ 0x55c812989100] Main profile bitstream
[hevc @ 0x55c812989100] Decoding PPS
Input #0, rtsp, from 'rtsp://admin:[email protected]:554/cam/realmonitor?channel=1&subtype=1':
  Metadata:
    title           : Media Server
  Duration: N/A, bitrate: N/A
  Stream #0:0, 0, 1/90000: Video: hevc (Main), 1 reference frame, yuv420p(tv, left), 704x576, 0/1, 90k tbr, 90k tbn, 90k tbc
Successfully opened the file.
Parsing a group of options: output url out.mp4.
Applying option acodec (force audio codec ('copy' to copy stream)) with argument copy.
Applying option vcodec (force video codec ('copy' to copy stream)) with argument copy.
Successfully parsed a group of options.
Opening an output file: out.mp4.
File '123.mp4' already exists. Overwrite? [y/N] y
[file @ 0x55c8129ba9c0] Setting default whitelist 'file,crypto,data'
Successfully opened the file.
[mp4 @ 0x55c8129bb800] Empty MOOV enabled; disabling automatic bitstream filtering
Output #0, mp4, to 'out.mp4':
  Metadata:
    title           : Media Server
    encoder         : Lavf58.76.100
  Stream #0:0, 0, 1/90000: Video: hevc (Main), 1 reference frame (hev1 / 0x31766568), yuv420p(tv, left), 704x576 (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
cur_dts is invalid st:0 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
No more output streams to write to, finishing.e=00:00:00.00 bitrate=N/A speed=   0x
frame=    0 fps=0.0 q=-1.0 Lsize=       1kB 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:[email protected]:554/cam/realmonitor?channel=1&subtype=1):
  Input stream #0:0 (video): 0 packets read (0 bytes);
  Total: 0 packets (0 bytes) demuxed
Output file #0 (123.mp4):
  Output stream #0:0 (video): 0 packets muxed (0 bytes);
  Total: 0 packets (0 bytes) muxed
0 frames successfully decoded, 0 decoding errors

関連情報