View Full Version : Encoding interlaced DV to interlaced DivX
miamicanes
13th September 2007, 16:55
I'm getting ready to archive my mountain of old VHS tapes to a digital format. I have a DV capture box (ADStech Pyro), and will have a TBC in another day or so. Being able to burn them to DVD for viewing NOW is a minimal concern; preserving as much quality as possible (what little there is) in as little space as possible is a major one.
If I wanted to encode them to MPEG-4 that can be played back on at least one higher-end current DVD player that supports XVid/DivX:
* Does DivX and/or XVid directly support encoding interlaced content? Frankly, I'd rather leave the videos intact for now and preserve them as interlaced, then use the best-available deinterlacing when the future need arises, than to forever freeze them at what can be achieved today.
* By the same token... do DivX and/or XVid allow the referencing of non-adjacent B-frames? In other words, if I'm encoding field #30,284 as a B-frame, can the encoder *ONLY* reference data in fields 30,283 and 30,285 (both of which would be for the OTHER odd/even field), or could it reference data in fields 30,282 and/or 30,286 as well? This is one of MPEG4's big strengths over MPEG2 insofar as the encoding of interlaced content is concerned... if DivX and/or XVid won't allow it, that's a HUGE drawback for my particular use.
* How good is the deblocking supported by DivX/Xvid compared to what x264 will allow you to achieve if DivX/Xvid compatibility isn't required?
* Are there presets for MeGUI somewhere that correlate to the best possible quality achievable for 720x480@29.97hz interlaced content that will produce files compatible with the best hardware players existing today (like the Oppo DV-981HD, I guess?) Or at least a FAQ somewhere that explains what x264 limits need to be observed to generate a file compliant with DivX "Home Theater Profile" (and its Xvid equivalent)?
Blue_MiSfit
13th September 2007, 18:55
* Does DivX and/or XVid directly support encoding interlaced content? Frankly, I'd rather leave the videos intact for now and preserve them as interlaced, then use the best-available deinterlacing when the future need arises, than to forever freeze them at what can be achieved today.
Yep, they both handle interlaced content perfectly fine. It's a great idea to keep interlaced content interlaced, provided your playback device knows what to do with it.
By the same token... do DivX and/or XVid allow the referencing of non-adjacent B-frames? In other words, if I'm encoding field #30,284 as a B-frame, can the encoder *ONLY* reference data in fields 30,283 and 30,285 (both of which would be for the OTHER odd/even field), or could it reference data in fields 30,282 and/or 30,286 as well? This is one of MPEG4's big strengths over MPEG2 insofar as the encoding of interlaced content is concerned... if DivX and/or XVid won't allow it, that's a HUGE drawback for my particular use.
Hmm... why exactly? AFAIK, only H.264 allows this method of prediction. It makes a difference, sure, but I can't see it being a make or break difference. It's also difficult for me to understand why this would be "a HUGE drawback for my particular use"
How good is the deblocking supported by DivX/Xvid compared to what x264 will allow you to achieve if DivX/Xvid compatibility isn't required?
Deblocking for MPEG-4 ASP (DivX / Xvid) is provided by the decoder / post processing engine. H.264 / MPEG-4 AVC (x264) allows for an encoder-side in loop deblocker. Thus, H.264 (when implemented well) has an inherently superior deblocking capability. Note that "DivX/Xvid compatibility" is not something that x264 is capable of. The two (ASP and AVC) are totally different standards and are not compatible.
Are there presets for MeGUI somewhere that correlate to the best possible quality achievable for 720x480@29.97hz interlaced content that will produce files compatible with the best hardware players existing today (like the Oppo DV-981HD, I guess?) Or at least a FAQ somewhere that explains what x264 limits need to be observed to generate a file compliant with DivX "Home Theater Profile" (and its Xvid equivalent)?
Again, ASP and AVC are not compatible. You have to chose which standard you want to follow. You can get good results with both, including interlaced content. I don't know of any STBs that can actually handle interlaced AVC content, but I'm not really too "up" on the issue. AFAIK, ASP compliance is much more common that AVC compliance, due the increased complexities (and therefore cost) associated with decoding AVC.
Good luck, it looks like you've got more thinking to do! :) Ask more questions!
~Misfit
miamicanes
13th September 2007, 20:39
Ah. Oh well. So much for DivX compatibility.
At this point, I'm mainly searching for a good long-term archival storage format for the hundreds of old VHS tapes I'm going to be digitizing & tossing over the next few months. Keeping the majority of them as DV-AVI just isn't practical, and most of them have terrible picture & sound quality to begin with (as you'd expect)... but I want to preserve as much of what's there as I can.
I'm less concerned with being able to burn them to DVD *now* than I am with being able to burn them to HD-DVD *later*. My original plan was to encode everything to AVC/H.264... but so far, I've had zero luck at finding anyone who even knows what hard limits need to be observed when using x264 to produce video that's HD-DVD-compliant (it seems like the few who DO genuinely know the specific details are bound by NDAs and can't tell anyone). I've seen lots of speculation and conservative guesses, but nothing along the lines of, "... you must not reference macroblocks from frames more than 2 away, nor create B-tree pyramids more than 3 levels deep..." (note: I made up those values). So, this morning I was exploring the possibility of archiving them to DivX-compliant MPEG-4 instead. However, that option has kind of been deprecated now that I discovered that the highest bitrate supported by any DivX-certified DVD player is 4mbit/sec avg, 8mbit/sec max. I suspect that getting archival quality at that bitrate would be tough enough if every last option supported by x264 were allowed, and probably impossible with the subset of MPEG-4 apparently supported by DivX.
The main reason I'm so obsessed with deep B-trees is because it seems like that's the holy grail for achieving near-DV quality at a fraction of the bitrate... trading a tiny bit of quality loss and a lot of encoding time for a substantial savings in file size. I think deblocking is important too, because (correct me if I'm wrong) that's one of the major things that will help me out if I ultimately need to take one of those archived AVC/H.264 files and re-encode it to MPEG-2 to burn it onto a DVD for something. From what I remember, trying to re-encode MPEG-4 with visible macroblocks into MPEG-2 is a recipe for ugliness... but if I'm re-encoding deblocked MPEG-4 and using the highest-allowable target bitrate for DVD-compliant MPEG-2, it will hopefully look about as good as 6mbit avg/8mbit max VBR MPEG-2 from the original DV file would have looked. That's the theory, anyway ;-)
Blue_MiSfit
14th September 2007, 01:36
That's the theory, anyway ;-)
Indeed :)
You may be thinking too theoretically! No worries.
I had also considered the issue of most set-top boxes not supporting high bitrate MPEG-4. I don't know of any real easy solution.
Your options for archival are (as I see them):
1) Encode as set-top compliant interlaced MPEG-4 ASP (DivX / Xvid), at 4mbit average, maybe lose some quality, especially later with a DVD conversion
2) Encode as DVD - will look good, pretty easy to convert to MPEG-4 at a later date, should you need it. Might even be possible to re-author to make it work on a HD-DVD / BluRay later.
3) Encode as MPEG-4 (not set-top compliant) for archival.
4)...
~MiSfit
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.