Skip to content

Instantly share code, notes, and snippets.

ffmpeg -i input.mp4 -ss "00:00:00" -to "00:00:05" -filter:v "scale=iw*min(405/iw\,720/ih):ih*min(405/iw\,720/ih),crop=405:720" -c:v libx264 -crf 18 -an output_file.mp4
ffmpeg -i input.mp4 -ss "00:00:00" -to "00:00:05" -filter:v "scale=iw*min(405/iw,720/ih):ih*min(405/iw,720/ih),crop=405:720" -c:v libx264 -crf 18 -an output_file.mp4
[Steps to create magic-dependencies-layer]
1. Launch an EC2 with Amazon Linux 2 OS.
2. SSH into EC2 instance.
Let me share the commands I’ve used to create layer in this EC2 instance.
> cd ~
> mkdir magic
> cd magic
> mkdir lib # this directory must be called 'lib'
[{"name":"John", "age":30, "car":null},{"name":"Simon", "age":38, "car":null}]
@Simoneth
Simoneth / ffmpeg.md
Created March 10, 2022 09:19 — forked from liangfu/ffmpeg.md
using ffmpeg to extract audio from video files

ffmpeg

Converting Audio into Different Formats / Sample Rates

Minimal example: transcode from MP3 to WMA:
ffmpeg -i input.mp3 output.wma

You can get the list of supported formats with:
ffmpeg -formats

Convert WAV to MP3, mix down to mono (use 1 audio channel), set bit rate to 64 kbps and sample rate to 22050 Hz:

0x123B92c756746dA9c264b6E87e7F388c404Ea8B8
@Simoneth
Simoneth / derty
Created September 26, 2017 11:58
0x10cef043efea423486f8a58584ce1c6e656b9d52
/**
* Current exchange - 1 ETH = 285.57 USD - 9/20/17 10:00 GMT
*/
/**
* Math operations with safety checks
*/
contract SafeMath {
function safeMul(uint a, uint b) internal returns (uint) {
uint c = a * b;
@Simoneth
Simoneth / cooin
Created September 14, 2017 09:33
0x3CAd8863e53e90E76dC3f2A9B22052849CF7BCBf
@Simoneth
Simoneth / coin2
Created September 14, 2017 09:04
0xf1f1Dc5529D1804Fdccc90c002DE0EDA3978C861
0x123B92c756746dA9c264b6E87e7F388c404Ea8B8