Skip to content

Instantly share code, notes, and snippets.

View SudhansuuRanjan's full-sized avatar
🎯
Focusing

Sudhanshu Ranjan SudhansuuRanjan

🎯
Focusing
View GitHub Profile
@SudhansuuRanjan
SudhansuuRanjan / ffmpeg.md
Created November 12, 2024 21:27 — forked from protrolium/ffmpeg.md
ffmpeg guide

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

You can get the list of installed codecs with:

@SudhansuuRanjan
SudhansuuRanjan / ffmpeg_resize.sh
Created November 12, 2024 21:25 — forked from mmazzarolo/ffmpeg_resize.sh
Resize videos keeping the aspect ratio (shows black bar padding where needed)
#!/bin/bash
input="input.mp4"
output="output.mp4"
color="black"
while getopts ":i:o:w:h:c:" opt; do
case $opt in
i) input="$OPTARG"
;;
@SudhansuuRanjan
SudhansuuRanjan / ffmpeg-web-video-guide.md
Created November 12, 2024 21:24 — forked from jaydenseric/ffmpeg-web-video-guide.md
A quick guide to using FFmpeg to create cross-device web videos.

Video conversion with FFmpeg

Install

On mac:

  1. Download the latest release.
  2. Extract the binary and place it in /usr/local/bin.

Command basics

@SudhansuuRanjan
SudhansuuRanjan / compress_video
Created November 12, 2024 21:17 — forked from trvswgnr/compress_video
portable shell script to compress videos with ffmpeg
#!/bin/sh
print_usage() {
echo "usage: compress_video <input_file>"
echo "supported formats: mp4, webm, mkv, mov, avi, flv"
}
get_extension() {
f="${1##*/}"
case "$f" in