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
0
votes
1 answer

Class 'Pbmedia\LaravelFFMpeg\FFMpeg' not found

Inside an Artisan command I have this FFMpeg::fromDisk('songs') ->open('this.mp4') ->export() ->toDisk('converted_songs') ->inFormat(new \FFMpeg\Format\Audio\Aac) …
Elix
  • 3
  • 1
0
votes
1 answer

How to create TS segment on demand if M3U8 playlist is given

While transcoding I have to create m3u8 playlist manually and now on-demand I want to create .ts files. I have used FFmpeg's cut option from start to end but .ts files have audio problems while getting played. I have a command which creates ts…
0
votes
1 answer

FFMPEG is not executing

I have installed FFMPEG in my Centos7 dedicated Server, now I want to run the FFMPEG, but it is not executing, can anyone help what could be the reason. Note: I have Cpanel installed also. My code is below: …
0
votes
0 answers

Cannot call method getFrameFromSeconds() more than one time on $media object Laravel

I'm trying to set up a video platform for myself and for this I would like to make a timelapse from frames I'm taking from the uploaded video. This worked as long as I only took one frame from the video. The moment I tried to take more than one I…
toorboon
  • 35
  • 4
0
votes
1 answer

How to specify a output folder for ffmpeg

I am using ffmpeg to convert an audio file to .wav format (Rate -16K, 16 bit, Mono). I want to save the converted audio in a folder but I keep getting this error - Unable to find a suitable output format for…
shekwo
  • 1,411
  • 1
  • 20
  • 50
0
votes
1 answer

How to Concatenate Multiple Videos Using Cross fade in between and fade out at the end (FFMPEG)

Is there a way to concatenate file1.mp4 add xfade file2.mp4 add fade out? The first file usually has 30 seconds while the second is 10 seconds long. Also, is it possible to make the above merging work with multiple inputs/outputs? I know there's a…
Robert
  • 1
  • 1
0
votes
0 answers

FFMPEG 'Invalid data found when processing input' while scaling an Image

I just installed FFMPEG on a server and I am testing it to see if it works. I am new to this, so I don't know if I'm doing it correctly. I want to scale and compress an image. I am doing it by following php code - exec("ffmpeg -i $inputImg -vf…
0
votes
0 answers

FFMPEG mp4 videos not suddenly stops playing on Browsers

I have been struggling with this issue in regards to playing my converted mp4 videos using FFMPEG into an html 5 video player, I basically just use a single video player and just replace the source when the video ends. What happens is that a…
0
votes
1 answer

I cant install ffmpeg binary driver on my laravel project

I am trying to install ffmpeg binary on my laravel application but I am getting this error. Could not find a matching version of package php-ffmpeg/binary-driver. Check the package spelling, your version constraint and that the package is available…
oshakab
  • 299
  • 1
  • 3
  • 11
0
votes
2 answers

How can i use FFMpeg in laravel 6 with this config?

my system config is: windows 10 Xampp v3.2.3 installed in D Drive php v7.3.4 composer is installed I install FFMpeg and run this command: composer require php-ffmpeg/php-ffmpeg when I test it in one .php file it is work correctly but when i want…
YICT IR
  • 81
  • 1
  • 2
  • 7
0
votes
1 answer

FFmpeg : do not terminate script using loop

I have a collection of a few video URLs, and what I am trying to do is add a watermark to all the videos using a for loop, in a laravel inside the loop, this is my FFmpeg code. shell_exec('ffmpeg -y -i MY_VIDEO_PATH_HERE -i WATER_MARK_IMAGE_URL…
Punit Gajjar
  • 4,937
  • 7
  • 35
  • 70
0
votes
2 answers

Looking to play back non-encoded video upload then export gif from selection point via FFMPEG

We've been trying to crack this code all week, reaching out to everyone to see if you have any solutions? We want the user to upload a video and in the next step he will select a small 5 second loop of the video which will be made as a gif. Old…
0
votes
1 answer

PHP-FFMpeg video output is truncated

I'm using the PHP-FFMpeg library found here and code from the "Basic Usage" section. The outputted video seems to be truncated. I'm using a source video that's 28 seconds long, but the output is only 9 seconds. What's going wrong? Here, I'm checking…
showdev
  • 28,454
  • 37
  • 55
  • 73
0
votes
0 answers

How to use PHP FFMPEG to alter audio binary header bytes offset

I use the following method to create a WNB file that is flashable to my Electric Unicycle Ninebot Z10 First audacity to make the file raw pcm 16khz 16bit mono littleendian Then wnb-slicer golang app to convert that raw file into wnb. Today i did the…
SomniusX
  • 83
  • 6
0
votes
0 answers

How can I get these watermarks to scale to fit the video parameters?

The watermark.png is too large for the video. I believed my code has scale code, but I'm not sure why the image doesn't scale down to it. I've tried adding in scale2ref, but maybe didn't get the image reference correct. $ffmpegCommand…