changeset 29:41bf22504479

add remuxaudio.py
author Paper <mrpapersonic@gmail.com>
date Mon, 31 May 2021 13:02:36 -0400
parents 30e203432cd7
children 6f784c5d13ce
files README.md remuxaudio.py
diffstat 2 files changed, 16 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/README.md	Sat May 29 10:38:10 2021 -0400
+++ b/README.md	Mon May 31 13:02:36 2021 -0400
@@ -24,10 +24,15 @@
 ### python3path.bat
 a batch script to put python3 in the path. made this cause my friend didn't know how paths worked
 
+### remuxaudio.py
+originally made cause i was pissy over some mkv files having thumbnails and different defaults from what i liked<br>
+could've probably been made in batch but whatever, it was easier to do in python lmao
+
 ### rename.py
 originally created for lucky star, this gets a ton of episode names (or whatever) from a list and renames files accordingly<br>
 made this mainly cause i'm lazy and don't want to do manual renaming
 
+
 ### tenormoment.bat
 another batch script that was made primarily to spam the ytpmv tag on tenor. it makes gifs of every 5 seconds of a given video file.<br>~~it is extremely unorganized, i might remake it later and remove the debug option that stands no purpose~~ done
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/remuxaudio.py	Mon May 31 13:02:36 2021 -0400
@@ -0,0 +1,11 @@
+import os, sys
+
+count = 0
+for path, folder, files in os.walk("./"):
+    for file in files:
+        if file.endswith('.mkv'):
+            count += 1
+            file_mod = file[:len(file) - 15]
+            file_mod = f'KIZNAIVER - {count:02} [{file_mod[7:]}]'
+            os.system(f'mkvmerge -o "output\{file_mod}.mkv" --audio-tracks 2 --subtitle-tracks 6 "{file}"')
+            os.system(f'mkvpropedit --delete-attachment mime-type:image/jpeg "output\{file_mod}.mkv"')
\ No newline at end of file