Open yakir12 opened 2 years ago
Fixed by #345
I just tested it on a Raspberry Pi and:
julia> cam = VideoIO.opencamera()
ERROR: Could not open /dev/video0. avformat_open_input error code -22
Stacktrace:
[1] error(s::String)
@ Base ./error.jl:33
[2] open_avinput
@ ~/.julia/packages/VideoIO/3LUls/src/avio.jl:196 [inlined]
[3] VideoIO.AVInput(source::String, input_format::Ptr{VideoIO.libffmpeg.AVInputFormat}, options::VideoIO.AVDict; avio_ctx_buffer_size::Int32)
@ VideoIO ~/.julia/packages/VideoIO/3LUls/src/avio.jl:218
[4] AVInput
@ ~/.julia/packages/VideoIO/3LUls/src/avio.jl:207 [inlined]
[5] #opencamera#26
@ ~/.julia/packages/VideoIO/3LUls/src/avio.jl:1024 [inlined]
[6] opencamera(::String, ::Ptr{VideoIO.libffmpeg.AVInputFormat}, ::VideoIO.AVDict) (repeats 2 times)
@ VideoIO ~/.julia/packages/VideoIO/3LUls/src/avio.jl:1024
[7] top-level scope
@ REPL[4]:1
(jl_1G6zU9) pkg> st
Status `/tmp/jl_1G6zU9/Project.toml`
[d6d074c3] VideoIO v1.0.0
julia> versioninfo()
Julia Version 1.7.2
Commit bf53498635 (2022-02-06 15:21 UTC)
Platform Info:
OS: Linux (arm-linux-gnueabihf)
CPU: ARMv7 Processor rev 3 (v7l)
WORD_SIZE: 32
LIBM: libopenlibm
LLVM: libLLVM-12.0.1 (ORCJIT, cortex-a72)
Let me know if there is anything I can test or should do.
I'm getting the same "error code -22", in Raspberry Pi OS Lite Bullseye (with latest updates), on a Raspberry Pi Zero 2 W.
ERROR: LoadError: Could not open /dev/video0. avformat_open_input error code -22
Julia 1.8.5.
Program works fine on my Mac laptop.
I'm desperate to replace Python / OpenCV in my application.
For what is worth, 22 is EINVAL
: https://ffmpeg.org/doxygen/2.8/libavformat_2utils_8c_source.html#l00405
Thanks! I'll poke around a bit with opencamera
. Maybe it's obvious....
I'm trying to fetch frames from a Raspberry Pi camera (headless Raspbian on 32-bit ARMv7). I also tired @hhaensel's solution mentioned here: https://github.com/JuliaIO/VideoIO.jl/issues/341#issuecomment-1012974406
I should mention that both
raspistill
andraspivid
work as expected, and: