FFmpeg: Support lossless VP9 encoding

This commit is contained in:
Vicki Pfau 2018-09-18 14:24:22 -07:00
parent bf87a1db48
commit 3e75dae3dc
2 changed files with 5 additions and 0 deletions

View File

@ -89,6 +89,7 @@ Misc:
- Wii: Move audio handling to callbacks (fixes mgba.io/i/803)
- Qt: Clean up FPS target UI (fixes mgba.io/i/436)
- Core: Remove broken option for whether rewinding restores save games
- FFmpeg: Support lossless VP9 encoding
0.6.3: (2017-04-14)
Bugfixes:

View File

@ -334,6 +334,10 @@ bool FFmpegEncoderOpen(struct FFmpegEncoder* encoder, const char* outfile) {
encoder->video->pix_fmt = AV_PIX_FMT_YUV444P;
}
}
if (strcmp(vcodec->name, "libvpx-vp9") == 0 && encoder->videoBitrate == 0) {
av_opt_set(encoder->video->priv_data, "lossless", "1", 0);
encoder->video->pix_fmt = AV_PIX_FMT_YUV444P;
}
avcodec_open2(encoder->video, vcodec, 0);
#if LIBAVCODEC_VERSION_MAJOR >= 55