try again
This commit is contained in:
parent
881b07fb15
commit
3d55b8afa6
|
@ -520,9 +520,9 @@ function giveconverted(file, bitrate, format)
|
|||
mime = suffix in keys(Mux.mimetypes) ? Mux.mimetypes[suffix] :
|
||||
"application/octet-stream"
|
||||
headers["Content-Type"] = mime
|
||||
data = take!(iodata)
|
||||
headers["Content-Length"] = string(length(data))
|
||||
return Dict(:body => data,
|
||||
# data = take!(iodata)
|
||||
# headers["Content-Length"] = string(length(data))
|
||||
return Dict(:body => iodata,
|
||||
:headers => headers,
|
||||
:file => join([split(basename(file), '.')[1:end-1],
|
||||
".oga"],""))
|
||||
|
@ -532,7 +532,7 @@ function convert(infile; bitrate = 64, format = "oga")
|
|||
global ffmpeg_threads
|
||||
io = IOBuffer()
|
||||
p = run(pipeline(`ffmpeg -i $infile -y -c:a libvorbis -b:a $(bitrate)k -threads $(ffmpeg_threads) -f $format pipe:1`,
|
||||
stderr=devnull, stdout=io), wait = true)
|
||||
stderr=devnull, stdout=io), wait = false)
|
||||
io
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue