This is a toolset for replacing the original Japanese text of Kirara Fantasia's story video into other languages.
きららファンタジアの字幕を抽出し、文字部分を差し替えるツールである。
Sample ouput:(generated by ver2.0)
効果例:
- If you are using windows, download the pre-built binaries.
- If you are using Linux or MacOS, clone this repository to a clean directory.
And install the dependences below:- python (version 3)
- python libraries
- pillow
- numpy
- opencv-python
- ffmpeg
- Record
Record a Kirara Fantasia story video, and copy it to an empty folder of your PC.- The folder name and video names must not include any non-ansi characters.
- It is recommend to record by iOS built-in recording function.
- You should turn on audio and check if audio is recorded.
- When recording, make sure to include the first transition from 図書館 to Story, since transition will be an important sign for detecting start and end of each section.
- Click Auto Button after the first sentence of section are shown fully.
- You can record all videos of one chapter continually, since this tool will crop them automatically, but we recommend to record 5 ~ 10 videos at one time.
- Crop
Drag the record video into Kirafan_AutoSub.exe, and select 1 (Crop).- on Linux, run
python AutoSub.py <video_file>
instead. - This procedure will detect transition between sections and automatically seperate them.
- It will create a folder named
<video_file>_seq_video
, and the seperated sections are named0001.mp4
,0002.mp4
and so on. - In case you recorded 1
5.mp4 and 610.mp4, run for them respectively, and rename the videofile manually in6~10.mp4_seq_video
to0006.mp4
,0007.mp4
and so on. After that copy those files into the same folder for consequence procedure.
- on Linux, run
- Analysis and Label
Drag the folder containing0001.mp4
... intoKirafan_AutoSub.exe
, and select 2 (Analysis).- on Linux, run
python AutoSub.py <folder>
instead. - The program will ask your targer language, input one from
en
,jp
,cn
,ko
. - This procedure will analyse and label texts in videos, and generate a
krfss
file and a image folder for each video inautosub
folder.
- on Linux, run
- Translate
Edit thosekrfss
files by Krfss_Editor- Refer the tutorial of Krfss_Editor.
- Patch
Drag the folder containing0001.mp4
... intoKirafan_AutoSub.exe
, and select 3 (Patch).- This procedure will apply the subtile file
krfss
and automatically patch them into videos. - It will generate files like
0001.mp4.autosubed.mp4
. - Besides, it will generate a
videolist.txt
file for video concatenating.
- This procedure will apply the subtile file
- Concatenate(Optional)
- Edit
videolist.txt
to add or remove some files to concat.
file '0001.mp4.autosubed.mp4' file '0002.mp4.autosubed.mp4' ......
- If you want to insert Openning/Ending, you must convert them before you copy them and add to
videolist.txt
- To convert a video, drag it into
Kirafan_AutoSub.exe
and select 5 (Convert). - The video after convertion is named
<video_name>.cvt.mp4
. - In case you have to adjust aspect ratio or audio gain manually, refer to ffmpeg toturial.
- To convert a video, drag it into
- Drag the folder containing
0001.mp4
... intoKirafan_AutoSub.exe
, and select 4 (Concat). - The
output.mp4
is the final video.
- Edit