Make it nightcore
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

8 lines

  1. jobid=$RANDOM$RANDOM
  2. curl "$RANDOM" 2>/dev/null | sed -e '1,2d' | sed '2d' | sed -e 's/.*file_url=\"\(.*\)\" frames=\"\" frames_pending.*/\1/' | xargs curl > /tmp/$jobid-imagedl.png 2>/dev/null
  3. youtube-dl -x "ytsearch:$1" -o "/tmp/$jobid-download.%(ext)s" -f m4a
  4. ffmpeg -y -i /tmp/$jobid-imagedl.png -vf scale=1920:1080 /tmp/$jobid-imagescaled.png
  5. ffmpeg -y -i /tmp/$jobid-download.m4a -filter:a "asetrate=55125" -map 0:a -shortest -strict -2 "/tmp/$jobid-nightcore.m4a"
  6. ffmpeg -y -i /tmp/$jobid-imagescaled.png -i /tmp/$jobid-nightcore.m4a -vf "drawtext=text=$1:fontsize=100:x=(w-tw)/2:y=(h-3.5*th)" -map 0:v -map 1:a -strict -2 "$1-nightcore.mp4"
  7. rm /tmp/$jobid-imagedl.png /tmp/$jobid-imagescaled.png /tmp/$jobid-download.m4a /tmp/$jobid-nightcore.m4a