Archive for July 23rd, 2007

HD videos on your HDTV without an HD-DVD or Blu-Ray drive

The most cost-effective way to play your own HDV files as HD videos on your TV is either the Sony PS3 (or XBox360) or the Ziova CS505. With the latest firmware the PS3 supports playback of h.264 files up to 1080/30p. The Ziova CS505 goes up to 1080i for some filetypes, and 720p for others (no h.264 support btw). So basically, if your TV is 1080i and you don’t have lots of money, go for the Ziova product. If you have a 1080p TV, you have more money and more time, and you would find the Blu-Ray and gaming abilities useful, get the PS3.

I have ruled out the following ways to playback your personal HD files on your TV:
– A Media PC: can be more expensive than the PS3 before its specs can handle 1080p, takes too much space and if you run it with Linux instead of Windows it can be difficult to configure properly. It can be a flexible solution with lots of extra features, but it can also be a nightmare. Decide with care.
– AppleTV: Good price, nice interface, but it goes only up to 720/24p, and most HDV camcorders grab 30fps, not 24. AppleTV would be THE device to go, if and only if, Apple upgrades it to support full HD resolutions one day.
– HDV Camcorder: you will have to use tapes all the time and deal with 2-hour battery life each time. Yuck.
– HD-DVD/Blu-Ray burner and separate TV player: way too expensive, buggy burner software up to this day.
– DivX-enabled upscaling DVD players: *Most* of these models only have NTSC resolution DivX support, not HD. Don’t fall into the trap of their “1080p upscaling” marketing because that doesn’t usually apply for your own mpeg-2/4 files.

Now, here is how you could export your HDV home videos to HD, from let’s say, the $130 consumer NLE Sony Vegas Movie Studio 8 Platinum (VMS8-P), which is the best deal for the money compared to other consumer NLEs in terms of feature-set. VMS8-P is not the easiest to operate and it has its own quirks and bugs, but overall, I found it to be the best bang for the buck if you need flexibility and power. Most consumer NLEs don’t allow you to save on anything above 1080i-HDV (that’s 1440×1080/60i) and that’s ok for Ziova (export either as WMV or MP4 or MP2 in 1080i or 720p, Ziova should be able to handle it) but that’s not as optimal for the PS3 which is able to output 1080p progressively, so we will need to pull a few tricks and re-encode from 1080i-HDV resolution to true 1080p without loss of quality.

First thing to do is install the Huffyuv lossless codec and MediaCoder. The Lagarith codec would have been my personal choice instead of Huffyuv, but it is not supported by most freeware encoder front-ends, so we are going with Huffyuv for this tutorial. Edit your HDV video clips as you normally would on VMS8-P. When your video editing is finished, select “render as” from the “File” menu, select the .avi method and the “1080/60i-intermediate” template. Click “Custom”. From the “Video” tab there is a “Video Format” drop-down menu. From there, select the Huffyuv lossless codec. Encode your finished work using these settings and a huge.avi file will be produced. It is not uncompressed, but because it’s lossless, the filesize will be big (about 2 GB per minute of video length).

Open MediaCoder, load the newly created .avi file, and from the “Extensions” menu select the “Game Consoles / PSP”. Select “yes” to revert settings, select either the default MPEG4 or AVC versions (note: the AVC HD versions produced by MediaCoder don’t playback on Quicktime/VLC so you might want to go with the default mpeg-4 encoding option to be on the safe side), and then close the popup PSP window that MediaCoder has opened. From the “Video” tab at the bottom of MediaCoder’s main window change the bitrate to 8192 Kbps or more. From the “Picture” tab on the Resize option type 1920×1080, select your source frame rate (usually 29.970 on NTSC), Aspect Ratio 16:9. Then, click on “Effects” button below and from the “De-Interlace” option select “Linear Blend” (not sure if it’s the best option) and then click “ok”. Select 128 Kbps from the Audio tabs on the right by changing the “target quality” to “streaming CBR”. Then, start encoding. Depending on the speed of your PC and how lengthy your video was, you should be having a 1080p file now.

Instead of using MediaCoder, you could use XviD4PSP, which is more well-tested against the PS3. However, in order to force that utility to de-interlace, you first will have to click “configure” on the Huffyuv lossless codec setup under Vegas’ .avi export dialog, and tell it to use YUV2 instead of its default. Then, you export normally from Vegas and you load the .avi file on XviD4PSP. *If* it has black bars left and right of the image (if it shows up with wrong aspect ratio) then crop it by 240 pixels on the left and 240 pixels on the right. Then on the next screen you select the PS3 preset format, and you adjust the bitrate to 8192 Mbps (or more), resolution 1920×1080, Aspect Ratio 16:9. On the “Advanced” tab click on the “De-Interlace” checkbox and then click “ok” and then “Start” to encode. That resulting HD .mp4 file is compatible with the PS3, Quicktime and VLC.

You can burn a CD or DVD with these files, as normal files in the optical drive filesystem (not as DVD-video), or copy them to PS3’s hard drive or a USB stick or via networking, and then enjoy them on your PS3 and HDTV.

Update: Using the second method described above, I have created this 5 MB test 1080p file for testing with the PS3 or XBox360, shot with my HV20. Let me know if it works on your console (if you have the latest firmware installed).

Update 2: It seems that only the SUPER encoder will create valid –and with fewer headaches– 1080p files for the XBox360 and PS3. Works well with avi source files using Huffyuv btw, but it will only accept 29.97 fps as output, no matter if your source video is 24fps — which makes it useless for people with Canon HV20 cameras who shot in 24f mode.

Update 3: Read the Update on this blog post for the best way yet to convert interlaced HDV files to PS3/XBox360.

How to upload the right clip on video sharing sites

I frequent a number of video-related forums lately, and this question pops up all the time: what’s the best practice for videos to upload on YouTube and other video sharing sites.

Youtube encodes your video in 320×240 QVGA format and it has a time limit of 10 minutes and 100 MB size per clip. Other sites have similar size or time limitations, but few don’t. Revver re-encodes on 480×360 and Veoh on something close to 500 pixels wide. Here are a few pointers:

1. If your clip is smaller than 10 minutes, you can safely decide to encode it and upload it in VGA 640×480 format. If it’s bigger than 10 minutes, please note that YouTube won’t accept your video. Regardless, if your video is too long select the QVGA exporting size.

2. If your video is widescreen, make sure you use your encoder’s options to create a letterbox. You can choose to not letterbox and instead export using a widescreen size (e.g. 640×360 or 320×180), but depending on the kind of codec you will use, some video sharing sites won’t be 100% compatible recognizing it and they will “stretch” your video vertically making it look ugly. To be on the safe side, learn how to letterbox your videos.

3. If you decided to export in VGA size, use 1024 kbps video bitrate and 64kbps audio. If you went for QVGA, choose 320 kbps video and 64kbps audio.

4. The preferred codec exporting format is mpeg4. Choose either XVid or MP4-Simple profile, with CBR bitrate encoding (VBR bitrate can cause compatibility problems). Avoid WMV, as depending on the encoder used it has A/V sync issues when re-encoded by most video sharing sites.

Useful applications to do the job properly (with letterbox support) is MediaCoder on the PC side and QuickTime Pro on the Mac. FFmpegX won’t letterbox.

iPhone security breach

Haha… So basically, Apple bent over to Cingular to not include support for native apps because –as it’s well known– carriers are afraid of native app stability but mostly security problems, and now they get their full blown security hole from the browser. I can only suggest two things to ATT for that (expected) overreaction over native apps: either remove the browser from the iPhone (*tsk*), or free the damn SDK and let users have native apps instead of useless web “apps”.