Archive for July, 2009

python uploading scripts for youtube

July 27, 2009

consider skipping this post and going right to this newer one:

many thanks to sean levin for writing the upload scripts.

basic script functionality:

check a folder periodically
if movie file is there: upload it, then move it somewhere else.

that covers the basics. here are some more details.

make softlink for no space version of “Photo\ Booth”
ln -s /Users/yourname/Pictures/photobooth /Users/yourname/Pictures/Photo Booth/
crontab to call shell script periodically.
shell script functionality: check for directory and lock file. make lock file. look for files. call python uploader with file. cp file with new timestamped name. mv file.

now the problems.

1. login problems. i think this has to do with the way that youtube and gmail are now linked in some account. including the edlabbroadcaster account. i made edlabbroadcaster2 that is not linked to google account and that seems to fix log in problems.

2. conversion problems. lots of the videos fail to convert. and some convert to junk like this.

and a static shot of the conversion errors.
youtube conversion errors

tried with some avi files and it works so i’m guessing it’s the .mov format. does built in camera on an imac generate different .mov files than external isight firewire camera on a macmini? that is the question i am pondering.

is there another 3rd party photobooth style software that will write a different format video?

login problems persist as well. would love to move to something other than youtube. it seems youtube gets very confused about login now as accounts are linked to google accounts. so you can’t change password anymore or anything. its really annoying.

UPDATE on login:
so i was working on this today (2009-aug-4) and had several succesful uploads. then 2-3 in a row had login problems with no change to code. then waited 5 minutes and login is fine.

still working on this issue of videos that go grey:

some question asking on developers forum.

login issues seem to be mostly fixed now.
conversion errors may have something to do with the filme movement while photbooth is still open. it seems the first of “movei” always seems to upload fine. but the next one often has a conversion error. maybe photobooth has some issues with file movement going on while it’s still open? should the files be left in the directory and only moved once a day or something? should photobooth be closed and restarted? is there a photobooth alternative that might work better? use screencapture program like ishowuhd combined with processing or openFrameworks webcam monitor?

installing ffmeg on mac os x

July 27, 2009

i’m on a mac mini. 1.83 intel core duo. 1 gb ram.

os x 10.5.4.

my notes on ffmeg install following this article  —

 tar xvzf lame-3.97.tar.gz

(this line didn’t work for me because mc os x automatically unzipped for me) so instead i need to get rid of the z.

tar xvf lame-3.98-2.tar

then a couple lines down there is a 


this didn’t work for me either. i got

… configure: error: no acceptable C compiler found in $PATH See `config.log’ for more details.

now i’m downloading xcode and developer tools. i’m assuming this will cover the c compiler part.

ok. this block works now. 



sudo make install 


same issue with tar after downloading. i could get the command line download line to work. so i went to download faad from sourceforge. and then used this tar line

tar xvf faad2-2.7.tar

then i ran ./configure, make,and make install.

now back to ffmpeg. mkdir. cd. svn.

“Checked out revision 19521.”

long configure line. make (this is a long one). sudo make install.

now i noticed the additional config flags for the aac stuff. so i go back and run config again.



 ./configure –enable-libmp3lame –enable-shared  –disable-mmx –enable-libfaac –enable-libfaad

libfaad2 is gpl and –enable-gpl is not specified.

If you think configure made a mistake, make sure you are using the latest version from SVN.  If the latest version fails, report the problem to the mailing list or IRC #ffmpeg on Include the log file “config.err” produced by configure as this will help solving the problem.

not sure what this means but i’m moving on…
so here i am. first try.
$ ffmpeg -i codemovie.flv
FFmpeg version SVN-r19521, Copyright (c) 2000-2009 Fabrice Bellard, et al.
  configuration: –enable-libmp3lame –enable-shared –disable-mmx
  libavutil     50. 3. 0 / 50. 3. 0
  libavcodec    52.32. 0 / 52.32. 0
  libavformat   52.36. 0 / 52.36. 0
  libavdevice   52. 2. 0 / 52. 2. 0
  libswscale     0. 7. 1 /  0. 7. 1
  built on Jul 27 2009 15:15:19, gcc: 4.0.1 (Apple Inc. build 5493) Unknown format

tar xvf faad2-2.7.tar

it can’t understand the native .mov files written by photobooth. that’s all for now. back to this at a later date.

Hello world!

July 27, 2009

Welcome to This is your first post. Edit or delete it and start blogging!