[xcode] Add VP8 encoding profile

This commit is contained in:
ejurgensen 2020-11-05 23:04:56 +01:00
parent a11ab808b2
commit 7e106aec09
2 changed files with 15 additions and 1 deletions

View File

@ -260,6 +260,19 @@ init_settings(struct settings_ctx *settings, enum transcode_profile profile, str
settings->video_codec = AV_CODEC_ID_PNG;
break;
case XCODE_VP8:
settings->encode_video = 1;
settings->silent = 1;
// See explanation above
#if (LIBAVFORMAT_VERSION_MAJOR > 58) || ((LIBAVFORMAT_VERSION_MAJOR == 58) && (LIBAVFORMAT_VERSION_MINOR > 29))
settings->format = "image2pipe";
#else
settings->format = "image2";
#endif
settings->pix_fmt = AV_PIX_FMT_YUVJ420P;
settings->video_codec = AV_CODEC_ID_VP8;
break;
default:
DPRINTF(E_LOG, L_XCODE, "Bug! Unknown transcoding profile\n");
return -1;

View File

@ -23,9 +23,10 @@ enum transcode_profile
XCODE_MP3,
// Transcodes the best audio stream into OPUS
XCODE_OPUS,
// Transcodes the best video stream into JPEG/PNG
// Transcodes the best video stream into JPEG/PNG/VP8
XCODE_JPEG,
XCODE_PNG,
XCODE_VP8,
};
struct decode_ctx;