AVI project continued

It’s only been a few days since I got the mad idea to wage war on the AVI format by converting every such file on my server to nice AppleTV-friendly .m4vs and then importing them into iTunes to add art and do some basic tagging.

I’m not tagging every single file with, say, episode number and title and description, as that would be sheer madness, but getting them sorted by show and season is usually good enough, with the title generally being the same as the file name which almost always contains the episode number.

Anyway, I started with about 2,000 avi files. That’s rather a lot.

I have about 900 to go. That’s rather good progress by any measure.

I’m not running in to too many “problem” files, ones where I need to run them through VirtualDub or mencoder to get them in shape for ffmpeg. I was a bit worried to start, as I hit three or four in the first couple of shows I was converting and that would have meant an awful lot of extra work had it continued.

What I’m running into more often is perfectly well-encoded files that just had some poor choices. For example, avi files with stereo AC3 audio rather than mp3 or AAC.

There’s nothing wrong with AC3, of course, it’s a fine codec. It’s just that I don’t know how to get good encodes from files with AC3 audio. My attempts have sounded like, well, what it used to sound like when you put a CD-ROM into a CD player before CD players got smart enough not to try to play them.

Unfortunately it took me a little while to spot the pattern, so I did need to do some re-encoding of about 30 files, but I got it sorted out. I’m having to feed files with AC3 tracks through Handbrake, which is a little less fire-and-forget than my existing script but which is working all right to a point.

I did also have to make some encoding-quality tweaks. I’ve been doing most of my encodes in h264 with a crf of 19. This makes m4v files that are usually 10-15% larger than the source AVI files. This is a little inefficient, sure, but drive space is pretty cheap.

This breaks down if the source material is of poor quality. For example, we had a folder full of episodes of Time Trax that are in really bad shape. The source appears to have been VHS recordings in 6-hour mode, there’s tons of tracking noise and the VBI data is in the picture area.

Throwing these through libx264 at crf 19 is a BAD idea. In an effort to faithfully reproduce all the noise and snow from the original files, they balloon from 400MB files to well over a GB.

Drive space ain’t that cheap. I’ve had to go down to crf 22 for these and a few others.

My last problem is dealing with files with AC3 audio and external subtitle files, since Handbrake doesn’t like to burn SRT titles into video. That only affects about a dozen files though.

My bigger nightmare is mkv files with stylized subtitles, because my conversion process for those was reliant on some versions of mplayer and ffmpeg I compiled myself for OSX and I’m not sure I can reproduce them for Windows.

But that is for another time. For now, the heady glow of progress. 🙂

This entry was posted in organization. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.