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";
$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 "Не удалось получить количество кадров";
}