forked from leftypol/leftypol
ffmpeg.php: Use first available video if more than on is present
This commit is contained in:
parent
8bb7daefae
commit
477485458e
1 changed files with 2 additions and 1 deletions
|
|
@ -62,7 +62,7 @@ function is_valid_webm($ffprobe_out) {
|
|||
$trackmap = locate_webm_tracks($ffprobe_out);
|
||||
|
||||
// one video track
|
||||
if (count($trackmap['videoat']) != 1) {
|
||||
if (count($trackmap['videoat']) < 1) {
|
||||
return [
|
||||
'error' => [
|
||||
'code' => 2,
|
||||
|
|
@ -70,6 +70,7 @@ function is_valid_webm($ffprobe_out) {
|
|||
]
|
||||
];
|
||||
}
|
||||
// If there's more than one video, yolo it
|
||||
$videoidx = $trackmap['videoat'][0];
|
||||
|
||||
$extension = pathinfo($ffprobe_out['format']['filename'], PATHINFO_EXTENSION);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue