formats of animations

I have just created a series of animations for an educational CD I am publishing. The presentation will be in the HTML format. What would be the best format to make animations available in? Is it possible to insert the blender “Play” button in an html page to do the animations? I am an advocate of open source software. Is there an open source format that would accommodate my needs? There is some room on the CD to install player software of some kind. Please excuse my questions if this is the wrong forum. Any help is greatly appreciated.

You can creat GIF animations with the GIMP, but not sure if you can have it play ‘on demand’ as you seem to want.

Thanks Pam. These animations are rather large for gifs. Presently they are in jpeg avi format. A coupl e of them are about 27 megs each. I’d really like to use blender somehow for it. I just don’t know how to go about it. I use gifs of course for various things but the license issues are a bit of a snag also in this case.

Look for the “somehow” free Bink CODEC. Excellent options, file size and quality.
http://www.radgametools.com/

Thanks arangle. No way to just use the blender to do it? Link to the play button and use the blender?

you should save your animations in MPEG format - most browsers are configured to handle that either via media player or quicktime plugin. you can also embed your animations directly within the html (this is, no extra window pops up for the animation) - check out webmonkey.com, they used to host some detailed tutorials on how to accomplish this. i don’t know, however, how linux browsers handle MPEG files. if there is a plugin/program configured to handle the MPEG mime-type, everything should work as expected, if not, some clients might not be able to link directly to the animations.

hope this helps

greets

marin

It does and doesn’t help :wink: Linux has mpeg capabilities but they are often a pain to get going with xine or mplayer and a lot of people avoid the hassle. Thanks for the input

oh yes, one more thing - flash could help. since v6 (MX) you can embed videos within your swf’s. the client doesn’t need any codecs or stuff, just the flash player/browser plugin, which is available for wintel, mac and linux and which you could add to your cd.

I think that would be hard to implement (not worthy). You should choose a wide accepted CODEC that doesn´t need plug-ins (like MPEG or Cinepak AVI).

only for the ditribution via internet. if he uses a cdrom, he can pack virtually any player/plugin/codec onto it.

Yes I’ve been doing a little homework on the subject and there are some interesting prospects. Those raw avi’s are enormous :o that I am re-rerendering for reformating. It doesn’t look like it will be an easy task on the linux side. (another sharp learning curve) but I’ve got to get a handle on it. How’s this - Linux Blender and Video all at once [!] ANy good tutorial sites are appreciated. Zwein-Stein looks easy but not quite precise enough.

arangle, yes it is cdrom. That is why I was hoping to somehow be able to put the blender play button on the CD. Like with the web plugin or something.

Well

render the images as gifs, and then write a javascript function that will swap out the images (since they’re written sequentially, the function could be pretty simple - I’ll write it and send it to you if you wish).

WITH that function, you would have play, pause, reverse, etc, functionality. YES, the total number of images might be huge, but, if you’re looking at a 27-meg file already, then there hopefully wouldn’t be a problem. ESPECIALLY if they’re on a CD - there wouldn’t be lag time in downloading picture after picture. AND, it would be entirely cross-browser compatible since EVERY browser supports GIFS and Javascript.

Basically, here’s the code:

![IMAGE_URL_0.gif](IMAGE_URL_0.gif)
<script language="JavaScript">
var counter = 0;
var total_number_of_files = 400;
var control = "play";

function move(num){
  document.animation.src = "IMAGE_URL_" + num + ".gif";
}

function play_mov(){
   if(control=="play"){
      if(counter<=total_number_of_files){
         move(counter);
         counter++;
      }else{
         counter = 0;
         play_mov();
     }
}

function play_from_start(){
     counter=0;
     play_mov();
}

function rew_mov(){
   if(counter>=0){
      counter--;
      move(counter);
   }
}
</script>

And then the PLAY href would be “javascript:play_mov();” and the reverse button would be “javascript:rew_mov();”, and the PLAY FROM START href would be “javascript:play_from_start();”

I’m pretty sure that’s all you need. If you still have questions, let me know. I’m sort of assuming you know something about html and javascript, but if not, let me know. I’ll try to whip together an example online.

EDIT:
heh. well. it’s all BRILLIANT except that Blender wont render GIF files. So, I’m looking into PNGs.

On linux I tend to use mplayer and its utilities to do most of my encoding, avi’s at least. I use mpeg2-enc and mjpeg-tools to deal with making mpegs. If I want to use some basic video editing, I’ve used MainActor. It works for basic stuff, although I’d definitely NOT write a rave review of it, :).

I generally render to png or other lossless image format, then either use blender’s sequence editor to assemble the images into an avi or mencoder (from mplayer) to encode the files, and possibly the audio, into an avi. I like going to the images rather than directly to video because of the options it preserves. Also, compress png or even RLE compress tga images will consume much less disk space than an uncompressed avi will.

I generally wrap a few simple scripts around these command line tools as I tend to do the same thing over and over again. It sounds like you haven’t been using mplayer or might be fighting it, so in the event that it might help you, here’s my simple encoding script for using mencoder (part of mplayer):


TMPFILE=/home/zaz/tmp/enc-$$.avi
 
if [ $# -ne 2 -a $# -ne 3 ]
then
        echo "usage: picbasename [audiofilename] outputfilename"
        exit 1
fi
 
 
if [ $# -eq 2 ]
then
        mencoder -fps 24 -o $2 -ovc lavc -lavcopts vcodec=mjpeg:vhq:vbitrate=1800 mf://"$1"\*.png
else
        trap "rm -f $TMPFILE" 1 2
        mencoder -fps 24 -o $TMPFILE -ovc lavc -lavcopts vcodec=mjpeg:vhq:vbitrate=1800 mf://"$1"\*.png
        mencoder -o $3 -ovc copy -audiofile $2 -oac copy $TMPFILE
        rm -f $TMPFILE
fi

Its not setup for high quality output as I only use this to get a general look at stuff I’ve rendered. You can change the bitrates and stuff to improve the quality. Usage is simple, I generally render to images with names like walk-0000.png, walk-0001.png, etc., so to encode with this I run “enc walk- walk-sound.wav …/anims/walk.avi” or something similar.

For audio I use audacity to do the basic editing and cleaning of audio clips, then use blender’s sequence editor to synchronize the audio to the video and do the mix down.

I do have VirtualDub and ULead’s Media Studio Pro available for me under windoze should I decide I want to use them as years ago I used to use windoze for video editing. These days, I just normally don’t feel the need to use those tools, although I might if I ever get closer to actual final production on something. MSP just has some nice title capability as well as some effects I might want to use to spiff my project up. I wouldn’t recommend purchase of it though just for that.

Okay - I’ve built an animator out of PNG files. Online, it’s limited because I’m too lazy to write a decent pre-loader, but if all the files are on your computer, it’s pretty fast… all controlled by variables in the HEADER.

http://www.funkmusician.com/anim8/anim8.html

Provided, these files are 4K png files. No, I haven’t tested it all with huge gigantor files.

I just tested it with larger files (18k each) and got acceptable framerates on my machine. So, then, it’s doable.

the sound the ox is currently making [>] glub glug glug glub :slight_smile: water and bubbles everywhere.

That script is awesome. Very much like I’d like to use. I will experiment with it and get back to you thanks

I have a video directory loaded with video editing software that I have downloaded probably5 times as false starts. :expressionless: Yet i keep coming back to it because I need to. (The ox confesses he is overwhelmed) Not whining mind you just letting you know the facts. I’ have been a red hat user since 5.3 and there are issues (especially now -RH9) with mplayer that frustrate me. I’ll keep your suggestions as a reference while I’m in the thick of it (like right now :stuck_out_tongue: )

My latest rerender in raw avi is so far 117 megs and 130 frames to go :o I get your point. The blender sequence editor is a piece of cake. I love it . mplayer is another thing all together because of red hats stance on the license issues. I’ll keep your script for mencoder to try it out when i get there. I could kick myself in the butt for not paying my dues and going with Debian. BTW this would be nice. http://www.chainsawlinux.com/? I wonder if it would make a good blender box?

thanks a lot. it is really helping me orient and get a grip on this stuff.

Here’s the latest update.

I have embedded avi’s into my web page and it works great. The file is defintely toooooo big but it does play quite nicely. I guess my next leap is to convert the avi’s into mpeg1 and see if that works.