all repos — mgba @ 6a77d2aaeafd999f2b7258db70f377d44305ef08

mGBA Game Boy Advance Emulator

FFmpeg: Force MP4 files to YUV420P
Vicki Pfau vi@endrift.com
Tue, 04 Apr 2017 02:02:29 -0700
commit

6a77d2aaeafd999f2b7258db70f377d44305ef08

parent

d9b645b2098cc4ccb5662d0705d3f3a3d37b7486

2 files changed, 9 insertions(+), 0 deletions(-)

jump to
M CHANGESCHANGES

@@ -82,6 +82,7 @@ - Qt: Remove audio thread

- Qt: Remove audio buffer sizing in AudioProcessorQt - Qt: Re-enable QtMultimedia on Windows - FFmpeg: Return false if a file fails to open + - FFmpeg: Force MP4 files to YUV420P 0.5.2: (2016-12-31) Bugfixes:
M src/feature/ffmpeg/ffmpeg-encoder.csrc/feature/ffmpeg/ffmpeg-encoder.c

@@ -304,6 +304,14 @@ av_opt_set(encoder->video->priv_data, "preset", "faster", 0);

} av_opt_set(encoder->video->priv_data, "tune", "zerolatency", 0); } + + if (encoder->video->codec->id == AV_CODEC_ID_H264 && + (strcasecmp(encoder->containerFormat, "mp4") || + strcasecmp(encoder->containerFormat, "m4v") || + strcasecmp(encoder->containerFormat, "mov"))) { + // QuickTime and a few other things require YUV420 + encoder->video->pix_fmt = AV_PIX_FMT_YUV420P; + } avcodec_open2(encoder->video, vcodec, 0); #if LIBAVCODEC_VERSION_MAJOR >= 55 encoder->videoFrame = av_frame_alloc();