quasarstream / PHP-FFmpeg-video-streaming

📼 Package media content for online streaming(DASH and HLS) using FFmpeg

Home Page:https://www.quasarstream.com/op/php/ffmpeg-streaming?u=php-ff

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Command Failed!

MrCheatEugene opened this issue · comments

commented

I've tried to run this code:

'/usr/bin/ffmpeg', 'ffprobe.binaries' => '/usr/bin/ffprobe', '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('/var/log/ffmpeg-streaming.log')); // path to log file $ffmpeg = Streaming\FFMpeg::create($config, $log); $video = $ffmpeg->open('/var/www/html/test-hls/video.mp4'); $video->dash() ->x264() // Format of the video. Alternatives: hevc() and vp9() ->autoGenerateRepresentations() // Auto generate representations ->save(); // It can be passed a path to the method or it can be null $video->hls() ->x264() ->autoGenerateRepresentations([720, 360]) // You can limit the number of representatons ->save(); but got error: PHP Fatal error: Uncaught Alchemy\\BinaryDriver\\Exception\\ExecutionFailureException: ffmpeg failed to execute command '/usr/bin/ffmpeg' '-y' '-i' '/var/www/html/test-hls/video.mp4' '-c:v' 'libx264' '-c:a' 'aac' '-bf' '1' '-keyint_min' '25' '-g' '250' '-sc_threshold' '40' '-use_timeline' '1' '-use_template' '1' '-init_seg_name' 'video_init_$RepresentationID$.$ext$' '-media_seg_name' 'video_chunk_$RepresentationID$_$Number%05d$.$ext$' '-seg_duration' '10' '-hls_playlist' '0' '-f' 'dash' '-map' '0' '-s:v:0' '80x144' '-b:v:0' '68k' '-map' '0' '-s:v:1' '134x240' '-b:v:1' '80k' '-map' '0' '-s:v:2' '202x360' '-b:v:2' '96k' '-map' '0' '-s:v:3' '270x480' '-b:v:3' '120k' '-map' '0' '-s:v:4' '404x720' '-b:v:4' '160k' '-map' '0' '-s:v:5' '576x1024' '-b:v:5' '240k' '-strict' '-2' '-threads' '12' '/var/www/html/test-hls/video.mpd':\n\nError Output:\n\n ffmpeg version 3.4.8-0ubuntu0.2 Copyright (c) 2000-2020 the FFmpeg developers\n built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)\n configuration: --prefix...' Fix this please.
commented

Is this ever gonna be fixed?