GitHub Source
Motivation:
Digital cameras and phones typically save video to MOV (Motion JPEG) files. I share my photos & videos via a self hosted open source photo gallery (zenPhoto). MOV files must be converted to a compatible format like MP4 to stream through the readily available web video players like Flowplayer.
Script features:
- Handles multiple files at once… even from different folders, e.g. when part of a file explorer search result
- Applies rotation where recognized in the EXIF metadata.
- Touches new file datestamp to be same as original.
Leverages 3rd party tools:
-
[FileMenu Tools (FMT)][4] - handy for creating a FileExplorer right mouse context menu for executing transcode on selected files - See new free approach for the Context Menu piece
- HandBrake - read something that suggested HandBrake is faster than ffmpeg and that appears true on my quick comparison
- MediaInfo - pulls the EXIF metadata to determine if any rotation is necessary
Install:
- save transcode.ps1 to a known location
- install FileMenu Tools and disable all the commands you don’t want.
- Configure a “transcode” command as shown in screenshot below… edit for your path
- updated FMT Arguments:
-Command "{path}\transcode.ps1" -list %TEMPFILEPATHS% -rotate auto
- install HandBrake and put HandBrakeCli in your path
- minimally, put MediaInfo.exe and MediaInfo.dll in your path