Hi! Could we please enable some services and cookies to improve your experience and our website?
Online Sandbox for SQL and PHP: Write, Run, Test, and Share SQL Queries and PHP Code
<?php
$videoInfo = " Stream #0:0[0x12d]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv, progressive), 1280x720 [SAR 1:1 DAR 16:9], 60 fps, 60 tbr, 90k tbn";
$pattern = '/Stream\s#\d+:\d+\[\w+\]\:\s\w+\:\s\w+\:\s(\d+)/';
preg_match($pattern, $videoInfo, $matches);
if (!empty($matches[1])) {
$frameCount = $matches[1];
echo "Количество кадров: " . $frameCount;
} else {
echo "Не удалось получить количество кадров";
}