Need advice on compression.

  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23456
  • Loc: Woodbridge VA

Post 3+ Months Ago

I'm trying to create an animation loop for work. I've been successful with that part. It's basically a flight loop over a computer generated landscape. I've also gotten a fairly high quality AVI for it and using MPEG4 Video Codec V2, was able to get the movie file size down to about 20 MB. The animation consists of 2037 frames of JPG's at about 26 KB each. Some of the file sizes of the original codecs I tried ranged between 64MB to as much as 400MB. So I was pretty pleased to get a movie of fairly decent quality down to around 20 with the MPEG4.

The finally goal is to get this into Flash at a low file size, realistic for dialup users as well as broadband, because this will eventually need to be embeded into an existing website. I messed around with various compression settings and can get the file size under 3MB, but the video quality goes to crap. The best I could get it down to and still maintain close to original quality is this at about 15MB
http://www.alaron-nuclear.com/images/newFlight4.html

To achieve that level of quality, I imported the AVI at an edited DSL/Broadband (I think it was roughly 768Mbps setting - the highest one available in Flash MX2004 ) and I edited it to use 100% quality vs, the default bandwidth setting. When publishing it, I disabled the default compression and set jpg quality at 95%. Even set where it's at now, I can still see slight degredation in the quality.

I'm looking for suggestions on getting the file size as low as possible, while maintaining as close to the original movie quality as possible. If you'd like to view the original AVI, here's the link:
http://www.boastingrights.com/images/NewLoopMpeg4.avi (That's about 20MB, so you might want to save it and open it up in Media Player.)

Any advice would be appreciated.
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • lostinbeta
  • Guru
  • Guru
  • User avatar
  • Posts: 1402
  • Loc: Philadelphia, PA

Post 3+ Months Ago

Well I have no idea about working with video at all, but over at kirupaForum with a discussion about how the video for http://corpsebridemovie.warnerbros.com/ was so superb while not being too damaging as far as loading, one guy chimed in with

grimdeath from kirupaForum wrote:
all ou need is to export the 3d as a tiff sequence then import the sequence to any video editing appt and export it as a Mov or avi, then you jsut compress it with sorenson squeeze at constant bitrate and the quality will be superb.


If that helps you out at all.
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23456
  • Loc: Woodbridge VA

Post 3+ Months Ago

*lol - I think I read that before leaving work. In fact, I found several mentions of using Sorenson and exporting to FLV files. I don't know anything about FLV files, or how to use them with Flash. If anyone has any links to tutes or instructions about what to do with them or how to use them, that'd be great. I got the feeling from what little I read, that is probably the way I should go.
  • lostinbeta
  • Guru
  • Guru
  • User avatar
  • Posts: 1402
  • Loc: Philadelphia, PA

Post 3+ Months Ago

Well from everyone I know that does work with video, they all have Sorenson Squeeze, it's apparently the must-have app for video editing.

Here are the livedocs for video in Flash if it helps at all...

http://livedocs.macromedia.com/flash/mx ... 00338.html
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23456
  • Loc: Woodbridge VA

Post 3+ Months Ago

Excellent lib! Thanks. That helps a lot. I'll start playing around with that when I get back to work on Tuesday.
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23456
  • Loc: Woodbridge VA

Post 3+ Months Ago

I made some good progress on this. Over the last couple days I learned quite a bit about streaming FLV files. I wouldn't mind some feedback on this. Depending on your Computer speed it might start off a little jerky through some or most of the first loop. With a faster processor, it streams pretty smooth right off the bat on all of my computers. I'd be particularly interested in feedback from dial-up users as to how it goes. From where I'm sitting, it's all streaming just about perfectly. The cool part is the FLV file is over 46MB's.

http://www.alaron-nuclear.com/AlaronStream4.html
(requires Flash Player 7)

I've considered breaking the video up into 8 smaller 5 MB files, but I'm not sure how to code the Actionscript to do it. This is the first time I've ever done anything with Actionscript. What I would need to do is script it so that when each segment ends the next one begins, and then after the last one loop back to start the first. Suggestions on how to code that would be great. Here's the script currently in use for the stream:

Code: [ Select ]
//Create a NetConnection object
var netConn:NetConnection=new NetConnection();
//Create a local streaming connection
netConn.connect(null);
//Create a NetStream object and define an onStatus() function
var netStream:NetStream=new NetStream(netConn);
netStream.onStatus=function(infoObject) {
    status_txt.text+="Status(NetStream)" + newline;
    status_txt.text+="Level:"+infoObject.level + newline;
    status_txt.text+="Code:"+infoObject.code + newline;
};
//Attach the netStream video feed to the Video object
my_video.attachVideo(netStream);
//Set the buffer time
netStream.setBufferTime(10);
//Begin playing the FLV file
netStream.play("animationStream.flv");

netStream.onStatus=function(infoObject) {
    if(infoObject.code=="NetStream.Play.Stop"){
        netStream.seek(0);
        netStream.play();
    }
};
  1. //Create a NetConnection object
  2. var netConn:NetConnection=new NetConnection();
  3. //Create a local streaming connection
  4. netConn.connect(null);
  5. //Create a NetStream object and define an onStatus() function
  6. var netStream:NetStream=new NetStream(netConn);
  7. netStream.onStatus=function(infoObject) {
  8.     status_txt.text+="Status(NetStream)" + newline;
  9.     status_txt.text+="Level:"+infoObject.level + newline;
  10.     status_txt.text+="Code:"+infoObject.code + newline;
  11. };
  12. //Attach the netStream video feed to the Video object
  13. my_video.attachVideo(netStream);
  14. //Set the buffer time
  15. netStream.setBufferTime(10);
  16. //Begin playing the FLV file
  17. netStream.play("animationStream.flv");
  18. netStream.onStatus=function(infoObject) {
  19.     if(infoObject.code=="NetStream.Play.Stop"){
  20.         netStream.seek(0);
  21.         netStream.play();
  22.     }
  23. };


The last function is basically testing to see if the stream is done and when it is loop it. I'm also wondering if there would be a better buffer setting to use than 10?

Thanks for any thoughts.
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23456
  • Loc: Woodbridge VA

Post 3+ Months Ago

Heehee. Well, I guess I answered one of my own questions. I just got home and checked it on an 11Mbps wireless connections, and there's some serious lag the first time through the loop. At 56Mbps and 100Mbps at work it was streaming nearly perfectly. *sighs. Definitely going to have to follow the plan for breaking it up into smaller segments, so any advice on the action script would be appreciated.
  • lostinbeta
  • Guru
  • Guru
  • User avatar
  • Posts: 1402
  • Loc: Philadelphia, PA

Post 3+ Months Ago

Yeah, I'm on a fairly good system, and I get the music playing, but just a still frame at the beginning and it never eventually plays. I have to refresh it a couple times for it to actually play.

The actionscript for smaller segments is probably pretty straightforward, but it's going to be complex to write.

How do you want to do it? Do you want to preload the entire movie then play? Or do you want to preload individual sections one after the other and just start playing the first one hoping the next ones will be loaded in time? Sort of a psuedo stream.
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23456
  • Loc: Woodbridge VA

Post 3+ Months Ago

I found some pretty straight forward instructions HERE. Looks like that might do the trick. I'll play around with that idea over the next day or two. In the meantime, I downloaded a 30 day trial of Sorenson Squeeze. Didn't turn out too bad, and only 7 MB on the FLV. Much better than I anticipated. I didn't include the music on this one, but see what you think:
http://www.alaron-nuclear.com/Sorenson_Stream2.html
  • graphixboy
  • Control + Z
  • Mastermind
  • User avatar
  • Posts: 1828
  • Loc: In the Great White North

Post 3+ Months Ago

Nice thing about squeeze is that you can export several different files of the same movie optimized to different speeds. This means you have the option of detecting the client download speed and deploying the correct file. I'm not sure that doing it this way will fit your presentation but its something to think about

Post Information

  • Total Posts in this topic: 10 posts
  • Users browsing this forum: No registered users and 3 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.