我正在使用以下命令生成 fmp4 文件
ffmpeg -rtsp_transport tcp -i rtsp://someuser:somepassword@somedomain:someport/Streaming/Channels/101 -acodec copy -vcodec copy -hls_segment_type fmp4 -hls_time 2 -hls_list_size 10 -hls_flags delete_segments+append_list+split_by_time -hls_playlist_type event test.m3u8
我需要知道每个片段的确切持续时间和帧数。不幸的是 -vstats 似乎被忽略了。
我尝试使用
ffprobe -show_frames ./test0.m4s
但我明白了
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fb68e80b000] could not find corresponding track id 1 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fb68e80b000] could not find corresponding trex (id 1) [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fb68e80b000] could not find corresponding track id 0 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fb68e80b000] trun track id unknown, no tfhd was found [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fb68e80b000] error reading header ./test0.m4s: Invalid data found when processing input
我假设这是因为尚未加载初始化段,但我找不到这样做的选项。
如果我尝试用
ffprobe -show_frames ./init.mp4
我没有得到任何帧信息和错误
Could not find codec parameters for stream 0 (Video: h264 (avc1 / 0x31637661), none, 2560x1440): unspecified pixel format Consider increasing the value for the 'analyzeduration' and 'probesize' options
将不胜感激任何帮助。