{"action":"created","issue":{"url":"https://api.github.com/repos/clinton-hall/nzbToMedia/issues/860","labels_url":"https://api.github.com/repos/clinton-hall/nzbToMedia/issues/860/labels{/name}","comments_url":"https://api.github.com/repos/clinton-hall/nzbToMedia/issues/860/comments","events_url":"https://api.github.com/repos/clinton-hall/nzbToMedia/issues/860/events","html_url":"https://github.com/clinton-hall/nzbToMedia/issues/860","id":113085373,"number":860,"title":"Problems with Transcoding, Moving, and Renaming for Couch Potato","user":{"login":"bakka5","id":15269232,"avatar_url":"https://avatars.githubusercontent.com/u/15269232?v=3","gravatar_id":"","url":"https://api.github.com/users/bakka5","html_url":"https://github.com/bakka5","followers_url":"https://api.github.com/users/bakka5/followers","following_url":"https://api.github.com/users/bakka5/following{/other_user}","gists_url":"https://api.github.com/users/bakka5/gists{/gist_id}","starred_url":"https://api.github.com/users/bakka5/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bakka5/subscriptions","organizations_url":"https://api.github.com/users/bakka5/orgs","repos_url":"https://api.github.com/users/bakka5/repos","events_url":"https://api.github.com/users/bakka5/events{/privacy}","received_events_url":"https://api.github.com/users/bakka5/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/clinton-hall/nzbToMedia/labels/BUG","name":"BUG","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2015-10-23T19:32:20Z","updated_at":"2015-10-28T17:57:41Z","closed_at":null,"body":"Hello,\r\n\r\nI am currently having issues with the trancoding portion. I previously had this working partly as it would transcode but would not rename properly when the files were moved to Couch Potato. I did not change any settings but now nothing is working accurately. I will be attaching a copy of the script as well as a screen shot of my Couch Potato settings for review. I have been working at getting this to work for a few months to no avail. Also I am trying to do two instances of Couch Potato where one is for 3d movies and one is for non 3d so I need it to be able to work for both if that is possible. I also removed the api key's from the scripts and settings below for security purposes. They are in the actual script and settings when they are running. \r\n\r\n\r\n\r\n\r\n# nzbToMedia Configuration\r\n\r\n[General]\r\n    # Enable/Disable update notifications\r\n    version_notify = 1\r\n    # Enable/Disable automatic updates\r\n    auto_update = 0\r\n    # Set to the full path to the git executable\r\n    git_path = \"\"\r\n    # GitHUB user for repo\r\n    git_user = \"\"\r\n    # GitHUB branch for repo\r\n    git_branch = \"\"\r\n    # Enable/Disable forceful cleaning of leftover files following postprocess \r\n    force_clean = 1\r\n    # Enable/Disable logging debug messages to nzbtomedia.log\r\n    log_debug = 1\r\n    # Enable/Disable logging database messages to nzbtomedia.log\r\n    log_db = 0\r\n    # Enable/Disable logging environment variables to debug nzbtomedia.log (helpful to track down errors calling external tools.)\r\n    log_env = 0\r\n    # Enable/Disable logging git output to debug nzbtomedia.log (helpful to track down update failures.)\r\n    log_git = 0\r\n    # Set to the directory where your ffmpeg/ffprobe executables are located\r\n    ffmpeg_path = G:\\ffmpeg\\bin\r\n    # Enable/Disable media file checking using ffprobe.\r\n    check_media = 1\r\n    # Enable/Disable a safety check to ensure we don't process all downloads in the default_downloadDirectories by mistake.\r\n    safe_mode = 1\r\n\r\n\r\n[CouchPotato]\r\n    #### autoProcessing for Movies\r\n    #### movie - category that gets called for post-processing with CPS\r\n    [[movie]]\r\n        enabled = 1\r\n        apikey = \r\n        host = localhost\r\n        port = 7070\r\n        ###### ADVANCED USE - ONLY EDIT IF YOU KNOW WHAT YOU'RE DOING ######\r\n        ssl = 0\r\n        web_root = \"\"\r\n        # Enable/Disable linking for Torrents\r\n        Torrent_NoLink = 0\r\n        method = renamer\r\n        delete_failed = 1\r\n        wait_for = 2\r\n        extract = 1\r\n        # Set this to minimum required size to consider a media file valid (in MB)\r\n        minSize = 0\r\n        # Enable/Disable deleteing ignored files (samples and invalid media files)\r\n        delete_ignored = 1\r\n        ##### Enable if Couchpotato is on a remote server for this category\r\n        remote_path = 0\r\n        ##### Set to path where download client places completed downloads locally for this category\r\n        watch_dir = \"\"\r\n    [[3d movie]]\r\n        enabled = 1\r\n        apikey = \r\n        host = localhost\r\n        port = 7071\r\n        ssl = 0\r\n        web_root = \"\"\r\n        Torrent_NoLink = 0\r\n        method = renamer\r\n        delete_failed = 1\r\n        wait_for = 2\r\n        extract = 1\r\n        minSize = 0\r\n        delete_ignored = 1\r\n        remote_path = 0\r\n        watch_dir = \"\"\r\n\r\n\r\n\r\n[Nzb]\r\n    ###### clientAgent - Supported clients: sabnzbd, nzbget\r\n    clientAgent = sabnzbd\r\n    ###### SabNZBD (You must edit this if your using nzbToMedia.py with SabNZBD)\r\n    sabnzbd_host = localhost\r\n    sabnzbd_port = 8080\r\n    sabnzbd_apikey = \"\"\r\n    ###### Enter the default path to your default download directory (non-category downloads). this directory is protected by safe_mode.\r\n    default_downloadDirectory = \"\"\r\n\r\n\r\n\r\n[Extensions]\r\n    compressedExtensions = .zip, .rar, .7z, .gz, .bz, .tar, .arj, .1, .01, .001\r\n    mediaExtensions = .mkv, .avi, .divx, .xvid, .mov, .wmv, .mp4, .mpg, .mpeg, .vob, .iso, .m4v\r\n    audioExtensions = .mp3, .aac, .ogg, .ape, .m4a, .asf, .wma, .flac\r\n    metaExtensions = .nfo, .sub, .srt, .jpg, .gif\r\n\r\n\r\n[Transcoder]\r\n    # getsubs. enable to download subtitles.\r\n    getSubs = 0\r\n    # subLanguages. create a list of languages in the order you want them in your subtitles. \r\n    subLanguages = eng, spa, fra\r\n    # transcode. enable to use transcoder\r\n    transcode = 1\r\n    ###### duplicate =1 will cretae a new file. =0 will replace the original\r\n    duplicate = 0\r\n    # concat. joins cd1 cd2 etc into a single video.\r\n    concat = 1\r\n    ignoreExtensions = .mp4\r\n    # outputFastStart. 1 will use -movflags + faststart. 0 will disable this from being used.\r\n    outputFastStart = 0\r\n    # outputQualityPercent. used as -q:a value. 0 will disable this from being used.\r\n    outputQualityPercent = 0\r\n    # outputVideoPath. Set path you want transcoded videos moved to. Leave blank to disable.\r\n    outputVideoPath = \"\"\r\n    # processOutput. 1 will send the outputVideoPath to SickBeard/CouchPotato. 0 will send original files.\r\n    processOutput = 0\r\n    # audioLanguage. set the 3 letter language code you want as your primary audio track.\r\n    audioLanguage = eng\r\n    # allAudioLanguages. 1 will keep all audio tracks (uses AudioCodec3) where available.\r\n    allAudioLanguages = 0\r\n    # allSubLanguages. 1 will keep all exisiting sub languages. 0 will discare those not in your list above.\r\n    allSubLanguages = 0\r\n    # embedSubs. 1 will embded external sub/srt subs into your video if this is supported.\r\n    embedSubs = 0\r\n    # burnInSubtitle. burns the default sub language into your video (needed for players that don't support subs)\r\n    burnInSubtitle = 0\r\n    # extractSubs. 1 will extract subs from the video file and save these as external srt files.\r\n    extractSubs = 0\r\n    # externalSubDir. set the directory where subs should be saved (if not the same directory as the video)\r\n    externalSubDir = \"\"\r\n    # hwAccel. 1 will set ffmpeg to enable hardware acceleration (this requires a recent ffmpeg)\r\n    hwAccel = 1\r\n    # generalOptions. Enter your additional ffmpeg options here with commas to separate each option/value (i.e replace spaces with commas).\r\n    generalOptions = \"\"\r\n    # outputDefault. Loads default configs for the selected device. The remaining options below are ignored.\r\n    # If you want to use your own profile, leave this blank and set the remaining options below.\r\n    # outputDefault profiles allowed: iPad, iPad-1080p, iPad-720p, Apple-TV2, iPod, iPhone, PS3, xbox, Roku-1080p, Roku-720p, Roku-480p, mkv, mp4-scene-release\r\n    outputDefault = Roku-1080p\r\n    #### Define custom settings below.\r\n    outputVideoExtension = .mp4\r\n    outputVideoCodec = libx264\r\n    VideoCodecAllow = \"\"\r\n    outputVideoPreset = medium\r\n    outputVideoResolution = 1920:1080\r\n    outputVideoFramerate = 24\r\n    outputVideoBitrate = 800000\r\n    outputVideoCRF = 19\r\n    outputVideoLevel = 3.1\r\n    outputAudioCodec = ac3\r\n    AudioCodecAllow = \"\"\r\n    outputAudioChannels = 6\r\n    outputAudioBitrate = 640k\r\n    outputAudioTrack2Codec = libfdk_aac\r\n    AudioCodec2Allow = \"\"\r\n    outputAudioTrack2Channels = 2\r\n    outputAudioTrack2Bitrate = 128000\r\n    outputAudioOtherCodec = libmp3lame\r\n    AudioOtherCodecAllow = \"\"\r\n    outputAudioOtherChannels = \"\"\r\n    outputAudioOtherBitrate = 128000\r\n    outputSubtitleCodec = mov_text\r\n\r\n\r\n    \r\n#  Couch Potato Configuration Settings for Rename\r\n\r\n\r\nRun Every 0\r\nDetect movie status every X minutes.\r\n\r\nTo\r\n\r\nG:\\Users\\dj\\Downloads\\movie\\\r\nDefault folder where the movies are moved/copied/linked to.\r\nMovie\r\n\r\nG:\\Users\\dj\\Downloads\\movie\\\r\nFolder Naming\r\n\r\n<thename>  (<year>)\r\n\r\nName of the folder. Keep empty for no folder.\r\nFile Naming\r\n\r\n<thename> (<year>) <quality> <video> <audio_channels>Ch.<ext>\r\n\r\nName of the file\r\nClean Name\r\n\r\nAttempt to clean up double separaters due to missing data for fields.\r\nUnrar\r\n\r\nExtract rar files if found.\r\nUnrar Path\r\n\r\nCustom path to unrar bin\r\nUnrar Modify_date\r\n\r\nSet modify date of unrar-ed files to the rar-file's date.\r\nCleanup\r\n\r\nCleanup leftover files after successful rename.\r\nFrom\r\n\r\nG:\\Users\\dj\\Downloads\\complete\\movie\\\r\nFolder where CP searches for movies.\r\nForce Every\r\n\r\n1\r\nForces the renamer to scan every X hours\r\nNext On_failed\r\n\r\nTry the next best release for a movie after a download failed.\r\nMove Leftover\r\n\r\nMove all leftover file after renaming, to the movie folder.\r\nFile-Separator\r\n\r\nReplace all the spaces with a character.\r\nFolder-Separator\r\n\r\nReplace all the spaces with a character.\r\nCheck Space\r\n\r\nCheck if there's enough available space to rename the filesDisable when the filesystem doesn't return the proper value\r\nDefault File Action\r\n\r\nLink, Copy or Move after download completed.\r\nTorrent File Action\r\n\r\nSee above. It is prefered to use link when downloading torrents as it will save you space, while still being able to seed.\r\nNTFS Permission\r\n\r\nSet permission of moved files to that of destination folder (Windows NTFS only).\r\n\r\n\r\n\r\n\r\n# sabnzbd script \r\n\r\n[15:05:44] [INFO]::MAIN: Loading config from [G:\\Scripts\\autoProcessMedia.cfg]\r\n[15:05:44] [INFO]::MAIN: Checking database structure...\r\n[15:05:44] [DEBUG]::MAIN: Checking Initial Schema database upgrade\r\n[15:05:44] [DEBUG]::MAIN: InitialSchema upgrade not required\r\n[15:05:44] [INFO]::MAIN: Checking if source needs an update\r\n[15:05:46] [DEBUG]::MAIN: cur_commit = None % (newest_commit)= 1cd64053b0da1d351bb6af392e1ebb904c6b6ce2, num_commits_behind = 0\r\n[15:05:46] [ERROR]::MAIN: Unknown current version number, don't know if we should update or not\r\n[15:05:46] [INFO]::MAIN: nzbToMedia Version:10.12 Branch:master (Windows 7)\r\n[15:05:46] [INFO]::MAIN: #########################################################\r\n[15:05:46] [INFO]::MAIN: ## ..::[nzbToMedia.pyc]::.. ##\r\n[15:05:46] [INFO]::MAIN: #########################################################\r\n[15:05:46] [DEBUG]::MAIN: Options passed into nzbToMedia: ['G:\\\\Scripts\\\\nzbToCouchPotato.py', 'G:\\\\Users\\\\dj\\\\Downloads\\\\complete\\\\movie\\\\Big Hero 6 (2014)', 'Big_Hero_6_2014_720p_WEB-DL.mkv.nzb', 'Big_Hero_6_2014_720p_WEB-DL.mkv', '', 'movie', 'alt.binaries.movies', '0']\r\n[15:05:46] [INFO]::MAIN: Script triggered from SABnzbd\r\n[15:05:46] [DEBUG]::MAIN: Searching for nzoid from SAbnzbd ...\r\n[15:05:46] [WARNING]::MAIN: Data from SABnzbd could not be parsed\r\n[15:05:46] [DEBUG]::MAIN: Adding NZB download info for directory G:\\Users\\dj\\Downloads\\complete\\movie\\Big Hero 6 (2014) to database\r\n[15:05:46] [INFO]::MAIN: Auto-detected SECTION:CouchPotato\r\n[15:05:46] [DEBUG]::MAIN: Checking for archives to extract in directory: G:\\Users\\dj\\Downloads\\complete\\movie\\Big Hero 6 (2014)\r\n[15:05:46] [INFO]::MAIN: Calling CouchPotato:movie to post-process:Big_Hero_6_2014_720p_WEB-DL.mkv.nzb\r\n[15:05:47] [INFO]::MAIN: Attemping imdbID lookup for Big_Hero_6_2014_720p_WEB-DL.mkv.nzb\r\n[15:05:47] [INFO]::MAIN: Searching folder and file names for imdbID ...\r\n[15:05:47] [INFO]::MAIN: Searching IMDB for imdbID ...\r\n[15:05:48] [DEBUG]::MAIN: Opening URL: http://www.omdbapi.com\r\n[15:05:49] [INFO]::MAIN: Found imdbID [tt2245084]\r\n[15:05:49] [DEBUG]::MAIN: Opening URL: http://localhost:7070/api/73aa9f6e3ea0478a9ef6ebbb81/media.get with PARAMS: {'id': u'tt2245084'}\r\n[15:05:50] [ERROR]::MAIN: no media found for id tt2245084\r\n[15:05:50] [DEBUG]::MAIN: calling command: G:\\ffmpeg\\bin\\ffprobe.exe -v quiet -print_format json -show_format -show_streams -show_error G:\\Scripts\\tests\\test.mp4\r\n[15:05:50] [INFO]::TRANSCODER: Checking [Big Hero 6 (2014).mkv] for corruption, please stand by ...\r\n[15:05:50] [DEBUG]::MAIN: calling command: G:\\ffmpeg\\bin\\ffprobe.exe -v quiet -print_format json -show_format -show_streams -show_error G:\\Users\\dj\\Downloads\\complete\\movie\\Big Hero 6 (2014)\\Big Hero 6 (2014).mkv\r\n[15:05:50] [INFO]::TRANSCODER: SUCCESS: [Big Hero 6 (2014).mkv] has no corruption.\r\n[15:05:50] [INFO]::MAIN: Checking for files to be transcoded\r\n[15:05:50] [DEBUG]::MAIN: calling command: G:\\ffmpeg\\bin\\ffprobe.exe -v quiet -print_format json -show_format -show_streams -show_error G:\\Users\\dj\\Downloads\\complete\\movie\\Big Hero 6 (2014)\\Big Hero 6 (2014).mkv\r\n[15:05:50] [INFO]::MAIN: Transcoding video: G:\\Users\\dj\\Downloads\\complete\\movie\\Big Hero 6 (2014)\\Big Hero 6 (2014).mp4\r\n[15:05:50] [DEBUG]::MAIN: calling command: G:\\ffmpeg\\bin\\ffmpeg.exe -loglevel warning -hwaccel auto -fflags +genpts -i G:\\Users\\dj\\Downloads\\complete\\movie\\Big Hero 6 (2014)\\Big Hero 6 (2014).mkv -map 0:0 -map 0:1 -map 0:1 -c:v copy -c:a:0 aac -b:a:0 160000 -c:a:1 ac3 -sn G:\\Users\\dj\\Downloads\\complete\\movie\\Big Hero 6 (2014)\\Big Hero 6 (2014).mp4\r\n[15:05:50] [ERROR]::MAIN: Transcoding of video to G:\\Users\\dj\\Downloads\\complete\\movie\\Big Hero 6 (2014)\\Big Hero 6 (2014).mp4 failed with result 1\r\n[15:05:50] [ERROR]::COUCHPOTATO: Transcoding failed for files in G:\\Users\\dj\\Downloads\\complete\\movie\\Big Hero 6 (2014)\r\n[15:05:50] [ERROR]::MAIN: A problem was reported in the G:\\Scripts\\nzbToCouchPotato.py script.\r\nCouchPotato: Failed to post-process - Transcoding failed!"},"comment":{"url":"https://api.github.com/repos/clinton-hall/nzbToMedia/issues/comments/151932669","html_url":"https://github.com/clinton-hall/nzbToMedia/issues/860#issuecomment-151932669","issue_url":"https://api.github.com/repos/clinton-hall/nzbToMedia/issues/860","id":151932669,"user":{"login":"bakka5","id":15269232,"avatar_url":"https://avatars.githubusercontent.com/u/15269232?v=3","gravatar_id":"","url":"https://api.github.com/users/bakka5","html_url":"https://github.com/bakka5","followers_url":"https://api.github.com/users/bakka5/followers","following_url":"https://api.github.com/users/bakka5/following{/other_user}","gists_url":"https://api.github.com/users/bakka5/gists{/gist_id}","starred_url":"https://api.github.com/users/bakka5/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bakka5/subscriptions","organizations_url":"https://api.github.com/users/bakka5/orgs","repos_url":"https://api.github.com/users/bakka5/repos","events_url":"https://api.github.com/users/bakka5/events{/privacy}","received_events_url":"https://api.github.com/users/bakka5/received_events","type":"User","site_admin":false},"created_at":"2015-10-28T17:57:41Z","updated_at":"2015-10-28T17:57:41Z","body":"I stall can't figure out what's wrong\r\n"}}