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 8971741
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T18:02:15+00:00 2026-06-15T18:02:15+00:00

Hey I’m running into a similar problem as: Converting RGB to YUV, + ffmpeg

  • 0

Hey I’m running into a similar problem as: Converting RGB to YUV, + ffmpeg

From AIR, I figured the encoding was too long to render frames at a reasonable rate – so I exported the argb ByteArray from bitmap.getPixels(rect) directly to a file.

So for a 30sec flash animation, I’d export let’s say 1500 frames to 1500 .argb files.

This method works great. I was able to render HD video using the ffmpeg cmd:

ffmpeg -f image2 -pix_fmt argb -vcodec rawvideo -s 640x380 -i frame_%d.argb -r 24 -qscale 1.1 -s 640x380 -i ./music.mp3 -shortest render-high.mpg

So far so good! However, inbetween the two processes we need to store those ~3gb of data.

I then tried to append all the argb to one single file and have ffmpeg consume it, but didn’t get anything good out of it… Also tried messing tcp/udp but getting stuck…

Does anyone know of a way to streamline that process and hopefully pipe both Air and ffmpeg together?

  • 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-15T18:02:17+00:00Added an answer on June 15, 2026 at 6:02 pm

    You need to start a ffmpeg NativeProcess with arguments like these:

    ffmpeg -f rawvideo -pix_fmt argb -s 640x480 -r 24 -i - -c libx264 -b:v 1024k video.mp4
    

    Here you need to specify input frame size (-s) frame rate (-r) and output bitrate for video (-b:v) and output filename. Also the order of these arguments matters.

    Then you just pipe byte arrays from bitmap.getPixels(rect) to standardInput of this nativeProcess with _process.standardInput.writeBytes(data, 0, data.bytesAvailable); frame by frame.

    Occasionally an IOErrorEvent.STANDARD_INPUT_IO_ERROR will occur – this means that ffmpeg can’t keep up with your data and frames will be dropped. Apart from lowering frame size, frame rate or bitrate there is nothing you can do about it – you may want to have some kind of queue for your frames, but high resolution uncompressed images are very large so you will be able to store just tens of them in memory and you won’t be able to store them on disk because of slow IO speeds. And this problem only occurs when dealing with HD video encoding.

    Call _process.closeInput(); when you have no more frames to send and wait for ffmpeg process to exit with code 0.

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

Sidebar

Related Questions

Hey I just started dabbling with android programming, and from my short period of
hey guys having this really simple problem but cant seem to figure out have
Hey its really hard to define an exact title for my problem. I am
Hey people I've been searching over the internet for the following problem without success...
Hey I'm building an app that will allow a user to log into a
Hey all I want to reseed my IDENTITY COLUMN values starting from 1 I
Hey I'm having a problem trying to figure this out: Lets start out with
Hey, I have a problem sharing a link on twitter: data-url=http://ipofmywebsite/mypage/?some_id=276&some_name=b+a As I put
Hey, I'm trying to get the source code of an app similar to the
Hey i have been looking around and i cant find a way to get

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.