[FFmpeg-devel] [PATCH] ffmpeg: Don't offer H.264 compatibility warning for NV12 input
wm4
nfxjfg at googlemail.com
Thu Jun 15 02:29:52 EEST 2017
On Wed, 14 Jun 2017 23:03:39 +0100
Mark Thompson <sw at jkqxz.net> wrote:
> It's also 8-bit YUV 4:2:0.
> ---
> Most visible with streams downloaded from hardware to encode properly with libx264, which will typically be NV12.
>
>
> ffmpeg.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/ffmpeg.c b/ffmpeg.c
> index 6170bd453c..e6e8b9e119 100644
> --- a/ffmpeg.c
> +++ b/ffmpeg.c
> @@ -3345,7 +3345,8 @@ static int init_output_stream_encode(OutputStream *ost)
> av_buffersink_get_sample_aspect_ratio(ost->filter->filter);
> if (!strncmp(ost->enc->name, "libx264", 7) &&
> enc_ctx->pix_fmt == AV_PIX_FMT_NONE &&
> - av_buffersink_get_format(ost->filter->filter) != AV_PIX_FMT_YUV420P)
> + av_buffersink_get_format(ost->filter->filter) != AV_PIX_FMT_YUV420P &&
> + av_buffersink_get_format(ost->filter->filter) != AV_PIX_FMT_NV12)
> av_log(NULL, AV_LOG_WARNING,
> "No pixel format specified, %s for H.264 encoding chosen.\n"
> "Use -pix_fmt yuv420p for compatibility with outdated media players.\n",
This warning shouldn't exist in the first place. It's dumb and
incorrect.
More information about the ffmpeg-devel
mailing list