Created
September 7, 2020 15:03
-
-
Save srameshr/d6778ffdcb8ad805f29c4e3826c060f9 to your computer and use it in GitHub Desktop.
Installing latest version of FFMPEG and FFPROBE on AWS ElasticBeanstalk via .ebextensions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Create a folder at the root of your app or project called ```.ebextensions``` | |
Inside the folder ```.ebextensions``` create a file called ```01_ffmpeg.config``` | |
Inside this file paste in the below contents: | |
``` | |
commands: | |
command1: | |
command: ls | |
command2: | |
command: "cd /usr/local/bin" | |
command3: | |
command: "mkdir ffmpeg" | |
cwd: /usr/local/bin | |
ignoreErrors: true | |
command4: | |
command: "cd /usr/local/bin/ffmpeg" | |
command5: | |
command: "wget https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-amd64-static.tar.xz" | |
cwd: /usr/local/bin/ffmpeg | |
ignoreErrors: true | |
command6: | |
command: "tar -xf ffmpeg-release-amd64-static.tar.xz" | |
cwd: /usr/local/bin/ffmpeg | |
ignoreErrors: true | |
command7: | |
command: "ln -sfn /usr/local/bin/ffmpeg/ffmpeg-*-amd64-static/ffmpeg /usr/bin/ffmpeg" | |
cwd: /usr/local/bin/ffmpeg | |
ignoreErrors: true | |
command8: | |
command: "ln -sfn /usr/local/bin/ffmpeg/ffmpeg-*-amd64-static/ffprobe /usr/bin/ffprobe" | |
cwd: /usr/local/bin/ffmpeg | |
ignoreErrors: true | |
``` | |
4. add the folder and file you just created to your source versioning system via ```git add .ebextensions/``` | |
5. Commit via ```git commit -m "install ffmpeg on AWS"``` | |
6. Deploy to beanstalk via ```eb deploy``` | |
NOTES: Tutorial on syntax for the file - https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/customize-containers-ec2.html |
Hi guys!
how to use after these installation?
Im using:
`<?php
require 'vendor/autoload.php';
$ffmpeg = FFMpeg\FFMpeg::create();
$video = $ffmpeg->open('movie.mov');
$format = new FFMpeg\Format\Video\X264();
$format->setAudioCodec("libmp3lame");
$video->save($format, 'movie.mp4');`
But it`s not working.
Thanks in advance!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yes the issue was in the creating the folder, the folder locally it was creating it self, on production it don't