![]() The 1st timestamps basically says that the sentence should be displayed from the 1sr minute and 20 seconds, to minute 52, which is clearly wrong. (SRT timestamps convention explained at ) "00:01:20,000 -> 00:52:00,000 : what's going on guys john elder here"Īs you can see from the console, the subtitles have wrong timestamps, according to SRT timestamps convention. ![]() Print(''.format(dic, dic))Īt the original YouTube video, the captions start at the 1st second (should be around 00:00:01,000 )įirst downloaded caption sentence with timestamps : # just a function to test how's the cations are structured.įor line in str(captions.generate_srt_captions()).split('\n'):Ĭaption_list] = line You can use online free Youtube video downloaders like the one below Then, you can use Subtitles.love to convert the Youtube video and detect any language present in it. from pytube import YouTube as YTĬaptions = yt.captions.get_by_language_code(caption_code) Before being able to convert a Youtube video to text, you need to download the video. ![]() ![]() This is a part of my code, changed so it will be easy to understand. Using pytube, I am trying to download a YouTube video, translate the subtitles and embed the translated subtitles back into the video, then download it to my PC. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |