Cross-platform java library and command-line utility to generate a subtitle file given a video and transcript
To create a standalone executable java program:
gradle exec
The executable is located inside {PROJECT_FOLDER}/build/libs/
[Java SE Runtime Environment 8 Downloads]
Setting JAVA_HOME environment variables
java -jar transcript_tether-x.y.z.jar
-c, --credential Provide credential file for google api.
-l,--language (Optional) Indicate the language used in the video [en|fr].
-o,--output_path (Optional) The output directory for [target].srt, the default place is the current folder.
-t,--transcript_file The transcript file for the video.
-v,--video_file The video file for tethering.
java -jar transcript_tether-x.y.z.jar -v 'test.mp4' -t 'test.txt' -c 'HOME/.client_secret.json'
java -jar transcript_tether-x.y.z.jar -i 'youtubevideoid' -t 'test.vtt'
-
First, to install and deploy the software, you need to enable the youtube Data API v3 "https://console.developers.google.com/apis/library/youtube.googleapis.com".
-
Second, at the first execution, the program will prompt up for you to create the OAUTH2.0 json file. Just follow the process, download the secret.json file and rerun the program with "-c {secret.json}". The json file will be cached to the user.home folder, so that you don't need to enter the secret info at next time.
-
The youtube uploading service has a 20 min length limitation for uploaded video. To remove this limitation, perform the verification on youtube account at "https://www.youtube.com/my_videos_upload_verify"
-
The video should be uploaded to the same youtube account, the youtube account authorizes the API.
-
The youtube channel needs to be created, since the program upload the video to users' personal channel (Privated).