I have a video where seek yields highly inaccurate results. Maybe this can be explained by some "quality" of the video, but if so, it might be worth mentioning in seek's docstring what the accuracy of seek depends on.
MWE (note that the link here is valid only for the next 7 days, expiring approximately on 2025-01-09 23:00:00 CET):
using VideoIO
url = "https://vision-group-temporary.s3.eu-central-1.amazonaws.com/00002_K02.MTS"
file = download(url) # sorry, 740 MB, takes a moment
vid = openvideo(file)
t = 2 # arbitrary time stamp, feel free to choose another
seek(vid, t)
read(vid)
tt = gettime(vid) # 2.46 >> 2
close(vid)
# the following proves there are many frames closer to the desired target time point:
vid = openvideo(file)
ts = Float64[gettime(vid)]
while ts[end] < tt # collect up to the claimed time stamp
read(vid)
push!(ts, gettime(vid))
end
close(vid)
filter(≥(t), ts) # 24 frames between the desired and claimed time points
I'm on VideoIO v1.1.1 and Julia Version 1.11.2.
I have a video where
seekyields highly inaccurate results. Maybe this can be explained by some "quality" of the video, but if so, it might be worth mentioning inseek's docstring what the accuracy ofseekdepends on.MWE (note that the link here is valid only for the next 7 days, expiring approximately on 2025-01-09 23:00:00 CET):
I'm on
VideoIO v1.1.1and Julia Version 1.11.2.