• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

video .f4v very slow

Community Beginner ,
Jan 22, 2013 Jan 22, 2013

Copy link to clipboard

Copied

Hello:

I'm having problems playing f4v video is very slow. The size is 100 MB and resolution 1280x720. When I play out of Flash it reproduces well.

I need to play in Desktop application not over Internet.

What I'm doing bad? Is there anywhere to play well or wich is the better option to do it?

thank you very much.

This is my code:

import flash.net.NetConnection;

import flash.net.NetStream;

import flash.media.Video;

import flash.events.AsyncErrorEvent;

//fullscreen

stage.displayState = StageDisplayState.FULL_SCREEN;

var conexion:NetConnection= new NetConnection();

conexion.connect(null);

var display:NetStream = new NetStream(conexion);

display.play("videos/ocioelecer.f4v");

var video:Video = new Video(1280,720);

video.attachNetStream(display);

addChild(video);

display.addEventListener(AsyncErrorEvent.ASYNC_ERROR, noshow);

function noshow(event:AsyncErrorEvent):void{

  //no show error   

}

display.addEventListener(NetStatusEvent.NET_STATUS, statusHandler);

function statusHandler(event:NetStatusEvent):void

{

    switch (event.info.code)

    {

        case "NetStream.Play.Start":

            trace("Start [" + display.time.toFixed(3) + " seconds]");

            break;

        case "NetStream.Play.Stop":

        //End video       

                        trace("Stop [" + display.time.toFixed(3) + " seconds]");

        (root.loaderInfo.loader.root as Object).removeSWF();

            break;

    }

}

TOPICS
ActionScript

Views

674

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guru ,
Jan 22, 2013 Jan 22, 2013

Copy link to clipboard

Copied

f4v is only a container (like avi or mov) the codec that is used to encode your video can have a great influence how it performs.

Look here for some tips how you can improve performance for flash

A first measure could be right-clicking on the the stage (while your movie is running) and cheking/unchecking hardware accleration (you have to restart the movie to see the effect).

The size of the video is not so much of an issue, but more the size/length ratio.

If you have a 10 second long 100MB f4v-with with a 720p resolution, the encoding process went wrong. (like forcing the encoder to have every second frame to be a keyframe)

I need to play in Desktop application not over Internet.

Target MAC/Windows Projector or AIR to get a Desktop application instead of swf

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 22, 2013 Jan 22, 2013

Copy link to clipboard

Copied

LATEST

100MB played locally is nothing. Most HDs have burst cache which can load up to 200MB instantly off disk. You shouldn't even need to (but might want to on a really 'value/green' rated drive) set the buffer to require 1 second of data before playing (bufferTime = 1).

Are you using any kind of integrated graphics, like using a Z-esque Intel chipset with Intel 2000/3000/4000 graphics? Sometimes people over-estimate how well their built in hardware decoders perform.

You always want to add Event listeners before you invoke a method that uses events. In your code you're adding listeners AFTER invoking a 'play(...)' method. Just for best practice, run the load(...) last.

Lastly is the video available for inspection? 100MB for 10 seconds is 10MB/s, which is really only required in excessively high quality rendering with a huge gaumet with high motion. 9mbit is average full quality 720p (which is 1.25MB/s). You may have your bitrate set too high as moccamaximum mentioned if you are not in that video situation or striving for lossless video in ultra high motion.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines