Script for creating movie

XML, Perl, Python, and other languages can be discussed here, even if it isn't PHP (We might forgive you).

Moderator: General Moderators

Post Reply
asai
Forum Commoner
Posts: 43
Joined: Tue May 04, 2010 6:24 am
Location: Norway

Script for creating movie

Post 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?
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: Script for creating movie

Post by Christopher »

What OS are you using?
(#10850)
asai
Forum Commoner
Posts: 43
Joined: Tue May 04, 2010 6:24 am
Location: Norway

Re: Script for creating movie

Post by asai »

Ubuntu.
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: Script for creating movie

Post 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
(#10850)
asai
Forum Commoner
Posts: 43
Joined: Tue May 04, 2010 6:24 am
Location: Norway

Re: Script for creating movie

Post 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?
asai
Forum Commoner
Posts: 43
Joined: Tue May 04, 2010 6:24 am
Location: Norway

Re: Script for creating movie

Post 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?
Post Reply