View Full Version : HDTV to xvid
chadamir
19th March 2004, 21:51
After deinterlacing and resizing and taking out each to see which was bottlenecking I cannot seem to get better than an average of 3.5 fps. Is this normal for converting from 1080i to 540p? Heres the avisynth script I'm using:
LoadPlugin("c:\Program Files\Avisynth 2.5\plugins\mpeg2dec3.dll")
mpeg2source("e:\testjl.d2v")
crop(0,0,-12,-8)
I have an athlon xp 1700 and im using virtualdub and avisynth. Is there anyway to speed this up? Every Frame counts
jimmy basushi
19th March 2004, 22:18
might help more for the guys in the know if you post your xvid settings also
chadamir
19th March 2004, 23:36
All settings are default except motion search precision which I set to 6 which seems to speed it up. Oh yeah and its 1 pass 3700 cbr. Can't do multipass cause it's too slow.
FreQi
20th March 2004, 15:49
I posted my method here (http://forum.doom9.org/showthread.php?threadid=49349) some time ago. Some of the tools are old now, but the process is still pretty much the same today. I have an Athalon 2700 and I encode in just about real-time (something like 30fps, I don't really remember. I've been doing a lot of DVD encodes lately). Maybe it'll help you gets some more speed out of the process and let you do 2-passes...
And remember, if you're taking 1080i and tryng to make it progressive, just resizing it won't do you. You'll end up with blended fields, badly blurred motion and it'll look pretty much like ass. You'll either need to use SeperateFields().SelectOdd().Decimate() or Telecide().Decimate()
chadamir
20th March 2004, 18:55
Would It be forward of me to say I love you? Im averaging around 10+ now. Thank you so much.
chadamir
21st March 2004, 08:42
Now the problem is this:
Can 720p fit nicely without over compression on a dvd-r with ac3? Also, what's a good way to get from 1080i to 720p?
FreQi
21st March 2004, 18:45
chadamir
Would It be forward of me to say I love you? Im averaging around 10+ now. Thank you so much.
heh, tell your lady friends ;] and don't touch
chadamir
Can 720p fit nicely without over compression on a dvd-r with ac3? Also, what's a good way to get from 1080i to 720p?
On a dvdr? Hell yeah. You're talking ~4.3gigs of space (I hate counting in gigabit) and your ac3 for a 44min tv show is only what, 120megs? you should be able to fit several episodes on a dvdr with no problem. Hell, you could (and I would) make it a 700meg encode and even fit each episode on a cdr (which would be about 6 or 7 eps per dvdr btw).
Just remember that your source is HDTV which is born digital and is delivered to you digitally. That makes your source extremly clean and compressable. Don't be affraid to dip into the bitrate in order to get a comfortable file size.
Now, if you wanna do 540p, the fastest way is going to be SeperateFields().SelectOdd().Decimate() because when you seperate the odd and even fields, you chop the vertical resolution in half and it just becomes progressive scan at 2x the frame rate (which is why you then follow seperate fields with selectodd or selecteven) and 1080/2=540.
Now if you want to go to 720p... You really don't want to make things bigger when you resize. If you're just going a couple rows and columns it not a big deal, but 540 to 720 is a pretty big jump, and I'd expect your resulting image quality would be pretty gross. So your best, but slower option is to use the good ol' Telecide().Decimate() process which will turn it into 1080p and you can then resize that to 720p. I've become a fan of LanczosResize() but Bicubic is a solid alternative for you too. I don't know which one is faster, but I seem to remember the speed difference to be neglegable.
This is all stuff you should keep in mind if you decide to do dvd encodes because dvd's are only 720x480, and you can do them in 480i or 480p (but 480p at ~24fps with a 2:3 pulldown is the best imho). So you can use the Select method then just resize the result to DVD res and it'll be way faster than trying to telecide the whole freakin thing.
chadamir
21st March 2004, 21:41
Well let me rephrase that how many minutes of 720p can fit on a dvd-r? Also, would you recommend xvid over wmv9? And to follow that up I want to go from 1080i to 720p, so can you give me a full script for that?
Zep
21st March 2004, 23:54
Originally posted by chadamir
Well let me rephrase that how many minutes of 720p can fit on a dvd-r? Also, would you recommend xvid over wmv9? And to follow that up I want to go from 1080i to 720p, so can you give me a full script for that?
impossible to answer because it depends on what you are encoding.
A very low motion show like "The Practice" 700 megs is all you would need. A high motion, high detail, many many fast cuts and constant panning like "American Idol" you need 4 times the bit rate to get the same average Q. (that show is very very hard to compress)
as for your first post use
YV12InterlacedReduceBy2() # reduce to progressive 960x544 (MY source is 1088i where I live)
that is the fastest and best why so far that i have found.
As for 1080i to 720p I never do it. 960x540 is plenty but if you insist do what FreQi said.
I would use Xvid. wmv9 bahhhh :)
FreQi
22nd March 2004, 02:05
Re: How many minuets can you fit on a dvdr with XviD
It's up to you. Whatever you are comfortable with. I do most my XviD encodes at 624x352p so I get dandy quality with only about 1000kbit. That fits something like a dozen 42 minute episodes on a dvd. Use a calculator ;] You're using higher resolutions so you'd want to use a higher bitrate and therefore fewer minuets will fit to get the same quality. And chadamir is absolutely right about it heavily depending on the footage you're encoding. for reference, most the stuff I do are sitcom's and dramas.
If I did 1080i to 720p, I suppose it would look something like this...
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\MPEG2Dec3.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\Decomb.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\Uncomb.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\BT709ToBT601.dll")
MPEG2Source("f:\path\to\the\shows.d2v")
# correct the slight color error SDTV->HDTV introduces
BT709ToBT601().AssumeFieldBased()
# decimation on even fields only (if you wanted to do 540p)
#SeparateFields().SelectEven().AssumeFrameBased().Decimate(cycle=5)
# the more "traditional" decimation methods
Telecide().AssumeFrameBased().Decimate(cycle=5)
# this is somewhat faster than telecide, but may not be as accurate
#Uncomb().AssumeFrameBased().Decimate(cycle=5)
# When Source AR is 1.778:1 -- 16:9 Wide-Ssreen
Crop(4,4,-4,-4) # take 4 pixels of left, top, right, bottom
# here's your 720p
LanczosResize(1280,720)
I've got more in there than you'd need, but it's some stuff you can play with.
edit:
Oh yeah, and when it comes to WMV9 vs XviD, I am no expert on WMV, but I avoid it altogether. I am a fan of open source, and XviD is ISO standard compliant with MPEG4 so I have no intentions to migrate to WMV9 at this point. However, since you are encoding HDTV resolutions, you might want to look into it because I understand there is debate over what will be the format on HD-DVD's and I guess WMV is one of the potentials. I would prefer MPEG4 myself, but I am biased that way.
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.