Follow the below instructions to upload/update a tutorial video:
-
Create a metadata file similar to the one in here.
Note: For each step, the time elapsed between
startTimeandendTimeshould approximately be the duration of the spoken sentence. I.e. this is almost impossible to get right on the first try and will need further refinement. -
Make sure to remove
youTubeId. This field is automatically added by the video manager script once the video is uploaded. -
In metadata file,
descriptionLinksis a list of links which are added to video description. See description template for more details. -
Run the below command to add voice to the video:
python video-manager.py voiceover --file PATH_TO_ORIGINAL_VIDEO --metadata PATH_TO_METADATA --audio PATH_TO_SAVE_AUDIO --output PATH_TO_SAVE_NEW_VIDEO
whereby
PATH_TO_SAVE_AUDIOandPATH_TO_SAVE_NEW_VIDEOshould have the file extension.mp3and.mp4, respectively.Voiceover audio alone (without an accompanying video file) can be generated by omitting the
--fileand--outputoptions.The Google Cloud Text-to-Speech API has a limit of about 4 minutes of audio per request. Audio longer than this must be split into multiple requests using the
--skipand--untiloptions. The exact end time of a segment should be used as theskipand/oruntilvalue. -
Retry step 4 with adjusted
youTubeCaptionsdata until the optimal outcome is achieved. -
Before uploading, make sure that the timings of the
youTubeCaptionssentences in the metadata file match exactly the duration of their pronunciations in the voiceover. This ensures that the subtitles will be synced correctly to the voice in the final online video version. -
Run the below command to upload/update the video once metadata is ready:
python video-manager.py upload --file PATH_TO_VIDEO --metadata PATH_TO_METADATA
-
The video privacy status is set to
unlistedby default. Pass privacy status as below to override it:python video-manager.py update --file PATH_TO_VIDEO --metadata PATH_TO_METADATA --privacyStatus public
-
Commit the new changes to metadata file such as
youTubeIdand push.
Use translate.py script to generate translated docs using Google API:
python translate.py -t 100See script source for options. Use the below regex to fix image links in WebStorm once translation is done:
/ images / (\w+) / <- contains a space as the final character
/images/$1/