You can get mp4 duration using below script
ffprobe -i ${file_name} -show_entries format=duration -print_format json -loglevel quiet
Output is like this
{
"format": {
"duration": "15.061333"
}
}
Please ensure that you already installed ffmpeg
brew install ffmpeg
Oldest comments (0)