![]() To convert the above value into minutes and seconds, round it to an integer and divide it by 60.Īnother way of formatting the output duration is to add the -sexagesimal flag to the ffprobe command. If you just want to get the numerical duration of the video in seconds with no wrappers, set the output format to noprint_wrappers=1:nokey=1 using the -of flag like this:įfprobe -i sample_5.mp4 -v quiet -show_entries format=duration -hide_banner -of default=noprint_wrappers=1:nokey=1 924.688000 This tells ffprobe to only return the duration.įfprobe -i sample_5.mp4 -v quiet -show_entries format=duration -hide_banner To get the duration with ffprobe, add the -show_entries flag and set its value to format=duration. In this tutorial, we will learn how to get the duration of a video with FFmpeg using the ffprobe utility.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |