Skip to content

Instantly share code, notes, and snippets.

@kopilaca
kopilaca / !FFmpegExamples.md
Created May 22, 2024 17:27 — forked from daephx/!FFmpegExamples.md
[FFmpeg Examples] Common FFmpeg Commands #Commands #Examples

FFmpeg Examples

Personal collection of basic examples / scripts.

FFmpeg Documentation
A complete, cross-platform solution to record, convert and stream audio and video.

Table of contents

@kopilaca
kopilaca / 001.sh
Created May 22, 2024 17:23 — forked from ZiTAL/001.sh
ffmpeg examples
#/bin/bash
# resize and crop
# ffmpeg: 1440x1072 -> 1452x1080 -> 1440x1080 rockchip h264_rkmpp
ffmpeg-rockchip -i input.mp4 -b:v 2472k -vcodec h264_rkmpp -s 1452x1080 -r 30 -g 60 -b:a 160k -ar 44100 -threads 4 tmp.mp4
ffmpeg-rockchip -i tmp.mp4 -b:v 2472k -vcodec h264_rkmpp -s 1440x1080 -r 30 -g 60 -filter:v \"crop=1440:1080:6:0\" -aspect 4:3 -acodec copy -threads 4 output.mp4
@kopilaca
kopilaca / ffmpeg.md
Created May 22, 2024 17:20 — forked from cetinajero/ffmpeg.md
Usefull ffmpeg commands

Usefull ffmpeg commands

General options

List codecs

ffmpeg -codecs | grep -i sub

Quiet output:

@kopilaca
kopilaca / VolumeDetect.md
Created March 6, 2024 09:17 — forked from 44213/VolumeDetect.md
Use ffmpeg to detect audio volume level. bat file included for easier interaction.

Detect the audio file volume with ffmpeg.

Require tools

  • ffmpeg: [Official site][1], [Download][2]

How to use

  1. Download ffmpeg from [link][2]
  2. Extract the ffmpeg.exe from zip package and copy to the directory contain the audio file
  3. Copy the volumeDetect.bat into the folder. (Just make sure the bat file and ffmpeg.exe are in the same directory)
  4. Doulbe click volumeDetect.bat and drag the file into the window.
  5. Press enter and get the result.

Converting audio to AAC with Fraunhofer FDK AAC (libfdk_aac) in FFmpeg

Check if you have an FFmpeg build supporting libfdk_aac

Run:

ffmpeg -hide_banner -h encoder=libfdk_aac