View Full Version : HDTV Mpeg2 to X.264
lordx
28th February 2006, 16:17
Hi !
I've started to encode my HDTV Transport Stream to X264 'cause of HUGE files and waiting for Blue-Ray/HDDVD .
First, I'm using DGIndex to create d2v and Demux AC3.
My TS are 1920*1088 .
Then I'm using avisynth scripting like that :
Loadplugin("C:\AVIsynth 2.5\plugins\DGDecode.dll")
Loadplugin("D:\AVIsynth 2.5\plugins\decomb521.dll")
Loadplugin("D:\AVIsynth 2.5\plugins\simpleresize.dll")
Loadplugin("D:\AVIsynth 2.5\plugins\undot.dll")
mpeg2source("D:\hdtv.d2v")
Telecide(order=1,guide=1,post=2,vthresh=30)
Decimate()
crop(0,0,0,-8)
UnDot()
simpleresize(1280,720) -> max for my Hitachi projector
Then I load this script into Megui, with a bitrate of 4500 and HQ-Slow profile. With 2 threads for P4 HT.
On my P4C 2,6 Ghz , 1Go RAM PC3200, the first pass run at 4 fps and the second pass at ... 1,2 fps :scared: :scared: :scared: . 2 days to encode a 2 Hours movie ...
So, my simple question : do i must change cpu ? An athlon X2 with be really faster or not ? I'm ok to upgrade my PC but only if the results is really better.
Perhaps I've made a mistake in my avisynth script ?
Need your help ;)
I've finished one encoding last week , quality was AMAZING for 5go file ( 12Go source) , but big big problem on it -> on fast movements and travelling , a lot of macroblocks appears which are not on the source ... don't understand.
Thanks, hello from France and sorry for my english !
Sirber
28th February 2006, 16:26
Encoding HD is very slow. You'd be better off with Dual Core, or wait few days. It is normal :)
Also, why do you use SimpleResize?
lordx
28th February 2006, 16:35
Hi !
perhaps I will test an Athlon X2 in few days , so i will see ;)
I use SimpleResize 'cause I've found the script on the net :o
I'm using Lancsos Resize on my upscaling DVD to "not true HD" but I think that a a simpleresize is ok for a downscaling , isn't it ?
Sirber
28th February 2006, 16:36
I'd use Lancsos for both :) It keeps more detail. Also, I never heard of simpleresize so I can't trust it.
tomos
28th February 2006, 20:41
i encode a lot of this HD stuff. used to use divx, now moved on to x264. an X2 makes world of difference. especially if its clocked. hitting 14-18 fps sometimes on my 3800+ (overclocked of course) :D
i dont resize tho. i keep 1080i material at the same res - i just deinterlace etc etc etc. :)
shon3i
28th February 2006, 21:35
I dont now what happening with x264 speed i encode 1080i material with HQ-Slow about 2fps but my machine is Intel Pentium III ~750Mhz with 512MB Ram.
nm
28th February 2006, 22:36
Perhaps for fast first pass, but certainly not for the second.
lordx
1st March 2006, 12:40
well , X2 is my next buy ;)
But I always don't understand why I've lot of macroblocks in my first encode. Quality was amazing but on fast movement or travelling, ... horrible quality ... I've used the HQ-Slow and my script. So my next encode will be finished tomorrow, so I will see if it's ok , if not I will post screenshot of it !
I prefer downscaling to 720p 'cause my projector is 720p and he loves his native resolution ;)
tomos
1st March 2006, 22:12
i'm inbetween on that one. my sony is 720p but my dells res is capable of 1080i so encode to 1080p on basis that at some point, i'll have a 1080i/p projector :)
Bentso
2nd March 2006, 10:26
Decomb is also very slow with HD-resolutions.
I prefer Bicubicresize over Lanczosresize when encoding. Yes lanczos is a bit sharper but takes more bits to encode.
lordx
2nd March 2006, 11:42
Is there an alternative to Decomb ? A faster deinterlacer ?
lordx
3rd March 2006, 08:39
Well, my encoding is finished. Amazing results !
This is the log of megui :
Log for job job1-1
avis [info]: 1280x720 @ 23.98 fps (177877 frames)
x264 [info]: using cpu capabilities MMX MMXEXT SSE SSE2 3DNow!
x264 [info]: slice I:1584 Avg QP:15.96 size: 71794
x264 [info]: slice P:90843 Avg QP:17.93 size: 33137
x264 [info]: slice B:85450 Avg QP:19.91 size: 12786
x264 [info]: mb I I16..4: 36.6% 0.0% 63.4%
x264 [info]: mb P I16..4: 36.5% 0.0% 0.0% P16..4: 53.5% 0.0% 0.0% 0.0% 0.0% skip: 9.9%
x264 [info]: mb B I16..4: 3.0% 0.0% 0.0% B16..8: 24.3% 0.0% 0.0% direct:25.6% skip:47.1%
x264 [info]: final ratefactor: 19.75
x264 [info]: kb/s:4546.8
Actual bitrate after encoding without container overhead: 4546.93
----------------------------------------------------------------------------------------------------------
job job1-1 has been processed. This job is linked to the next job: job1-2
Starting job job1-2 at 22:52:39
Job is a video job. encoder commandline:
--pass 2 --bitrate 4500 --stats "D:\avs\script.stats" --ref 5 --bframes 3 --b-pyramid --weightb --filter -2,-1 --subme 6 --trellis 1 --analyse all --8x8dct --direct spatial --me umh --progress --no-psnr --output "D:\avs\script.mkv" "D:\avs\script.avs"
successfully started encoding
Processing ended at 17:40:27
----------------------------------------------------------------------------------------------------------
Log for job job1-2
avis [info]: 1280x720 @ 23.98 fps (177877 frames)
x264 [info]: using cpu capabilities MMX MMXEXT SSE SSE2 3DNow!
x264 [info]: slice I:1584 Avg QP:16.26 size: 62498
x264 [info]: slice P:90843 Avg QP:17.72 size: 31412
x264 [info]: slice B:85450 Avg QP:19.44 size: 14285
x264 [info]: mb I I16..4: 27.6% 48.1% 24.3%
x264 [info]: mb P I16..4: 13.4% 20.5% 4.5% P16..4: 40.2% 7.0% 2.2% 0.1% 0.0% skip:11.9%
x264 [info]: mb B I16..4: 1.4% 3.5% 0.9% B16..8: 25.9% 1.7% 4.5% direct:13.9% skip:48.3%
x264 [info]: 8x8 transform intra:53.9% inter:36.8%
x264 [info]: ref P 59.1% 18.4% 11.1% 6.6% 4.9%
x264 [info]: ref B 64.7% 19.6% 6.5% 5.5% 3.7%
x264 [info]: kb/s:4500.0
Actual bitrate after encoding without container overhead: 4500.08
desired video bitrate of this job: 4500 kbit/s - obtained video bitrate: 4503,00192896149 kbit/s
----------------------------------------------------------------------------------------------------------
Some blocks again in darker scenes, but only a few ... nothing to do with my first encode which was horrible ( perhaps a buggy x264 version .. )
What do you think about parameters of the x264 command line ? Is it the best I can do for this type of video - HD in this case ?
I'm using r408 and the last Sharktooth' profiles.
Thanks ;)
Revgen
3rd March 2006, 09:10
I encoded a 1080i clip bobbed to 60p and I couldn't play it all with the HQ-slow setting.
Even CoreAVC couldn't handle it. Your clip would have to be about 24fps for it to play well.
Hopefully the CORE devs add dual-core support to their decoder so that they can play.
lordx
3rd March 2006, 09:35
My movie are decimated at 24 fps in avisynth script , so it plays great !
I'm able to play it with ffdshow and of course CoreAVC.
No problem at all for playing back an x264 HDTV encode !
My post was just to show log of my encode and perhaps found tweaks for it to reduce blocks in darker scene !
lordx
30th June 2006, 10:42
Well, I'm back with my X2 and so happy with it !!
What do you think about my method ? Perhaps can you help me to obtain the "perfect" method ;)
- D2v with DGindex
- Avisynth Script like that for 1080i :
Loadplugin("C:\AVIsynth 2.5\plugins\DGDecode.dll")
Loadplugin("C:\AVIsynth 2.5\plugins\decomb521.dll")
mpeg2source("D:\hdtv.d2v")
Telecide(order=1,guide=1,post=2,vthresh=30)
Decimate()
crop(0,0,0,-8)
lanczosrsize(1280,720)
- Load .avs into Megui
- SharkTooth's Slow profile into Megui , 2 threads for X2
- SharkTooh's Matrix for preserving grain
- 5000 Kbits bitrate , mp4, remux with ac3 into mkv.
With my X2 3800 + 'oc 4200+, first pass -> 7 fps , second pass -> 4 fps. A LOT better than before !!
Do I obtain better results with slower or slowest profile ?
Thanks ;)
Daodan
30th June 2006, 10:50
No, not really. After all, that bitrate you use is quite high from the x264's point of view. Quality is mostly decided by the source quality and the avs script.
lordx
30th June 2006, 10:57
Well, the bitrate is high but I want preserve the quality after all.
When I've a 14 Go Mpeg2 TS 1080i for 1h45 movie, after the encode, file is 5/6 go x264 !! And Quality is amazing !
If the source is bad, I don't keep it.
And for the avs script, I not an expert .. at all :)
rezard
1st July 2006, 05:39
by increasing '--qcomp', complex scenes(fast motions) may get more bits.
Blue_MiSfit
1st July 2006, 06:20
If you have a decent 3d card, fft3dgpu might be a good idea for you to increase compressability. It's not quick, but when tuned for light settings, it can really do amazing things. Do some searching and give it a whirl. It does a GREAT job with noisy sources.
BTW, do it before you resize. More info for it to work with that way.
~MiSfit
crypto
1st July 2006, 08:25
lordx:
If I get you right, you are encoding to preserve disk space and you have a slow PC. Why are you using 2 pass VBR? You should use 1 pass quality-based VBR.
1. It is much faster
2. Quality is much better, especially in high motion and complex scenes
3. Quality remains consistent across the stream
Morte66
1st July 2006, 10:20
Hopefully the CORE devs add dual-core support to their decoder so that they can play.
FYI, CoreAVC Professional Edition has dual processor support. And very useful it is too, for 1080p. :)
Zerofool
2nd July 2006, 02:30
I would recommend you to check the settings in dgindex (iDCT alg. (appropriate for your cpu); field operations -> "honor pulldown flags"), then in the .avs use uncomb() instead of telecide(), it's much faster. Don't forget ColorMatrix (if you are going to watch it on your monitor, I'm not sure if it's necessary when talking about projectors).
Then in megui I use 2 pass mode and I modify the hq-slower profile that way:
Deblocking -2,-2 ; Bitrate Variance 3.0 ; Quantizer Compression 0.75 ; Number of Referance Frames 6. And if the source has more still scenes - Number of b-frames 4.
An example of avs script:
LoadPlugin("G:\work\dgmpgdec146\DGDecode.dll")
LoadPlugin("G:\work\UnComb\UnComb.dll")
LoadPlugin("G:\work\decomb521\decomb521.dll")
LoadPlugin("G:\work\UnDot\UnDot.dll")
LoadPlugin("G:\work\ColorMatrix_v110\ColorMatrix\Release\ColorMatrix.dll")
mpeg2source("g:\work\hdtv.d2v")
UnComb().Decimate()
ColorMatrix(mode="Rec.709->Rec.601")
crop(0,0,0,-8)
UnDot()
LanczosResize(1536,864)
#4285kbps
And the result looks gret.
seekrtz
4th July 2006, 06:09
Why is everyone using the decomb filter on hdtv movies? I mean have you all forgotten about doubleweave and pulldown; or is it too time consuming to figure out the correct pattern? I always prefer using this method. Most movies only change patterns once. I hate to risk decomb messing anything up when it only takes an extra 5 mins worth of avs scripting to get a perfect IVTC - is anyone with me on this:P
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.