From d2beee4be54c2eb44cbe696a9e0e96f50845c11d Mon Sep 17 00:00:00 2001 From: zombie Date: Mon, 2 Jan 2023 01:26:03 -0500 Subject: [PATCH] add stuff --- README.md | 50 ++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 48 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f19dc17..e1a6b61 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,55 @@ -# zombie_transcoding_scripts +zombie_transcoding_scripts +========================== scripts that i might need later for transcoding -# Common Transcoding commands +Common Transcoding commands +--------------------------- ``` penis ``` + +### Transcode input to av1 and transcode the audio aswell (used for teen titans) +``` +#!/bin/bash +#script written by logan but typed by zombie +#optimezed for teentitans +for i in *mkv; do + av1an -i "$i" -o av1/"$(basename "$i")" -e aom -c mkvmerge --passes=2 -v "--threads=2 --cpu-used=5 --end-usage=q --cq-level=24 --enable-fwd-kf=1 --aq-mode=1 --lag-in-frames=48 --bit-depth=10 --kf-max-dist=240 --kf-min-dist=12 --enable-qm=1 --sb-size=64 --enable-keyframe-filtering=2 --arnr-strength=2 --arnr-maxframes=3 --sharpness=1 --enable-dnl-denoising=0 --denoise-noise-level=5" -a "-c:a libopus -b:a:0 128k -af aformat=channel_layouts='7.1|5.1|stereo'" --chunk-order random -m lsmash -r +done +``` +for the one above it will transcode ALL the audio tracks so you might want to delete some unnessicary ones +like with teentitans there was a lossless track and a lossy one and i wanted to only transcode and keep the lossless one +so i use +``` +for i in *mkv; do mkvmerge -o "$(basename "$i").balls" --audio-tracks 1 "$i"; done +``` +to delete the unwanted tracks +you can use the `mkvinfo` command to get the track you want to remove + +#### this one doesnt transcode the audio +``` +#!/bin/bash +#script written by logan but typed by zombie + +for i in *mkv; do + av1an -i "$i" -o av1/"$(basename "$i")" -e aom -c mkvmerge --passes=2 -v "--threads=2 --cpu-used=5 --end-usage=q --cq-level=24 --enable-fwd-kf=1 --aq-mode=1 --lag-in-frames=48 --bit-depth=10 --kf-max-dist=240 --kf-min-dist=12 --enable-qm=1 --sb-size=64 --enable-keyframe-filtering=2 --arnr-strength=2 --arnr-maxframes=3 --sharpness=1 --enable-dnl-denoising=0 --denoise-noise-level=5" --chunk-order random -m lsmash -r +done +``` + +### Transcode input to h264 and not audio (classic zombie crap version for playing on phone) +``` +# create the h264 directory if it doesn't already exist +mkdir -p h264 + +# loop through all .mkv files in the current directory +for file in *.mkv; do + # run the ffmpeg command on the current file + ffmpeg -i "$file" -s 960x540 -c:v libx264 -preset veryslow -crf 30 -c:a copy "h264/${file%.*}.mkv" +done +``` +#### single file version +``` +ffmpeg -i Teen\ Titans\ S04E11.mkv -s 960x540 -c:v libx264 -preset veryslow -crf 30 -c:a copy output540pveryslow30ep11kleiner.mkv +```