Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Encode captions lambda #7

Open
cjjenkinson opened this issue Jul 28, 2021 · 0 comments
Open

Encode captions lambda #7

cjjenkinson opened this issue Jul 28, 2021 · 0 comments

Comments

@cjjenkinson
Copy link
Owner

cjjenkinson commented Jul 28, 2021

The final part of the video transcribing workflow is encoding the audio transcription back onto the video.

These comprises of a number of steps:

  1. Store the SRT transcription file (the transcribed words from the audio from Assembly a.i) from the audio bucket into the tmp writable space within the lambda
  2. Store the original video in the tmp write store
  3. Prepare the arguments required for ffmpeg to burn the SRT subtitles onto the original video
ffmpeg -i input.mp4 -map 0 -c copy -c:s mov_text -metadata:s:s:0 language=eng -metadata:s:s:1 language=ipk output.mp4

Reference: https://askubuntu.com/questions/214199/how-do-i-add-and-or-keep-subtitles-when-converting-video

Notes: we want to ensure the input and output name are clear as the input video is the referencing the original video with the audio included and the output video will be the video that will have the captions encoded onto it.

  1. Store the encoded output video into the output-video bucket and update the video job from Dynamo as complete
  2. Sanity check the process worked by viewing the output video and then tweaking the subtitle styling to suit your preferences

See: https://stackoverflow.com/questions/21363334/how-to-add-font-size-in-subtitles-in-ffmpeg-video-filter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant