Added script for adding subtitles to videos that already don't have one
PR Fixes:
- 1 #875
Resolves #875
Script that will take contentId of a video, generate and upload the subtitles to bunny in .json format if it doesn't already have subtitles. It will download the video, convert it to mp3 and generate a .json file in the temp/ folder which I have added to .gitignore and after the subtitle is successfully uploaded, the temp folder/files inside it will be deleted.
Need an OpenAI api key and some other .env variables I have added in the .env.example file
Checklist before requesting a review
- [x] I have performed a self-review of my code
- [x] I assure there is no similar/duplicate pull request regarding same issue
Looks good, let me test it
Looks good, let me test it
Yeah let me know if it works as expected or needs some improvement
@Pritam12F Can we optimise it? There is a way in ffmpeg to only download the .mp3 from the videoURL.
And I think our videoJS requires the .srt file for the subtitles. No the JSON format
@SujithThirumalaisamy Will fix this
Tested it locally?
Tested it locally?
I don't have access to an OpenAI api key, so I couldn't test