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

How to implement Text Animations with FFMPEG?

I want to achieve text animations in video. example given below [https://www.youtube.com/watch?v=_sLeWcwBJ_s][1] Is this possible with FFMPEG or there is any other way possible? i have implemented text in and out with FFMPEG but now i want to add…
1
vote
2 answers

Converting and Compressing a Video with FFmpeg

I'm using FFmpeg to convert and compress a video. Everything converts/compresses fine, but my video has no sound when I try to play it on a mobile device. But it has sound when I play it on a desktop. I don't know if this has to do with the codec…
1
vote
0 answers

PHP-ffmpeg ratecontrol_init: can't open stats file

noob to php-ffmpeg. have it installed. Can get it to do some things, so might be installed right. I've boiled it down to the crux of the problem: $file="appL.mp4"; $config = array( 'ffmpeg.binaries' => '/usr/local/bin/ffmpeg', 'ffprobe.binaries' =>…
1
vote
1 answer

How can I stabilize a video using FFMPEG in Android

I have built and successfully imported FFMPEG library in the android studio. How can I develop a program to stabilize a video using that?
Kamran Bashir
  • 632
  • 6
  • 12
1
vote
1 answer

ffmpeg image concat file with different file extensions

I've been working with ffmpeg and I have got it to work perfectly quite a few times, but as of recent I am running into an issue where all the images from my text file arent used. My text file looks like - ffconcat version 1.0 file…
730wavy
  • 944
  • 1
  • 19
  • 57
1
vote
1 answer

ffmpeg How does the blend filter work

I have small project which uses blend filter of FFmpeg library. I read the examples of this document https://ffmpeg.org/ffmpeg-filters.html#blend_002c-tblend But I'm not clearly understand about it. X, Y : the coordinates of the current sample W, H…
1
vote
0 answers

avconv can not overwrite files?

I want to reduce the size of video files. I want to do it this way: $thuc = exec("avconv -y -i $vfile -map 0 -c:v libx264 -crf 22 -c:a copy $vfile"); if ($video_width > 800) { $thuc = exec("avconv -y -i $vfile -filter:v…
Verode
  • 145
  • 2
  • 9
1
vote
1 answer

avconv - reducing video dimensions and file size

Is there any way how to reduce the size of video? In php I use this: $result = exec("avconv -i $file1 -vcodec libx264 -acodec aac -strict experimental $file2"); Unfortynately, all produced videos have the same size as originals or are more…
Verode
  • 145
  • 2
  • 9
1
vote
0 answers

How could I concatenate 3 videos in ffmpeg

I'm using FFMPEG already for 2 videos and working fine with the following command ffmpeg -i intro.mp4 -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate1.ts ffmpeg -i outro.mp4 -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate2.ts ffmpeg -i…
Siddharth
  • 1,649
  • 4
  • 22
  • 47
1
vote
1 answer

Error while generating video thumbnail in laravel

I am using ffmpeg and Pawlox/video-thumbnail package to generate thumbnail. I have already installed both ffmpeg and pawlox/video-thumbnail. Here is my…
jack
  • 589
  • 8
  • 22
1
vote
3 answers

php-ffmpeg video converting issue when Source video size is more than 25 MB.

I am using php-ffmpeg for converting uploaded videos. With all videos it was working great before. But from last few days through now only small videos are getting convert and giving me proper response on success. But large videos which size are…
Gaurang Sondagar
  • 814
  • 1
  • 9
  • 23
1
vote
0 answers

merging images to create video using ffmpeg

I am creating a video from images using ffmpeg. I am using a file that contains the list of images as file 'C:\wamp64\www\test\public\userFolder\media\nature3.jpg' file 'C:\wamp64\www\test\public\userFolder\media\img_001.jpg' file…
1
vote
0 answers

How to adjust the background music volume according to the main audio volume?

I am using the following ffmpeg "amerge" command to mix two audio files, ffmpeg -i voice.mp3 -i music.mp3 -filter_complex "[0:a]volume=1dB[a0];[1:a]volume=0.5[a1];[a0][a1]amerge=inputs=2[a]" -map "[a]" -strict -2 -y output.mp3 voice.mp3 file also…
harishkumar329
  • 1,210
  • 4
  • 16
  • 34
1
vote
0 answers

How to add metadata like UPC (Universal Product Code) and ISRC (International Standard Recording Code) to mp4 files using PHP?

I am using php-ffmpeg for adding metatag on mp4 but it does not work for isrc and upc. While adding upc and isrc metatag on mp3, ffmpeg works fine. Code for adding metadata to mp4 $video = $ffmpeg->open(__DIR__ . '/audio.mp3'); $format =…
1
vote
0 answers

FFMpeg-PHP Headers Not Found on CentOS / cpanel

I have looked all over for directions on how to install. I have followed the guide at ffmpeg(dot)org/wiki/CompilationGuide/Centos FFMpeg works fine as I have been able to convert an mp3 and mp4. My issue is when I try to setup FFMpeg-PHP. When I run…
Colter
  • 11
  • 2