Codementor Events

Bash script to automate video rendering

Published Apr 13, 2023
Bash script to automate video rendering
  • Write a bash script that will:
    • loop through the videos from video_texts.csv and for each row/video will:
    • update sections.json
      • display out/{video_name}.mp4

Columns
keyword,duplicate_check,header_1,header_2,header_3,header_4,content_1,content_2,content_3,content_4,video_name
All headerX and contentX columns are needed to generate content for sections.json (see below details). video_name is to be used for the {video_name}

This file needs to be updated for each row of video_texts.csv and should have the following content:

[
{
"sections": [
{
"title": "header_1",
"contents": [
"content_1 - each sentence"
]
},
{
"title": "header_2",
"contents": [
"content_2 - each sentence "
]
}
etc.
]
}
]

Notes:

  • you need to check if headerX is not blank and only if it is not blank add it to JSON

  • contentX needs to be split by sentence

    Request Solution Now 
Discover and read more posts from Jigna N. Mer
get started