Skip to content

Instantly share code, notes, and snippets.

View seamonkey420's full-sized avatar
🤓
Geeking Out

seamonkey420 seamonkey420

🤓
Geeking Out
  • USA
View GitHub Profile
@seamonkey420
seamonkey420 / Add AAC Audio with FFMPEG.cmd
Last active June 14, 2025 16:05
ffmpeg script to convert main audio stream to aac while copying video and subtitles. windows cmdline based.
:: Can be integrated into explorer shell
:: and right click menus too
:: seamonkey420
:: Requirements: copy ffmpeg to c:\windows\system32
:: env variables needed to parse spaces in file paths!
:: pick one of the below sets of code, top replaces all audio with an ac3 one
:: bottom adds an ac3 stream and retains everything else, video, subs, audio.
setlocal EnableExtensions DisableDelayedExpansion
@seamonkey420
seamonkey420 / OSMC GPIO NESPi Case Script Install.txt
Last active December 11, 2024 00:42
Rerns OSMC GPIO button service (customized for NESPi Case and OSMC by seamonkey420)
#1. Install RPi.GPIO. Open up Putty and run these commands:
sudo su
apt-get update
apt-get install python-pip python-dev gcc
apt-get install python-setuptools
pip install rpi.gpio
#1a. Enable root to make things easier, you can disable afterwards, type and then enter a root password:
sudo passwd
@jamesmacwhite
jamesmacwhite / ffmpeg_mkv_mp4_conversion.md
Last active September 27, 2025 00:07
Easy way to convert MKV to MP4 with ffmpeg

Converting mkv to mp4 with ffmpeg

Essentially just copy the existing video and audio stream as is into a new container, no funny business!

The easiest way to "convert" MKV to MP4, is to copy the existing video and audio streams and place them into a new container. This avoids any encoding task and hence no quality will be lost, it is also a fairly quick process and requires very little CPU power. The main factor is disk read/write speed.

With ffmpeg this can be achieved with -c copy. Older examples may use -vcodec copy -acodec copy which does the same thing.

These examples assume ffmpeg is in your PATH. If not just substitute with the full path to your ffmpeg binary.

Single file conversion example