diff --git a/JlSonic/api.jl b/JlSonic/api.jl index 8afd883..1e4dac7 100644 --- a/JlSonic/api.jl +++ b/JlSonic/api.jl @@ -5,7 +5,7 @@ "Subsonic API compatible version" const apiversion = "1.16.1" const domain = "nixo.xyz" - +const ffmpeg_threads = 6 """ Helper function that prepares a subsonic response. """ @@ -524,7 +524,8 @@ function giveconverted(file, bitrate, format) end function convert(infile; bitrate = 64, format = "oga") - pipeline(`ffmpeg -i $infile -y -c:a libvorbis -b:a $(bitrate)k -f $format pipe:1`, + global ffmpeg_threads + pipeline(`ffmpeg -i $infile -y -c:a libvorbis -b:a $(bitrate)k -threads $(ffmpeg_threads) -f $format pipe:1`, stderr=devnull) |> read end