Tested on Windows 10.
Converts various videos of your choice with ffmpeg. You can change this line if you wish
another type of conversion or configuration for your videos:
ffmpeg -i "$file" -c:v libx264 -c:a copy "$output"
Leave "$file" and "$output" as is.
For more information see ffmpeg docs: link
ffmpeg needs to be installed on your computer.
- Download ffmpeg.
- Unzip ffmpeg.
- Copy all the files from bin to a folder of your choice.
- Add bin to your Path environment variables.
For this script to work, as PowerShell might be quite strict with some scripts, you need to activate this first:
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
And to deactivate it once you're done:
Set-ExecutionPolicy Restricted -Scope CurrentUser
- It will ask if you are in the correct folder (answer with Y or N). If not, write your path and it will automatically change to the one you choose.
- It will ask if this configuration is correct, choose [1] or [2].
- It will ask you to input a filename. It will ask for every file in this path.
- If you don't want my default conversion, open this file with any text editor and change it. See point About the project for ffmpeg docs.
- If you want to cancel it, press CTRL+C.
Example:
- You're in C:\Downloads but your videos are in G:\Downloads\Movies, so when prompted answer with N
- Write G:\Downloads\Movies
- It will ask again. You're in G:\Downloads\Movies, so this time answer with Y
- Answer 2 when prompted asking about the configuration.
- Write movie01.mp4 and it will convert MyMovie.mkv to movie01.mp4
- For any remaining files, it will repeat the last point.