Would it be possible to calculate how many minutes of content are present in total from video/audio files inside a folder from their properties? Exactly like the number of files and their sizes are calculated in nautilus or perhaps via CLI. Any suggestions?
With
mediainfo
:mediainfo
return the video duration in milliseconds for each fileawk
bit computes the sum and formats it in HH:MM:SS format.For a quick graphical way, you can drag a number of folders into the VLC playlist. You will get the length of each movie in the playlist, and the total length of all files in the left top corner under "Playlist" in the sidebar.
If this needs to be automated for a number of folders, some scripting would be required, where metadata of each videofile would need to be read to obtain the duration. The utility ffprobe, part of the ffmpeg tools, includes "Duration" as part of its output, and obviously supports a wide range of formats.