Page 1 of 1

Script for creating movie

Posted: Sat Sep 17, 2011 8:56 am
by asai
Hi

I'm trying to make a script to make a movie from multible image (jpg) files.
Theres several steps this script shall do:

1. Download all the files from a ftp server.
2. Convert the files to a .mpg or mp4 movie.
3. Delete the dowloaded image files from the ftp server.
4. Upload the finished movie file to a web page where the file kan be played.

Anyone have examples of code to do theese steps?

Re: Script for creating movie

Posted: Sat Sep 17, 2011 12:24 pm
by Christopher
What OS are you using?

Re: Script for creating movie

Posted: Sat Sep 17, 2011 1:53 pm
by asai
Ubuntu.

Re: Script for creating movie

Posted: Sat Sep 17, 2011 6:39 pm
by Christopher
You can do the FTP with PHP using:
http://us2.php.net/manual/en/ref.ftp.php

You can run command line image conversion tools with:
http://us2.php.net/manual/en/ref.exec.php

Re: Script for creating movie

Posted: Sun Sep 18, 2011 5:08 am
by asai
Thanks for the reply.
I have now managed much of my tasks, but one small issue is still left:
The movie my script creates is a .swf file. It then publish to a web page.

Here is the code for the movie in my webpage:

Code: Select all

<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" WIDTH="320" HEIGHT="250" id="alldaymovie" ALIGN="center">
<PARAM NAME=movie VALUE="alldaymovie.swf"> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#333399> <EMBED src="alldaymovie.swf" quality=high bgcolor=#333399 WIDTH="320" HEIGHT="250" controller=true NAME="alldaymovie" ALIGN="center" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED> </OBJECT>
My question is: How can i get movie controls (start/stop) into the webpage?

Re: Script for creating movie

Posted: Sun Sep 18, 2011 11:50 am
by asai
One more question:
I'm trying to convert a swf file to avi.
The swf file is created from multible jpg files with this command:

Code: Select all

jpeg2swf *.jpg -o movie.swf
Then I use ffmpeg like this:

Code: Select all

ffmpeg -i movie.swf movie.avi
But I get this error message:

Code: Select all

picture size invalid (0x0)
Any suggestions to where I go wrong?