From 1977db0319266064b437167135f75b115a13404d Mon Sep 17 00:00:00 2001 From: ejurgensen Date: Sun, 17 Jan 2021 22:45:24 +0100 Subject: [PATCH] [xcode] Add profile for ALAC encoding --- src/transcode.c | 7 +++++++ src/transcode.h | 2 ++ 2 files changed, 9 insertions(+) diff --git a/src/transcode.c b/src/transcode.c index e48c72d7..03b2d3ca 100644 --- a/src/transcode.c +++ b/src/transcode.c @@ -235,6 +235,13 @@ init_settings(struct settings_ctx *settings, enum transcode_profile profile, str settings->sample_format = AV_SAMPLE_FMT_S16; // Only libopus support break; + case XCODE_ALAC: + settings->encode_audio = 1; + settings->format = "data"; // Means we get the raw packet from the encoder, no muxing + settings->audio_codec = AV_CODEC_ID_ALAC; + settings->sample_format = AV_SAMPLE_FMT_S16P; + break; + case XCODE_JPEG: settings->encode_video = 1; settings->silent = 1; diff --git a/src/transcode.h b/src/transcode.h index 8b2bc36f..6707189c 100644 --- a/src/transcode.h +++ b/src/transcode.h @@ -23,6 +23,8 @@ enum transcode_profile XCODE_MP3, // Transcodes the best audio stream into OPUS XCODE_OPUS, + // Transcodes the best audio stream into ALAC + XCODE_ALAC, // Transcodes the best video stream into JPEG/PNG/VP8 XCODE_JPEG, XCODE_PNG,