make videos by linux + PowerDirector+powerpoint

update on 2017-05-30

  1. powerdirector
    Recently I need to do a video project for my daughter’s birthday. the project involves two chapters: the first chapter is to slide her photos with 0.2 seconds interval, each photos has approximately the same head size and eye position is close. The second chapter is to combine all of the interesting videos of her.

    The first one is going to be massive if one uses gimp or photoshop to do that. therefore, I decided to use scripts to handle these problem. After digging, I found opencv in python and matlab has the function of finding faces from files. So I decided to use opencv as a start. I found a code (updated from http://stackoverflow.com/questions/13211745/detect-face-then-autocrop-pictures) I did further change so that each output file has put the face right in the middle with same size (translations and scaling)

    here is the working scripts :

  2. new scripts for photo to be as video

    first, send all the photos in the same folder and using the following command to convert photo name to 000,001… and so on

    ls | cat -n | while read n f; do mv "$f" "$(printf "%03d" $n).png"; done
    

    Second, convert the photo to video using

    ffmpeg -framerate 4 -i %03d.png -vcodec mpeg4  -vb 20M output.mp4
    

    –framerate, the no of frames per seconds, the more you have , the faster the video flows
    -vcodec mpeg4, thi is find to work well with windows
    –vb 20M this is to check the quality of the photo

    WARNING: how to inset the video to ppt2010
    Just make sure that use the script above and the extension name is set as .mp4 if you set as .avi it may not work

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s