From 9762150da60da9ab2629eab6bec4963a1fcb1d8c Mon Sep 17 00:00:00 2001 From: ghostwheel Date: Tue, 14 Mar 2023 08:24:14 -0600 Subject: [PATCH] Changed audio conversion to only use one stream 0:a means take all audio streams of first file. 0:a:0 means first stream of first file. 0:a:0? means first audio stream of first file if available. --- internal/ffmpeg/convert.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/ffmpeg/convert.go b/internal/ffmpeg/convert.go index be29d8b32..acb85ad3d 100644 --- a/internal/ffmpeg/convert.go +++ b/internal/ffmpeg/convert.go @@ -51,7 +51,7 @@ func AvcConvertCommand(fileName, avcName, ffmpegBin, bitrate string, encoder Avc "-vf", format, "-c:v", string(encoder), "-map", "0:v:0", - "-map", "0:a", + "-map", "0:a:0?", "-vsync", "vfr", "-r", "30", "-b:v", bitrate, @@ -69,7 +69,7 @@ func AvcConvertCommand(fileName, avcName, ffmpegBin, bitrate string, encoder Avc "-i", fileName, "-c:v", string(encoder), "-map", "0:v:0", - "-map", "0:a", + "-map", "0:a:0?", "-c:a", "aac", "-vf", format, "-profile", "high", @@ -92,7 +92,7 @@ func AvcConvertCommand(fileName, avcName, ffmpegBin, bitrate string, encoder Avc "-vf", format, "-c:v", string(encoder), "-map", "0:v:0", - "-map", "0:a", + "-map", "0:a:0?", "-vsync", "vfr", "-r", "30", "-b:v", bitrate, @@ -110,7 +110,7 @@ func AvcConvertCommand(fileName, avcName, ffmpegBin, bitrate string, encoder Avc "-pix_fmt", "yuv420p", "-c:v", string(encoder), "-map", "0:v:0", - "-map", "0:a", + "-map", "0:a:0?", "-c:a", "aac", "-preset", "15", "-pixel_format", "yuv420p", @@ -137,7 +137,7 @@ func AvcConvertCommand(fileName, avcName, ffmpegBin, bitrate string, encoder Avc "-i", fileName, "-c:v", string(encoder), "-map", "0:v:0", - "-map", "0:a", + "-map", "0:a:0?", "-c:a", "aac", "-vf", format, "-num_output_buffers", "72", @@ -159,7 +159,7 @@ func AvcConvertCommand(fileName, avcName, ffmpegBin, bitrate string, encoder Avc "-i", fileName, "-c:v", string(encoder), "-map", "0:v:0", - "-map", "0:a", + "-map", "0:a:0?", "-c:a", "aac", "-vf", format, "-max_muxing_queue_size", "1024",