remove ffmpeg

This commit is contained in:
2023-02-05 13:01:01 +10:00
parent 5f22142a6d
commit c671fb9bf6

View File

@@ -46,20 +46,6 @@ class OCRController extends ApiController
file_put_contents($tmpfname, $curlResult);
$ffmpeg = FFMpeg\FFMpeg::create();
$inputFile = $ffmpeg->open($tmpfname);
if ($inputFile !== null) {
$videoFrames = $inputFile->frames();
foreach ($videoFrames as $frame) {
unlink($tmpfname);
$tmpfname = tempnam(sys_get_temp_dir(), 'download');
// Save the frame as a PNG
$frame->save(new FFMpeg\Format\Video\PNG(), $tmpfname);
break;
}
}
// Raw OCR
$ocr = new TesseractOCR();
$ocr->image($tmpfname);