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

Doesn't grab file size after encoding handbrake

Hazado opened this issue · comments

Will fail after encoding with Handbrake because the file size is still set for the when it failed during ffmpeg.exe encoding.

Below is code to fix it.

<#----------------------------------------------------------------------------------
Begin Handbrake encode (lossy)
----------------------------------------------------------------------------------#>
EncodeHandbrake
$fileOld = Get-Item $oldFile
$fileNew = Get-Item $newFile
commented

Good catch, this will be addressed in the next release. Thanks!