You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We currently encounter a problem at Javis.jl (JuliaAnimators/Javis.jl#340) regarding the duration of some videos.
I know that VideoIO.jl is already at v0.9.2 but it seems like quite a lot of stuff changed such that we didn't upgrade yet.
Furthermore we suspect that the issue might not strictly be at VideoIO.jl but some kind of dependency.
Maybe you have an idea though 😄
Now to the issue itself: This code creates 30 frames with Luxor.jl and renders them to an mp4 with a framerate of 1 frame per second. The video should therefore have a duration of 30 seconds. It is however only 28 seconds long.
using Colors
using Luxor
using VideoIO
functionget_frame(i)
Drawing(1000, 750, :image)
if i ==1background("black")
elseif i ==30background("red")
elsebackground("white")
end
img =image_as_matrix()
finish()
return img
endfunctionmain()
framerate =1
frame_images = [convert.(RGB, get_frame(i)) for i in1:30]
codec_props = [:priv_data=> ("crf"=>"22", "preset"=>"medium")]
video_io = Base.open("temp.stream", "w")
video_encoder =prepareencoder(
frame_images[1],
framerate = framerate,
AVCodecContextProperties = codec_props,
)
for i in1:30appendencode!(video_encoder, video_io, frame_images[i], i)
endfinishencode!(video_encoder, video_io)
close(video_io)
mux("temp.stream", "video.mp4", framerate; silent =true)
video_duration = VideoIO.get_duration("video.mp4")
@show video_duration
isapprox(video_duration, 30.0, atol =0.1)
end
I changed the background for the first and last frame which shows that those two frames are not being part of the video file.
Interestingly enough it works fine when one runs it in 1.5 of Julia. This however downgrades also the following packages:
We currently encounter a problem at Javis.jl (JuliaAnimators/Javis.jl#340) regarding the duration of some videos.
I know that VideoIO.jl is already at v0.9.2 but it seems like quite a lot of stuff changed such that we didn't upgrade yet.
Furthermore we suspect that the issue might not strictly be at VideoIO.jl but some kind of dependency.
Maybe you have an idea though 😄
Now to the issue itself: This code creates 30 frames with Luxor.jl and renders them to an mp4 with a framerate of 1 frame per second. The video should therefore have a duration of 30 seconds. It is however only 28 seconds long.
I changed the background for the first and last frame which shows that those two frames are not being part of the video file.
Interestingly enough it works fine when one runs it in 1.5 of Julia. This however downgrades also the following packages:
as my knowledge about VideoIO is relatively limited I can't easily see which of those packages might create the problem in this regard.
We (@TheCedarPrince) and I are looking forward to any pointers to find out what is going on here 😄
In this gist you can see the Project,toml which I used for both v1.5 and v1.6 of Julia and the Manifest_1.5/6 for those two to see the differences.
https://gist.github.com/Wikunia/dd471faea18a663ab11ee518d5bb6642
The text was updated successfully, but these errors were encountered: