Added map for audio stream, too

It seems that if -map is used for video (-map 0✌️0) then a map is also needed for audio, otherwise no audio is produced.
This commit is contained in:
ghostwheel 2023-03-12 22:49:04 -06:00 committed by Michael Mayer
parent a1fb66e28b
commit 7e843808ca

View file

@ -51,6 +51,7 @@ func AvcConvertCommand(fileName, avcName, ffmpegBin, bitrate string, encoder Avc
"-vf", format,
"-c:v", string(encoder),
"-map", "0:v:0",
"-map", "0:a",
"-vsync", "vfr",
"-r", "30",
"-b:v", bitrate,
@ -68,6 +69,7 @@ func AvcConvertCommand(fileName, avcName, ffmpegBin, bitrate string, encoder Avc
"-i", fileName,
"-c:v", string(encoder),
"-map", "0:v:0",
"-map", "0:a",
"-c:a", "aac",
"-vf", format,
"-profile", "high",
@ -90,6 +92,7 @@ func AvcConvertCommand(fileName, avcName, ffmpegBin, bitrate string, encoder Avc
"-vf", format,
"-c:v", string(encoder),
"-map", "0:v:0",
"-map", "0:a",
"-vsync", "vfr",
"-r", "30",
"-b:v", bitrate,
@ -107,6 +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",
"-c:a", "aac",
"-preset", "15",
"-pixel_format", "yuv420p",
@ -133,6 +137,7 @@ func AvcConvertCommand(fileName, avcName, ffmpegBin, bitrate string, encoder Avc
"-i", fileName,
"-c:v", string(encoder),
"-map", "0:v:0",
"-map", "0:a",
"-c:a", "aac",
"-vf", format,
"-num_output_buffers", "72",
@ -154,6 +159,7 @@ func AvcConvertCommand(fileName, avcName, ffmpegBin, bitrate string, encoder Avc
"-i", fileName,
"-c:v", string(encoder),
"-map", "0:v:0",
"-map", "0:a",
"-c:a", "aac",
"-vf", format,
"-max_muxing_queue_size", "1024",