JuliaIO / VideoIO.jl

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

have_avdevice not defined #227

Closed yakir12 closed 4 years ago

yakir12 commented 4 years ago

Me too (saw this one #226).

But this happens when I try using a package that is using VidioIO. Here's that package's repo: https://github.com/yakir12/Format2DB.jl You'll see in its Manifest that VideoIO is at 0.6.11, so I'm not sure what the remedy would be.

I even tried adding FFMPEG.jl to see if that would help, it didn't. FFMPEG is stuck at 0.2.4 (see here), so maybe that's the problem? But Pkg says it's VideoIO that set it to that version:

(Format2DB) pkg> add FFMPEG@0.3.0
  Updating registry at `~/.julia/registries/General`
  Updating git-repo `https://github.com/JuliaRegistries/General.git`
 Resolving package versions...
ERROR: Unsatisfiable requirements detected for package FFMPEG [c87230d0]:
 FFMPEG [c87230d0] log:
 ├─possible versions are: [0.1.0, 0.2.0-0.2.4, 0.3.0] or uninstalled
 ├─restricted to versions 0.3.0 by an explicit requirement, leaving only versions 0.3.0
 └─restricted by compatibility requirements with VideoIO [d6d074c3] to versions: 0.2.0-0.2.4 — no versions left
   └─VideoIO [d6d074c3] log:
     ├─possible versions are: [0.4.0, 0.5.0-0.5.6, 0.6.0-0.6.11] or uninstalled
     └─restricted to versions 0.6.11 by an explicit requirement, leaving only versions 0.6.11
yakir12 commented 4 years ago

OK, I've narrowed it down, but not sure hoe to fix it: In Format2DB's manifest the VideoIO version is 0.6.11 --> good. But if I ]add https://github.com/yakir12/Format2DB.jl to some clean stack, and check in that generated Manifest.toml file, VideoIO's version is 0.6.10 --> bad.

No idea why...

I can however, manually added it...

(tmpi) pkg> st
    Status `~/tmp/tmpi/Project.toml`
  [ee64474f] Format2DB v0.1.0 #master (https://github.com/yakir12/Format2DB.jl)

(tmpi) pkg> add VideoIO@0.6.11
  Updating registry at `~/.julia/registries/General`
  Updating git-repo `https://github.com/JuliaRegistries/General.git`
 Resolving package versions...
  Updating `~/tmp/tmpi/Project.toml`
  [d6d074c3] + VideoIO v0.6.11
  Updating `~/tmp/tmpi/Manifest.toml`
  [6e34b625] - Bzip2_jll v1.0.6+1
  [c87230d0] ↓ FFMPEG v0.3.0 ⇒ v0.2.4
  [b22a6f82] - FFMPEG_jll v4.1.0+2
  [d7e528f0] - FreeType2_jll v2.10.1+1
  [559328eb] - FriBidi_jll v1.0.5+2
  [c1c5ebd0] - LAME_jll v3.100.0+0
  [dd192d2f] - LibVPX_jll v1.8.1+1
  [e7412a2a] - Ogg_jll v1.3.3+0
  [458c3c95] - OpenSSL_jll v1.1.1+1
  [91d4177d] - Opus_jll v1.3.1+0
  [d6d074c3] ↑ VideoIO v0.6.10 ⇒ v0.6.11
  [83775a58] - Zlib_jll v1.2.11+8
  [0ac62f75] - libass_jll v0.14.0+0
  [f638f0a6] - libfdk_aac_jll v0.1.6+1
  [f27f6e37] - libvorbis_jll v1.3.6+2
  [1270edf5] - x264_jll v2019.5.25+1
  [dfaa095f] - x265_jll v3.0.0+0

Which also elicits the correct down-versioning of FFMPEG.

yakir12 commented 4 years ago

Adding VideoIO@0.6.11 helped my actual case as well, so I can continue working, but not sure what all of this meant/means. Hope this is helpful somehow...

SimonDanisch commented 4 years ago

https://github.com/JuliaIO/FFMPEG.jl/issues/24

IanButterworth commented 4 years ago

We might want to correct the FFMPEG compat bound in the general registry retroactively for previous VideoIO versions to prevent this situation. It happened to me too. Even though I updated my main version to 0.6.11, other packages tried to use 0.6.10

yakir12 commented 4 years ago

Wah.. I now realize that every time I update I break my package. I'll need to set the same limits as you've mentioned.

IanButterworth commented 4 years ago

Yeah, the mistake I made was setting FFMPEG = "≥ 0.2.0" rather than FFMPEG = "0.2".

I don't think there's an easier fix than just limiting projects to >= VideoIO 0.6.11, as even if we updated the general registry, the Project.toml files associated with each erroneous VideoIO release 0.6.8-0.6.10 would allow FFMPEG = "≥ 0.2.0" and break.

If we have any more reports of this I'll think more, but for now I'd say just do this for any project with VideoIO:

VideoIO = "0.6.11"

MaHaWo commented 4 years ago

I also get this error, but doing


Julia 
] 
add VideoIO@0.6.11

did not help for me, I still get

┌ Info: Precompiling VideoIO [d6d074c3-1acf-5d4c-9a43-ef38773959a2]
└ @ Base loading.jl:1260
ERROR: LoadError: UndefVarError: have_avdevice not defined
Stacktrace:
 [1] getproperty(::Module, ::Symbol) at ./Base.jl:26
...
...

when trying using VideoIO.

any hints welcome, since package looks really useful! thx in advance.

SimonDanisch commented 4 years ago

did you try running ]free VideoIO; up ? I think all packages involved should be tagged by now..

MaHaWo commented 4 years ago

strange, this results in:

pkg> free VideoIO
ERROR: expected package `VideoIO [d6d074c3]` to be pinned, tracking a path, or tracking a repository

I'm quite a noob to Julia's package system, so not so sure what to do with that.

SimonDanisch commented 4 years ago

maybe up is enough then...

galenlynch commented 4 years ago

as even if we updated the general registry, the Project.toml files associated with each erroneous VideoIO release 0.6.8-0.6.10 would allow FFMPEG = "≥ 0.2.0" and break

Is that true? I thought the registry's Compat.toml overrides the package's Project.toml in terms of resolving which packages are compatible with eachother.

Just noticed that the Compat.toml for VideoIO.jl has two more errors that are lurking:

["0.6.1-0.6.7"]
BinaryProvider = "0.3.0-*"
FixedPointNumbers = "0.3.0-*"

If for whatever reason people need a VideoIO version in that range, then those unconstrained upper bounds will someday be the cause of an error.

galenlynch commented 4 years ago

And I think these too:

["0.5.5-0.6.0"]
FixedPointNumbers = "0.3-0"

["0.6.0"]
BinaryProvider = "0.3-0"
caleb-allen commented 4 years ago

while up VideoIO alone upgraded to v0.6.10 and was still broken, using add VideoIO@0.6.11 did the trick for me

IanButterworth commented 4 years ago

Should be fixed with v0.7.0 being released