Questions tagged [ffmpeg-php]

Refers to a few similarly named PHP extensions that add functions for accessing and retrieving information about multimedia files. Questions about generally using ffmpeg cli tool through exec() or similar or other libraries should not use this tag!

ffmpeg-php refers to a few similarly named PHP extensions that add functions for accessing and retrieving information about multimedia files:

  • FFmpegPHP: a pure OO PHP port of the legacy ffmpeg-php writer in C.

  • PHP-FFMpeg An Object-Oriented library to convert video/audio files with FFmpeg.

  • ffmpeg-php: The classic, legacy version. This is a very old, long dead project that will not work with any ffmpeg versions officially supported by the FFmpeg project.

Note that these extensions are not part of the FFmpeg project.

You may not need a wrapper/extension/library if you simply want to invoke the ffmpeg binary from your PHP script. Refer to FFmpeg Wiki: PHP for more info.

276 questions
1
vote
2 answers

php_ffmpeg not working

i've installed the php_ffmpeg extension on my xampp under c:/xampp/php/ext/php_ffmpeg.dll - according to phpinfo() it seems to be properly installed. however - when trying to create a thumbnail from a video it is executing without errors, but i'm…
Fuxi
  • 7,611
  • 25
  • 93
  • 139
1
vote
0 answers

How to stream a video formatted in hls, m3u8 in Laravel?

In database, videos are saved in m3u8 format as shown below. I want to open video when I click on button or download it. I read this. But still not clear for me? Thanks in advance. dfa7088-9d3c-4b23-0010a-59fc63f4441d/hls/qe8b807916f8816a.m3u8 @if(…
black man
  • 21
  • 4
1
vote
0 answers

ProtoneMedia Error ffmpeg failed to execute command

public function handle() { $lowBitrateFormat = (new X264())->setKiloBitrate(500); FFMpeg::openUrl($this->video->url) //https://commondatastorage.googleapis.com/gtv-videos-bucket/big_buck_bunny_1080p.mp4 ->exportForHLS() …
Y- Jull
  • 11
  • 1
1
vote
1 answer

How to create multiple quality video streaming system by using ffmpeg?

I am creating a streaming app like youtube while I am creating it I am facing many challenges related to different quality video converting. My question is Should I convert orginal video file into multiple video file (like 240p, 480p and 720p) and…
laxec61532
  • 29
  • 2
1
vote
1 answer

FFMpeg returns error: Unrecognized option 'master_pl_name'

I used this command (described at the processing message bellow) on my application several times before and always worked well. Now returns that error. '/usr/bin/ffmpeg' '-y' '-threads' '12' '-i'…
jonatasos
  • 101
  • 1
  • 5
1
vote
0 answers

Why does my website not load in a browser I send a request in but fine in another browser?

Scenario I upload a file, after that is done I use PHP-FFMPEG to convert the file to an mp4, this is the code I use for that: $video = $ffmpeg->open($targetPath . '1.' . $extension); $format = new…
Tom
  • 606
  • 7
  • 28
1
vote
1 answer

Merge Multiple Inputs in One With PHP-FFmpeg

I want to merge multiple videos side by side in one video with PHP-FFmpeg, is there anyone help me about that? public function GENERATE_VIDEO() { require_once APPPATH . '/third_party/vendor/autoload.php'; $ffmpeg = FFMpeg\FFMpeg::create([ …
1
vote
1 answer

how to use or import ffmpeg in a laravel controller

i have already installed the laravel-ffmpeg via composer in my project composer require pbmedia/laravel-ffmpeg then i added class to config/app.php file as documentation says // config/app.php 'providers' => [ ... …
Vines Villa
  • 27
  • 10
1
vote
0 answers

PHP FFMPEG AUDIO ARTWOARK METADATA

I am using laravel-ffmpeg Package and I want to put the image on the audio file. My code is as follows: $thumbnailUrl = Storage::disk('thumbnail')->path($thumbnailPath); $audioUploaded->filters()->addMetadata([ …
1
vote
0 answers

FFMPEG php HLS and DASH conversion

I'm using this repo https://github.com/aminyazdanpanah/PHP-FFmpeg-video-streaming to encode video in hls and then reproduce on the front end. After creating all the hls segments correctly the php script fail to execute the command below. The command…
Angus Simons
  • 528
  • 1
  • 5
  • 26
1
vote
1 answer

FFmpeg - change audio codec

Here is my code: $format = new X264('aac', 'libx264'); $format->setKiloBitrate(500); but when videos transcode with pascalbaljetmedia/laravel-ffmpeg, this package sets audio codec to mp3 by default instead aac. How solve this problem?
1
vote
1 answer

Can't convert audio files to mp3 using ffmpeg in laravel on linux server

I installed FFmpeg, php-ffmpeg, laravel-ffmpeg. Then I tried to convert Video and Audio files to mp3 on laravel. Then it worked properly on Windows10 XAMPP. However, when I installed the same on my linux shared server, get error: Class…
Tieria
  • 333
  • 3
  • 11
1
vote
2 answers

How to trim a video by 4 fragments to 4 seconds using the PHP-FFMpeg?

How to trim a video using the PHP-FFMpeg? I need to implement the following FFMpeg command: ffmpeg -i 7207783801bb.mp4 -filter_complex \ "[0:v]trim=start=10:end=11,setpts=PTS-STARTPTS[a]; \ [0:v]trim=start=20:end=21,setpts=PTS-STARTPTS[b]; \ …
Sergey Kozlov
  • 452
  • 5
  • 17
1
vote
2 answers

FFMpeg Merge audio and video files

I need to Merge an audio (.mp3) and video (.mov) file and output an mp4 file using FFMpeg PHP library. The following works: $ffmpeg = \FFMpeg\FFMpeg::create([ 'ffmpeg.binaries' => 'C:/ffmpeg/bin/ffmpeg.exe', 'ffprobe.binaries' =>…
Donal.Lynch.Msc
  • 3,365
  • 12
  • 48
  • 78
1
vote
0 answers

Using laravel to convert videos with AWS Amazon Elastic Transcoder

Just wanted to know if it's possible to use laravel with Amazon Elastic Transcoder. having a lot of issues using FFMPEG to convert videos as it's always timing out on larger video files event though I have set the timeout to 60000. Is there a plugin…