Alert icon
We're changing our privacy policy. This stuff matters.  Learn more  Dismiss

DIY_fluxusMOV

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
312 views
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Feb 14, 2008

# BuiLDING A letter Paul Sharits - Word Movie (1966)
# takes stdinput
# call script with -f [YOUR_CHARACTER_HERE] for individual results
# MATCHES WORDS THAT START WITH A GIVEN LETTER

import sys, os
from optparse import OptionParser
import Image, ImageDraw, ImageFont

width = 320
height = 240
ii = 0

myFont = ImageFont.truetype("/var/lib/defoma/fontconfig.d/D/DejaVu-Sans-Bold-Oblique.ttf"­, 32)

parser = OptionParser()
parser.add_option("-f", "--firstletter", dest="letter", default="d", help="print only words that begin with the given letter")
(options, args) = parser.parse_args()
# print options

matchletter = options.letter
text = sys.stdin.read()

# convert text to lower case
text = text.lower()
text = text.split()


for w in text: im = Image.new("RGB", (width, height), (128, 128, 128)) draw = ImageDraw.Draw(im) textsize = draw.textsize(w, font=myFont) # find the position of matching letter index_char = w.find(matchletter) # check if letter is present if index_char != -1: left_chunk = w[:index_char] left_size = draw.textsize(left_chunk, font=myFont) # get starting X-position of text left_pos = width/2 - left_size[0] # print w, left_pos, left_chunk, left_size draw.text((left_pos, height/2), w, fill=(255, 255, 255), font=myFont) filename = "word%06d.png" %(ii) im.save(filename) ii += 1

os.system("ffmpeg -y -r 10 -b 1800 -sameq -i word%06d.png foo.flv")
# remove old files
os.system("rm word*.png")

Category:

Science & Technology

Tags:

License:

Standard YouTube License

  • likes, 0 dislikes

Link to this comment:

Share to:
see all

All Comments (0)

Sign In or Sign Up now to post a comment!
Loading...
Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more