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

Pause/Resume/Seek mp4 on FFMPEG while transmitting to RTMP

I'm currently streaming an mp4 to an RTMP server just fine. I'm trying to figure out if I can pause the MP4 and Resume while staying connected to the RTMP server the entire time. I'm streaming with the following command: ffmpeg -re -i myfile.mp4…
Intracta
  • 91
  • 7
2
votes
0 answers

Fluent-FFMPEG How To Add A Background Audio To A Video Which Has Sound

I am using fluent-FFmpeg library to render some videos on my node js Application, Is there a way to add a background audio to a video that already has sound, If a video doest have a sound this code works, can someone help? …
Ilhamzac
  • 81
  • 1
  • 8
2
votes
0 answers

ffprobe failed to execute command

I'm trying to get a frame from a video in a temp location but I get an error like this: Uncaught Alchemy\BinaryDriver\Exception\ExecutionFailureException: ffprobe failed to execute command '/usr/bin/ffprobe' '/tmp/phpfwEh9u' Which is weird because…
Ted Bed
  • 57
  • 7
2
votes
1 answer

How can I upscale videos with FFmpeg to a fixed resolution?

Resolution of an example video: 640x788 Desired resolution of the new video: 1920x1080 The aspect ratio of the video should be kept (the area left & right should be filled black). My current call looks like this: ffmpeg -i input.mp4 -s 1920x1080 -r…
Tobias
  • 33
  • 1
  • 6
2
votes
1 answer

Encoding failed during converting and saving video using php-ffmpeg in laravel

i'm using https://github.com/PHP-FFMpeg/PHP-FFMpeg package to convert user video uploads to mp4 format, note that I'm using Laravel framework for development process. But I'm facing error for this and Im not really sure what im doing wrong because…
2
votes
0 answers

How can i add a watermark on videos?

This is my code that i'm using to merge videos . var_dump(shell_exec( "C:/ffmpeg/bin/ffmpeg.exe -f concat -safe 0 -i D:/xampp/htdocs/test/file.txt -c copy D:/xampp/htdocs/test/phpconcatenated.mp4 2>&1")); But this code is working only when all…
Vikas Verma
  • 149
  • 1
  • 11
2
votes
2 answers

PHP-FFMpeg: How to properly concatenate two videos?

THE SITUATION: I need it to concatenate multiple videos into one single video. I am using the library PHP-FFMpeg. But I don't manage to make it working. THE VIDEOS: The videos are recordings made with the MediaRecorder Web API. The video format…
FrancescoMussi
  • 20,760
  • 39
  • 126
  • 178
2
votes
1 answer

overlay transparency video on top of other video

I have two videos. I used below command to overlay first video(overlay.mp4) on top of second video(main.mp4) and set transparency for alpha chanel to 0.3 ffmpeg -y \ -i main.mp4 \ -i overlay.mp4 \ -filter_complex…
huynq9
  • 522
  • 8
  • 22
2
votes
1 answer

Use FFMpeg with pure php and shared hosting

So I want to use FFMpeg library and found standalone PHP version, I used this before on Laravel and installed composer but now in this case, I am trying to install this library on a shared hosting, I just upload src folder and start with…
Jack The Baker
  • 1,781
  • 1
  • 20
  • 51
2
votes
1 answer

php-ffmpeg can't open stats file. Will run in Terminal if I remove temp file name

I have a simple app that is trying to: 1) rotate videos that have a rotation value 2) re-encode HEVC videos so they play in Chrome (until Chrome supports HEVC) 3) stitch several of the results together. I'm currently developing locally and in…
2
votes
2 answers

PHP-FFMpeg allow multiple input

I want to reproduce this command ffmpeg -i image.png -i audio.wav -acodec libvo_aacenc -vcodec libx264 output.flv with PHP-FFMpeg I can't find in documentationa way to add multiple input file (-i image.png -i audio.wav)
Filo
  • 2,829
  • 1
  • 21
  • 36
2
votes
0 answers

Adding subtitle in video using php-mpeg

I am using PHP-FFMpeg (a php wrapper for FFMpeg exacutable library) for making a very basic video editor. I am facing two issues right now. Below are description of those issues: 1.) Currently, I am adding subtitles to the video by using code…
Xeeshan
  • 21
  • 4
2
votes
0 answers

Where do I get FFMPEG dll for php 5.6.25 for windows 8

Hi I have installed wamp with php 5.6.25. I need to enable ffmpeg. I have done the followings: Option one: I have followed what has provided in this link http://www.wikihow.com/Install-FFmpeg-on-Windows, but it didn't work Option two: Downloaded…
user75472
  • 1,277
  • 4
  • 28
  • 53
2
votes
2 answers

How to get video size of compressed video by ffmpeg?

Hi we are using ffmpeg for compressing the video through php script, now what i need is i want to get the video size of compressed image, but am getting an video path so kindly guide me how i need to over come this? Below is the code what i used for…
Mani Kandan
  • 699
  • 1
  • 10
  • 30
2
votes
2 answers

get image from uploaded video codeigniter

I am using Codeigniter to develop a website in which one of the features is to upload videos to a folder. There will be a gallery that contains several thumbnails corresponding to each video. Those thumbnails would work as a links to the…
DMBorges
  • 93
  • 2
  • 8
1 2
3
18 19