HandBrake to encode HD video for Youtube

I’ve just defeated a problem I had with Youtube not accepting my videos encoded with Handbrake.

I usually encode videos using the High Profile preset in Handbrake but for some reason Youtube wasn’t very happy with that. It uploaded fine but after converting it it only displayed the first 30 seconds of my video. And that in fast forward speed. Not what I wanted.

By default Handbrake use the x264 encoder. If you select FFmpeg in the Video tab it works fines. I also increased the quality to QP:5 which seems to be ok for Youtube.

Sony Vegas Platinum 8 HDV workflow

I’m using Sony Vegas Platinum 8 to make my video editing. It’s some years old but I like it a lot. I just updated my camera from standard definition to high definition (one Canon HV20-PAL and one Canon 550D). It gave me some problems. But I think I’ve found a decent workflow. There is a never version available that might work better with HDV but I’m sticking with my 8. For now at least.

Capture

To capture from the HV20 I use HDVSplit. It captures to M2t files. And with the 550d it’s just to copy the MOV files from the memory card. To get Sony Vegas to accept the MOVs you must install QuickTime. I used the free version and that worked fine. The video I have been working on doesn’t have that many files from the 550D so I cannot tell how good it performs yet.

Project settings and editing

Start Sony Vegas and let it automatically detect the project settings by opening one of your M2t files. It should then detect the format automatically. Open the project properties. It should look something like this.

I use Deinterlace methodInterpolate fields. I tried all the different options in Vegas. I tried to deinterlace in Handbrake but this way seemed to give the best results.

The Platinum version of Sony Vegas only allows 1440 x 1080 which is the maximum resolution from the HV20. The 550D does 1920 x 1080. Vegas automatically converts the clips so they work together. I’m not really sure what happens with the 480 pixels but the video looks good so.

When that’s set up you can start editing. If you get performance problems Eugenia has some tips you can try.

Rendering

When you are done it’s time to render your video. I started out by following Eugenia’s guide but Sony Vegas kept crashing on me. I tried some different methods and I ended up with the following.

Start out by following step 2 & 3 in another of Eugenia’s guides. The only thing I changed was that I’m using Pixel aspect ratio: 1.0000 here instead of 1.3333 as before. I’m not sure why but the videos turned up wrong otherwise.

This will export a HUGE file in a lossless format.

Once that was done I had to convert the file to some other format. I tried with some different tools but I found Handbrake to be the easiest to use. All you do is to open the file in Handbrake and select a preset profile and render the video.

Viola! That’s all. Maybe not optimal but it works.

Combine Time Lapses with standard DV – Avidemux and Sony Vegas

I’ve just gone trough some hoops to import a time lapse video made in Avidemux into my standard DV project in Sony Vegas. My first issue was to find a suitable video format and the second to get the size of the time lapse video to match the size of the DV format. I’ll go through all steps in an example project below. I’ll use a time lapse with 14 stills and a DV project (PAL, 720×576, 4:3) with one clip.

Sequence the filenames
Avidemux is a bit picky that the file names of the images are in a sequence. I use ReNamer to automatically serialize the images.

I use ReNamer to serialize file names
I use ReNamer to serialize file names

Making the time lapse video in Avidemux
Even though Sony Vegas can import still images I prefer Avidemux for my time lapses.

Open the first image in Avidemux and make sure all frames are visible in the video. Since I’m going to export the video to Sony Vegas I want to use a format that preserves as much quality as possible. I chose Huffyuv.

Select the frame rate you want. I choose 5 fps.

My time lapse images are in 640 x 480 px and my DV stream is in 720 x 576. I’ll resize the images to 768 x 576 px, then I crop 24 px on each side to get a 720 x 576 px image.

Scale the time lapse images in Avidemux
Scale the time lapse images in Avidemux

Save your time lapse video to avi.

To be able to play the video (in Windows Media Player) I had to install a codec for Huffyuv. I installed the latest ffdshow and selected to install Huffyuv only. I also had to enable Huffyuv in ffdshows VFW configuration utility.

Enable the correct codec
Compare the black border in the preview window with the next screenshot

Now you should be able to play the file in Windows Media Player and it’s time to import the video to Sony Vegas!

Import to Sony Vegas and fix the size problem
I start by just adding my two files to Vegas and preview them. I can see a black border around my time lapse file. I fiddeled around quite a while with this. I tried to resize the time lapse in Event Pan/Crop -tool but could only get that to work if I dissabled Maintain aspect ration.

Compare the black border in the preview window with the next screenshot
Compare the black border in the preview window with the next screenshot
See the black border on the left and right hand side in the preview window. Time lapse video has wrong pixel aspect ratio.
See the black border on the left and right hand side in the preview window. Time lapse video has wrong pixel aspect ratio.

Finally I found out that the pixel aspect ratio differs from my DV file and my time lapse file. On the DV file it’s set to 1,0926 (PAL DV) and on the time lapse it’s set to 1,0000 (Square). I changed it by right clicking on the media, select properties and it’s in the media tab.

Media properties for DV file
Media properties for DV file
Media properties for time lapse file
Media properties for time lapse file

You are done!

Big thanks fo LoRd_Mulder and DarkZell666 in the Avidemux forum for helping me out!

Video editing in Linux

For almost six months I have been using Linux. I have even managed to tame The Gimp.

But I have one issue – I can’t use Linux for video editing. I don’t have that high demands on the cutting tools, but I must be able to use two (or more) video tracks and one (or more) audio track.

After searching around for ”video editing for Linux” I have found the following programs:

Unfortunately does Cinelerra seems to be the only program that fulfills my needs, but it seems a bit too complicated. I’m not sure I will be able to use it (I’m sorry Heroine Virtual).

The program that looks most interesting is DIVA since it seems to have a nice GUI and Michael Dominics (developer of DIVA) seems to have the correct (IMO) ideas about how program should be designed. Here is a quote from his blog (a reply to a comment) where they have been discussing ”usability”

”…most programs of this kind are cluttered and with a lot of unneeded features. I just hate the Windows’ programs philosophy: try to find the option you want in the Winamp preferences and you’ll know what I’m talking about.”

DIVA is though still in early development process.. Hopefully there will be a version that can be tried out soon. I can’t wait to try it! I’ll come back to this or any of the other video tools later, when I have tried them more.

Don’t forget to check out the demos on Michael Domenics blog (the ”DIVA site”)!

Check out the DIVA Demo #4 from Michael Dominics web log. I love when he adjusts the length of a video clip!