A program to create "random movie"

Post and discuss creative ideas

A program to create "random movie"

Postby thecatzman » Sun Feb 03, 2013 4:14 pm

I need help to create a program which will play animations (.wmv, .avi or anything else) to create a movies which will be different at each watch.
At the root of the program there will be folders. In these folders, there will be files. The program will play these files by following codes.
For example:

-start
-at begining play randomly one file from folder A
-after that, play randomly three files (but do not repeat the same file) from folder B
-after that play randomly one file from folder C or play one file from folder D
-after that if last file come from folder C, play randomly one file from folder E; if last file come from folder D play randomly one file from folder F
-after that, play randomly 2,3,4 or 5 files ((but do not repeat the same file)) from folder G
-the end


So I need a program to do that, and example of code lines ( in my example, I think I show all the needed actions ).
I hope someone could help me. I know nothing about coding, but with examples (and some help) I am sure I can do it.
thecatzman
 
Joined: Tue Nov 27, 2012 5:41 pm

Re: A program to create "random movie"

Postby OwnerOfSuccuby » Mon Feb 04, 2013 3:54 pm

Just a question - will this files all be downloaded as one zip folder and then unziped ? I mean they have to be on users computer as i understand ?
All files have to have for example the same resolution and format - for example mp4. As i know wmv is some kind of format that flash can dislike.

If so may be i can help a little with it. It is possible as i understand to make on flash. Can you post some sample videos with the resolution and format (i hope for example mp4) - that you are planning to use ?

They can be just as example and very very shot. But i need to see it to understand its structure and coding type.
OwnerOfSuccuby
 
Joined: Fri Jun 11, 2010 9:33 pm

Re: A program to create "random movie"

Postby OwnerOfSuccuby » Mon Feb 04, 2013 5:12 pm

Test some prototype - of how is possible to play videos - it works - but a little blinking when new video starts - is it a problem ?. I can post some example:
OwnerOfSuccuby
 
Joined: Fri Jun 11, 2010 9:33 pm

Re: A program to create "random movie"

Postby thecatzman » Mon Feb 04, 2013 7:16 pm

OwnerOfSuccuby Wrote:Just a question - will this files all be downloaded as one zip folder and then unziped ? I mean they have to be on users computer as i understand ? .

Yes, all the files will be on a zip folder and then unziped.

All files have to have for example the same resolution and format - for example mp4. As i know wmv is some kind of format that flash can dislike.

No problem

If so may be i can help a little with it. It is possible as i understand to make on flash. Can you post some sample videos with the resolution and format (i hope for example mp4) - that you are planning to use ?

They can be just as example and very very shot. But i need to see it to understand its structure and coding type.

Ok I will do it.


OwnerOfSuccuby Wrote:Test some prototype - of how is possible to play videos - it works - but a little blinking when new video starts - is it a problem ?. I can post some example:

I prefer without blinking but it is not very important.
thecatzman
 
Joined: Tue Nov 27, 2012 5:41 pm

Re: A program to create "random movie"

Postby OwnerOfSuccuby » Mon Feb 04, 2013 7:29 pm

Okey i will look may be one idea will work how to remove blinking.
OwnerOfSuccuby
 
Joined: Fri Jun 11, 2010 9:33 pm

Re: A program to create "random movie"

Postby thecatzman » Tue Feb 05, 2013 7:40 pm

this is the videos ( titfight contents)
Attachments
video.zip
(4.15 MiB) Downloaded 21 times
thecatzman
 
Joined: Tue Nov 27, 2012 5:41 pm

Re: A program to create "random movie"

Postby OwnerOfSuccuby » Wed Feb 06, 2013 6:32 pm

Try this one:

I test it with *.mp4 formats and *.flv formats.

If you will use not mp4 in system folder change format from mp4 to what you will try to use. The same for if ypu add videos to folder make variables = number of videos in it. They have to be named like 1,2,3,4,5,6,7,8,9,10,11, and etc.

I do not know why but flash dislike *.avi - so better try mp4 :roll: :mrgreen:
OwnerOfSuccuby
 
Joined: Fri Jun 11, 2010 9:33 pm

Re: A program to create "random movie"

Postby thecatzman » Thu Feb 07, 2013 5:40 pm

OwnerOfSuccuby Wrote:Try this one:

I test it with *.mp4 formats and *.flv formats.

If you will use not mp4 in system folder change format from mp4 to what you will try to use. The same for if ypu add videos to folder make variables = number of videos in it. They have to be named like 1,2,3,4,5,6,7,8,9,10,11, and etc.

I do not know why but flash dislike *.avi - so better try mp4 :roll: :mrgreen:



ok, thank you, I will take a look at it ;)
thecatzman
 
Joined: Tue Nov 27, 2012 5:41 pm

Re: A program to create "random movie"

Postby thecatzman » Sat Feb 09, 2013 11:01 pm

Ok, so I am trying to understand how it works step by step. Let me know if I am wrong.

So about this lines:
var vVideoScenariy:Array=new Array();

It launch your program. So It must be the first line.



vVideoScenariy.push("System/A/"+String(Math.round((1+Math.random()*(vA-1))))+"."+vFormat);

It choose randomly one file in the folder "System/A"
But for example, If I would like to play one file from folder C instead of folder A, it will be
vVideoScenariy.push("System/C/"+String(Math.round((1+Math.random()*(vC-1))))+"."+vFormat);






var tmpBArray:Array=new Array();
var itmpBadr:int;

It prepare to launch another serie of videos (but I don't understand why this lines are not before the "//C-E or D-F" action too.)





for (var i1:Number = 1; i1 <= vB; i1++) {
tmpBArray.push(i1);
}
for (var i2:Number = 1; i2 <= 3; i2++) {

if (tmpBArray.length>0){
itmpBadr=Math.round((Math.random()*(tmpBArray.length-1)));
vVideoScenariy.push("System/B/"+String(tmpBArray[itmpBadr])+"."+vFormat);
tmpBArray.splice(itmpBadr,1);
}

}


It will play randomly 3 files from foider B
Now if I want to play randomly 2 files from folder C for example, it will be

for (var i1:Number = 1; i1 <= vC; i1++) {
tmpBArray.push(i1);
}
for (var i2:Number = 1; i2 <= 2; i2++) {

if (tmpBArray.length>0){
itmpBadr=Math.round((Math.random()*(tmpBArray.length-1)));
vVideoScenariy.push("System/C/"+String(tmpBArray[itmpBadr])+"."+vFormat);
tmpBArray.splice(itmpBadr,1);
}

}




Let me know if I am wrong.
thecatzman
 
Joined: Tue Nov 27, 2012 5:41 pm

Re: A program to create "random movie"

Postby Kurushimi » Sun Feb 10, 2013 7:56 am

OwnerOfSuccuby Wrote:Test some prototype - of how is possible to play videos - it works - but a little blinking when new video starts - is it a problem ?. I can post some example:

Holy fook! Is this taking random sound from my computer?

(EDIT: If not, why did I hear Manowar?)
User avatar
Kurushimi
 
Joined: Mon Jan 21, 2013 12:45 am
Location: Norway

Re: A program to create "random movie"

Postby thecatzman » Sun Feb 10, 2013 8:20 am

Kurushimi Wrote:
OwnerOfSuccuby Wrote:Test some prototype - of how is possible to play videos - it works - but a little blinking when new video starts - is it a problem ?. I can post some example:

Holy fook! Is this taking random sound from my computer?

(EDIT: If not, why did I hear Manowar?)

This is a clip with a song by manowar (it is write at the end of the clip).
thecatzman
 
Joined: Tue Nov 27, 2012 5:41 pm

Re: A program to create "random movie"

Postby OwnerOfSuccuby » Sun Feb 10, 2013 8:36 am

Oh yes may be in the video with dark elf if you talk about that prototype :mrgreen:

About how it works:

var vVideoScenariy:Array=new Array(); - is a array of scenario. All videos that will be put there will play.

vVideoScenariy.push("System/A/"+String(Math.round((1+Math.random()*(vA-1))))+"."+vFormat);


It choose randomly one file in the folder "System/A"
But for example, If I would like to play one file from folder C instead of folder A, it will be

vVideoScenariy.push("System/C/"+String(Math.round((1+Math.random()*(vC-1))))+"."+vFormat);


You put adress of your video to this scenario. For example you put video from first directiry A:
vVideoScenariy.push("System/A/VideoName.mpg");

The video that will be pushed first will play first.

var tmpBArray:Array=new Array();
var itmpBadr:int;


It prepare to launch another serie of videos (but I don't understand why this lines are not before the "//C-E or D-F" action too.)


I need all other arrays not for videos - but to chose randomly X videos from for example dirrectory B with out repeats. It can be another way - even with out arrays but i like this method.

The only one array that will play videos is : vVideoScenariy

All other are just for simpler adding video adress to it.

It will play randomly 3 files from foider B
Now if I want to play randomly 2 files from folder C for example, it will be


Yes you are right but - it is better to rename array to tmpCArray - becouse it is anoother array and tmpBArray.- is already in use for B.

And to change all B to -> C
itmpBadr -> itmpCadr
And etc ;)
OwnerOfSuccuby
 
Joined: Fri Jun 11, 2010 9:33 pm


Return to Discussion



Who is online

Users browsing this forum: No registered users