Could use some help with my script
Posted: January 27th, 2017, 12:27 pm
Started working on my first post processing script yesterday and I'm a bit stuck. I'll share my setup to give some background context. I'm running a plex server on windows 10, with couchpotato and sonarr. For a while I had plex doing the transcoding, but as most of you probably know, it saves the transcoded file in a plex versions folder, resulting in 2 videos. As such, I'm using up a lot of unnecessary hard drive space (13TB/16TB, thinking I can probably half that).
So, I started looking into automating with handbrake and kept coming across Don Melton's vidoe-transcoding tool (Apparently only established users can post links, so you'll have to google it). Figured I'll try and set my post processing script up with it. I got the repo setup fine, and ran a couple test inside of powershell, everything is working. Last night I spent a couple hours messing around with post processing script. Started out with a batch file and realized that it's very powerful, so I've switched to a python file. I'm running python 3.5.6.
Since couchpotato and sonarr handle moving/renaming the files, all I really want to do is run the media through a simple "transcode-video --mp4 [video-file]" command, and let everything else remain the same.
sabnzd logs
So I looked at some other scripts and thought I should try this instead
sabnzd logs
That was around 2am last night, so I decided to go to sleep. So, any help will be much appreciated. Thanks.
So, I started looking into automating with handbrake and kept coming across Don Melton's vidoe-transcoding tool (Apparently only established users can post links, so you'll have to google it). Figured I'll try and set my post processing script up with it. I got the repo setup fine, and ran a couple test inside of powershell, everything is working. Last night I spent a couple hours messing around with post processing script. Started out with a batch file and realized that it's very powerful, so I've switched to a python file. I'm running python 3.5.6.
Since couchpotato and sonarr handle moving/renaming the files, all I really want to do is run the media through a simple "transcode-video --mp4 [video-file]" command, and let everything else remain the same.
- couchpotato/sonarr/manual download kicked off
download & unpack completes
transcode-video runs
sabnzbd puts transcoded video in download folder
couchpotato/sonarr handle move/rename
Code: Select all
os.system("transcode-video --mp4 sys.argv[1]")
Code: Select all
'transcode-video' is not recognized as an internal or external command, operable program or batch file.
Code: Select all
transcode_cmd = "C:/Ruby22/bin/transcode-video"
file = sys.argv[1]
subprocess.run([transcode_cmd, '--mp4', file], stdout=subprocess.PIPE, shell=True)
Code: Select all
C:/Ruby22/bin/transcode-video: HandBrakeCLI not available