Skip to content

Commit

Permalink
v3.1
Browse files Browse the repository at this point in the history
* Addressed Issue #19 : Added a toggle for Plex features so it can be
turned on or off (by setting $usePlex to $True or $False in the cfg
file)
* Addressed Issue #22 : Special characters in file names are ignored and
working properly now
* Added a description for each ffmpeg and HandbrakeCLI argument within
the script. Hopefully this will make it easier for those wishing to
customize encoding parameters.
* Since an option was added to the cfg file, make sure you don't delete
the new $usePlex variable if you copy your old settings over. Using a
text diff/merge tool (like WinMerge) is recommended.
  • Loading branch information
BrianDMG committed Oct 21, 2017
1 parent dbaab0e commit f913f0a
Show file tree
Hide file tree
Showing 3 changed files with 906 additions and 992 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# conv2mp4-ps
Powershell script that recursively searches through a user-defined file path (<i>or paths</i>) and convert all videos of user-specified file types to <b>MP4</b> with <b>H264</b> video and <b>AAC</b> 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>
Powershell script that recursively searches through a user-defined file path (<i>or paths</i>) and convert all videos of user-specified file types to <b>MP4</b> with <b>H264</b> video and <b>AAC</b> 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 (optionally) refreshed and source file is deleted. The purpose of this script is to reduce the amount of transcoding CPU load on a Plex, Emby, or Kodi 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 (<i>ffmpeg.exe, ffprobe.exe</i>) and Handbrake (<i>HandbrakeCLI.exe</i>) to be installed. You can download them from here:<br>
Expand All @@ -17,6 +17,7 @@ There are several user-defined variables you will need to edit using notepad or
<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>$usePlex</b> = If set to $True, Plex settings will be used. Set to $False if Plex feature is not needed<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>
Expand Down
4 changes: 3 additions & 1 deletion cfg_conv2mp4-ps.ps1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<#======================================================================================================================
cfg_conv2mp4-ps v2.9 RELEASE - https://github.com/BrianDMG/conv2mp4-ps
cfg_conv2mp4-ps v3.1 RELEASE - https://github.com/BrianDMG/conv2mp4-ps
This script stores user-defined variables for use by conv2mp4-ps.ps1.
========================================================================================================================
Dependencies:
Expand All @@ -17,6 +17,7 @@ NOTE: For network shares, use UNC path if you plan on running this script as a s
$fileTypes = the extensions of the files you want to convert in the format "*.ex1", "*.ex2". Do NOT add .mp4!
$logPath = path you want the log file to save to. defaults to your desktop. (no trailing "\")
$logName = the filename of the log file
$usePlex = If set to $True, Plex settings will be used. Set to $False if Plex feature is not needed
$plexIP = the IP address and port of your Plex server (for the purpose of refreshing its libraries)
$plexToken = your Plex server's token (for the purpose of refreshing its libraries).
NOTE: Plex server token - See https://support.plex.tv/hc/en-us/articles/204059436-Finding-your-account-token-X-Plex-Token
Expand All @@ -34,6 +35,7 @@ $mediaPath = "\\your\path\here"
$fileTypes = "*.mkv", "*.avi", "*.flv", "*.mpeg", "*.ts" #Do NOT add .mp4!
$logPath = "$PSScriptRoot"
$logName= "conv2mp4-ps.log"
$usePlex = $True
$plexIP = 'plexip:32400'
$plexToken = 'plextoken'
$ffmpegBinDir = "C:\ffmpeg\bin"
Expand Down
Loading

0 comments on commit f913f0a

Please sign in to comment.