A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: Fzip and videos

  1. #1
    Junior Member
    Join Date
    Sep 2017
    Posts
    14

    Fzip and videos

    I'm trying to load either mp4 or FLV video into flash to play as a video. simple enough I thought, but the videos are inside a zip file using the fzip (http://codeazur.com.br/lab/fzip/) library. The code I got for loading from a zip appears to work fine, but the problem comes with the file itself. It loads the zip, I get the file, which puts it as a Bytearray, but when I pass it into a loader, the error is the 2044/2124 (Error #2044: Unhandled IOErrorEvent:. text=Error #2124: Loaded file is an unknown type.)

    I should be able to add an event error handler but the fact that its erroring with unknown type is annoying me.
    Since loader is normally more for swfs and images if I remember, I tried the URLloader but the first problem that jumps out with that is I don't have an address to pass it, cause it's already got the bytearray.

    The properties for the fzipfile it should be in seams to be correct so it has loaded right.. looking around I can't seam to find too much that might help me..

    anyone have any ideas?

  2. #2
    Senior Member realMakc's Avatar
    Join Date
    Oct 2002
    Posts
    921
    this a valid flash question, but I no longer remember enough of this technology to help people have moved on, and so should you.
    who is this? a word of friendly advice: FFS stop using AS2

  3. #3
    Member Alloy Bacon's Avatar
    Join Date
    Apr 2011
    Posts
    1,085
    If it is just one video that will always be the same why dont you just unzip it to a mp4 outside of flash and than play the mp4 instead. Or do you have to unzip it while its being streamed to your player.. The decompressing is done using bitwise operators on the bytearray which adds alittle bit more of cpu useage compared to having it decompressed already. I highly doubt you are going to need to draw the video out with set pixel after.. It will be looking like an mp4 bytes ready to go through the player. Anyway ill do the job for $1 because i like money yeh but than you can sell me a program you make later
    Last edited by Alloy Bacon; 02-24-2020 at 01:08 AM.
    Is there such a thing as a daily paid job?

  4. #4
    Member Alloy Bacon's Avatar
    Join Date
    Apr 2011
    Posts
    1,085
    In some cases you have to trim the first 45 bytes that come in from http headers that can also corrupt the file with its extra bytes so you have to load the bytes starting at 45, end. That was an issue I once had and fixed while inspecting the bytearray because i knew the exact size of my bytearray had a larger file size than usual by a little
    Is there such a thing as a daily paid job?

  5. #5
    Junior Member
    Join Date
    Nov 2010
    Posts
    3
    Like Alloy Bacon said, it can happen with malformed headers, and sometimes with different compression algorithms too. Have you tried downloading the zip, extracting it, zipping it back up and opening that? That'll tell us definitively whether it's an error in F-Zip (which is kinda unlikely) or in the zip file.

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