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

Add utility function `get_number_frames` #260

Closed galenlynch closed 4 years ago

galenlynch commented 4 years ago

There is currently no way to query a video container to determine the number of video frames that it contains, besides decoding the video and counting the frames. While this is the best you can do for some container formats, other container formats can report the number of frames without decoding each video frame. I have added a new function, get_number_frames, which will query the container and return the number of frames, if applicable, or return nothing otherwise. This function will not decode the video stream in order to determine the number of frames.

I have additionally added simple tests of this function, a documentation string, and added it to the docs.

codecov[bot] commented 4 years ago

Codecov Report

Merging #260 into master will increase coverage by 0.30%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #260      +/-   ##
==========================================
+ Coverage   76.83%   77.13%   +0.30%     
==========================================
  Files          14       14              
  Lines         600      608       +8     
==========================================
+ Hits          461      469       +8     
  Misses        139      139              
Impacted Files Coverage Δ
src/info.jl 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update e69f3ff...9cbeff5. Read the comment docs.

IanButterworth commented 4 years ago

Nice 👍