Transcoding tweaks

This commit is contained in:
Gabe Kangas 2020-06-11 17:34:20 -07:00
parent 3317a4a5c6
commit e8db314784

View File

@ -43,17 +43,18 @@ func startFfmpeg(configuration Config) {
"-hide_banner", "-hide_banner",
"-re", "-re",
"-i pipe:", "-i pipe:",
"-vf scale=900:-2", // "-vf scale=900:-2", // Re-enable in the future with a config to togging resizing?
"-sws_flags fast_bilinear", // "-sws_flags fast_bilinear",
strings.Join(videoMaps, " "), // All the different video variants strings.Join(videoMaps, " "), // All the different video variants
strings.Join(audioMaps, " ") + " -c:a copy", // Audio for all the variants strings.Join(audioMaps, " ") + " -c:a copy", // Audio for all the variants
// strings.Join(audioMaps, " ") + " -c:a aac -b:a 192k -ac 2", // Audio for all the variants // strings.Join(audioMaps, " ") + " -c:a aac -b:a 192k -ac 2", // Audio for all the variants
"-master_pl_name stream.m3u8", "-master_pl_name stream.m3u8",
"-g 48", "-g 60", "-keyint_min 60", // create key frame (I-frame) every 48 frames (~2 seconds) - will later affect correct slicing of segments and alignment of renditions
"-keyint_min 48", "-framerate 30",
"-r 15",
"-preset " + configuration.VideoSettings.EncoderPreset, "-preset " + configuration.VideoSettings.EncoderPreset,
"-sc_threshold 0", "-sc_threshold 0", // don't create key frames on scene change - only according to -g
"-profile:v high", "-profile:v main", // Main for standard definition (SD) to 640×480, High for high definition (HD) to 1920×1080
"-f hls", "-f hls",
"-hls_list_size 30", "-hls_list_size 30",
"-hls_time 10", "-hls_time 10",