Skip to content

Cross-platform java library and command-line utility to generate a subtitle file given a video and transcript

License

Notifications You must be signed in to change notification settings

decheng-zhang/transcript_tether

 
 

Repository files navigation

Build Status

transcript_tether

Cross-platform java library and command-line utility to generate a subtitle file given a video and transcript

Release


To create a standalone executable java program:

gradle exec

The executable is located inside {PROJECT_FOLDER}/build/libs/

Running_prerequisition

[Java SE Runtime Environment 8 Downloads]
Setting JAVA_HOME environment variables

Usage


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.

Example

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'

FAQ

  1. 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".

  2. 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.

  3. 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"

  4. The video should be uploaded to the same youtube account, the youtube account authorizes the API.

  5. The youtube channel needs to be created, since the program upload the video to users' personal channel (Privated).

About

Cross-platform java library and command-line utility to generate a subtitle file given a video and transcript

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%