JuliaIO / VideoIO.jl

Reading and writing of video files in Julia via ffmpeg
https://juliaio.github.io/VideoIO.jl/stable
Other
128 stars 53 forks source link

Tests fail on Julia v1.4 #329

Closed Wikunia closed 2 years ago

Wikunia commented 3 years ago

Based on the Project.toml VideoIO should work on Julia v1.3 and above. Unfortunately it is only tested on v1.6 (latest) and nightly. I encountered this issue due to https://github.com/Wikunia/Javis.jl/pull/368 which I created based on the issue I created here yesterday #328

One of the issues is this when running ] test VideoIO on Julia v1.4 (potentially also on v1.3)

MethodError: no method matching #VideoWriter#29(::Nothing, ::Int64, ::Bool, ::Nothing, ::Nothing, ::NamedTuple{(:color_range, :crf, :preset),Tuple{Int64,Int64,String}}, ::Nothing, ::Nothing, ::Nothing, ::Int64, ::Nothing, ::Bool, ::Nothing, ::Type{VideoIO.VideoWriter}, ::String, ::Type{RGB{Normed{UInt8,8}}}, ::Tuple{Int64,Int64})
  Closest candidates are:
    #VideoWriter#29(::Union{Nothing, AbstractString}, ::Real, ::Bool, !Matched::Union{AbstractDict{Union{},Union{}}, AbstractDict{Symbol,#s200} where #s200, NamedTuple}, !Matched::Union{AbstractDict{Union{},Union{}}, AbstractDict{Symbol,#s200} where #s200, NamedTuple}, ::Union{AbstractDict{Union{},Union{}}, AbstractDict{Symbol,#s200} where #s200, NamedTuple}, !Matched::Union{AbstractDict{Union{},Union{}}, AbstractDict{Symbol,#s200} where #s200, NamedTuple}, !Matched::Union{AbstractDict{Union{},Union{}}, AbstractDict{Symbol,#s200} where #s200, NamedTuple}, ::Union{Nothing, Int32}, ::Any, ::Any, ::Any, !Matched::Union{AbstractDict{Union{},Union{}}, AbstractDict{Symbol,#s200} where #s200, NamedTuple}, ::Type{VideoIO.VideoWriter}, ::AbstractString, ::Type{T}, ::Tuple{Integer,Integer}) where T at /home/ole/.julia/dev/VideoIO/src/encoding.jl:244

which happens when one calls open_video_out or VideoWriter directly with filename, image_matrix and options. I not really understanding the error to be honest. Thought the first argument should be the filename with AbstractString but somehow it's nothing and also allowed to be nothing and I expected overall different argument types like the Tuple for the image size.

In general I'm not sure how many people are still using v1.3 or v1.4 but it might be something worth having a look into.

TheCedarPrince commented 3 years ago

Out of curiosity, if you are not thinking about supporting 1.3 or 1.4, could we open a PR to fix the Project.toml in VideoIO for 1.6?

IanButterworth commented 3 years ago

Sorry for the delay.

I guess not testing on 1.3/1.4 was an oversight during the work into 0.9

I'm torn about putting time into supporting 1.3/1.4 as 1.5/1.6+ really are so much better for users..

But I'll try to figure this out soon and make a call on it

Wikunia commented 3 years ago

Any news on this? Otherwise we might also want to make the switch to 1.5 and 1.6 @TheCedarPrince

galenlynch commented 3 years ago

I can try to take a look at it soon, sorry for the delay.

IanButterworth commented 2 years ago

Now that 1.6 is a solid LTS I've marked julia compat at 1.6