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
0 answers

Thumbnail generation in Laravel with FFmpeg

Using FFmpeg video upload is successful in the database, but the file is not found in the storage directory. I want to make a thumbnail of the video that has just been uploaded using FFmpeg in Laravel. When viewed in the database it has been…
0
votes
1 answer

Convert large video files with php-ffmpeg

I have a very strange problem. I need to convert video files by file resolution, for example, if the video file resolution is '1920x1080' then it must convert to 1080, 720, and 480 resolutions. The converter works fine but with low-size files. For…
Boychik
  • 61
  • 7
0
votes
0 answers

PHP-FFMPEG Waveform is a little noisy, how to fix that?

I made a waveform through sample code : $waveform = $audio->waveform(2000, 500, array('#FFA500')); $waveform->save('waveform.png'); But result has some noise in top & bottom of edges: https://gcdnb.pbrd.co/images/80v6Up6etCrD.png?o=1 So I made a…
Kranchi
  • 73
  • 1
  • 9
0
votes
2 answers

Call to undefined method FFMpeg\Media\Video::addWatermark()

I m trying to add a watermark to a video that I have but it's giving me this error while applying a watermark The library is installed and working with the code commented but not when trying to add watermark use FFMpeg\FFMpeg; use…
Amir Khan
  • 401
  • 5
  • 13
0
votes
0 answers

Apostrophe issue with FFmpeg

I'm working on a company's project which is vue.js. There are also code parts in php. It uses FFmpeg to create a video from multiple videos. On each video, there is a text type subtitle. Each text is retrieved from a .txt file But I have a problem…
0
votes
0 answers

Why is my output video in ffmpeg so slow and Sometimes it seems broken?

i use the ffmpeg command for convert video , or chroma key video But my output video is very slow and sometimes crashes and stops? my command : ffmpeg -i first.mp4 -c:v libx264 -pix_fmt yuv420p -c:a copy output642.mp4
0
votes
0 answers

FFmpeg concat videos from array with fade effect

I am trying to concatenate videos into one using PHP and FFMpeg. The URL of each video are in the array $files_aux[]. $video = $ffmpeg->open($files_aux[0]); $video->filters()->synchronize(); $video ->concat($files_aux) …
Corboss
  • 1
  • 1
0
votes
0 answers

Fatal error: Uncaught Symfony\Component\Process\Exception\LogicException:

I install PHP-FFMpeg on aapanel with apache/LAMP(PHP 8.0) (Digitas Ocean VPS) also Installed ffmpeg using sudo apt install ffmpeg check with which ffmpeg and which ffprobe ffmpeg path= /usr/bin/ffmpeg ffprobe path= /usr/bin/ffprobe Run composer…
0
votes
0 answers

Unable to load FFProbe

On my local pc, I've installed the FFmpeg package and run my Laravel application nicely. But when I deployed my application in the cloud server FFmpeg is not working properly. When I upload an audio file this error occurred. "Unable to load FFProbe"…
0
votes
0 answers

How to re-run ffmpeg rtsp to rtmp conversion process if the process gives error?

currently, I am working on a project where I need to run rtsp to rtmp conversion using ffmpeg. but some how I am getting error after several minutes running the process and the process getting exited. I want to run the process even if it gets error.…
0
votes
0 answers

FFMPEG command not running from php but working in cmd

i have this function in my laravel controller foreach ($arrayi['audio'] as $i => $audioFile) { // Loop through the audio files and image files // Create a new video with the audio file and image file …
Altin
  • 1
  • 1
0
votes
0 answers

How to best compress videos using PHP-FFMpeg?

I'm using the PHP-FFMpeg v1.1.0 library to compress videos sent from a variety of mobile devices into 480p (640x480) MP4 videos. Everything is working great, but I'm wondering how to reach an optimal compression level. It looks like I'm already…
Bruno Leveque
  • 2,647
  • 2
  • 23
  • 33
0
votes
0 answers

ffmpeg header how to allow certain domain

so im new to ffmpeg , i want to restrict my streams be allowed only to my website stream server is nginx and mywebsite is written in php , the stream server is different from mywebsite host , so i want to restrict stream requests only to my website…
0
votes
0 answers

ffmpeg command for overlaying a video onto am image with blend

I have these requirements but cant seem to get this even close : ffmpeg to produce a mp4 video inputs : an image of varying size, an audio wav of X length, a video for the overlay such as particles or dust create an mp4 with the image as the final…
0
votes
0 answers

How to use Laravel FFMpeg to convert file using cuda

I have the following ffmpeg command that converts and scales an input video using cuda: ffmpeg -hwaccel cuda -hwaccel_output_format cuda -i input.mp4 -c:a copy –vf scale_npp=-1:360:interp_algo=super -c:v h264_nvenc -b:v 5M output.mp4 I'm trying to…