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

WSL 2 webcam/open_avinput error #298

Open anandijain opened 3 years ago

anandijain commented 3 years ago

I'm trying to use the webcam() function from VideoInTerminal.jl and running it gives:

julia> webcam()
ERROR: Could not open
Stacktrace:
  [1] error(s::String)
    @ Base ./error.jl:33
  [2] open_avinput
    @ ~/.julia/packages/VideoIO/hkeYD/src/avio.jl:194 [inlined]
  [3] VideoIO.AVInput(source::String, input_format::Ptr{VideoIO.AVFormat.AVInputFormat}, options::VideoIO.AVDict; avio_ctx_buffer_size::Int64)
    @ VideoIO ~/.julia/packages/VideoIO/hkeYD/src/avio.jl:219
  [4] AVInput
    @ ~/.julia/packages/VideoIO/hkeYD/src/avio.jl:207 [inlined]
  [5] #opencamera#10
    @ ~/.julia/packages/VideoIO/hkeYD/src/avio.jl:807 [inlined]
  [6] opencamera(::String, ::Ptr{VideoIO.AVFormat.AVInputFormat}, ::VideoIO.AVDict)
    @ VideoIO ~/.julia/packages/VideoIO/hkeYD/src/avio.jl:807
  [7] webcam(io::Base.TTY; kwargs::Base.Iterators.Pairs{Symbol, Bool, Tuple{Symbol}, NamedTuple{(:stream,), Tuple{Bool}}})
    @ VideoInTerminal ~/.julia/packages/VideoInTerminal/Xpz1w/src/VideoInTerminal.jl:66
  [8] webcam(; kwargs::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ VideoInTerminal ~/.julia/packages/VideoInTerminal/Xpz1w/src/VideoInTerminal.jl:69
  [9] webcam()
    @ VideoInTerminal ~/.julia/packages/VideoInTerminal/Xpz1w/src/VideoInTerminal.jl:69
 [10] top-level scope
    @ REPL[7]:1

julia> versioninfo()
Julia Version 1.6.0-rc1
Commit a58bdd9010 (2021-02-06 15:49 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-11.0.1 (ORCJIT, skylake)
Environment:
  JULIA_NUM_THREADS = 8

I was recommended to open an issue here.

edit: forgot to mention that I am using WSL 2