A Flash Developer Resource Site

Results 1 to 8 of 8

Thread: Stitching...our savior!? (CD problem)

  1. #1

    Stitching...our savior!? (CD problem)

    I use squeeze for my videos in flash. I read about he stitching option and wonder if this could solve the loading (streaming) problem with flash video

    I tried compressing a file and it works great once I put it on a CD
    but the problem is when I try to load the file (with loadmovienum) from a projectyor or even another swf, nothing happens.

    Any clue?

    Frank
    -------------------------

  2. #2
    Flash Video Moderator Wheels's Avatar
    Join Date
    Dec 2000
    Location
    Minneapolis
    Posts
    1,590
    Hi Frank,

    According to Sorenson, the stiching feature was included for use with the streaming server solutions such as Flash Comm. - althought it is supposed to work with any http delivery method. I'm not sure about Projectors.

    I haven't tried loading one dynamically. Are you saying it doesn't work with loadMovieNum() in either Projector or Player?

  3. #3
    Hi Wheels,

    Sorry I didn't get back to you earlier about your last email.
    I thank you again and will surely keep the option you proposed in mind.


    As for the stitching, I got it to work with loadmovienum from a projector and surely it solves the loading time problem.

    I made a couple of tests with an 8 min. video. The video is 50 Mb.
    I "stitched" it with squeeze in blocs of 2 Mb. Testing has shown that
    loading time is about 1 sec per Mb. So in that case it took about
    2 seconds to load the first part of the video (2Mb) and then no wait.
    I thought I had finally solved that problem but there is a down side.
    Actually 2 down sides!

    The first problem is when the fisrt part of the video starts playing, it jerks. I,m going to try different things this week end, to try to see if it can run smootly. Note that once the fisrt part of the v ideo starts playing correctly, than the rest flows great and you can't notice the changes from one segment to the other.

    The second problem I am facing (and that's probably due to the fact that I ain't no actionscript wise) is that you cannot assign actions such as if _level1.currentframe = totalframes
    because it's segments of video. May be I'm way off on this one. Let's hope!

    I'll keep on testing.

    As for the new beta, ever since I installed it, I have had no problems playing back video either on PC or MC.

    Later Wheels!
    Frank

  4. #4
    Flash Video Moderator Wheels's Avatar
    Join Date
    Dec 2000
    Location
    Minneapolis
    Posts
    1,590
    Nice work Frank! I thought that stitching might work for this.

    I used to make these streaming audio jukeboxes for CD, I found that when you have a host inside of a host, it seemed to cure the stallling off the CD. I suspected the same would be true of stitching, but I've yet to get a chance to test my theory.

    I contacted Sorenson about how they target the second host (the 4k starter file) but they we're reluctant to give me too much information. But I did talk to them about the delay (which happens in the player as well) I suspect it may be related to a an undocumented property that is created when a sound .swf is generated. _soundbuftime.

    It's there on all .swf's with streaming sound and the default is 5 (clock seconds) about 1 or 2 seconds on a PC. Their engineer is going to test it and get back to me. If we can assign that property a value of soundbuftime=0; from the host we may be able to get rid of some of the stutter you are experiencing.

    You could easily test this by creating a video .swf with no sound.

    I think you're close. I'll try to do some testing over the weekend. Which Projector are you publishing with? The Beta? How much lag are you seeing between stitches?

    Let me know what you need to control with scripts and I'll build them up. I may have a preloader that will work with the CD as well, I'll bet that would be handy.

  5. #5
    Flash Video Moderator Wheels's Avatar
    Join Date
    Dec 2000
    Location
    Minneapolis
    Posts
    1,590
    Hey Frank,

    Did you ever do anything else with this? I'm thinking I'll get a chance to play around with this next week.

  6. #6
    Senior Member
    Join Date
    Apr 2002
    Posts
    153
    Is the Squeeze stiching the answer for the current release of the Flash player? Or does this only apply to the beta?

  7. #7
    I don't think I quit understand the question 1a.

    The beta is suppose to solve different aspects of the video playback
    but not the streaming.

    From what I understand, video from a CD cannot stream in flash. Wether imported dierctly in flash or through flv or loaded with loadmovienum, the video is always considered like a mc so it loads completely before it starts playing. Some people (smarter than I) have proposed segmenting (if that's an english word!) your video so that you make a first small part of the video so it starts right away and the while the first part plays, the second part loads and so on.

    I could be wrong but when running a video with flash from a CD, whenever a video starts loading, everything else freezes on the computer. Unless I am wrong about that, I find it very disturbing that moderators (whatever that means!) say that you can make preloaders of videos for CDs. It is one thing to try something from your HD and another to try it from a CD. I wonder if these people have ever tried putting an 8 minute long video on a CD and try playing it back.

    May be it works with some third party soft. That leads me to sometimes wonder that if it wasn't for Wheels that section should be called third party video!

    Anyways, the stitching option in squeeze does exactly that. When you export an swf from squeeze you can export many little segments of your video and squeeze will automatically make preloaders. So the first video starts ans loads the second and so on and it works great.
    The only thing is the video jerks a little at the begining but after that you don't see any lag between videos.

    And Wheels, I'm going to be testing without sound tomorrow to see about your theory but I think you are on to something because I have seen more jerking with higher sound data rate.

    I'll get back to you on that.

    Now time to take some time off!

    Ciao all!

    Frank.
    -----------------------------------
    99% of statics are made up!

  8. #8
    Flash Video Moderator Wheels's Avatar
    Join Date
    Dec 2000
    Location
    Minneapolis
    Posts
    1,590
    Nice Frank,

    Your right about the higher data rate affecting playback. I had a video that was created at 30 fps in After Effects. When it was created, the designer used the keyframe (in AE) at frame 300 to make a sync with a major transition in both the sound and video - resulting in too much information at that frame.

    When I encoded at 7.5 fps, frame 300 had a huge spike (as seen in the profiler). It was stalling on every machine I tested except for a twin chip G4 (as tested from a server).

    I couldn't change the source and I didn't want to change my frame rate, so I played with the data rate on the sound and found that it was much easier to get the spike down a comfortable, playable level by doing this:

    Creating a .flv in Squeeze at 56 kbp/s then importing to Flash and exporting at 64 kbp/s. At the same time I added _soundbufftime = 0; on the first frame to reduce the lag at the beginning., and exported as a .swf.

    It worked, I was able to reduce the spike and achieve smooth playback. The sound quality was surprisingly good at this data rate.

    From my conversation with Sorenson, the stitching they are using has some built-in intelligence and is different from all other methods. There is a code built-in that detects when a video "slice" is completely loaded and will begin to load the next slice as soon as that has been detected.

    They are aware that there is a slight delay between these slices on playback, but they are testing my method of setting the _soundbuftime to 0 to see if that will eliminate this little glitch.

    The thing to look for then on your test Frank, is whether or not the _soundbuftime property is present in a movie with no sound. You can check this by publishing with the process I discussed above and then checking the "allow debug" in the publish settings and opening the file in the debugger. If the property is there, it will appear in black, if not it will be greyed out.

    I'm trying to figure out how to set the _soundbufttime to 0 for movies created with Squeeze's stiching from within the main movie. It's a targeting issue, and Sorenson has been reluctant to tell me how they target with their internal code.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center