Ingredients: avconv, ImageMagick, some images, a LibreOffice Writer doc, tiMIDIty, some shell scripting, DeVeDe.
Result: A video slideshow with neat fades from image to image & background music... zero ©opyright material involved anywhere.
ImageMagick scales images to 720x480 (saved as PNG for losslessness).
convert -gravity center -font "Sansation-Bold" -pointsize $PS \
-draw "fill white text 0,0 \"$(cat 1.txt)\"" \
transparent.png temporary-image-name.png
Make lettering,
convert -gravity center -font "Sansation-Bold" -pointsize $PS \
-strokewidth 5 -draw "fill black text 0,0 \"$(cat 1.txt)\"" \
-channel RGBA -blur 9x9 \
transparent.png temporary-image-name.png
Make shadows behind lettering (for contrast). Blend all onto background image using composite ImageMagick command.
avconv -loop 1 -i image.png -target ntsc-dvd \
-r 30 -b 2048k -crf 30 -t 10 video-chunk.mpeg
Show fixed image for ten seconds.
k=1
for i in $(seq 0 4 200); do
j=$(printf %03d $i)
convert -compose dissolve -define compose:args=${j} \
background-image.png lettered-image.png \
-composite temp-image${k}.png
k=$(($k + 1))
done
Make a set of images fading from background to lettering.
avconv -i temp-image%d.png -target ntsc-dvd \
-r 30 -b 2048k -crf 30 video-chunk.mpeg
Build a video clip fading from background image to lettering.
Use timidity to turn MIDI into WAVe files. Use sox to fade WAVe files in/out, concatenate to make a sound-track.
Now concatenate all video clips in order, feed the concatenated (MPEG2) clip to avconv with an audio track, feed the result to DeVeDe, burn video DVD.
Tomorrow’s micro-project will be to bolt the whole lot together into a single script. Save Writer doc as HTML, run script, do other stuff while the whole lot is auto-assembled. Being a Lego® kid seems to have no end.
Result: A video slideshow with neat fades from image to image & background music... zero ©opyright material involved anywhere.
ImageMagick scales images to 720x480 (saved as PNG for losslessness).
convert -gravity center -font "Sansation-Bold" -pointsize $PS \
-draw "fill white text 0,0 \"$(cat 1.txt)\"" \
transparent.png temporary-image-name.png
Make lettering,
convert -gravity center -font "Sansation-Bold" -pointsize $PS \
-strokewidth 5 -draw "fill black text 0,0 \"$(cat 1.txt)\"" \
-channel RGBA -blur 9x9 \
transparent.png temporary-image-name.png
Make shadows behind lettering (for contrast). Blend all onto background image using composite ImageMagick command.
avconv -loop 1 -i image.png -target ntsc-dvd \
-r 30 -b 2048k -crf 30 -t 10 video-chunk.mpeg
Show fixed image for ten seconds.
k=1
for i in $(seq 0 4 200); do
j=$(printf %03d $i)
convert -compose dissolve -define compose:args=${j} \
background-image.png lettered-image.png \
-composite temp-image${k}.png
k=$(($k + 1))
done
Make a set of images fading from background to lettering.
avconv -i temp-image%d.png -target ntsc-dvd \
-r 30 -b 2048k -crf 30 video-chunk.mpeg
Build a video clip fading from background image to lettering.
Use timidity to turn MIDI into WAVe files. Use sox to fade WAVe files in/out, concatenate to make a sound-track.
Now concatenate all video clips in order, feed the concatenated (MPEG2) clip to avconv with an audio track, feed the result to DeVeDe, burn video DVD.
Tomorrow’s micro-project will be to bolt the whole lot together into a single script. Save Writer doc as HTML, run script, do other stuff while the whole lot is auto-assembled. Being a Lego® kid seems to have no end.
Comments