FFmpeg By Example is a documentation website to showcase all the unique and different ways to use FFmpeg.
Got a cool idea to share with the community? Send your contribution here!

Get the duration of a audio or video file using ffmpeg / ffprobe

No Preview.

If you feel like this example could be improved, you may edit this example here.

ffprobe -show_streams -select_streams v -v quiet video.mp4 | grep "duration=" | cut -d '=' -f 2

All Examples