[FFmpeg-cvslog] avcodec/mediacodecenc: Add a hint message to use nv12 pix_fmt
Zhao Zhili
git at videolan.org
Tue Mar 5 15:40:24 EET 2024
ffmpeg | branch: master | Zhao Zhili <zhilizhao at tencent.com> | Mon Mar 4 11:37:58 2024 +0800| [b0e17e0f959b09fb228665a7eb7323af9b6ffeac] | committer: Zhao Zhili
avcodec/mediacodecenc: Add a hint message to use nv12 pix_fmt
Signed-off-by: Zhao Zhili <zhilizhao at tencent.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b0e17e0f959b09fb228665a7eb7323af9b6ffeac
---
libavcodec/mediacodecenc.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libavcodec/mediacodecenc.c b/libavcodec/mediacodecenc.c
index 086b545590..984014f1b1 100644
--- a/libavcodec/mediacodecenc.c
+++ b/libavcodec/mediacodecenc.c
@@ -319,6 +319,9 @@ static av_cold int mediacodec_init(AVCodecContext *avctx)
ret = ff_AMediaCodec_configure(s->codec, format, s->window, NULL, ret);
if (ret) {
av_log(avctx, AV_LOG_ERROR, "MediaCodec configure failed, %s\n", av_err2str(ret));
+ if (avctx->pix_fmt == AV_PIX_FMT_YUV420P)
+ av_log(avctx, AV_LOG_ERROR, "Please try -pix_fmt nv12, some devices don't "
+ "support yuv420p as encoder input format.\n");
goto bailout;
}
More information about the ffmpeg-cvslog
mailing list