my use is as follows.
edit: what i want the .bat to do is to "scan" the files, in this case, .mkv, looking for streams (if there's more than a video stream and an audio stream you might need a matroska file). if you have an audio stream and an video stream, let's change the files as there's no reason to use matroska.
Currently i have 10 seasons of a tv show that i personally ripped from my own dvds, and they are in .mkv format. BUT inside the .mkv there's only video and audio, the subtitles are seperate.
the only reason i want to change .mkv to .mp4 is that plex can't use .mkv.
current code i have to remove meta data on all .XXX in the folder:
if not exist "%~dp1_temp" ( goto foldercreate ) else ( goto continue )
:foldercreate echo. echo Created temp folder. echo - mkdir _temp attrib _temp +h set errorlevel= :continue for %%f in (*%~x1) do ( title Fixing %%f... move "%%f" _temp >nul echo Currently fixing %%f... ffmpeg -xerror -hide_banner -i "%~dp1_temp%%f" -map_metadata -1 -codec copy -map 0 "%~dp1%%f" -loglevel warning -stats if %errorlevel% neq 0 ( pause ) del "%~dp1_temp%%f" echo - ) if %errorlevel% neq 0 ( echo FFmpeg errored... pause ) echo All done! removing temp dir... rmdir _temp /S /Q timeout /t 2 /nobreak>nul
:eof
Edit: i am a bit drunk so if the thing doesn't make sense, please PM...
Aucun commentaire:
Enregistrer un commentaire