Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8369131
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T13:34:12+00:00 2026-06-09T13:34:12+00:00

I am using simple as3+php, no FMS or such in between. I am making

  • 0

I am using simple as3+php, no FMS or such in between. I am making a video recording app, and I can capture frames and convert them to flv encoded bytearray. But the problem happens when I try to save it on the server. If I convert the bytearray to a string via base64 encode and then send that string to the server, all works ok, but the problem is that since it’s an video file, it can be pretty big, like 20mb or so, and hence it takes a long time to encode it and then upload it, moreover normally a script timeout will occur during the encoding. To make things faster, I am trying to send the bytearray directly, but my firebug net panel shows me that the data being sent is around 20-46 bytes. Please tell me what I am doing wrong.

//var encoded_str = Base64.encodeByteArray(_baFlvEncoder.byteArray);
            //Handle Upload
            /*var url_data:URLVariables = new URLVariables();
            url_data.data = _baFlvEncoder.byteArray;*/
            var url_ref:URLRequest = new URLRequest("save_vid.php");

            url_ref.contentType = 'application/octet-stream';
            url_ref.data = _baFlvEncoder.byteArray;//url_data;
            url_ref.method = URLRequestMethod.POST;

            var urlLoader:URLLoader = new URLLoader();

            // just making sure the server knows we are sending data in proper format
            //urlLoader.dataFormat = URLLoaderDataFormat.TEXT;
            urlLoader.dataFormat = URLLoaderDataFormat.BINARY;

            try {
                urlLoader.load( url_ref );
            } catch (e:Error) {
                trace(e);
            }

And my PHP code:

<?php
echo 'Data:<pre>';
print_r($_POST);
echo '</pre>';
//$decodedData= base64_decode($GLOBALS[ 'HTTP_RAW_POST_DATA' ]);
//file_put_contents("test.flv",$decodedData);
file_put_contents("test.flv",$GLOBALS[ 'HTTP_RAW_POST_DATA' ]);
?>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T13:34:13+00:00Added an answer on June 9, 2026 at 1:34 pm

    In the URLRequest.data documentation, it specifies the option of using a ByteArray directly.

    Here,

    urlLoader.data = _baFlvEncoder.byteArray;
    

    You can then skip the URLVariables object, which relies on encoding your transmitted data as application/x-www-form-urlencoded, which is not well suited to binary data (even if it were handled properly, which it may not be).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a very simple AS3 app that draws few circles using drawing api
Below is a basic code bit in as3 flash.A simple video streaming example using
Background: I recently completed a tic-tac-toe game in AS3, using some simple function-based code
I am using as3. Just a simple question. If I created a static method.
I have a simple game that I am building in as3/air using flash develop,
I'm using Flash Professional cs5/AS3 I'll try and describe this the best I can.
How can I make a USB controller control my AS3 game. I'm using the
How can I generate a random number in Flash CS5 using AS3, I'd prefer
I'm using AS3, and have one simple layer with 4 keyframes If I import
I'm trying to create a simple message form using navigateToURL() and PHP mail(). But

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.