multiple ffmpeg threads
This commit is contained in:
parent
c07dd34878
commit
c05c0b85a6
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue