I have a large number of flash movies which i need to convert to mp4 files, to make them ios compatible. Each of the movies already has a basic html file (all called index.html) which will open the swf, setting the appropriate parameters to make it go.
Each video has the same format: the movie itself is 800px wide by 600px high. The bottom 60 px is taken up with a control bar with play button, scrubbber etc. I do not want to capture this (since the mp4 player will add its own controls): i only want to capture the top 540px. Each flash video has an xml file which it reads in, and i can scrape the duration of the flash movie from this, so that i can pass the duration of the movie to whatever does the recording.
I'm in linux, and I want to write a script which does the following:
- reads the location of the next index.html file
- opens it in chrome (or some kind of headless browser perhaps)
- runs *something* which does the following:
- presses the "play" button on the video, which for the sake of argument lets say is always at coordinates "30,570"
- starts recording video and audio for X seconds, where X is passed through from my script.
- after X seconds, stop recording, and save the output as an mp4 file to a specified location on my filesystem.
Let's say, as an example, that for the first video i have these parameters i can pass through to whatever tool is going to do this:
{url: "localhost:3000/my_video_input/1/index.html", duration: 250, output_file:"/home/max/my_video_output/1/video.mp4"}
Can anyone point me at a tool, or perhaps a javascript library, for doing this? Perhaps the solution involves writing javascript into the html file before loading it into the browser. If so then that's doable but i'd prefer something simpler :)
thanks in advance - max
EDIT - some more info. The flash apps are as2, not as3, in case that's relevant.