Created
May 29, 2023 16:09
-
-
Save yatharthb97/36401e047da01b6464c954d219d74f77 to your computer and use it in GitHub Desktop.
For counting the number of frames from a video file without reading the whole video in memory.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#On bash | |
ffprobe -v error -select_streams v:0 -count_packets \ | |
-show_entries stream=nb_read_packets -of csv=p=0 <filename> | |
# On Jupyter | |
! ffprobe -v error -select_streams v:0 -count_packets \ | |
-show_entries stream=nb_read_packets -of csv=p=0 {filename} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment