Skip to content

Instantly share code, notes, and snippets.

@srameshr
Created September 7, 2020 15:03
Show Gist options
  • Star 8 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save srameshr/d6778ffdcb8ad805f29c4e3826c060f9 to your computer and use it in GitHub Desktop.
Save srameshr/d6778ffdcb8ad805f29c4e3826c060f9 to your computer and use it in GitHub Desktop.
Installing latest version of FFMPEG and FFPROBE on AWS ElasticBeanstalk via .ebextensions
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
@chumeston
Copy link

Works like a charm! Thank you very much.

@ewhalenkamp
Copy link

ewhalenkamp commented Aug 26, 2021

I love you I love you I love you I love you I love you this issue has kept me up all night and this worked perfectly.

@srameshr
Copy link
Author

@ewhalenkamp Haha! Glad you found it helpful. I have struggled for couple of days in installing the latest version of FFMPEG and FFPROBE from the right mirror with EBS.

@hasanhmedeh
Copy link

@srameshr I did created this file absolutely the same but I got this error now (ffmpeg was killed with signal SIGSEGV) any idea why this is happening ?

this is the code I wrote

return new Promise((resolve, reject) => { ffmpeg() .input(process.env.S3_BASE_URL + '/' + input) .screenshot({ timestamps: ['50%'], filename: name, folder: join('thumbnails'), }) .on('end', () => { resolve('ok'); }) .on('error', (err) => { reject(err); }); });

response:

image

@rahmanTecho
Copy link

Error: ffprobe was killed with signal SIGSEGV

@srameshr I did created this file absolutely the same but I got this error now (ffmpeg was killed with signal SIGSEGV) any idea why this is happening ?

this is the code I wrote

return new Promise((resolve, reject) => { ffmpeg() .input(process.env.S3_BASE_URL + '/' + input) .screenshot({ timestamps: ['50%'], filename: name, folder: join('thumbnails'), }) .on('end', () => { resolve('ok'); }) .on('error', (err) => { reject(err); }); });

response:

image

did you find solution for this ?

@hasanhmedeh
Copy link

Error: ffprobe was killed with signal SIGSEGV

@srameshr I did created this file absolutely the same but I got this error now (ffmpeg was killed with signal SIGSEGV) any idea why this is happening ?
this is the code I wrote
return new Promise((resolve, reject) => { ffmpeg() .input(process.env.S3_BASE_URL + '/' + input) .screenshot({ timestamps: ['50%'], filename: name, folder: join('thumbnails'), }) .on('end', () => { resolve('ok'); }) .on('error', (err) => { reject(err); }); });

response:

image

did you find solution for this ?

Yes the issue was in the creating the folder, the folder locally it was creating it self, on production it don't

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment