-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated to reflect new functionality
- Loading branch information
Showing
1 changed file
with
1 addition
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,4 @@ | ||
# conv2mp4-ps | ||
Powershell script that recursively searches through a user-defined file path and convert all videos of user-specified file types to MP4 with H264 video and AAC audio as needed using ffmpeg. If a conversion failure is detected, the script re-encodes the file with HandbrakeCLI. Upon successful encoding, Plex libraries are refreshed and source file is deleted. The purpose of this script is to reduce the amount of transcoding CPU load on a Plex server and increase video compatibility across platforms.<br><br> | ||
Python version can be found here: <a href="https://github.com/BrianDMG/conv2mp4-py">conv2mp4-py</a><br><br> | ||
<b><u>Dependencies</u></b><br> | ||
This script requires ffmpeg (ffmpeg.exe, ffprobe.exe) and Handbrake (HandbrakeCLI.exe) to be installed. You can download them from here:<br> | ||
<a href="https://ffmpeg.org/download.html">ffmpeg</a><br> | ||
<a href="https://handbrake.fr/downloads.php">Handbrake</a><br><br> | ||
<b>Usage</b><br> | ||
To use this script on a Windows computer, simply right click the file and choose "Run with Powershell". Additionally, you can run the script as a scheduled task for full automation.<br><br> | ||
<b>User-defined variables</b><br> | ||
There are several user-defined variables you will need to edit using notepad or a program like <a href="https://notepad-plus-plus.org/download/v6.9.2.html">Notepad++</a>.<br><br> | ||
<b>$mediaPath</b> = the path to the media you want to convert <i>(no trailing "\")</i><br> | ||
<u>NOTE:</u> <i>For network shares, use UNC path if you plan on running this script as a scheduled task. If running manually and using a mapped drive, you must run "net use z: \\server\share /persistent:yes" as the user you're going to run the script as (generally Administrator) prior to running the script.</i><br> | ||
<b>$fileTypes</b> = the extensions of the files you want to convert in the format "*.ex1", "*.ex2"<br> | ||
<b>$logPath</b> = path you want the log file to save to. defaults to your desktop. <i>(no trailing "\")</i><br> | ||
<b>$logName</b> = the filename of the log file<br> | ||
<b>$plexIP</b> = the IP address and port of your Plex server (for the purpose of refreshing its libraries)<br> | ||
<b>$plexToken</b> = your Plex server's token (for the purpose of refreshing its libraries).<br> | ||
<u>NOTE:</u> <i>Plex server token - See https://support.plex.tv/hc/en-us/articles/204059436-Finding-your-account-token-X-Plex-Token. Plex server token is also easy to retrieve with PlexPy, Ombi, Couchpotato, or SickRage.</i><br> | ||
<b>$ffmpegBinDir</b> = path to ffmpeg bin folder <i>(no trailing "\")</i>. This is the directory containing ffmpeg.exe and ffprobe.exe<br> | ||
<b>$handbrakeDir</b> = path to Handbrake directory <i>(no trailing "\")</i>. This is the directory containing HandBrakeCLI.exe<br> | ||
<b>$script:garbage</b> = the extensions of the files you want to delete in the format "*.ex1", "*.ex2"<br> | ||
<b>$appendLog</b> = $False will clear log at the beginning of every session, $True will append new session log to old session log | ||
<b><u>Dependencies</u></b><br>This script requires:<ul><li>PowerShell 3.0 - <a href="https://blogs.technet.microsoft.com/heyscriptingguy/2014/10/13/powertip-check-version-of-powershell/">How to check your PowerShell version</a></li><li>ffmpeg (ffmpeg.exe, ffprobe.exe) - <a href="https://ffmpeg.org/download.html">Download</a></li><li>Handbrake (HandbrakeCLI.exe) - <a href="https://handbrake.fr/downloads.php">Download</a></li></ul><b>Usage</b><ol><li>Unzip or place script files in the same directory or folder</li><li>Prior to running the script, run the interactive configuration setup utility (<i>setup_conv2mp4-ps.ps1</i>)</li><li>Run the script (<i>conv2mp4-ps.ps1</i>) either manually or as a scheduled task for full automation.</li></ol><br><b>Features</b><ul><li>Allows for full automation of video conversion on your media server</li><li>Select what media you want to convert by file path</li><li>Select what file types you want to be converted</li><li>Detailed logging allows easy tracking of what files are in the queue, overall queue progress, individual and cumulative file size gains and reductions, as well as total hours of video converted, how long it took to convert them, and the average encode speed.</li><li>Refreshes Plex libraries upon completion of each item in the queue</li><li>Garbage collection allows user-specified file types to be deleted during each execution (<i>keeps non-media files such as .nfo or thumbs.db from accumulating</i>)</li></ul> |