Author Archive

General A/V compression guidelines

This is a generic tutorial on audio/video compression. It does not adhere to any specific application, but it teaches you what is what, so by using this knowledge you can export from ANY application in the market. So, here’s what you need to know:

* Many video editors require that you “tell them” in their project properties what kind of source footage you got. For example, if your source footage is NTSC HDV, you need to tell them to accommodate/optimize for 1080/60i. For PAL that would be 1080/50i. Then there is 24p footage, different resolutions, or plain DV or just digicam VGA video. You must always know what kind of source footage your camera outputs, so you can configure your video editor or utility to accommodate it. For example, if your camera shoots HD at 24fps and you let your video editor to use the default DV in a 60i timeline, you will get bad quality, and performance degradation during editing. So, get it right! Not all editors automatically recognize your source footage and auto-configure themselves.

* If you are using Sony Vegas, I would recommend you right click on clips in the timeline that lots of motion, select “Properties” and then “Disable Resample”. This will get rid of the “ghosting” effect during the final export. Not sure how to do that on other video editors, most of them don’t have the ability to turn it on/off.

* When you are finally ready to export, the first thing you need to decide is the medium you want to export to. Is it the web, the iPod, the PS3, a DVD, or simple archival? You see, depending the device you want to export for, different codecs and options apply. Here are some basic codec guidelines for some popular devices:
– iPod: 320×240 resolution, native frame rate as source footage, h.264 video codec 512 kbps, AAC audio codec 64 kbps stereo.
– Sony PS3 and XboX360: 1280×720 or 1920×1080 resolution depending if you have a 1080p or a 720p TV, native frame rate as source footage, h.264 or WMV or XViD video codec at 5 or 9 mbps, AAC audio codec 128 kbps stereo or 5.1 surround.
– DVD: use the DVD templates that video editors usually come with.
– Youtube: Same as iPod.
– iPhone and PSP: Same as iPod, but at 480×270 resolution at 1mbps bitrate.
– Vimeo SD and HD: Tutorials here and here.
– Zune and Creative players: 320×240 resolution, native frame rate as source footage, WMV video codec 512 kbps, WMA audio codec 64 kbps stereo.
– Archos and other PMPs: 320×240 resolution, native frame rate as source footage, XViD video codec 512 kbps, MP3 audio codec 64 kbps stereo.
– Archival: a lossless or near-lossless codec, like DV, HDV, mjpeg, Huffyuv, Lagarith, Cineform, ProRes, AIC etc.

* Video codecs. There are two kinds of codecs. The Delivery grade codecs and the Intermediate grade codecs. The first ones are supposed to be exporting/view-friendly, and the other ones archival/editing friendly. More information here on the subject. I would suggest to hunt for h.264 video, AAC audio, inside the .mp4 container format. That’s the most compatible and widespread format today on devices.

* Frame rate. Keep frame rate the same as the source footage (you should be able to find some “summary” information about your footage somewhere on your application). For NTSC that would be 29.97 (60i), for PAL 25 (50i), and then there’s 24 progressive frames, which actually in reality is 23.976 fps. I would suggest you export with the right frame rate each time and not round these weird numbers to 30.00 or 24.00.

* Resolution. When you export, depending on the camera you got, here are your resolution options and bitrate you should be exporting at with delivery-grade codecs:
NTSC DV 4:3: 656×480 or 640×480 (at 1800 kbps)
PAL DV 4:3: 768×576 (at 2300 kbps)
NTSC 16:9: 874×480 or 880×480 (at 3000 kbps)
PAL 16:9: 1040×576 (at 4000 kbps) or 880×480 (at 3000 kbps)
HVX or DVX 16:9 DV Panasonic cameras, export at 848×480 or 852×480 (at 3000 kbps)
AVCHD/HDV: 1920×1080 (9 mbps) or 1280×720 (5 mbps)
Canon TX1 or Kodak 720p digicams: 1280×720 (5 mbps)
Digital camera VGA 4:3: 640×480 (at 1800 kbps)
Please note that you should never export for web/viewing purposes with aspect ratios that are not 1.0000. I see a lot of people for example exporting DV at 720×480 or 720×576, but this is not the safe thing to do, because most applications don’t take into account the special aspect ratio value that these kinds of exports have, and so you end up with squashed heads. Use the above guide to get it right, and make sure that aspect ratio is set to either 4:3 or 16:9 for the above resolutions, or at aspect ratio 1.0000 if your application uses this way to represent pixel information.

* Bitrate. Bitrate is the amount of bits per seconds that the video uses. That’s the only factor that decides how big a video file will be or not. There are two kinds of bitrates: constant and VBR. In constant bitrate, you just tell the application to use a specific number of kbps or mbps, as shown above. But in VBR, you give two numbers: one for the average number and one for the peak number. For example, if you want an average bitrate of 3mbps, you can also ask the application to have a peak number of 5mpbs. The application will go as high as 5mbps only when there is a lot of motion on the scene and it requires more bits to encode it properly, while it will stay at 3mbps or below if the image is static and doesn’t require lots of bits. VBR is generally preferred for best quality, but it’s more difficult to figure out, if the application’s user interface is not well done.

* De-interlacing. If your camera does not shoot in progressive mode (most camcorders don’t, only digital cameras do), then you must de-interlace during export, otherwise your video will have “jaggies” (horizontal lines). You must hunt for a checkbox or option that’s called “de-interlacing” or “progressive”. Please note that if you are exporting in an intermediate format for editing/archival reasons, or back to the camera’s tape, you should not be exporting as progressive, because this is not the footage’s native format. Only de-interlace for “viewing” purposes, e.g. youtube, ipod etc.

* Audio bitrate. For audio select between 64kbps to 128 kbps (although you can have VBR for audio too). More than that is usually goes unused by many devices/headphones, so there’s no reason to use more. Use 44.100 Khz for sample rate, and Stereo.

* Audio Codec. Like with the video codecs, there are many different audio codecs you can choose from. But the audio codec should always be decided in conjuction to the video codec. For example, if you want to export in h.264 Mpeg4, you must use AAC, because that’s the way most players are optimized to read h.264 with. For DivX/XViD it’s mp3. For Theora video it’s Vorbis audio. For WMV it’s WMA, and so on.

* Containers. Don’t confuse “containers” with “codecs”. MOV and AVI are *not* codecs, so saying that “I exported as AVI” says nothing to others who might try to debug your problem. AVI/MOV are simply file formats that inside them can “host” actual video and audio codecs. In theory, you can have a gazillion different codecs in them, it’s just a container format to keep “glued” the different kinds of audio and video together…

Prejudice

Someone said that I am rude (not the first time, of course). Thing is, I am rude in general. But NOT on the specific case. But people always have prejudice against others and they over-read comments in the future if they have caught you once to actually be rude.

But despite that, I won’t stop being who I am and always second-thinking every move of mine just so I make sure I don’t get misunderstood again in the future. That would just not be honest. And if I am one thing for sure, that’s “honest” (no, not “self-righteous bitch”).

My “straight-forwardness” and “to the point” comments towards others often puts me in trouble, but I believe this is my best quality. If you look like a stuffed potato in your new dress, be assured that I will be the one to point it out to you point blank, and I’d do that exactly because I care. Would it “suck the fun out” of it? It probably would. But at least you get one person who’s not afraid to be honest with you and not laugh behind your back.

WGA strike is over

A deal has been struck between the major media companies and the Writers Guild of America to end the writers’ strike, former Walt Disney chief executive Michael Eisner revealed on CNBC.

Now the only question I have is how many “Lost” episodes will be shot for this season (there are 8 that are already done). To go back at the field and shoot it requires 4 to 6 weeks. Then, it requires 2 weeks to actually shoot, per episode (although multiple episodes are usually worked on at the same time). Then it requires at least 1-2 weeks of post-processing.

Overall, we are looking for at least 2 months time before a new episode is ready for broadcast. This means that if the crew starts working this coming Monday, the first new episode (9th of the season) would be ready around 10th of April. Given the fact that “Lost” plans were for 16 episodes this season, the season’s finale will have to be pushed to 12th of June (Thursday). And this is up to ABC if they want to push their series so far into the summer when viewership is down, or cut the number of new episodes, or have a two-hour finale. Hopefully, they will allow “Lost” to have all its 16 episodes this season, as planned.

Regardless, don’t forget to watch the 2nd episode tonight. It’s an exciting episode, I hear.

The first alien-human hybrid is a success

Perez calls Victoria Beckham “alien spice” and he’s got a point. She reminds me of the Greys too. Creepy.

Lourdes

Madonna’s daughter, Lourdes, looks great. In fact, she looks exactly like her mom. She has the same smile as Madonna used to have as a youngster. I am impressed in the way Madonna is raising her children. Lots of education (Lourdes speaks 3 languages flawlessly, already), little TV, no junk food. Hopefully she doesn’t inject them with B12 though as she does to herself.

Disgusted by LG

I’ve always been disgusted by the way LG does business. It’s the mobile company that I can not stand the most. They do quick jobs with shady usability, and most importantly, they never release firmware upgrades. “Arpa-kolla”, as we say in Greece.

MobileBurn posted their recent press release where the Viewty LG phone can now capture 120fps at VGA resolution (previously it would only do so for QVGA). Instead of releasing a firmware upgrade for everyone to have access to that small feature and possibly other bug fixes, they just re-release the same god damn model in to the market, leaving everyone with an already purchased Viewty in the cold.

I hate LG. And I go on record with that.

The role of John Locke

I was astonished to see on various polls and discussions online that most viewers would have taken Locke’s side instead of Jack’s on Lost’s 4th season opener. I wonder if these people are actually sane or if they understand what the hell they are viewing on TV.

Locke’s role on “Lost” is to be a sidekick. He is actually the main ‘villain’ on the series, not the Others, but he is portrayed in a way that people don’t realize it. Locke simply does what he thinks it’s right, without taking other people’s wishes into account, without even having enough information himself about the things he stands for. He is insane, as Jack very well put it. Sure, he is able to walk after he crash landed, but that doesn’t mean that everyone shares his wish to stay on the island.

Locke’s is the magician of the clan. He acts purely on superstition and subjectiveness. Jack on the other side is the hero, who takes logical steps according to available information to him, to save his people. The fact that Locke sees an apparition of Walt while he’s almost dead, doesn’t mean that it’s a true vision, but it could be tricks of the mind while bleeding to death. But instead of thinking straight that he is hallucinating (no matter if WE, the viewers, know that the island has special powers or not), he embarks on his way to stop the freighter people. Just because a vision told him so. I am pretty sure that after the blown up of the submarine, communication station, implosion of the hatch and the killing of Naomi, he will make sure to sour the freighter people’s opinions for the survivors, resulting in them deciding taking them hostage or something, and only save 6 of them.

Locke is not a friendly character. He is a cool character, but he is not the hero. Jack is. Locke is here just to make things difficult for the hero from the “inside”, in a similar way to Dr. Zachary Smith in 1965’s “Lost in Space“. Dr Smith was not a bad person, just like Locke is not a bad person, but he is selfish, and most of all, misguided.

So why the hell would I ever follow Locke? I don’t follow the Pope either. Instead, I would follow a scientist-turned-leader who thinks hard before taking an ultimately, rational, decision.

As someone put it on Blogger:

“If i were a lostie who has been trapped in a creepy island for 3 months eating only mangos, fish and boar meat, running and hiding from a smoke monster, witnessed a lot of deaths, hearing some creepy voices coming from the woods, kidnapped or watched my friends kidnapped by some ppl who call themselves the others, i would try my chance to get off the island and go with team jack no matter who was coming to the island… At least they have a boat and a helicopter! and who says “not penny’s boat” means they are coldblooded murderers who are coming to the island to kill them all… Oh yeah Ben and Locke say they are coming to kill them all… At least we are sure that 6 of them are alive in the future.”

Lovely videos

It was nice to have Kino‘s maintainer Dan Dennedy around today for lunch. We talked about all things Linux and video editors.

Also, here are some videos that I liked recently. Click their titles to view or download their HD versions.

PAL support on PS3/A2

All I can say is this: Shame on you, both Sony and Toshiba.

My parents in law were leaving for France today and they asked me to burn a DVD for them with some of my video clips. I burned a PAL DVD (out of NTSC HD sources), and I tried it on the PS3’s Blu-Ray. Error: no PAL support. I turn ON the Toshiba A2 HD-DVD player and I got another error about PAL support. Apparently you have to literally hack the A2’s firmware using a hex editor to get PAL support. At the end, JBQ had to hook up our 6 year old Philips DVD player to be able to successfully test the PAL DVD.

Remember, we are just talking about a region-free, unlocked home DVD here. And yet, these two expensive devices will refuse to playback the DVD even if the ability IS there. That’s something that most DVD players of years ago would do anyway, as long as the disc was unlocked.

FAIL. Go burn in hell, Sony and Toshiba.

Big splash for “Lost”

“Lost”‘s premiere managed over 16 million viewers last night, a good record for the show which has seen some decline last year. But “Lost” is back in full strength and it’s becoming more violent, if I am to believe some of the spoilers online. I bet this half-season will be huge.

Check this deleted scene (.flv format) from the first episode of the 4th season. Partial transcript below:

(While rescue is very close, Juliet digs some graves, and Sawyer drinks a beer near by. Juliet is not one of the survivors of the plane crash but she wishes to be rescued as well.)
Sawyer (sarcastic): So what are you gonna tell’em?
Juliet: Sorry?
Sawyer: The cavalry comes here and some yahoo from Oceanic Airlines shows up with a little clipboard looking to tick off your name. What are you gonna tell’em?
Juliet: …You have some blood on your cheek.
(Sawyer cleans up his right cheek with his hand.)
Juliet: The other one.

Pure genius dialog. You gotta see Sawyer’s face.