3.0 KiB
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 andFINAL_TITLE
at the top ofmain.py
-
The
main.py
script does the following:- Downloads the videos with lowest quality (speeds up further
ffmpeg
processing) and the subtitles in both English and German - Optionally syncs the video timestamps (very stupid linear algorithm right now which is super slow and maybe completely useless)
- Times and tries best to arrange the timestamps of the two subtitle files to match
- Stops and lets the user fix (see
fix.txt
below) - If the
fix.txt
file exists, it assumes times have been fixed - Cuts the scenes defined in
fix.txt
and then combines them in'EN'+'DE'+'EN'
form - Concatenates the final video with title of variable
FINAL_TITLE
and clears up temp files
- Downloads the videos with lowest quality (speeds up further
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):
- First:
Text in English Text 2 in English
Text in German Text 2 in German
- Second:
Title in scene 2 is in two lines in English
Title in scene 2 in German is in one line