Extract subtitles from all MP4 files as SRT (coming soon..)

This is script will search for all .mp4 files, and extract the subtitles and save it as a .srt-file in the same location as the original file.

I'm having some difficulties with language automation, making the script able to ask the user for prefered language, and then strip the subtitles in that language.

It works perfect if there's only one subtitle in the file, but that aint good enough :-)



The video converter script (using MediaInfoCLI and HandBrake)

Also called "The Ultimate Google Chromecast Video Converter Script"
.. yeah, i haven't found a shorter name for it.

This is proberly my first PowerShell script longer than 20-25 lines.





This script has 2 requirements, before its able to run:

1) HandBrake Nightly must be installed, and located on
"C:\Program Files\HandBrake Nightly"
2) MediaInfoCLI must be installed, and located on
"C:\MediaInfoCLI"
Links are at the bottom



Download the script (.ps1)



Link to HandBrake's website (make sure you download the Nightly build and the CLI file)
Link to MediaInfo's website (make sure you download the CLI interface)



UNRAR EVERYTHING !!

This script will look for all .RAR files in a user defined location, and then unpack all of them. When the unpacking is finished, it will delete all the .RAR files and all other remaining files (like .r01, .r02, .r03 and such)

You can remove the delete feature if you like. There is no "fail safe" incase the unpacking fails. It will still delete the .RAR-files, so use carefully. I have tested succesfully, but i can't garantee you will experience the same.


This script has 1 requirement
WinRAR must be installed on location "C:\Program Files\WinRAR"

Please note, this only unpacks .RAR files - not .zip, .tar.gz or .7z files



Download the script (.ps1)



Link to WinRAR's website



Memory Overload/Leak on computers running for months/years

A few years back i ran into some memory issues on my server forcing me to restart it every 4-5 days, due to memory leak from all kinds of processes.

I did a lot of research using Windows Performance Toolkit, and did all sort of troubleshooting.

But as soon as i started to troubleshoot, the memory leak "disappeared" for a reason, that i am not able to explain - because im not quite sure i understand it myself.

But this line, which actually just generates a report of the current memory usage, also checks blocks for load/usage. Files that haven't been accessed by any proccesses, or memory of process loop, will be flushed immediately.

xperf -on ReferenceSet -BufferSize 1024 -MaxFile 512 -FileMode Circular && timeout 5 && xperf -d MemUsage.etl
(In case you wonder, it's supposed to be on 1 line)

You can just paste this into "Run", or you can download my .bat file. The .bat solution also deletes the report afterwards, because after some time, i stopped reading them and they do take up some MB's.

Due to differences in servers, please test this in a enviroment that is not in production and can be restarted safely.

This script has 1 requirement:
Windows Performance Toolkit - part of Windows Assessment and Deployment Kit (ADK)


Download the script (.bat)


Link to Windows ADK