yt_de_study/README.md
Daniel Tsvetkov 6643959596 added readme
2020-09-06 20:24:39 +02:00

3.0 KiB

Study German using Kurzgesagt / Dinge Erklärt Youtube Channels

Kurzgesagt and Dinge Erklärt channels contain videos that are mostly the same in English and German. Which provides great opportunity to study both languages.

Dependencies

Description

  • Fix the EN_VIDEO, DE_VIDEO videos and FINAL_TITLE at the top of main.py

  • The main.py script does the following:

    1. Downloads the videos with lowest quality (speeds up further ffmpeg processing) and the subtitles in both English and German
    2. Optionally syncs the video timestamps (very stupid linear algorithm right now which is super slow and maybe completely useless)
    3. Times and tries best to arrange the timestamps of the two subtitle files to match
    4. Stops and lets the user fix (see fix.txt below)
    5. If the fix.txt file exists, it assumes times have been fixed
    6. Cuts the scenes defined in fix.txt and then combines them in 'EN'+'DE'+'EN' form
    7. Concatenates the final video with title of variable FINAL_TITLE and clears up temp files

fix.txt

The file is used to further align scenes. It has the following form (it is auto-generated):

000 ...               Text in English  |          
... 000                                | Text in German
... 001                                | Text 2 in German
001 ...              Text 2 in English | 
-------
... 002                                | Title in scene 2 in German is in one line
002 ...              Title in scene 2  |         
003 ...    is in two lines in English  |         
------- 
  • The file is generated if fix.txt doesn't exist
  • The first number is the Nth subtitle in English
  • The second number is the Nth subtitle in English
  • The numbers are three digits long (000) and are separated by space
  • The number could be ... which signifies that this subtitle in this language is not defined on this line
  • After the numbers, the rest of the line is not processed by the program but it's helpful for users to align the texts - English and German separated by the | character
  • Scene is separated by 7 dashes (-------)
  • All subtitles in a scene are grouped by language and then a cut is produced
  • The timings of the videos are not defined here, they are assumed from the corresponding subtitle (i.e. there is no way to adjust timings other than adjust them in the corresponding subtitle file)
  • The user can re-arrange the lines as they wish, combining the subtitles as they seem most useful (e.g. attempt for full sentences although if the subs are cut in a weird way that may be very challenging)

Given the above file, two cuts will be produced with the following on-screen text (and hopefully aligned audio):

  1. First:
Text in English Text 2 in English

Text in German Text 2 in German
  1. Second:
Title in scene 2 is in two lines in English

Title in scene 2 in German is in one line