問題タブ [fmp4]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票する
1 に答える
775 参照

ffmpeg - 断片化された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 は無視されているようです。

を使用してセグメントの1つをプローブしようとしました

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

助けていただければ幸いです。