日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

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

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

ubuntu下,我用.h264轉(zhuǎn)換.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 時發(fā)現(xiàn)無效數(shù)據(jù)

總結(jié)

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

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。