* [FFmpeg-devel] [PATCH] avcodec/mediacodecenc: Add a hint message to use nv12 pix_fmt
@ 2024-03-04 3:37 Zhao Zhili
2024-03-04 8:20 ` Matthieu Bouron
0 siblings, 1 reply; 2+ messages in thread
From: Zhao Zhili @ 2024-03-04 3:37 UTC (permalink / raw)
To: ffmpeg-devel; +Cc: Zhao Zhili
From: Zhao Zhili <zhilizhao@tencent.com>
---
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;
}
--
2.25.1
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [FFmpeg-devel] [PATCH] avcodec/mediacodecenc: Add a hint message to use nv12 pix_fmt
2024-03-04 3:37 [FFmpeg-devel] [PATCH] avcodec/mediacodecenc: Add a hint message to use nv12 pix_fmt Zhao Zhili
@ 2024-03-04 8:20 ` Matthieu Bouron
0 siblings, 0 replies; 2+ messages in thread
From: Matthieu Bouron @ 2024-03-04 8:20 UTC (permalink / raw)
To: FFmpeg development discussions and patches; +Cc: Zhao Zhili
On Mon, Mar 04, 2024 at 11:37:58AM +0800, Zhao Zhili wrote:
> From: Zhao Zhili <zhilizhao@tencent.com>
>
> ---
> 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;
> }
>
LGTM.
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-03-04 8:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-04 3:37 [FFmpeg-devel] [PATCH] avcodec/mediacodecenc: Add a hint message to use nv12 pix_fmt Zhao Zhili
2024-03-04 8:20 ` Matthieu Bouron
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git