Closed yajrendrag closed 11 months ago
This PR fixes the issue for me. Some video files were causing an exception to raise because ffprobe
could not find the duration. Below I will provide the ffprobe
command before and after this change and how it surfaces the duration on some video files.
ffprobe -v error -show_entries stream=duration,width,height -print_format json test_video.mkv
{
"programs": [
],
"streams": [
{
"width": 720,
"height": 480,
"side_data_list": [
{
}
]
},
{
}
]
}
ffprobe -v error -show_entries stream=duration,width,height:format=duration -print_format json test_video.mkv
{
"programs": [
],
"streams": [
{
"width": 720,
"height": 480,
"side_data_list": [
{
}
]
},
{
}
],
"format": {
"duration": "633.472000"
}
}
Added fix to allow video duration to be obtained from ffprobe format section if streams section is void of duration value.