[英]How to get frame information from fragmented mp4
我正在使用以下命令生成 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
將不勝感激任何幫助。
我假設這是因為尚未加載初始化段
正確的。
一種方法來實現,你需要將什么cat
初始化段和媒體段有問題一起和管道他們ffprobe
:
$ cat ./init.mp4 ./test0.m4s | ffprobe -show_frames -
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.