View Full Version : DivX5 to MPEG2(DVD)
colinb
3rd May 2006, 09:17
I have an AVI file which GSpot identifies as:
640x480 resolution (presumably square pixels)
MP3 audio
DivX5 codec
I want to burn this to a standard (MPEG2) DVD. I have not used DivX before and I don't want to get too involved with it at this stage - I'm just interested in getting this particular file converted.
I'll probably use Avisynth to resize it to the standard size 704x576 (rectangular pixels) and feed it into the "HC" Mpeg2 encoder. (Then use my usual DVD authoring package.)
The audio isn't a problem - I'll just be converting that either to uncompressed PCM or re-encode it to AC3.
What do I need to install on my PC to read and decode the DivX file into avisynth at the highest possible image quality?
jggimi
3rd May 2006, 09:47
Any MPEG-4 codec that understands DivX's 4cc can be used; if you don't wish to install DivX, try XviD, it can handle DivX. Then just use AviFile() in your script.
colinb
3rd May 2006, 10:04
Thanks.
Where can I find just the Xvid codec for windows? I assume that's all I'll need. The Xvid site only seems to have the complete Xvid souce code available for download.
Am I right in assuming that Xvid is now preferred over DivX as DivX has gone commercial (or something)?
jggimi
3rd May 2006, 10:12
No. Preferences for MPEG-4 codecs vary. For a brief description of the major codecs, including DivX, see:
http://www.doom9.org/divx-encoding.htm
For comparisons, see http://www.doom9.org/codec-comparisons.htm
Look to Doom9's download pages for codecs.
hhttp://www.doom9.org/divx-encoding.htm
2 "h" aren't necessary :p
jggimi
3rd May 2006, 11:38
Corrected, thanks!
Corrected, thanks!
np :)
@colinb: if you're looking just for the codec, I suggest you to take a look here (http://www.koepi.org/xvid.shtml)
colinb
3rd May 2006, 17:22
Then just use AviFile() in your script
Do you mean AviSource() ?
If I understand correctly DivX5 uses YV12 and so will output YV12 by default. Does this still apply if I've just installed the XviD codec (rather than DivX) ?
As I'll be feeding this to the HC mpeg2 encoder which only accepts YV12 then it should encode without any colorspace changes from end-to-end.
So assuming that the footage is progressive, presumably I just need
# Read 640x480 DivX (YV12)
AviSource("mydivx.avi")
LanczosResize(704,576)
and let the output feed into HC encoder?
jggimi
3rd May 2006, 18:33
Do you mean AviSource() ?Ye.s; sorry about the finger fumble.If I understand correctly DivX5 uses YV12 and so will output YV12 by default. Does this still apply if I've just installed the XviD codec (rather than DivX) ? I'm fairly certain both MPEG-4 ASP codecs store information in the same colorspace, though I could be wrong. You could always add a ConvertToYV12() to the script if you found it necessary.So assuming that the footage is progressive, presumably I just need
# Read 640x480 DivX (YV12)
AviSource("mydivx.avi")
LanczosResize(704,576)
and let the output feed into HC encoder?Looks ok to me. But ... you might not be happy with upsizing along with reencoding. The additional resolution doesn't buy you any additional detail, and it might -- just a guess -- make macroblocks and other mpeg artifacts more obvious to the human eye. If you have time to experiment, you may want to use Trim() and run a scene through at different DVD resolutions, and make your final determination after viewing the results.
Good luck!
colinb
4th May 2006, 09:14
Having looked at the avi file again I notice it's frame rate is 29.9xx. I suppose I should have expected it from its number of lines 480.
Although the original source would have been from PAL land (25 frames/s) it looks like it had been converted to NTSC 29.9xx frames/sec progressive with some occasional blending of frames visible.
I live in PAL land, so It seems I therefore have two choices:
1. Attempt to reduce the frame rate back to its original 25 frames/s (not sure how to do that or whether it can be done effectively), and resize it from 640x480 to 704x576, or
2. Keep the 29.9xx frame rate and just resize from 640x480 to 704x480 (i.e. just a horizonal stretch), and leave it up to my DVD player to output it as PAL60.
I think option 2 might provide the best quality, but some players may just drop frames and output 25 frames per sec consequently with visible glitches.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.