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

PHP FFMPEG not working when I upload mp4 file

To convert video to formats compatible with HTML5 video I wrote the following script: $srcFile = "name/of/the/video.mp4"; $destFile = "/media/video/newfilename"; $ffmpegPath = "/usr/local/bin/ffmpeg"; $flvtool2Path =…
Chris
  • 374
  • 1
  • 5
  • 16
3
votes
1 answer

How to get Highest possible bit rate and dimensions of a video?

I am using a package called pascalbaljetmedia/laravel-ffmpeg And want to create an HLS playlist for video streaming. but first i want to check the video bit-rate or width/height to see if it's a 4k, 1080, 720 etc. So how do i calculate the video…
chawila
  • 412
  • 1
  • 4
  • 22
3
votes
0 answers

How to implement filter_complex on the PHP-FFMpeg

How to using filter_complex on the PHP-FFMpeg? I need to implement the following FFMpeg command: ffmpeg -i test.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
3
votes
0 answers

How To fix "PHP Fatal error: Class 'ffmpeg_movie' not found" Error in PHP

I have installed FFMPEG in my server for video conversions into different sizes of videos within my WordPress site running on PHP 5.6/Linux. Previously all things were working fine but today suddenly I got one error like: "PHP Fatal error: Class…
Ajay Katariya
  • 439
  • 9
  • 22
3
votes
2 answers

fatal error: Uncaught exception 'Alchemy\BinaryDriver\Exception\ExecutableNotFoundException' with message 'Executable not found, proposed

I have installed https://github.com/PHP-FFMpeg/PHP-FFMpeg on linux hosting path is /public_html/videoconversion/ I got this error. Fatal error: Uncaught exception 'Alchemy\BinaryDriver\Exception\ExecutableNotFoundException' with message…
arvindpundir
  • 136
  • 1
  • 12
3
votes
1 answer

Download a percentage of a video with curl

I have some videos that are hosted on S3 (.mp4 and .mov) some of which are rather large (1.2GB+). I want to get the first frame from each video using the PHP wrapper for FFmpeg but I don't want to have to download the full file first. What I really…
Jimmyb_1991
  • 346
  • 5
  • 12
3
votes
1 answer

File for preset 'slower' not found in ffmpeg with linux

When I am using the below command then getting the error "File for preset 'slower' not found" /usr/bin/ffmpeg -i mainFile.mp4 -ss 00:03:22 -t 00:00:22 -acodec libfaac -vcodec libx264 -vpre slower -crf 18 -aspect 16:9 -r 25 -b 3000k -vpre main -level…
Urdesh Kumar
  • 1,120
  • 1
  • 17
  • 23
3
votes
1 answer

avcodec_encode_video2 return -542398533 Generic error in an external library only with h264 encoder

pAvframe = GetVideoFrame(); av_init_packet(&pkt); /* encode the image */ ret = avcodec_encode_video2(pAvCodecCtx, &pkt, pAvframe, &got_packet); //return Generic error in external library if (ret < 0) { char errbuf[128]; const char…
Parwez Akhtar
  • 243
  • 1
  • 3
  • 13
3
votes
1 answer

Filter concat:out:v0 has a unconnected output | Concatenating with php-ffmpeg

I'm incorporating PHP-FFMpeg to my symfony3 project which is working perfectly. However recently I've been needing to concatenate two videos into one, and it would appear it's not supported. So I created a ConcatVideoFilter class that I'm using…
kemicofa ghost
  • 16,349
  • 8
  • 82
  • 131
3
votes
1 answer

How can I use php-FFMpeg in laravel 4?

I am new to Laravel 4. I have installed php-ffmpeg in my local Laravel setup, but I need help on how to use this ffmpeg with Laravel 4?
3
votes
2 answers

FFMPEG start and duration in FPS

Is it possible to set the -ss and -t flags in FFMPEG in frames? I am building a simple video trimmer in PHP with FFMPEG and have been using PHP-FFMPEG to extract screen grabs etc and it works entirely in frames. Also my script requires that I add…
user825494
  • 35
  • 1
  • 3
2
votes
1 answer

ffmpeg quality with watermark

i want to add a watermark to a video with ffmpeg. At this time nearly all things are computing properly, except the quality of the new video is massively lower than in the one of the original video. I also use ffmpeg-php and tried to set the minrate…
trialgod
  • 302
  • 1
  • 15
2
votes
1 answer

How to install ffmpeg and lame on Xampp for Mac?

I've searched the internet for days to find out how to install ffmpeg (and lame) on XAMPP for Mac (PHP). But I didn't find the key to my quetsion. I need to covert mp3's on my webserver (php) using lame, but I like to test it on my XAMPP for Mac…
Guido Lemmens 2
  • 2,317
  • 5
  • 23
  • 29
2
votes
1 answer

How to draw text on a rectangle with rounded corners using ffmpeg?

I'm trying to draw text on a rectangle with rounded corners using ffmpeg, but my current command is not working. Here's what I've tried: ffmpeg -y -i ./video-ready-all.mp4 -filter_complex "drawbox=y=0:color=white@0.5:width=iw:height=40:t=max,…
eugene_prg
  • 948
  • 2
  • 12
  • 25
2
votes
1 answer

Video not playing on all browsers (FFMPEG)

For days I have been struggeling with ffmpeg (PHP). I have a website where users can upload video's. Obviously people use .mov, .mp4 and .mpeg created by various devices such as cameras, mobile telephones, tablets and many more devices. The problem…
user14685910
1
2
3
18 19