vendredi 26 juin 2015

How to Improve FLVPlayback - Reduce Choppy Video

I have a 1920x1080 video playing inside a flash project with the same dimensions, using Firefox. The project is using CC2015, Latest Flash Player, Latest FF. I should note that this project is using locally stored videos.

I'm using AS3, FLVPlayback component, and the videos have been compressed (by production).

Heres the code that uses the playback component

function playVideoByString(source: String): void {
    hideTheButtons();
    attractTimer.stop();
    movie_container = new MovieClip();
    addChild(movie_container);
    movie_container.x = 0;
    movie_container.y = 0;

    launchVideo(movie_container, source);
}

function launchVideo(vBox, vFile): void {
    attractTimer.stop();
    flvPlayer = new FLVPlayback();
    flvPlayer.source = vFile;
    flvPlayer.skinAutoHide = true;
    flvPlayer.skinBackgroundColor = 0x000000;
    flvPlayer.width = 1920;
    flvPlayer.height = 1080;
    flvPlayer.autoRewind = false;
    cuePt.time = 0.9;
    cuePt.name = "ASpt1";
    cuePt.type = "actionscript";
    flvPlayer.addASCuePoint(cuePt);
    vBox.addChild(flvPlayer);
    // adding listeners in here
    flvPlayer.addEventListener(MetadataEvent.CUE_POINT, cp_listener);
    flvPlayer.addEventListener(fl.video.VideoEvent.COMPLETE, completeHandler);
}

Playback is experiencing some degradation in the form of what looks like frames dropping, or "stutter." The animations look glass smooth when the MP4 is opened in Firefox and played back using FFs player. They also look fine when played in QuickTime (obviously). The video is 30FPS, as is the Flash Project, though from what I understand, FLVPlayback will use the videos encoded frame rate regardless of Flash's FPS.

Is there anything I can do to improve the video playback, and possibly smooth the videos out without loosing quality?

Aucun commentaire:

Enregistrer un commentaire