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

use_out_path option not working correctly

BladeWDR opened this issue · comments

First time submitting an issue on github - please excuse any errors.

When an output path is specified in the config file, the source file is deleted but the target file never gets created due to the out_path variable having no value.

See the below log file.

image

In the conv2mp4-ps.ps1 file - line 49 reads

$cfg.out_path = $baseout_path + $fileSubDirs;

When I changed it to

$cfg.out_path = $cfg.out_path + $fileSubDirs;

It works as expected.

Great script though - thanks for your hard work! :)

commented

Good catch! Feel free to submit a PR (to develop) if you like with the fix. If not, I'll take care of it and include it in the next release. This isn't a feature I personally use, so it doesn't get as thoroughly tested as it should :)

commented

Merged your changes and a few other extras surrounding out_path to master in #62 . Let me know if anything else jumps out at you or could be improved, and thanks for contributing!