quasarstream / PHP-FFmpeg-video-streaming

📼 Package media content for online streaming(DASH and HLS) using FFmpeg
https://www.quasarstream.com/op/php/ffmpeg-streaming?u=php-ff
MIT License
514 stars 117 forks source link

Warning: A non-numeric value encountered #66

Closed fintaz closed 4 years ago

fintaz commented 4 years ago

This is my code

<?php

use Monolog\Handler\StreamHandler;
use Monolog\Logger;

use Streaming\FFMpeg;

require 'includes/VideoLib/vendor/autoload.php';

$config = [
    'ffmpeg.binaries'  => 'C:\ffmpeg\bin\ffmpeg.exe',
    'ffprobe.binaries' => 'C:\ffmpeg\bin\ffprobe.exe',
    'timeout'          => 3600, // The timeout for the underlying process
    'ffmpeg.threads'   => 12,   // The number of threads that FFmpeg should use
];

$log = new Logger('FFmpeg_Streaming');
$log->pushHandler(new StreamHandler('video-log/ffmpeg-streaming.log')); // path to log file

$ffmpeg = FFMpeg::create($config, $log);
$video = $ffmpeg->open(ROOT_PATH . 'data\video\5986e0c173718d572df1dc57833cb8c8.mp4');

die;

I get errors like this.

image

This error appears when I add the following line of code:

$video = $ffmpeg->open(ROOT_PATH . 'data\video\5986e0c173718d572df1dc57833cb8c8.mp4');

Was I doing something wrong? How to fix this?

aminyazdanpanah commented 4 years ago

The error is not related to this package. It is related to monolog package