summaryrefslogtreecommitdiff
path: root/ffmpeg.c
diff options
context:
space:
mode:
authorCarl Eugen Hoyos <cehoyos@ag.or.at>2013-08-18 22:00:35 +0200
committerCarl Eugen Hoyos <cehoyos@ag.or.at>2013-08-18 22:00:35 +0200
commit47f9a5b737c576069c26cc800ba9a2dd96441162 (patch)
tree798564c6f22f2ed892a1145ac793bf1a6e327997 /ffmpeg.c
parent63c0e9077e22e63ca8524ab2519cf3b75ae9e924 (diff)
Warn the user if a pix_fmt != yuv420p was chosen for MPEG-2 video encoding.
Fixes ticket #2870.
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index 3c7617a338..886b373e96 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -2355,6 +2355,13 @@ static int transcode_init(void)
"No pixel format specified, %s for H.264 encoding chosen.\n"
"Use -pix_fmt yuv420p for compatibility with outdated media players.\n",
av_get_pix_fmt_name(ost->filter->filter->inputs[0]->format));
+ if (!strncmp(ost->enc->name, "mpeg2video", 10) &&
+ codec->pix_fmt == AV_PIX_FMT_NONE &&
+ ost->filter->filter->inputs[0]->format != AV_PIX_FMT_YUV420P)
+ av_log(NULL, AV_LOG_WARNING,
+ "No pixel format specified, %s for MPEG-2 encoding chosen.\n"
+ "Use -pix_fmt yuv420p for compatibility with outdated media players.\n",
+ av_get_pix_fmt_name(ost->filter->filter->inputs[0]->format));
codec->pix_fmt = ost->filter->filter->inputs[0]->format;
if (!icodec ||