mayeaux / generate-subtitles

Generate transcripts for audio and video content with a user friendly UI, powered by Open AI's Whisper with automatic translations and download videos automatically with yt-dlp integration
https://freesubtitles.ai
741 stars 101 forks source link

Install on Windows 10 #51

Closed PiperMp3 closed 1 year ago

PiperMp3 commented 1 year ago

Gotten quite close on a Windows platform, but struggling with the last bit.

Error: not found: YoutubeDL

However running "yt-dlp" purely in CMD starts YoutubeDL (so the PATH is correct) Seems generate-sub code is struggling to find the correct paths or files?

I've dug around in the files, and attempted to add yt-dlp.exe's to several paths

Thoughts?

osb910 commented 1 year ago

Hi, Can you paste the path that you're using in your environment variables? For me it's like this: C:\Python310\Lib\site-packages\yt_dlp

PiperMp3 commented 1 year ago

C:\Users\username\generate-subtitles In here, I got yt-dlp.exe and youtube-dl.exe (added both to be safe)

Reckon it could be an issue to have it within the users location?

osb910 commented 1 year ago

In this path, you should have YoutubeDL.py.

PiperMp3 commented 1 year ago

Aiight, updated Env Variables, Moved yt-dlp.exe to C:\yt-dlp I can still invoke yt-dlp via cmd, but npm start still errors on Not Found

Unsure what you mean by I should have YoutubeDL.py python file, could you elaborate? I have no such file, nor were it within the repo.

osb910 commented 1 year ago

If not, and you can't add it, try editing the project code as follows: Go to these two files: generate-subtitles/downloading/download.js:9 and... generate-subtitles/downloading/yt-dlp-download.js:11

then change both lines to this: const ytDlpName = 'yt-dlp';

osb910 commented 1 year ago

By the way, how did you install ytdlp in the first place? I'm curious because I use Windows for development and I'm the one who suggested the fix that's throwing an error at you.

PiperMp3 commented 1 year ago

Hello,

Yes so const ytDlpName = 'yt-dlp'; moved things along for sure.

I forgot to add ffmpeg and that so on to that now.

For yt-dlp I followed https://github.com/yt-dlp/yt-dlp#release-files which hands out a .exe. So pulled that down, and fixed PATH, and bam, worked, so then I moved on to the next part. Sure there is that other method with python3 and pip, but decided to try it's .exe first.

PiperMp3 commented 1 year ago

Yea @osb910 - its all running here now, so we all good!

Thank you!

osb910 commented 1 year ago

Great! You're welcome.

Yeah, that makes sense. I probably followed a different method for installation which doesn't output an .exe at all. I'll try reinstalling it using this method and then figure out how to support both methods on Windows because what I gave you is just a workaround.

So thank you for your issue.