Join my YouTube channel and get free books.
Thanks for coming here, I hope you are enjoying learning here, I have also written some books in case you want to learn a bit more :)
If you need my help with Drupal, Linux, Jira, Scripting, Automation or want to contact me then raise a ticket for me please :) and I will get back to you, promise. At Sparxsys we provide Atlassian consultancy services, reach out to me at ravi at sparxsys dot com

How Linux users generate thumbnails?

I generate my YouTube thumbnails using ffmpeg and shell script. I modified the script further to add transparency to my text background. Let me share the script with you. Have fun!

#ffmpeg #linux #Thumbnail #LinuxMemeGenerator

Script

  1. #! /bin/bash
  2.  
  3. # How to use?
  4. # generate-thumb.sh "Using Advanced Roadmaps" "Finish to Finish Dependency" ~/Camera/youtube/advanced-roadmaps.png ~/screenshot.png ~/Camera/youtube/blank.png "#330000" "#0000ff" ".5"
  5.  
  6. #Configurations, audio and video sourc.
  7. LABEL1=$1
  8. LABEL2=$2
  9. BG_IMAGE=$3
  10. SECOND_IMAGE=$4
  11. THIRD_IMAGE=$5
  12. FFMPEG_COLOUR1=$6
  13. FFMPEG_COLOUR2=$7
  14. TRANSPARENCY=$8
  15. #FONTPATH="/usr/share/fonts/cantarell/Cantarell-ExtraBold.otf"
  16. FONTPATH="/home/ravisagar/.local/share/fonts/futura_bdcn_bt_bold.ttf"
  17. SIZE=1280x720
  18. #Work with showfreqs
  19. ffmpeg \
  20.     -i $BG_IMAGE \
  21.     -i $SECOND_IMAGE \
  22.     -i $THIRD_IMAGE \
  23.     -filter_complex \
  24.         "[0:v]scale=$SIZE[bgresize]; \
  25.         [1:v]scale=900:-1[img2]; \
  26.         [2:v]scale=580:-1[cartoon]; \
  27.         [bgresize][img2]overlay=50:300[bg0]; \
  28.         [bg0][cartoon]overlay=750:100[bg1];
  29.         [bg1]drawtext=fontfile=$FONTPATH: \
  30.         text=$LABEL2: fontcolor=white: fontsize=90: box=1: \
  31.         boxcolor=$FFMPEG_COLOUR2@$TRANSPARENCY: boxborderw=10: \
  32.         x=30:y=(h-text_h-40)[bg2]; \
  33.         [bg2]drawtext=fontfile=$FONTPATH: \
  34.         text=$LABEL1: fontcolor=white: fontsize=90: box=1: \
  35.         boxcolor=$FFMPEG_COLOUR1@$TRANSPARENCY: boxborderw=10: \
  36.         x=30:y=(h-text_h-160)[bg3]" \
  37.         -map "[bg3]" ~/output.png
Topic

Syndications

Webmentions

Ravi Sagar Newsletter

Honestly I hardly send out mails but I guess there is no harm in at least having a newsletter. I will only send newsletter when I have something important to share or an update. People are busy and no one has time to read emails these days. If you really like my content then I guess you will remember my site and come back for more.

Want to contact me?