Closed shazwozza closed 4 months ago
Sorry, somehow gmail marked the issue notification as spam so I didn't see this. It sounds like you don't need path mapping as long as your subgen instance and Jellyfin are on the same machine.
http://192.168.1.111:8096
is the default setting in the script, so it's using that if it doesn't detect the environment variable.
The environment variables (that are saved from the webui @ http://subgenip:9000
) may not be getting saved correctly (or in the wrong path somehow). Do you have a file named subgen.env
inside your subgen directory?
You should be seeing something similar to: File subgen.env not found. Using default values.
or File subgen.env not found. Environment variables not set.
in your terminal if above was the case.
Are you clicking save at the bottom?
Yes both subgen and jellyfin are on the same machine. USE_PATH_MAPPING: False Yes subgenn.env is inside the subgen directory I made sure i clicked save at bottom.
EDIT: It looks like it's processing but still getting errors. I restarted pc. Started subgen via command using "python launcher.py -u -i -s" On subgen:9000 settings, i had to reenter the jellyfinip:port I started jellyfin portable. Now i created an API token from jellyfin. I then added that key into the subgen:9000 settings. (I think this is how i'm at least getting some processing logs. But still getting errors at the end). I played a video and now the subgen terminal is showing some activity as follows. It seems like it's processing but i get some error in the end.
2024-05-13 21:01:16,430 DEBUG: Jellyfin event detected is: PlaybackStart
2024-05-13 21:01:16,430 DEBUG: itemid is: 84df5256a7400a580288d6f33102d8ed
2024-05-13 21:01:16,513 DEBUG: Path of file: D:\Files\Video.mp4
2024-05-13 21:01:16,605 DEBUG: No subtitles in 'eng' language found in the video.
2024-05-13 21:01:16,606 INFO: Added Video.mp4 for transcription.
2024-05-13 21:01:16,606 INFO: Transcribing file: Video.mp4
2024-05-13 21:01:16,607 DEBUG: Model was purged, need to re-create
2024-05-13 21:01:16,621 INFO: Metadata refresh queued successfully.
2024-05-13 21:01:16,622 INFO: Metadata for item 84df5256a7400a580288d6f33102d8ed refreshed successfully.
INFO: 192.168.1.3:12380 - "POST /jellyfin HTTP/1.1" 200 OK
config.json: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2.26k/2.26k [00:00<?, ?B/s]
vocabulary.txt: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 460k/460k [00:01<00:00, 249kB/s]
tokenizer.json: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2.20M/2.20M [00:05<00:00, 415kB/s]
model.bin: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1.53G/1.53G [22:40<00:00, 1.12MB/s]
OMP: Error #15: Initializing libiomp5md.dll, but found libiomp5md.dll already initialized.███████████████████████████████████████████████████| 1.53G/1.53G [22:40<00:00, 1.19MB/s]
OMP: Hint This means that multiple copies of the OpenMP runtime have been linked into the program. That is dangerous, since it can degrade performance or cause incorrect results. The best thing to do is to ensure that only a single OpenMP runtime is linked into the process, e.g. by avoiding static linking of the OpenMP runtime in any library. As an unsafe, unsupported, undocumented workaround you can set the environment variable KMP_DUPLICATE_LIB_OK=TRUE to allow the program to continue to execute, but that may cause crashes or silently produce incorrect results. For more information, please see http://www.intel.com/software/products/support/.
Traceback (most recent call last):
File "C:\Users\shazwozza\Downloads\jellyfin_portable\subgen-main\launcher.py", line 168, in <module>
main()
File "C:\Users\shazwozza\Downloads\jellyfin_portable\subgen-main\launcher.py", line 163, in main
subprocess.run([f'{python_cmd}', '-u', 'subgen.py'], check=True)
File "C:\Users\shazwozza\AppData\Local\Programs\Python\Python312\Lib\subprocess.py", line 571, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['python', '-u', 'subgen.py']' returned non-zero exit status 3.
Awesome, getting way further. The libiomp5md.dll error isn't a subgen problem, but is essentially highlighting you have two versions of libiomp5md.dll in your python path somewhere.
See: https://stackoverflow.com/questions/64209238/error-15-initializing-libiomp5md-dll-but-found-libiomp5md-dll-already-initial or https://community.anaconda.cloud/t/omp-error-15-initializing-libiomp5md-dll-but-found-libiomp5-already-initialized/48993
or a simple work around for now: in your command prompt before running subgen, type set KMP_DUPLICATE_LIB_OK=TRUE
Hopefully if you have that resolved, we can get further and see where the problem is.
I added os.environ["KMP_DUPLICATE_LIB_OK"]="TRUE"
as a default to the script, so if you run python launcher.py -u
it should get you past the error.
I added
os.environ["KMP_DUPLICATE_LIB_OK"]="TRUE"
as a default to the script, so if you runpython launcher.py -u
it should get you past the error.
Thanks for your help! That worked a treat!
Great. Are you seeing any output yet (subs in Jellyfin)?
Great. Are you seeing any output yet (subs in Jellyfin)?
Yes it outputs an .srt file whenever I play a video.
I remembered reading on your reddit post that it was possible scan and transcribe any media file it sees.
"It depends on your configuration. If you want to transcribe as media is added, configure the media server webhooks."
What would I have to configure in webhooks plugin so that any new library i create, it will start generating subtitles, without having to play each video individually?
Use the batch endpoint at http://subgen:9000/docs or look at the watch folder variable in the readme.
Using Jellyfin portable on Windows 11.
Installed Webhooks - followed instructions. Made sure all correct boxes ticked, Request header: Key: Content-Type
Value: application/json. Webhook url is set to http://_subgenip_:9000/jellyfin
Installed subgen. I load http://_subgenip_:9000 to configure settings. JELLYFINSERVER is set to http://_jellyfinip_:8096 Now i wasn't sure if i should have USE_PATH_MAPPING: True or false. But i played with both settings, as well as setting PATH_MAPPING_FROM: and PATH_MAPPING_TO: to the media folder directory that I added on jellyfin.
I added the new media directory to Jellyfin and played some videos. In the subgen terminal i can see it triggers the webhook but get the following error (see below). I'm not sure why a connection is trying to be made to 192.168.1.111 ? That is neither the subgen or jellyfin ip address, nor any device on my network.