Tuesday

How To Save Your KVM Switch From Automatically Switching When Using Virtual Machines


I ran into this problem with VMware Player, but I'm sure other people have run into it, with other virtualization applications, or this one. What happens is, when you put your mouse into/out of the virtual machine, it 'kicks' your KVM (Keyboard Video Mouse) switch (esp. if it is USB) out to the other computer/connection! Annoying! This post is how to stop that from happening.


What is going on is, the virtualmachine is registering the mouse ('capturing' it) and the numlock state may change (as though you hit the button), and when you move the mouse outside of the VM again, it is releasing the mouse and the numlock state may change (as though you hit the button again) and these two 'numlock hits' together can trigger your KVM switch (especially if it is USB).

One solution is to disable the Numlock option to toggle the KVM connections (if you can). Another option (and if you can't disable anything) is to make sure that the Numlock state matches for both the host system and the virtual machine guest system.

To do this, hit numlock (ignore the triggering your KVM switch if it goes off) until it stays in the state you want it to be (either off or on) outside of the VM. Then, inside the guest VM, hit numlock to match the state that you set it outside of the VM (in the host, either off or on).

That's it!

Now, when you move your mouse in an out of the VM, the Numlock state will be the same for each and it won't toggle your KVM switch.


If you liked this post, buy me a cup of coffee :) (You can even use your credit card to donate a dollar with PayPal and it does not give out your information to the person you are sending it to). Thanks and check back in once in a while to see more tutorials on How To Save Things!


Wednesday

How To Save Any Video Into A Format For Use In Sony Vegas





Although I have tried many Video Editing programs, I always come back to Sony's Vegas video editing application. I own Sony Vegas Movie Studio HD 11 at the time of this post and have tried and worked with older versions including Pro, in the past. I always enjoy the flexibility of the Non-Linear Editing and the options that the program provides for all levels of users, despite it's learning curve. It is a powerful program and due to it's method of operation, it is made to handle certain types of formats better than others. This results in faster and easier processing and editing. It also results some slight strictness in formats that it can import (be read/input into Vegas).

One of the problems many people have with this program is when it comes to importing certain types of video. In Sony's Vegas video editing applications, clicking on such a problem file will not result in the program giving a preview or reading the file's attributes properly (the size and codecs within the video/audio file), it results in just the name of the file as it is, just below the built-in Explorer window pane. This post is how to take any format of video, from any source, and make it usable or available for import into Sony Vegas (Movie Studio/Pro) for editing.

There are many people that think they know what they are talking about, saying things like, "you can't use this-or-that format" or "that format is a distribution format" or "you can't import that into vegas" and other elitist and snobbish comments. These people are not being very helpful however and don't explain the issue fully - most likely because they do not understand it properly and only know how to do the one thing that they use Vegas for and have no experience with anything else.

There are formats that are indeed not listed in the Official Technical Specifications at the Sony Website for Sony Vegas. Here is the list that is given for Sony Vegas Pro 10:
Opens: AA3, AAF, AIF, ASF, AU, AVI, BMP, BWF, CDA, DIG, DLX, DPX, DV, EXR, FLAC, GIF, HDP, IVC, JPG, M2T, M2TS, MOV, Sony MXF, MP3, MP4, M4A, MPEG-1 and MPEG-2 video, OGG, OMA, PCA, PNG, PSD, QT, R3D, SFA, SND, SWF*, TIFF, TGA, VOX, W64, WAV, WDP, WMA, WMV
While many of the formats people ask about, such as FLV (Flash Video, from YouTube for example) are not listed, there are actually many "distribution formats" (compressors that are used in the final step before giving out a video to others to make it smaller) that people say 'will not work' in there, such as WMV (Windows Media Video, from Windows Movie Maker). Clearly, they can be used/imported into Vegas. There are many ways to do this, many outside the scope of this post, but I will explain some video concepts and why there are additional formats that can be imported into Vegas which are not listed.

Firstly, one issue that seems to confuse many people is the concept of Containers versus Codecs
 I will explain it here:

- A container, when talking about digital video, is merely a 'holder' of a video (and can hold audio and other things as well) inside a file. That file can have multiple file name endings (suffixes, such as FLV or WMV)
- A codec is a compressor/decompressor (the processing code) of a specific video format (type of file) that can be held within any container

What these mean, is that a container
(for example AVI (Audio Video Interleave) usually used in the Windows Operating System) 
can have many types of codecs
(for example AVI can hold inside it XviD, DivX, Mpeg-4 (MP4) and more)
inside of it. 


The file name ending (suffixes such as .wmv, .flv, .ogm) usually describes the type of file format (the codec used) inside the container. For instance, a file ending in ".wmv" (a Windows Media Video container) will usually have video inside that has been processed with the Windows Media Video codec inside. 

It does get more complicated somewhat, where you can rename certain containers into others (such as renaming DVD Video .VOB files into .MPG, as both containers can hold the MPEG-2 (Motion Picture Experts Group Part 2) codec inside, but it is actually more complicated than that, as each codec and container has it's own standards and programming limitations that it must adhere to inside to remain properly readable. Also, most codecs are processing the video differently with a different set of rules and operations, so you cannot just go around renaming all containers into other random container names.

If we ignore the container names (the file name endings of .asf, .flv, etc) and just talk about the codecs (the compression used) inside the file, it's easy to always remember that one codec can always be changed into another codec. That is, any format can be converted into another format.
For example, a WMV format video can be imported into a program (that can read WMV) and can be exported as an MPEG2 format (if MPEG2 is what is desired and the program can output it as a file type, format and container).
This allows us to do things such as take an FLV file and convert it so that we can put it on a DVD that can be read in a dvd standalone player or game console that can read dvds. This is video conversion.
All types and formats can be converted into other formats (as long as the program we are using can read the initial input format, the Source Video (or Audio).

This leads us into how we can take any video and import it into Sony Vegas. Although there are additional ways to do it, the easiest way to get any video into Vegas for fast and responsive editing, is to convert it.

The most usable format for Vegas (any edition) is Uncompressed Video (video that is not compressed). This means that the video (and audio if desired) is processed very little in any way that attempts to make it smaller and therefore give away some of the quality in exchange for a reduced file size.

Using Uncompressed, the video will look almost exactly the same as the source quality/sharpness/color, but the file size will be much much larger. A 20GB container of Uncompressed Video will only hold minutes worth of video and audio, for example. Uncompressed is the easiest way to go however, as most video utilities and conversion programs can output video as Uncompressed, with no need for any other software (or codecs) to be installed on your system (other than to read/open/import the source video itself). Uncompressed is usually only viable for small clips however, unless you have the harddrive space to devote to decompressing your videos fully (literally, taking the compression attempts to make it smaller out of it) into Uncompressed formats.

Another compression format, a 'light compression' or 'mildly compressed' format, is MJPEG. Used frequently in digital cameras, MJPEG at it's highest setting ('Quality 100 percent' or 'Quantizer 1') also has high quality output and is easily imported into all of Sony's Vegas products. Although it is not listed officially in the specifications, it is an older format that is handled almost natively by all applications available today, including Vegas, without any special conversion (other than converting your source video file into MJPEG). It is a fast, responsive, high quality format that easily imports into Vegas and has much smaller file sizes than straight Uncompressed. A 1GB container of MJPEG video will hold a couple minutes of video, but when compared to the 10-20-plus gigabytes required by Uncompressed for the same amount of time of the same video, it is clearly a more usable format for compiling a collection of videos on your system, prior to importing them into Vegas to work with. If you have not used MJPEG before, I highly suggest trying it out.
(MJPEG is available in the free FFDSHOW compilation of video and audio codecs and codec packs using the FFDSHOW codec translation)

Another format that Sony's Vegas line works well with is the Blu-Ray Disc Audio Visual (BDAV) container format (usually ending in .MTS or .M2TS) which can contain the codecs MPEG-4, H.264 AVC, MPEG-2 and more inside of it. Rendering to MPEG4, you may find that Vegas defaults to a standardized high bitrate .M2TS output file. With the high-quality Advanced Video Coding capability, you can have very high settings within an .m2ts file that is capable of being imported into Vegas for editing.

Some of the free utilities that can be used in Windows to convert video for easy import into Vegas are:
Using these free utilities (or any other program that you prefer), converting your source video into Uncompressed is the most reliable way to import any video for use in the Sony Vegas line of video editors. After that, other 'only slightly compressed video' formats such as Huffyuv and MJPEG are recommended.

I have found that Avidemux and even the trusty Virtualdub sometimes run into 'problem videos' that will not open (or be read incorrectly, such as being 'seen' as 320x240 when they are not). A solution for these is the previously mentioned Xmedia Recode. I have not yet run into any video that this wonderful freeware program cannot open and save in a format desired, such as the above-mentioned MJPEG, Huffyuv, MPEG-4 AVC and more (don't worry, the author is German but it is available in English from the author's website). I am not affiliated in any way or degree with the author or this application, I am merely a fan of it, choosing it over and above, after trying many others (such as Virtualdub, Mediacoder, Super, Xvid4Psp, Avidemux, Winavi, TMpeg programs and more over the past couple decades).

Remember, you can use other formats in Vegas, even formats that are not listed in the official specifications (such as DivX or XviD), but these formats are more highly compressed (more processing has been done on them, trading off some quality for a far smaller file size) and with larger Groups Of Pictures (GOP's, frames that are compressed in a way that only the changes between each are kept track of, so that each frame is dependent on the frames in front or behind it). These formats require more background processing as Vegas decompresses them on-the-fly in the various tracks in your project to show you the compressed frames as you work with them. This slows down the responsiveness of Vegas and makes your overall work flow slower (although it does work, do not listen to self-proclaimed 'experts' on forums that claim that it does not work). I have done it and seen it done many times in the past, usually due to time constraints - it merely causes extra processing time and some slowdown in your work flow (it may also require additional steps such as installing additional codecs or frameserving, but these topics are for another article). If this slowdown in work flow is undesired, then Uncompressed or MJPEG, Huffyuv and other 'lossless' or 'mild compression' formats is the way to go for Vegas, giving you the ability to use/edit any video that you may have while maintaining quality and responsiveness.

That's it!

  
 Addendum:  There seems to be an attitude going around forums everywhere, that Codec Packs (compilations/collections of various helpful codecs, so that your system can handle a multitude of video formats without any problems) are to be avoided. This attitude and stigma usually comes from persons who have no idea what they are talking about, or only know how to do the one thing they know how to do in Vegas (or use Vegas and have no experience with any other applications or video formats). There is nothing wrong with Codec Packs and I personally have used them for decades without problems (some unhelpful snobs who state that it will 'wreck your Windows' simply know nothing and have no experience in these matters). Using many different video formats (especially when dealing with foreign hardware or video) sometimes necessitates the usefulness of a Codec Pack, which allows the handling of many different video formats not natively handled by Windows and common applications. Many Codec Packs will also have additional capabilities other than just translation of differing video formats, offering features such as multiple subtitle handling, frameserving into video editing applications ('translating the video on the fly' so that a video editor can use the video 'as is') and more. They are nothing to be afraid of (unhelpful and unknowledgeable people will say to avoid anything new and useful at first) and greatly assist in opening the many different formats of video that you may encounter. Feel free to use Codec Packs such as K-lite Codec Packs, The Combined Community Codec Pack and others without fear.  


If you liked this post, buy me a cup of coffee :) (You can even use your credit card to donate a dollar with PayPal and it does not give out your information to the person you are sending it to). Thanks and check back in once in a while to see more tutorials on How To Save Things!


Tuesday

How To Save Certain Videos To Open Properly With Avidemux

Avidemux is a wonderful free open-cource program which has simple editing and offers many different filters for processing video (similar to Virtualdub for those that have used that). One problem that has arisen in the program however is that importing a few formats (such as FLV (Flash Video) files) results in what seems like only the upper left corner of the video being opened, and Avidemux 'sees' the video as being only 320x240. This post is how to change your video you want to work with to make it 'be seen' properly by Avidemux.

In our example for this post, we have an .FLV video file - which is just the type of container - that has an AVC H.264 format video inside of the container, with a resolution of 856x480 with a display ratio of 16:9 (perhaps a home video from YouTube or a family member). It is a widescreen video. When importing it into Avidemux however, it brings up only what seems like the upper left portion of that video and it looks square in the preview in Avidemux. 



This does not happen with all FLV containers or all formats of video, this is just an example, but for those whom this applies to, what is happening is that Avidemux is not getting the proper information from the video file to open it correctly.


To fix this takes only two steps using completely free programs:

  1. You can demux (demultiplex, separate) the video and audio with a little utility called "FLV Extract
  2. After that, simply re-mux (re-multiplex, put together) the video and audio in a utility called "YAMB"

To do this, just drag the video on to the first program, which opens up a little window to mouse-drag your file onto.

Then in YAMB, click ADD, and select the audio and video from the original clip (the files that flvextract makes, ending in .264 and .aac, which are the video and audio parts). Hit MUX and it will join them together in a new .MP4 file.

This file can then be read "properly".

That's it! Now those problem videos can be opened with these applications. Enjoy.

If I may suggest another great freeware program to open those 'trouble' video clips, I like to use Xmedia Recode. A list of the multitude of formats that the utility can handle, from the author's website, is here. As you can see, it is able to convert almost anything you will encounter into almost anything else, spectacular for a freeware program. Kudos to the author (although he is German, don't worry the program is available in English). I have used Xmedia Recode to open many .FLV and other files that Avidemux seems to have trouble with. I hope this help you a lot in working with your problem videos.

 Addendum:  Note that some video clips will sometimes result in having their video and audio 'out of sync' with each other (the audio seems to happen too early or late for the video occurences on screen, such as a gun shot appearing and then hearing the bang a second later) using the FLVextract/YAMB steps above. This is being investigated by many people and hopefully a fix for some of these problem videos comes soon. Until then, for these special problem videos, changing the frame rate can help with this problem. Whether in an editor or with another utility (such as AVI Frame Rate Changer), changing the frame rate slightly can help to put the video and audio back into syncronization. A tutorial post on this to come in the future! 
(Also, other video editing and conversion applications (such as Virtualdub and especially Xmedia Recode can open those videos without problem, so that they can be processed as desired, or at least converted into a format that your desired applications can import comfortably (such as de-compressing the video into an uncompressed or lightly compressed format, as in this article at this website) - when all else fails, try something else!) Good luck with it and I hope this has at least helped.
 


If you liked this post, buy me a cup of coffee :) (You can even use your credit card to donate a dollar with PayPal and it does not give out your information to the person you are sending it to). Thanks and check back in once in a while to see more tutorials on How To Save Things!