Skip to content

Instantly share code, notes, and snippets.

View seamonkey420's full-sized avatar

seamonkey420 seamonkey420

  • USA
View GitHub Profile
@seamonkey420
seamonkey420 / submenu context example.reg
Last active January 26, 2025 03:28
Example registry file for creating Windows context menu item with submenu and seperators (see comment for notes/explanations)
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\*\shell\Media Tools]
"MUIVerb"="Media Tools"
"icon"="\"C:\\Users\\USERNAME\\Scripts\\ffmpeg-32.ico\""
"SubCommands"="InstDbg1;InstDbg2;InstDbg3;InstDbg4;InstDbg5;InstDbg6;InstDbg7"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\InstDbg1]
@=""
@seamonkey420
seamonkey420 / Extract and Add AC3 Audio.cmd
Created January 25, 2025 03:47
Extract and Add AC3 audio stream
:: Extract main audio track as AC3 for mkvtoolnix adding
:: Opens mvktoolnix with original mkv file to then add ac3 manually
:: Recommended: create Scripts folder in your user folder and then copy MKVToolnix portable there
:: This will retain all original video/audio/subtitle streams and make ac3 versions of
:: all audiostreams in mka form and then open mkvtoolnix with said files to then multiplex.
:: seamonkey420
:: 1/14/2025
::------------
setlocal EnableExtensions DisableDelayedExpansion
@seamonkey420
seamonkey420 / FFMPEG - convert audio to aac.cmd
Created January 1, 2025 20:49
FFMPEG - Convert audio to aac
:: below will encode audio as AAC (nice for eac3 audio tracks!)
:: move ffmpmeg to c:\windows\system32
::----------------------------------------
setlocal EnableExtensions DisableDelayedExpansion
::get filename and extensions as variables
set _name=%~n1
set _ext=%~x1
ffmpeg -i "%_name%%_ext%" -map 0:v -c:v copy -map 0:a -c:a aac -ac 6 -b:a 640k -map 0:s? -c:s copy "%_name%.NEW%_ext%"
@seamonkey420
seamonkey420 / FFMPEG - Add AC3 audiostream.cmd
Last active January 25, 2025 04:12
OLD - FFMPEG - Add AC3 audio stream while keeping original video, audio, subtitles
:: below command will retain original audio stream and then create 2nd stream encoded in ac3
:: move ffmpmeg to c:\windows\system32
:: -vf "crop=trunc(iw/2)*2:trunc(ih/2)*2" command added to avoid errors with cropping
:: this will retain all prev audio streams and just add a new ac3 stream (converts first audio stream to ac3)
::
:: THIS does take a LONG TIME and would not recommend this method, use my extract audio as ac3 for fastest way!
:: Also my mapping may be messed up on this one too, def test on test files first!
::----------------------------------------
setlocal EnableExtensions DisableDelayedExpansion
::get filename and extensions as variables
@seamonkey420
seamonkey420 / ffmpeg-common-command-examples.txt
Last active December 11, 2024 00:43
FFMPEG Example Commands
:: Dec 2024, Seamonkey420
:: This is just a note for myself on some common ffmpeg commands i use for scripting.
:: Used in my .cmd/.bat script files on mkv files.
:: change %~1 to a proper variable, otherwise you can add commands to a batch file and then drag files to file to run!
:: add this to top of batch files!!:
:: setlocal EnableExtensions DisableDelayedExpansion
::-----------------------------------------------------
::Convert original audio streams to AAC 6 Channel, retains original video and subtitles streams
@seamonkey420
seamonkey420 / movTomp4.txt
Created October 20, 2024 21:06
MOV to MP4 with FFMPEG examples
:: Examples of converting mov to mp4 via ffmpeg
:: near lossless (visually)
ffmpeg -i input.mov -crf 18 output.mp4
:: lossless (huge file sizes)
ffmpeg -i input.mov -crf 0 output.mp4
:: compatibility (possible washout of colors though!)
ffmpeg -i input.mov -crf 18 -vf format=yuv420p output.mp4
@seamonkey420
seamonkey420 / YB1-X90FL-Android7.txt
Last active October 17, 2024 00:59
Lenovo Yoga Book YB1-X90L Android 7.1.1 update notes
Yoga Android 7.1.1 update notes!
Models: YB1-X90F and YB1-X90L (LTE needs to be added back, not covered here)
seamonkey420
created: 9/21/2024
updated: 10/16/2024
Wait to plug in yoga to pc!
Pre-req work:
@seamonkey420
seamonkey420 / docker-compose.yml
Created August 29, 2024 02:15
Wirepod for Synology NAS Docker. Proper compose file that will use host network.
version: "2.1"
services:
wirepod:
container_name: wirepod
image: thecrystalcross/wirepod-server:latest
hostname: escapepod
ports:
- 8080:8080
labels:
- "traefik.enable=true"
@seamonkey420
seamonkey420 / convert-all-avi-to-mp4.cmd
Created July 23, 2024 01:15
FFMPEG - convert all avi in folder or sub folders to mp4
for %%a in (*.avi) do ffmpeg -fflags +genpts -i "%%a" -c copy -map 0 "%%a.mp4"
pause
@seamonkey420
seamonkey420 / FFMPEG - English subtitles via command prompt
Last active January 1, 2025 20:44
FFMPEG - Keep only english subtitles via command prompt
:: Meant to be called by a context menu item or can drag and drop movies on .cmd/.bat file with commands
:: This will use ffmpeg to retain original video and audio streams (ie very fast, full quality retained) of a mkv file
:: and remove all subtitles or just english ones.
::
:: if you want to use command on its own, use command below and replace filename with file name
:: ffmpeg -i "filename -map 0:v -c:v copy -map 0:a -c:a copy -map 0:m:language:eng -c:s copy "%filename.new"
:: Be sure to delete or comment out (using ::) the command you dont plan to use!!
setlocal EnableExtensions DisableDelayedExpansion