You can use ffprobe to get the duration of a video file by running the command "ffprobe -i yourvideofile.mp4 -showentries formatduration -v quiet -of csv"p0"". This will provide you with the duration of the video file in seconds.
ffprobe is a command-line tool used to analyze multimedia files. You can use it to get information about a video or audio file, such as its format, duration, bitrate, and codec information. For example, you can run the command "ffprobe video.mp4" to get detailed information about a video file named video.mp4.