olaferlandsen / ffmpeg-php-class Goto Github PK
View Code? Open in Web Editor NEWA complete class for using FFmpeg written in PHP 5.3+
A complete class for using FFmpeg written in PHP 5.3+
I am getting this error.
ffmpeg: /opt/lampp/lib/libz.so.1: version `ZLIB_1.2.9' not found (required by /usr/lib/x86_64-linux-gnu/libpng16.so.16)
I am using PHP 7.2 and ubuntu 18.04
public function call( $method , $args = array() )
{
if (method_exists ($this, $method)) {
return call_user_func_array( array( $this , $method ) ,
( is_array( $args ) ) ? $args : array( $args )
);
} else {
throw new \Exception( 'method doesnt exist' );
}
return $this;
}
Suggestion (make it obvious):
public function call( $method , $args = array() )
{
if (method_exists ($this, $method)) {
return call_user_func_array( array( $this , $method ) ,
( is_array( $args ) ) ? $args : array( $args )
);
}
throw new \Exception( 'method doesnt exist' );
}
Cheers
File converts zero kb.
How to solve this problem.
my code is following..
require '../src/FFmpeg.php';
$FFmpeg = new FFmpeg();
$FFmpeg->input( 'original.mp4' )->output( 'new.flv' )->ready();
To install from Composer. If you do not complicate. Thank you.
Syntax error, should be $aq in the function body I think.
public function audioQuality( $aq )
{
return $this->set('aq', $a , false );
First of all, thanks for the package. ๐
Suppose, I just want to get the duration of a video. I found this code from SO. ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 input.mp4
. My question is, can I try this?
The answer is: YES. There is a workaround.
$this
from ffmpeg
method would be great.-y
overwrite flag is always present. I have to unset that.Can you just change your code to or should I give you some PR? any help is appreciated. ๐
Sorry, but I please help. I can't cope with the installation. I also tried with absolute path but it didn't work.
My server is working on a Pendrive, comp system is Win.
I think I need correct links to three items about location:
root/test/ffmpeg/src/ffmpeg.class.php
root/test/ffmpeg/bin/ffmpeg.exe
root/test/Crying.mp4
Below is the code I used (links start inside test folder):
include 'ffmpeg/src/ffmpeg.class.php';
$FFmpeg = new FFmpeg( "ffmpeg/bin/ffmpeg.exe" );
$FFmpeg->input( 'Crying.mp4' )->output( 'Crying.3gp' );
$FFmpeg->ready();
Maybe it would be possible to add a message about correct or incorrect operation?
hi there,
i have questions?
i dont make a thumb. how can i output thumb path?
i need a watermark logo. how can i put that?
and for example
i put $FFmpeg->ab('128k'); //audioBitrate
but my user's video is 64k.
your class is convert 128k.
can you put your class
user's value is done if user's value smaller than my value.
thank you
ibu
It would be nice to have multiple outputs.
In ffmpeg it is possible to do something like this:
$ ffmpeg -y -i input.mov -c:v copy -an -segment_time 30 -f segment segments/output-%03d.mov \
-vn -acodec aac -b:a 320k audio/output.m4a
What I am trying to accomplish is to generate segments of 30 seconds without audio, and one full length clip with only audio.
i needed to replace the reference to ffmpeg in your code with 'avconv' to get the class to function on my live server.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.