It seems that v0.9 assumes that if there are no frames remaining, the AVInput stream is finished, which isn't the case for streams that are updating like camera streams.
using VideoIO
cam = VideoIO.opencamera()
while true
sleep(1/100)
if eof(cam)
println("eof")
continue
end
img = read(cam)
println("new frame")
end
In v0.8
new frame
eof
new frame
new frame
eof
eof
new frame
In v0.9
new frame
new frame
new frame
new frame
new frame
eof
eof
eof
eof
eof
eof
eof
eof
eof
(ad infinitum)
It seems that v0.9 assumes that if there are no frames remaining, the AVInput stream is finished, which isn't the case for streams that are updating like camera streams.
In v0.8
In v0.9
Commenting out this line fixes it https://github.com/JuliaIO/VideoIO.jl/blob/33200c28ad823759f7548ca34c5beaf3524b9761/src/avio.jl#L112
Also I noticed that the framerate returned by
framerate(f::VideoReader)
for a webcam has changed in v0.9.v0.8
v0.9
Perhaps
Inf
is actually more accurate, but thought I'd checkcc. @galenlynch