BrianDMG / conv2mp4

This Powershell script will recursively search through a user-defined file path and convert all videos of user-specified file types to MP4 with H264 video and AAC audio using ffmpeg. The purpose of this script is to reduce transcoding CPU load on a media server like Plex or Emby and increase video compatibility across platforms.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Prevent reencoding the same file twice.

belrpr opened this issue · comments

Hi,

is there an option to check if the file is already in the correct format?
So if I let it run on my videos it won't reconvert them the next day when I run it again.

commented

Hey, by default the script deletes the source file once it has been converted unless it fails over twice (once to handbrakeCLI, then fails there, as well), so files should not be being converted more than once. Please post an example of your log where this is happening or provide some more specific information if the script is not deleting the source files once they've been successfully converted, then re-open the issue.

It wont scan the file twice since mp4 is in not in the $fileTypes config
$fileTypes = ".mkv", ".avi", ".flv", ".mpeg", "*.ts" #Do NOT add .mp4!