McCloudS / subgen

Autogenerate subtitles using OpenAI Whisper Model via Jellyfin, Plex, Emby, Tautulli, or Bazarr
MIT License
532 stars 48 forks source link

Subgen Container HTTP 404 error #8

Closed Wh1t3Rose closed 1 year ago

Wh1t3Rose commented 1 year ago

Me again! Thank you for your help last time. You were very helpful before!

So I updated my container and eliminated Tautulli

For some reason When I start playing a file in Plex I get this:

I do have subgen running on HOST Network. That did not solve the issue :(

image

My docker compose:

docker-compose.yml

version: '2'

services: subgen: container_name: subgen network_mode: host image: mccloud/subgen environment:

McCloudS commented 1 year ago

Do a quick check and see if your Tautulli is still sending webhooks.  I was getting similar errors because it's the wrong path and not the JSON it's expecting.I'll troubleshoot more in a couple hours. 

Mine shows something like below when Tautulli is still sending webhooks. You should be seeing the POST 200's, as thats a successful receipt of any valid webhook. So you'll see them even if no action is executed. You'll see movement on the log if it receives a media.play or library.added.

image

Wh1t3Rose commented 1 year ago

It says it can't see the service on port 8090. Not sure why. I have this Subgen on HOST and Plex on HOST. I had Tatulli on a custom network but now I have moved it to HOST as well.

image

McCloudS commented 1 year ago

You'll want to remove any Tautulli stuff, as it will just send invalid webhooks. Have you tried adding or playing a media file from plex to see if there is any movement in the logs? You should see "Webhook received!" and some debug stuff print, then it'll run.

McCloudS commented 1 year ago

As long as the subgen and plex container can reach each other, you shouldn't be seeing any issues.

Wh1t3Rose commented 1 year ago

Yea that is how I got the 404 errors, by playing a media file.

I removed the tatulli webhook and now I get nothing when I play a media file. Like subgen isn't using the Plex info

image

McCloudS commented 1 year ago

Did you add the webhook into Plex?

On Thu, Feb 2, 2023, 8:46 AM ech0 @.***> wrote:

Yea that is how I got the 404 errors, by playing a media file.

I removed the tatulli webhook and now I get nothing when I play a media file. Like subgen isn't using the Plex info

[image: image] https://user-images.githubusercontent.com/4251482/216372068-f04ef80d-7d1b-43f6-ac8c-86f9b4a575df.png

— Reply to this email directly, view it on GitHub https://github.com/McCloudS/subgen/issues/8#issuecomment-1413953761, or unsubscribe https://github.com/notifications/unsubscribe-auth/APJACQI4RVT7T6RKZCVKMJTWVPJE3ANCNFSM6AAAAAAUPCRNDU . You are receiving this because you commented.Message ID: @.***>

Wh1t3Rose commented 1 year ago

Ok. I forgot that part. That is my fault.

I think that maybe you could hilight that section in the doc a bit more as I had missed it even after scanning the instructions twice (I didn't even realize Plex had a webhooks section in settings!)

At any rate I think it is working as I get 200 codes now but I am getting a Traceback also:

image

Wh1t3Rose commented 1 year ago

Ok. I fixed it. For some reason my Plex token keeps changing :(

I think it is fixed now but I would like to keep this open for a couple hours till I can confirm.

Thanks again for your help!!

McCloudS commented 1 year ago

The 401 Unauthorized implies your plex server or port is wrong. That means the API call failed to get the media file path. I was getting similar errors when my subgen and plex were on different subnets, but yours look the same here...

On Thu, Feb 2, 2023 at 9:18 AM ech0 @.***> wrote:

Ok. I forgot that part. That is my fault.

I think that maybe you could hilight that section in the doc a bit more as I had missed it even after scanning the instructions twice (I didn't even realize Plex had webhooks!)

At any rate I think it is working as I get 200 codes now but I am getting a Traceback also:

[image: image] https://user-images.githubusercontent.com/4251482/216380839-39456ab1-a111-47a9-954a-57129be31556.png

— Reply to this email directly, view it on GitHub https://github.com/McCloudS/subgen/issues/8#issuecomment-1414005163, or unsubscribe https://github.com/notifications/unsubscribe-auth/APJACQIGONOJFNYMSXB35DLWVPM4NANCNFSM6AAAAAAUPCRNDU . You are receiving this because you commented.Message ID: @.***>

Wh1t3Rose commented 1 year ago

The 401 Unauthorized implies your plex server or port is wrong. That means the API call failed to get the media file path. I was getting similar errors when my subgen and plex were on different subnets, but yours look the same here... On Thu, Feb 2, 2023 at 9:18 AM ech0 @.> wrote: Ok. I forgot that part. That is my fault. I think that maybe you could hilight that section in the doc a bit more as I had missed it even after scanning the instructions twice (I didn't even realize Plex had webhooks!) At any rate I think it is working as I get 200 codes now but I am getting a Traceback also: [image: image] https://user-images.githubusercontent.com/4251482/216380839-39456ab1-a111-47a9-954a-57129be31556.png — Reply to this email directly, view it on GitHub <#8 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/APJACQIGONOJFNYMSXB35DLWVPM4NANCNFSM6AAAAAAUPCRNDU . You are receiving this because you commented.Message ID: @.>

See my update above :) We posted at the same time haha

Wh1t3Rose commented 1 year ago

Ok sorry for blowing up your emails. I definately noticed the docker network/subnet issues you had. I tried putting them both on the same custom network named fsociety and I had the same issues where they couldn't "see"each other or communicate. Put them back on HOST and I am getting 200 codes again.

I am not sure if it is actually doing anything tho? I played a file, got 200s and but my CPU usage hasn't gone up at all (sitting at 3%) and I don't see subtitles generating in the log like I did when I was using Tautulli

No stacktrace this time :)

Any ideas?

McCloudS commented 1 year ago

I'm not sure... I'll have to think about it. 200s shows it's getting valid webhooks from plex. But if you aren't getting a "Webhook received!" or eventual printouts anywhere in there, that means it isn't seeing a valid json return with "library.new" or "media.play", so it isn't triggering anything.

Wh1t3Rose commented 1 year ago

Ok. I did try changing the variable SKIPIFINTERNALSUBLANG to something bogus like "ddk" and removing the variable entirely as I do have internal ENG SRT Subs and maybe it wasn't processing because of that, but it didn't make a difference.

I'll leave you alone for now but I appreciate any input you can provide.

Thanks again!

McCloudS commented 1 year ago

I just added Tautulli webhooks back in with slightly new instructions (see the Readme). If you pull the new image, you could try Tautulli instead of plex. I'm a bit stumped because the Plex part is working flawless for me on two different setups.

I would recommend removing the plex webhook if you use Tautulli.

Wh1t3Rose commented 1 year ago

Thank you @McCloudS . I'll give that a go. I am back to getting the stacktrace I posted earlier despite having everything on host and an updated Plex token.

I'll pull the container and try again with Tautulli

Wh1t3Rose commented 1 year ago

Alright working again with Tautulli! Any downsides with using Tautulli that you know of besides just having another container running (I have 55 containers running at all times so I am not concerned about that!). I use tautulli already anyways for it's main purposes.

McCloudS commented 1 year ago

No differences using Tautulli. The implementation is actually simpler since it isn't dependent on making an outgoing API call, like Plex.

I just wish I knew what your plex problem was. I have it working on two different environments with different file structures.

Wh1t3Rose commented 1 year ago

Yea. Very strange indeed.

Let me know if I can do anything to help troubleshoot.

Would it be possible to speed up the transcode time by add additional "nodes" or multiple machines similar to the way Tdarr and Unmanic do transcoding?

Best thing I can think of for now is just having 2 of these containers running and pointed to 2 different tautulli instances (or just 2 separate webhooks I guess)? But you would just have 2 transcodes of the same tv episode going on unless you trigger one instance via "Media Add" and the other instance by "Playback started"?

Just spitballing

McCloudS commented 1 year ago

Orchestrating something like that is way outside of my skillset. Sure, it could be possible by splitting the WAV file, farming it out, and then joining the subs and time adjusting them.