Use PS/FFMPEG To Bulk Rotate Movies

Description:

So I have this certain family member that always seems to record videos 90 degrees clockwise and it drives me crazy when trying to import them into Plex. I tried various software to rotate the videos and nothing could do it in bulk without paying. So I hacked together the following solution using Powershell and FFMPEG.

Example: I want to bulk rotate (90 degrees COUNTERclockwise) the following files “c:\temp\vid.mp4″,”c:\temp\vid2.mp4”, and “c:\temp\vid3.mp4”
NOTE: This assumes you have the ffmpeg executable at c:\temp\ffmpeg\bin\ffmpeg.exe.

To Resolve:

1.Get a video file from somewhere and copy it three times to c:\temp where the ffmpeg folder lies. Rename to match above (vid.mp4, vid2.mp4, and vid3.mp4).

2. Create a file called “files.txt” in C:\temp and paste the following:

3. Create four files in C:\temp called run.bat, run.ps1, run2.bat, and run.ps1. For the .bat files, just copy, paste, save, and close the following:

4. For run.ps1, copy and paste the following:

5. For run2.ps1, copy and paste the following:

6. That’s it! When you want to bulk rotate movies, you just have to:

6a. Edit the original files.txt and put in the full path of the movies you want to rotate.

6b. Double click run.bat to launch the first powershell script. It will dump a file to the given directory called “FilesToProcess.txt”. This file is simply a command that will be ran using FFMPEG in the next script for each video file.

6c. Double click run2.bat and it will launch separate processes to bulk rotate your videos.