mdhiggins / sickbeard_mp4_automator

Automatically convert video files to a standardized format with metadata tagging to create a beautiful and uniform media library
MIT License
1.53k stars 202 forks source link

Files are converting to Mp4 but ..................... #1252

Closed sonicman66 closed 4 years ago

sonicman66 commented 4 years ago

Files are converting to Mp4 but not being tagged or moved to the correct dir using deluged or nzbget, manual use of couchpotato works fine. Even manual.py works.

here is a snippet .mp4 created. 2020-05-18 03:15:04 - DelugePostProcess - INFO - Successfully processed /var/lib/mythtv/videos/Flix/90.Days.S04E1x.The.Pleasure.Principle.mkv. 2020-05-18 03:15:04 - DelugePostProcess - INFO - Passing /var/lib/mythtv/videos/Flix/90.Days.S04E1x.The.Pleasure.Principle.mkv-convert directory to Sickrage. 2020-05-18 03:15:04 - autoprocess.autoProcessTVSR - INFO - Opening URL: http://localhost:8081/home/postprocess/processEpisode. 2020-05-18 03:15:04 - autoprocess.autoProcessTVSR - INFO - b'' 2020-05-18 03:15:04 - DelugePostProcess - ERROR - Unable to delete temporary directory. Traceback (most recent call last): File "/home/owner/.sickbeard/sickbeard_mp4_automator/delugePostProcess.py", line 170, in os.rmdir(delete_dir) OSError: [Errno 39] Directory not empty: '/var/lib/mythtv/videos/Flix/90.Days.S04E1x.The.Pleasure.Principle..mkv-convert'

sonicman66 commented 4 years ago

/68d391a63ab8402d8732cd2c5b17c9ee.mp4 created. 2020-05-18 06:42:49 - NZBGetPostProcess - INFO - Successfully processed /var/lib/mythtv/videos/Flix/tvtime/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/68d391a63ab8402d8732cd2c5b17c9ee.mkv. 2020-05-18 06:42:49 - autoprocess.autoProcessTVSR - INFO - Opening URL: http://localhost:8081/home/postprocess/processEpisode. 2020-05-18 06:42:49 - autoprocess.autoProcessTVSR - INFO - b''

sonicman66 commented 4 years ago

I have checked permissions. Can I turn on additional debugging?

sonicman66

mdhiggins commented 4 years ago

This has been asked before but only the final media manager scripts tag

The downloader scripts only perform conversion and hand the newly converted file back to their respective manager. The script does not move or rename any files beyond what is specified in the copy-to / move-to options.

Yours is failing because passing back to Sickrage is failing

2020-05-18 06:42:49 - autoprocess.autoProcessTVSR - INFO - b''

There should be some kind of response from the Sickrage API printed there but is appears you're not getting one, just blank data. You need to verify that Sickrage is working and that you have your Sickrage settings appropriately configured in autoProcess.ini

I'm also looking at Sickrages source code and it looks like they've updated their API url structure so that may be why its failing, though the old technique used should be backwards compatible. I pushed an update to use their new technique anyway

50693f5ed788f26167ad97e65958946905e0e033

Verify your settings and try that. I don't have a sickrage setup to test on so let me know

sonicman66 commented 4 years ago

I'm using SickChill will that be a problem?

mdhiggins commented 4 years ago

No idea, never used SickChill and its not officially supported. If its similar to Sickrage then it should be ok but that very well could be the problem. I'd suggest trying what I said above to see

mdhiggins commented 4 years ago

Looks like the update to use the API key that I did this morning should be more in line with what SickChill expects, but you'll need to report back

sonicman66 commented 4 years ago

Will do thanks,

sonicman66 commented 4 years ago

Seems to have worked with the first file I tried. I will keep testing on a few deluge files and nzbget ones.

sonicman66

sonicman66 commented 4 years ago

The files are not being tagged,

],
    "format": "mp4",
    "video": {
        "codec": "copy",
        "map": 0,
        "bitrate": 744.54,
        "crf": -1,
        "maxrate": null,
        "bufsize": null,
        "level": 0.0,
        "profile": null,
        "pix_fmt": null,
        "field_order": "unknown",
        "width": null,
        "debug": "video"
    },
    "audio": [
        {
            "map": 1,
            "codec": "aac",
            "channels": 2,
            "bitrate": 256,
            "samplerate": null,
            "filter": null,
            "language": "und",
            "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired",
            "title": "Stereo",
            "debug": "universal-audio"
        },
        {
            "map": 1,
            "codec": "ac3",
            "channels": 6,
            "bitrate": 288,
            "filter": null,
            "samplerate": null,
            "language": "und",
            "disposition": "+default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired",
            "bsf": null,
            "title": "5.1 Channel",
            "debug": "audio"
        }
    ],
    "subtitle": [
        {
            "map": 2,
            "codec": "mov_text",
            "language": "eng",
            "encoding": "",
            "disposition": "+default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired",
            "title": "",
            "debug": "subtitle.embed-subs"
        }
    ],
    "attachment": []
}
2020-05-18 11:11:24 - NZBGetPostProcess - INFO - Preopts
2020-05-18 11:11:24 - NZBGetPostProcess - INFO - [
    "-fix_sub_duration"
]
2020-05-18 11:11:24 - NZBGetPostProcess - INFO - Postopts
2020-05-18 11:11:24 - NZBGetPostProcess - INFO - [
    "-threads",
    "0",
    "-metadata:g",
    "encoding_tool=SMA",
    "-tag:v",
    "hvc1"
]
2020-05-18 11:11:24 - NZBGetPostProcess - INFO - Downloaded Subtitles
2020-05-18 11:11:24 - NZBGetPostProcess - INFO - []
2020-05-18 11:11:24 - NZBGetPostProcess - INFO - Starting conversion.
...
2020-05-18 11:12:58 - NZBGetPostProcess - INFO - /var/lib/mythtv/videos/Flix/tvtime/Millions.xxxxxxxxxxxxxxxxxxxxxxxxxxxxx/402527b477334566bb5fb26e761320b3.mp4 created.
2020-05-18 11:12:58 - NZBGetPostProcess - INFO - Successfully processed /var/lib/mythtv/videos/Flix/tvtime/Millions.xxxxxxxxxxxxxxxxxxxxxxxxxxx/402527b477334566bb5fb26e761320b3.mkv.
2020-05-18 11:12:58 - autoprocess.autoProcessTVSR - INFO - Opening URL: http://localhost:8081/api/c75a28b0ec815141c27f64583506da56/.
2020-05-18 11:12:58 - autoprocess.autoProcessTVSR - INFO - b'{"data": {}, "message": "Started post-process for /var/lib/mythtv/videos/Flix/tvtime/Millionsxxxxxxxxxxxxxxxxxxxxx", "result": "success"}'
mdhiggins commented 4 years ago

So that looks like it communicated with SickChill successfully so that's resolved now. I assume the files are now moved since SickChill should handle that

Tagging won't take place from NZBGetPostProcess

You need to set up postSickbeard.py as a post processing script from SickChill to get tagging.

The order of operations is

  1. Sick* find download
  2. NZBGet downloads
  3. NZBGetPostProcess converts and notifies Sick*
  4. Sick* picks up file and moves, renames
  5. Sick* runs postSickbeard.py
  6. postSickbeard.py gets metadata info from Sick* and tags file and runs final processing steps
sonicman66 commented 4 years ago

Ok will take a look, it had been working fine. Until there was an update from SickChill I think. Weird that post taging and meta stopped working.

mdhiggins commented 4 years ago

Not really weird; if the postSickbeard.py script isn't executing that's exactly what you'd expect. The other scripts (NZB/Deluge) have never had tagging support

sonicman66 commented 4 years ago

Was it ever called "postConversion.py"? Thats what I found in my old docs.

Under Extra Scripts< I was still using an old config.ini from years ago! Strange it was working.

mdhiggins commented 4 years ago

Yeah it used to be a while back

sonicman66 commented 4 years ago

Thanks everything is working again with SickChill.

sonicman66