gpt4 book ai didi

encoding - FFmpeg WebM AV1 支持

转载 作者:行者123 更新时间:2023-12-03 16:40:36 28 4
gpt4 key购买 nike

使用 FFmpeg 如何使用 AV1 webm 中的编解码器容器?

我得到错误:

Only VP8 or VP9 video and Vorbis or Opus audio and WebVTT subtitles are supported for WebM.
Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
Error initializing output stream 0:0 --

但是维基百科说 WebM 支持 AV1。

https://en.wikipedia.org/wiki/AV1
AV1 is intended to be able to be used together with the audio format Opus in a future version of the WebM container format for HTML5 web video
或者 FFmpeg 可以根本不编码这个新版本吗?

我的设置:
ffmpeg -y 

-i "C:\Users\Matt\video.mp4"

-c:v libaom-av1 -strict experimental
-cpu-used 1 -crf 28
-pix_fmt yuv420p
-map 0:v:0? -map_chapters -1
-sn

-c:a libopus
-map 0:a:0?

-map_metadata 0

-f webm

-threads 0

"C:\Users\Matt\video.webm"

最佳答案

ffmpeg 目前不支持在 WebM 中复用 AV1。 The error you're getting comes from this code :

if (mkv->mode == MODE_WEBM && !(par->codec_id == AV_CODEC_ID_VP8 ||
par->codec_id == AV_CODEC_ID_VP9 ||
par->codec_id == AV_CODEC_ID_OPUS ||
par->codec_id == AV_CODEC_ID_VORBIS ||
par->codec_id == AV_CODEC_ID_WEBVTT)) {
av_log(s, AV_LOG_ERROR,
"Only VP8 or VP9 video and Vorbis or Opus audio and WebVTT subtitles are supported for WebM.\n");
return AVERROR(EINVAL);
}

注意缺少 AV_CODEC_ID_AV1 在表达式中。

不过,这并不奇怪。 Matroska 中的 AV1(以及 WebM)尚未最终确定。如果您想关注 Matroska(和 WebM)中 AV1 的进展, follow the discussion here on the IETF CELLAR mailing list .

关于encoding - FFmpeg WebM AV1 支持,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51316811/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com