日韩av黄I国产麻豆传媒I国产91av视频在线观看I日韩一区二区三区在线看I美女国产在线I麻豆视频国产在线观看I成人黄色短片

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 >

ffmpeg:Codec for stream 0 does not use global headers but container format requires global headers

發布時間:2025/3/20 59 豆豆
生活随笔 收集整理的這篇文章主要介紹了 ffmpeg:Codec for stream 0 does not use global headers but container format requires global headers 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

ubuntu下,我用.h264轉換.mp4格式提示一下信息:
ffmpeg -i 1e1fee9790f26fa3_202214225310.h264 -vcodec copy -f mp4 test.mp4

[root@ubuntu /arnold_test/20220104_ffmpeg_test]6# ffmpeg -i 1e1fee9790f26fa3_202214225310.h264 -vcodec copy -f mp4 test.mp4 ffmpeg version 2.8.17-0ubuntu0.1 Copyright (c) 2000-2020 the FFmpeg developersbuilt with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.12) 20160609 ... Input #0, h264, from '1e1fee9790f26fa3_202214225310.h264':Duration: N/A, bitrate: N/AStream #0:0: Video: h264 (Main), yuv420p, 1920x1080, 25 fps, 25 tbr, 1200k tbn, 50 tbc [mp4 @ 0x1acb080] Codec for stream 0 does not use global headers but container format requires global headers Output #0, mp4, to 'test.mp4':Metadata:encoder : Lavf56.40.101Stream #0:0: Video: h264 ([33][0][0][0] / 0x0021), yuv420p, 1920x1080, q=2-31, 25 fps, 25 tbr, 1200k tbn, 1200k tbc Stream mapping:Stream #0:0 -> #0:0 (copy) Press [q] to stop, [?] for help frame= 150 fps=0.0 q=-1.0 Lsize= 1451kB time=00:00:05.96 bitrate=1994.0kbits/s video:1449kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.097164% [root@ubuntu /arnold_test/20220104_ffmpeg_test]7#


這個也不算個錯誤,就是個警告,如果想消除可以這樣
ffmpeg -i 1e1fee9790f26fa3_202214225310.h264 -vcodec copy -flags +global_header -f mp4 test.mp4

加上-flags +global_header,就不會報提示了

參考文章1:加密的m3u8、ts文件合并

參考文章2:ffmpeg 處理輸入 h264 到 h265 時發現無效數據

總結

以上是生活随笔為你收集整理的ffmpeg:Codec for stream 0 does not use global headers but container format requires global headers的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。