Story Template: How to Make with BASH!

I've never been good at using Video Editors on desktop computers, the closest was a few years playing with Kdenlive for Linux. I only need simple video editing and I prefer using single command lines (BASH Scripting) in a Shell, probably nerdy to many but it works great for me.
Items needed to complete this project
-HIVE Branding package
- I downloaded this many many years ago, not sure if it has been upgraded
-peakd AI AI-Powered Images Generation
- to create the models???? AI character layered on top of the video
-GIMP cross-platform image editor
- create transparent of model (ie remove background)
- reduce HIVE Logo Opacity
- feel free to download the next 2 images to use
| Logo | Model |
|---|---|
![]() | ![]() |
- your video or set of clips (you can use images as well).
- don't worry about the container (.ext) ffmpeg will convert it to the output file you specify
Let's start
for this "how to" we will use a single video clip
Step 1:
Create a new directory (folder)
- Move your files video.mp4, logo.png, model.png here
- View your video (C0093.MP4) and note start-time (00:05) and end-time (05:45)
- Cut the video where duration = end-time - start-time = 00:5:40

ffmpeg -ss 00:05 -i C0093.MP4 -to 05:40 -vf "scale=-1280:720" -r 30 -an SCALE.mp4
this code does 2 things-
- cut a section 5mins 40secs long from original C0093.MP4 starting at 5 secs from beginning
- also reduce the resolution from 1080p to 720p with 30fps (video isn't important, story is)
Step 2:
Make transparent strip along the bottom of the video for subtitles

ffmpeg -i SCALE.mp4 -vf "drawbox=x=0:y=720-140:h=140:[email protected]:t=fill" BOX.mp4
notice there is no w= (width, where to position the box) after the x:y box dimensions, this tells ffmeg to use the whole width
Step 3:
Overlay the Logo (or any image) once you work out the x:y co-ordinates.

ffmpeg -i BOX.mp4 -i HIVE2-60t.png -filter_complex "overlay=x=10:y=4" LOGO.mp4
top left point of ypur image (in this case the LOGO HIVE2-60t.png)
- the 60t in the filename reminds me I set the image Opacity to 60% in GIMP
- x=10: 10 pixels from ther left
- y=4 : 4 pixels down
Step 4:
Insert Video Details (not needed but I think it's nice) in a small box on the strip

ffmpeg -i LOGO.mp4 -vf "drawtext=fontfile=/path/to/font.ttf:text='Kaitoke Regional Park, Upper Hutt, Wellington, New Zealand. 16/01/2021':fontcolor=white:fontsize=14:box=1:boxcolor=black:boxborderw=5:x=(w-text_w)/4:y=h-th-16-115" TEXT.mp4
Looks complicated and the hardest part is how to position this text
- as always its all in the x:y maths
- text_w is the width of the total length of text in pixels (makes life easy). Took me a while to get this exactly where I want it, but once done all I had to do was change the text
Step 5:
Repeat Step 3 but this time use your model image

ffmpeg -i TEXT.mp4 -i model01-720.png -filter_complex "overlay=x=W-w:y=H-h" MODEL.mp4
- from memory W=screen width w=image width H=screen height h=image height, so no matter what image size you use it would be perfectly placed bottom right
Step 6:
Slow the Video down, this increases the video length and somewhat reduces camera shake a little bit.
ffmpeg -i MODEL.mp4 -filter:v "setpts=1.75*PTS" FILE-main.mp4
My observations on the video
- setpts=2.00: half speed but too coppy(jittery) to my liking
- setpts=1.85: a little bit fast than half speed, still choppy but not too bad
- setpts=1.75: this is the level I'm happy with
- This is the final step.
Note:
It's possible to blur the background video (as some do on youtube)

ffmpeg -i SCALE.mp4 -vf "gblur=sigma=2" BLUR.mp4
- Put this in between Step 1 & Step 2
- the larger the gblur=sigma the more the blur effect shows
- personally I don't like the effect and would never use it, but knowing the option is there and what code to use, is a good thing.
Even though I barely explained each ffmpeg command in detail, the command with its options should be self explanatory and is well documented online via simple search. Copy each code in step order to a text file, then paste one at a time into the shell.
Video purposely created at 16:9 720p with the focus on the story telling aspect not the visual content. Upload to your favorite subtitle program/app (eg VEED) to add audio and subtitles.
- An original FreeToUseImage, just display a link on your page back to this post.
- It is possible the image/s used here are part of another post at the time of creation. Posting here allows those images to be shared under the open license.
© 2026. This work is openly licensed via CC BY-NC
- BY: credit must be given to the creator.
- NC: Only noncommercial uses of the work are permitted.

Beneficiaries for this post: @PEAKD 5% hive-126730 5%


I tried the same approach with ffmpeg for quick clips and it cut my workflow time in half. The script you outlined for adding the Hive logo at the start feels clean.