-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add optional nvidia hardware-accelerated h264_nvenc encoding #251
Conversation
Codecov Report
@@ Coverage Diff @@
## master #251 +/- ##
=======================================
Coverage 77.09% 77.09%
=======================================
Files 14 14
Lines 598 598
=======================================
Hits 461 461
Misses 137 137
Continue to review full report at Codecov.
|
WIP: using FFMPEG
#FFMPEG.exe(`-h encoder=libx264`)
FFMPEG.exe(`-h encoder=h264_nvenc`)
using VideoIO, ImageCore
n = 300
imgstack = map(x->rand(RGB{N0f8}, 2048, 1536), 1:n)
props = [:priv_data => ("crf"=>"22","preset"=>"medium")]
for codec in ["libx264", "h264_nvenc"]
encoder = prepareencoder(imgstack[1], framerate=60, AVCodecContextProperties=props, codec_name=codec)
io = Base.open("temp.stream","w")
t = @elapsed for i in 1:n
appendencode!(encoder, io, imgstack[i], i)
end
@info "$codec fps: $(n/t)"
finishencode!(encoder, io)
close(io)
end Currently errors on the |
677d7d0
to
74f065e
Compare
Merging to allow the new FFMPEG_jll version (which loads slightly faster). |
Hoping to add hardware accelerated encoding, as per https://trac.ffmpeg.org/wiki/HWAccelIntro
Dependent on an updated FFMPEG_jll via JuliaPackaging/Yggdrasil#1384 and JuliaIO/FFMPEG.jl#32