Resize the video without quality loss

I am facing a problem of video resizing, could someone help me solve this problem.

I would like to video scale to the size of the content available (size of degree) without distorting the quality like VLC player.

Here is my code.

The FLA code:

import flash.display.StageScaleMode;

import flash.display.StageAlign;

import flash.events.Event;

////////////////////////////

var videoMC: MovieClip = new MovieClip ();

this.addChild (videoMC);

var videoMgr:VideoManager = VideoManager.getInstance ();

videoMgr.init ("sampleFile.flv");

videoMC.addChild (videoMgr);

// #############

This tells Flash NOT allow assets globally

stage.scaleMode = StageScaleMode.NO_SCALE;

internship. Align = StageAlign.TOP_LEFT;

need to create a listener to say object when the stage is resized.

stage.addEventListener (Event.RESIZE, onStageResize);

setBackground ();

called when the stage is resized

function onStageResize (evt: Event)

{

setBackground();

}

setBackground () function

{

determine the Middle

var middleX = stage.stageWidth / 2;

var middleY = stage.stageHeight / 2;

Replace the bkgd in the Middle

videoMC.x = 0;

videoMC.y = 0;

bottom of scale to fit the width and height

videoMgr.updateVideoSize (stage.stageWidth, stage.stageHeight),

see if it has grown like horizontally or vertically and adjust other

to maintain the proportions

videoMC.scaleX > videoMC.scaleY? videoMC.scaleY = videoMC.scaleX:videoMC.scaleX = videoMC.scaleY;

}

// #############

------------------------------------------------------------------------------------------ ------------

AS3 class:

package

{

import flash.display.Sprite;

import flash.events.AsyncErrorEvent;

import flash.events.NetStatusEvent;

import flash.events.SecurityErrorEvent;

import flash.events.StatusEvent;

import flash.events.TimerEvent;

import flash.media.SoundTransform;

import flash.media.Video;

import flash.net.NetConnection;

to import flash.net.NetStream;

import flash.utils.Timer;

SerializableAttribute public class videomanager, there extends Sprite

{

private static var _instance: videomanager, there;

private var con: NetConnection;

private var vStream: NetStream;

private var video: video;

private var vWidth: uint;

private var vHeight: uint;

private var filePath: String;

public void videomanager, there (enforce: Singleton)

{

}

Public Shared function getInstance (): videomanager, there

{

If (_instance is nothing)

{

_instance = new videomanager, there (new Singleton);

}

return _instance;

}

public void init (path: String, w: uint = 720, h: uint = 480): void

{

filePath = path;

con = new NetConnection ();

con.addEventListener (NetStatusEvent.NET_STATUS, onNetStatus);

con.addEventListener (SecurityErrorEvent.SECURITY_ERROR, onNetSecurity);

con. Connect (null);

}

public void updateVideoSize (w: uint, h:uint): void

{

vWidth = w;

vHeight = h;

//

Video.Width = vWidth;

Video.Height = vHeight;

}

/ * function public playVideo (startFrom: uint): void

{

}

public function pauseVideo (): void

{

}*/

public function resumeVideo (): void

{

vStream.togglePause ();

}

public function stopVideo (): void

{

}

public function hideVideo (): void

{

}

public void setAudioLevel (val: uint): void

{

var sndTrans: SoundTransform = new SoundTransform (val);

vStream.soundTransform = sndTrans;

}

private function connectStream (): void

{

vStream = new NetStream (con);

registerStreamEvents ();

video = new Video (vWidth, vHeight);

video.attachNetStream (vStream);

vStream.play (filePath);

startPreloader ();

addChild (video);

trace (vStream.bytesLoaded + "/" + vStream.bytesTotal);

}

private function registerStreamEvents (): void

{

vStream.addEventListener (StatusEvent.STATUS, onNetStatus);

vStream.addEventListener (AsyncErrorEvent.ASYNC_ERROR, onAsyncError);

}

private function unRegisterStreamEvents (): void

{

vStream.removeEventListener (StatusEvent.STATUS, onNetStatus);

vStream.removeEventListener (AsyncErrorEvent.ASYNC_ERROR, onAsyncError);

}

private function onNetStatus (evt: NetStatusEvent): void

{

Switch (evt.info.code)

{

case "NetConnection.Connect.Success":

connectStream();

break;

case 'NetStream.Play.Complete ':

videoPlayComplete ();

break;

case "NetStream.Play.StreamNotFound":

trace ("unable to locate video:" + evt.toString ());

break;

}

}

private function onNetSecurity (evt: SecurityErrorEvent): void

{

trace ("Error occurred in connection." + evt.toString ());

}

private function onAsyncError (evt: AsyncErrorEvent): void

{

It's handful of mandate

}

private function startPreloader (): void

{

var TMR: Timer = new Timer (100);

tmr.addEventListener (TimerEvent.TIMER, checkLoadProgress);

TMR. Start ();

}

private function checkLoadProgress (evt: TimerEvent): void

{

trace (vStream.bytesLoaded + "/" + vStream.bytesTotal);

If (vStream.bytesLoaded is vStream.bytesTotal)

{

trace ("slaughter the timer.");

evt.currentTarget.removeEventListener (TimerEvent.TIMER, checkLoadProgress);

}

}

private function videoPlayComplete (): void

{

TODO: Send the event indicating that the video is at the end.

}

}

}

Friend class Singleton {}

:

private function connectStream (): void

{

vStream = new NetStream (con);

registerStreamEvents ();

video = new Video (vWidth, vHeight);

Video.Smoothing = true;

video.attachNetStream (vStream);

vStream.play (filePath);

startPreloader ();

addChild (video);

trace (vStream.bytesLoaded + "/" + vStream.bytesTotal);

}

Tags: Adobe Animate

Similar Questions

  • How to record 1920 x 1080 video without quality loss? Do not use blu ray.

    How to record 1920 x 1080 video without quality loss? Do not use blu ray.

    It is physically IMPOSSIBLE to use HD on a DVD material and to play in a DVD player... the data rate is different, it is BluRay invented

    Link to DVD Demystified FAQ http://forums.adobe.com/thread/544206

  • How do I flush the pillarboxes in my video without quality loss?

    Hi all.

    I use Adobe Premiere CS6 now edit a promo video I did, but I have the problem of black boxes all around the video. I tried to stretch to fit, but the quality has suffered considerably. I tried to crop to 16:9, but it's the same with quality. I agree with a bit of black stripes, but preferably I would like the video to fit the screen. I am trying to load on Youtube.

    I shot the video with a Canon EOS Rebel T3, which has an aspect ratio of 3:2. It records up to 720 p. So basically, I just try to get rid of black borders while keeping quality 720 p video.

    I tried to export in H.264, MPEG, MPEG-4, cropping, stretching, but something always gets cut or suffers from quality or both.

    If you need more information, I will provide what I can, just ask. Thank you.

    It seems that the sequence does not match the sequence, for example editing of images in a sequence HD SD will expose the problem you describe. Pictures 720 p is 1280 x 720? If so, and the sequence is 1080 p, which would also put black around the smaller video in the broader context. They must match.

    If you drag a clip from the tray on the "New item" button next to the trash can, this will create a sequence corresponding to your images. The current order, Select All and copy, then paste in the new sequence, in this way, that you don't have to start with the edition.

    Hope it gets you going

    Thank you

    Jeff Pulera

    Safe Harbor computers

  • How to import a MKV without quality loss.

    Can how I import a MKV to edit and burn? I know that I will more than likely need. I'm in AVI, but how do I do that without quality loss?

    What to do next?

    As you said, convert a UT.avi of the original file.

  • Video of low without quality loss

    I try to export my video I want low memory as less than 1 GB or MB without losing video quality, I try several times not idea how work I want to keep the MP4 files, overtime I export more than 3 GB, then I use quicktime player to change low GB, but long I want thought easy quick Final cut pro also I want videos possible fit in a single DVD someone help me please.

    Did you intend for the video play on a DVD player? If so, do not be concerned by the size of the file. What is the duration of your video?

    Russ

  • new adobe flash doesn't let me watch the video without track do - what I do?

    Someone at - it fixes for Adobe flash player invade viewing many sites of streaming video? It seems that the latest version allowing a display on most of the sites without allowing them to follow me. I know it's maybe the site this but it did not begin happening until this morning, I downloaded the latest version of adobe.

    Thank you.

    Well, local storage can be used for good and bad purposes. You can use the previous link to empty from time to time in order to minimize the advertising networks follow you everywhere. There is also an add-on Firefox to manage Flash LSO. I have not tried myself.

    https://addons.Mozilla.org/firefox/addon/BetterPrivacy/

  • Resize the video Square (before Render or after)

    What is your best way to make the video room (example 1000 x 1000) in the output of resize settings I guess? I want to be able to post to a total size of squares. I know it can take a few steps, but did not know if anyone knew a good method or trick.

    Drop your video mockup standard in a new computer the same cadence and the size you require. There is one thing that can clog up the idea however. If you offer a mp4 then there are specifications of frame size that follow or the codec it is auto resize the output. If you want just a black frame your video all about, say back to YouTube, then just create a shape of 1000 X 1000 pixels layer and use as a reverse follow Matt in a model of standard size to your main nested model or place the shape layer on the bottom and enable transparency preserve on all layers above the shape layer.

  • Resize the text without scale text block

    Hi people,

    Is it possible to resize a text frame without scaling the text in the 2014 AI CC SDK?

    I'm working on an AI CC 2014 plug-in and need to resize a text frame without scaling of the text. However, I'm not having a bit of luck to find how to do this. Is what I want to resize the text block in the Type area Options Panel makes, but I'm not able to understand how what classes/methods it uses, or whether they are still exposed in the SDK of.

    I tried to use sAITransformArt->TransformArt(), but I can't find a way to stop the text to scale with the text block. I considered, after processing, reformat the text which has been nationally, but that doesn't seem right.

    My current thinking is to move the text of the framework which should be scaling in a new block of text size correctly, and then delete the existing framework, but before that, I thought I would ask here see if do I it's harder it must be because I'm missing something.

    Thanks in advance for any help!

    See you soon!

    -Jim Birkenseer

    You must use sAITransform-> (TransformArt) on the subject of track of the image of the text, not the entire text block.

    For example:

    AITextFrameType textFrameType;
    sAITextFrame->GetType( art, &textFrameType );
    if ( ( textFrameType == kInPathTextType ) || ( textFrameType == kOnPathTextType ) ) {
        sAITextFrame->GetPathObject( art, &art );
        AIRealMatrix sMatrix;
         // Set your matrix as needed here...
        sAITransformArt->TransformArt( art, &sMatrix, 1.0f, kTransformObjects );
    }
    
  • How to activate the video without coating

    I am doing a demo application using flash.

    I'm a Flash newbie.

    Importing the video is easy, but I didn't understand how to use it.

    If I embed the video and the game in the timeline panel, I can work on it and add the motion tweens of the hand to the video to make a demo of interesting application, BUT as Flash puts cautioned however, integrating video causes synchronization question-YES, HE DID! It exports badly and is unusable.

    I don't understand how to use the video. For me, the video is only as an image of sill and don't like a video at all.

    So how can I activate the video work with the timeline to add graphic interpolation without the integration of the video?

    HScreen Shot 2014-07-12 at 3.48.54 PM.pngow can I add the hand movements to the video in flash to simulate the push to talk key?

    1. If you set your flash to 29.97 frame rate, you can be able to overcome the problems of synchronization of your embedded video.  This is the simplest solution for inexperienced users of flash.

    2. you can also play your video in an flvplayback component.  You can add some cuepoints to your video and use to raise events in flash you can 'sync' flash animation / sound with animation / sound your video.

  • Why the video playback quality is not as good as the source?

    Hello.  I'm not new to PrE but I'm new to the forum.

    I use the 2 pre for about 7 years.  I got a newer computer running Windows 7 and basically was forced to move to 12 meadow because PrE 2 does not work very well on the newer machine. Once I installed pre 12, I couldn't wait to jump in my first draft on this machine.

    I expect that with a more recent machine and the latest version of the software, I would get outstanding results - hopefully much better than what I always got with 2 pre on the old machine.  With pre 2, it was not uncommon that the imported video seemed frozen during playback or for some other reason seemed not as good as the video source.

    Unfortunately, the new results were no better than the old.  So, I went to the machine (even newer) my wife running Windows 8 and got the same results.  Then I thought that maybe the DVD release would be better than what I saw in the pre Editor.  No dice.

    The video quality of the source is not the largest (see below), but I was expecting that the pre 12 would no more hurt.

    What has gone wrong?

    Here's what I'm working with the current project:

    Machine 1:

    HP EliteBook 8560w

    Processor 2.8 GHz Intel Core i7 - 2640M

    Windows 7 Enterprise SP1

    2 GB OF RAM

    360 GB of available disk space

    Machine 2:

    Dell Inspiron 3521

    Intel Pentium 1.8 GHz CPU 2117U

    Touch screen of Windows 8

    4 GB OF RAM

    + 400 GB HD space

    Video source:

    iPhone 4 video (MOV format)

    Thanks for ANY help you can give me.

    BTW, I noticed that Steve Grisetti is one of the frequent speakers on this forum.  In case you're reading this, Steve, I want to thank you and Chuck E. for your pre books.  I bought one several years ago and found it very useful.  And surprisingly, I found that with pre 12, I could always use the book that I bought before because the majority was still with the new software.  Still a great buy!

    kcarter

    Please excuse if I talk about things that you may already be aware of, but I didn't take anything for granted.

    The RAM installed on the computer 1 is too low for the work of the HD, and I wonder about the CPU on Machine 2, even if it has installed more RAM on the Machine 1. For now, I'll ignore the usual exercises and get the project settings and media source.

    1. from what I can put together, your support of the source of the iPhone 4 is 720 p at 30 frames per second. This usually means a variable rate which can be problematic for Premiere Elements. The variable can lead to audio out of sync, but not necessarily. If all else fails, then it is on the brake hand or similar to change the variable in a constant rate.

    2. one of the features of the version 11 and 12 is the program of support for the definition of the project parameter based on the properties of the video first drag in the timeline. A few times he made it OK, sometimes not. When not, and then you set the preset manually project yourself based on what you know to be the properties of your source media. Please see the following which includes how to define the project preset manually.

    http://www.atr935.blogspot.com/2013/04/pe11-accuracy-of-automatic-project.html

    From what I read on the iPhone 4 video properties, I suggest the project preset (assuming an NTSC set up)

    NTSC

    AVCHD

    AVCHD LITE 720p30

    One of the important things to remember is that 11 items first and 12 have as their default project preset

    NTSC

    AVCHD

    Full HD1080i30

    not the NTSC DV Standard and versions prior to version 11.

    When the 11 and 12 do not receive the automatic correct preset project, they don't give you the closest fit, rather than they give you their

    by default NTSC AVCHD Full HD1080i30 that will not suit for 720 p video.

    Classically, it is written if you have the right predefined project, you should have no colored line on content when you import video

    manually defined timeline. But, just the variable rate may trigger the unreturned indicator (orange instead of red in versions 11 and 12).

    So make the timeline would be indicated for the best possible overview in these circumstances.

    You have the latest version of QuickTime installed on one of your computers?

    Later.

    RTA

  • Read the size of the video without onMetaData on live stream.

    Hello

    I am a Flash developer and know virtually nothing about the FMS.

    We met with a situation where our encoder (Adobe, one not) does not inject metadata into a live stream. Thus, there is no onMetaData on the stream. When the stream is 16 x 9, our players don't resize the flow according to the ratio and always display in 4 x 3.

    Is there a way to read the width and height of the video even if there is no metsdata? Perhaps a method that can be called via answering machine similar to getStreamLength.

    Video is streamed through Akamai.

    Interestingly enough when we discover the same stream in Akamai - video player is resized to the value dimensions / / AFTER a few seconds. Akamai of course has a mechanism to detect the video dimensions.

    Any help will be greatly appreciated.

    Thank you.

    My ignorance is the problem.

    Video class AS3 has videoWidth and videoHeight properties that can be used in case onMataData is not called.

  • How to import the video without using a SD card

    OK, so I am really new to adobe first, so this may be something obvious, but I tried all the advice on the forums and still can not understand. If you answer this question, please use the very basic language because I'm still learning what that means and how to use first. I'm trying to import video to my project, but the images says Offline Media. It works fine when the SD card is in my computer, but I would like to use the SD card to other projects, so I copied the files on a hard drive external and even tried to put it on my computer and it says Media Offline. Media link does not work either and sometimes I get the message waiting media, but it stays on never instead of display the clip I need. Let me know what other information you need and I'll answer as best I can.

    You must copy the structure of the entire map of the SD card on your outside, not only the video files.

    On Mac OS, you simply swipe the card externally and it will copy and appear on the outside like a folder. Don't know if the applies to windows.

    Once it is finished, eject the SD card, restart the first and when the media rises in offline mode, select all media files in the media browser offline, and plugging it back in by pointing first to the location you copied your full SD card.

    MtD

  • Resize the image without undo - redo disturbing

    Hello
    I want to resize the image if its bigger than a maximum size. To that effect in the listener to 'StatusChangeEvent.INLINE_GRAPHIC_STATUS_CHANGED', I changed graphics width and height. But then the undoManager doen't cancel transactions before this image resizing.
    If I resize the image using editManager.modifyInlineGraphic () then in the undo stack additional surgery will be added.
    Any suggestions to resize the image to load so that undo-redo disrupts.

    Thank you
    Ahmed

    Good point - setting of the image solves the problem with the size of the chart.

    I'll take the idea of maximum size connected as an enhancement request parameters.

    Richard

  • Resize the movie without scaling of objects

    I would like to have a button in a movie that, once activated, resizes the height and width of the .swf movie, but I don't want anything else on the screen to be adjusted to reflect the change in the size of the movie.

    For example, if the dimensions of the movie are doubled in size, I won't double in size, a text box - I want to stay in the same size.

    Someone knows how to fix this?

    Sorry... Here is a direct link with the answer.

  • How do you overlay images in video without audio loss of the comment behind it?

    I'm making a video that starts with the comment. I want to show images while the person speak always in the background. How do I do this with Windows Live Movie Maker?

    Support is in the Movie Maker Forums:
    http://answers.Microsoft.com/en-us/windowslive/Forum/MovieMaker?TM=1349183784260

Maybe you are looking for