View Full Version : HDTV encoding recomendations
patxitron
30th December 2004, 22:22
Hello.
Recently I got a Panasonic PT-AE700 with native 1280x720 resolution and I've some (arround 1:30 hours) 1080i clips.
Now I'm thinking about deinterlacing and reencoding them in my pj native resolution and burn a single layer DVD-R with them. I think Xvid and matroska are the best codec/container because I love opensource. The destination video bitrate will be arround 6000kbps and it will be played with a computer (HTPC).
I'm new in Xvid so I'd like that you can make me some recomendations about Xvid settings like trellis quant, quant settings, quant matrix, BVOP etc...
Also I'm thinking about making 1280x720 versions of my DVD collection, using the best (and obviusly not realtime) video processing and rescaling. Which is the bare minimum bitrate (or time/DVD) recommended?
Thanks in advance.
Teegedeck
31st December 2004, 12:19
Well, two things would seem important:
Don't use the 'respect VBV' option in two-pass. At these bitrates it would produce absuredly high quantization in second pass in order to empty the buffer.
Use a 'high bitrate' custom matrix.
I don't have enough experience with this to tell what 'minimum playing time per DVD' is to be expected (my indeed very limited fiddling with it points to about 90 minutes); it should depend on the content and your choice of quantizer etc., as always. I go for SixOfNine at about quant=3 or 4.
Sharktooth
31st December 2004, 16:11
i would suggest to NOT use high-bitrate matrices coz HDTV materials consumes a lot of bitrate due to the resolution and using high-bitrate matrices will be an overkill for the average bitrate.
Enigmax
31st December 2004, 18:20
Hello Patxitron...
¿También interesado en el MPEG-4 HD para proyección?...
Nos vemos si quieres en http://www.mundodvd.tk
Also interested in MPEG-4 HD for projection?... We see if you want in http://www.mundodvd.tk
Saludos
Greetings
Sorry... :confused:
jon.schaffer
31st December 2004, 19:17
You could have use a PM, Enigmax... :rolleyes: ;)
Didée
31st December 2004, 19:39
No hi-BR matrices for HDTV material targetting at ~4GB. HVS-good|better, a good 1CD-matrix, perhaps even simply H263. HDTV through SixOfNine @ q3 looks impressing (especially on a proper display, Tee knows ;) ), but a bitrate range of 10000~15000 kbps (with detailed material) is usually not that handy for storage.
Teegedeck
1st January 2005, 11:46
Thanks for clearing that up, folks, I guess I was just lucky with the bitrate of my test source. :)
patxitron
2nd January 2005, 10:28
Thank you very much for your help.
I'll try both Hi-BR and med-low-BR matrices. This is my command line for the second pass (I'm a Linux fan :D ):
mencoder -ss 0.666 -frames 20000 -nosound -noaspect -sws 9 -vf scale=1280:720 -ofps 24 -ovc xvid -xvidencopts
pass=2:qpel:trellis:gmc:chroma_me:chroma_opt:hq_ac:vhq=4:par=vga11:
bvhq=1:max_bframes=3:bitrate=6000:quant_type=mpeg:
quant_intra_matrix=/home/patxi/Matrices_xvid/EQM_V3UHR_intra:
quant_inter_matrix=/home/patxi/Matrices_xvid/EQM_V3UHR_inter /mnt/wv2/HDTV_clip1.ts -o prueba_1.avi
What about options other than quantization matrices? I'm using xvid library version 1.1.-127 (build xvid-1.1-cvshead) downloaded and compiled yesterday.
Sharktooth
2nd January 2005, 14:42
2 things:
EQM V3UHR has been updated recently (download it from my signature) and has a better compression.
I will assure you HD with UHR @ 6000 is not the right choice. BTW it depends on the compressibility of the source material...
Maybe 6000 is enaugh for near lossless quality in standard 480p/i or 512p/i resolutions.
708145
2nd January 2005, 16:56
Sharktooth: Can you give ballpark numbers on PSNR/SSIM for what you consider near lossless? Or is this source dependent as well?
bis besser,
T0B1A5
Soulhunter
2nd January 2005, 17:53
Im not Sharktooth, but...
A PSNR value above 50 looks "nearly" lossless for me !!!
Bye
Blue_MiSfit
3rd January 2005, 07:13
From what I read awhile back about XviD HDTV, because you have so much resolution to work with that getting higher quantizers wasn't such a big deal because the macroblocks are so small compared to the overall framesize.
I would do comp tests at cq2, cq3 etc... possibly all the way down to 6 or 7.
Wish I had some good true HD content to try this out with...
~misfit
Sharktooth
3rd January 2005, 13:42
Near lossless means the matrix is able to reproduce even the smallest particular or the finest film grain (where the other matrices fails), it requires an insanely high bitrate though.
708145
3rd January 2005, 14:22
Thanks for your replies.
So is a SSIM value of 90 a good indicator of near-losslessness?
bis besser,
T0B1A5
Sharktooth
3rd January 2005, 14:38
As always, metric tests can fail...
Let's look at DivX plasma results: plasma has the same or higher PSNR than xvid but in the doom9 comparison even it's successor isn't able to achieve same visual results of xvid.
Both PSNR and SSIM are meant to be a numerical rappresentation of quality, but in some situations (which are not so improbable) those tests just fail.
So a SSIM > 90 is a general indication of quality but there are (frequent) cases where your eye will say the contrary.
The EQM V3EHR matrix is designed to reach the best possible compromise between SSIM and PSNR at Q2 but dont expect small filesizes at all! Maybe (in case of MPEG2/DVD material) the encoded file is much larger than the source...
708145
3rd January 2005, 23:38
Originally posted by Sharktooth
As always, metric tests can fail...
I understand.
bis besser,
Tobias
Sagittaire
5th January 2005, 10:50
Let's look at DivX plasma results: plasma has the same or higher PSNR than xvid but in the doom9 comparison even it's successor isn't able to achieve same visual results of xvid.
DivXNetwork say "DivX 5.2.1 is 30% better than WMV9"
DivXNetwork say "DivX Plasma better than XviD"
in fact not true and not true ... lol
XviD is very better than DivX (plasma or not) in metric test
mwahal
6th November 2005, 19:01
Sorry for reviving an old thread.
I'm using mencoder on linux to do something similar. My question is how do I get the quant_inter_matrix and quant_intra_matrix files from Sharktooth's EQM V3 Series matrices.
Shall I just cut and paste the two set of matrices in two files and call them inter and intra ? Or is there any tool to create these two files from either the numbers or from the .xcm file ?
Please excuse me if this is a dumb question.
Thanks
Mudit
SeeMoreDigital
6th November 2005, 19:37
I was thinking about going down the DVD-to-HDTV 1280x720 encoding route some time ago....
I initially began converting 720x480 anamorphic sources to 864x480 square pixel encodes, and found they actually looked rather good when played in a hardware player... I then progressed to converting 720x576 anamorphic sources to 1024x576 square pixel encodes, which sadly I could not play back in hardware (at the time). The next logical step was to convert both 720x480 and 720x576 anamorphic sources to 1280x720.... to create a unified back-up standard :)
However, the idea didn't get very far because there was no such thing as a high-def stand-alone player, at the time :( But given such players now exist, it might be time to resurrect the idea :D
Thanks for reminding me....
Cheers and good luck
patxitron
7th November 2005, 22:08
@mwahal: from mplayer/mencoder manpage:
quant_intra_matrix=<filename>
Load a custom intra matrix file. You can build such a file with xvid4conf's matrix editor.
quant_inter_matrix=<filename>
Load a custom inter matrix file. You can build such a file with xvid4conf's matrix editor.
You must have a recent version of xvid for linux and using xvid4conf you can create the matrix files manually typing the values in every cell.
I abandoned the idea some time ago because my hardware is unable to playback xvid in realtime at such resolutions (1280x720) so I'm not completely sure if I'm right.
Best regards
mwahal
7th November 2005, 22:11
@mwahal: from mplayer/mencoder manpage:
quant_intra_matrix=<filename>
Load a custom intra matrix file. You can build such a file with xvid4conf's matrix editor.
quant_inter_matrix=<filename>
Load a custom inter matrix file. You can build such a file with xvid4conf's matrix editor.
You must have a recent version of xvid for linux and using xvid4conf you can create the matrix files manually typing the values in every cell.
I abandoned the idea some time ago because my hardware is unable to playback xvid in realtime at such resolutions (1280x720) so I'm not completely sure if I'm right.
Best regards
Thanks !
I found out an easy way. Just copy the first matrix of Sharktooth in intra file and second in inter file.
But I still couldn't get rid of blotchiness in colors with the standard filters etc, until i used the profile=dxnhdtv option. It gives very good quality at 5mbps.
Thanks
Mudit
IgorC
8th November 2005, 12:54
For low speed CPU it's better dont use Qpel and GMC, but try to compensate with a highest settings (like VHQ,trellis, wide search, etc). videolan can play 1280x720 without Qpel, GMC normally (real time) on 2 ghz.
mwahal
8th November 2005, 17:15
Actually, I got very high quality video using
1) scale to 1280:720
2) xvidencopts: profile=dxnhdtv, max_bframes=0, bitrate=9000
3) video filters: pp=ci/hb/vb/dr/tn:1:2:3
4) 2 pass encoding
5) oac - copy
The size is about 1/2 of the original and quality is still awesome !
708145
8th November 2005, 17:25
Actually, I got very high quality video using
1) scale to 1280:720
2) xvidencopts: profile=dxnhdtv, max_bframes=0, bitrate=9000
3) video filters: pp=ci/hb/vb/dr/tn:1:2:3
4) 2 pass encoding
5) oac - copy
The size is about 1/2 of the original and quality is still awesome !
why do you use no b-frames?
ChronoCross
8th November 2005, 17:45
why do you use no b-frames?
damnit you beat me to it.
Also why are you using the high def profile? is this trying to be player compatible? if not I would use the unconstrained profile as it will give you maximum quality.
mwahal
8th November 2005, 22:18
why do you use no b-frames?
As per mplayer/mencoder page:
http://mplayerhq.hu/DOCS/HTML-single/en/MPlayer.html#menc-feat-xvid
8.4.2. Encoding options of XviD
max_bframes A higher number of consecutive allowed B-frames usually improves compressibility, although it may also lead to more blocking artifacts. The default setting is a good tradeoff between compressibility and quality, but you may increase it up to 3 if you are bitrate-starved. You may also decrease it to 1 or 0 if you are aiming at perfect quality, though in that case you should make sure your target bitrate is high enough to ensure that the encoder does not have to increase quantizers to reach it.
Since I'm aiming for perfect quality, I decided to use 0.
Also why are you using the high def profile? is this trying to be player compatible? if not I would use the unconstrained profile as it will give you maximum quality.
My player is IOData LinkPlayer2 which is capable of playing high defn media.
I did try all combinations of xvid options for high quality but never got satisfactory results. May be I didnt have the right combinations, although I did search all over the web and must have tried 100s of combinations.
The dxnhdtv profile along with bitrate of 8/9mbps gives very good result at 1/2 the disk space.
As I mentioned earlier, I've seen some high defn shows downres to 960x540 or even lower resolution, but with excellent picture quality and half to one CD size. I still cant achieve that. The gspot says that some are using nandub/virtualdub. These have names like hrhdtv VTV LOL etc ;-) I dont want to say anything more about them. I just want to achieve similar quality from my recording. But since I cant achieve that, I'll settle for dxnhdtv profile.
Thanks
Mudit
SeeMoreDigital
8th November 2005, 22:59
My player is IOData LinkPlayer2 which is capable of playing high defn media.
I did try all combinations of xvid options for high quality but never got satisfactory results. May be I didnt have the right combinations, although I did search all over the web and must have tried 100s of combinations.What sources have you tried converting from?
I've generated a few 1280x720 XviD MPEG-4 encodes from PAL and NTSC "progressive" DVD sources and they look pretty good to me, even at around 3500Kbps, when played back on my Zensonic Z500.
Things get a little more complicated when generating MPEG-4 encodes from "interlaced" sources ;)
Cheers
mwahal
8th November 2005, 23:59
My source is mpeg2-ts high definition programs recorded from Fusion HDTV Lite card. These are 1920x1080i OR 1280x720p at 19.2mbps.
These are shows or movies recorded from over the air HDTV ATSC stream.
Thanks
Mudit
SeeMoreDigital
9th November 2005, 09:40
Are you aware that some of your NTSC 1920x1080 content, such as video, will be interlaced, and will run at 29.970fps. But other 1920x1080 content, such as movies, will contain "triggering signals" to adjust the frame rate from 29.970fps to 23.976fps "progressive" during encoding?
Different encoding techniques have to be adopted for media which has been identified as being "interlaced", as apposed to media which has been identified as being "progressive".
Cheers
mwahal
9th November 2005, 16:02
I'm somewhat familiar with telecine and inverse telecine techniques. I'm only encoding TV shows right now which are in 1920x1080i OR 1280x720p format. Vlc/mplayer report these as 60000/1001 fps.
Thanks
Mudit
SeeMoreDigital
9th November 2005, 19:17
I'm somewhat familiar with telecine and inverse telecine techniques. I'm only encoding TV shows right now which are in 1920x1080i OR 1280x720pYour 1080i TV shows are most likely pure interlaced at 29.970fps. When you convert them with XviD, it's vital that you "check" XviD's "Interlaced Encoding" option (and Top Field First option). And make sure your Encoding Application does not try to de-interlace your source, by default.
I've just finished testing the Oct 16 2005 build of XviD 1.1.0 Beta2, by generating some 1920x1080 interlaced encodes and playing them back on my Z500..... The results have been excellent.... much better than some of the previous builds.
Cheers
mwahal
9th November 2005, 20:47
Your 1080i TV shows are most likely pure interlaced at 29.970fps. When you convert them with XviD, it's vital that you "check" XviD's "Interlaced Encoding" option (and Top Field First option). And make sure your Encoding Application does not try to de-interlace your source, by default.
I've just finished testing the Oct 16 2005 build of XviD 1.1.0 Beta2, by generating some 1920x1080 interlaced encodes and playing them back on my Z500..... The results have been excellent.... much better than some of the previous builds.
Cheers
What software are you using to transcode to xvid ? I'm using mencoder which is command line, so wont know what is equivalent of Interlaced Encoding option.
I'm using pp=ci option in video filters in mencoder to do deinterlacing.
Are you saying that I dont have to use an external deinterlacing filter for the 1920x1080i source if there is an option to do it in xvid ?
Thanks
Mudit
SeeMoreDigital
9th November 2005, 21:48
I'm using a really old encoding application called MPEG Mediator 1.5, which is able to offer basic de-interlacing options ie: "auto -> on -> off": -
http://img46.imageshack.us/img46/6888/mpegmediator5rq.jpg
When coupled with XviD's in-built "de-interlacing" options: -
http://img6.imageshack.us/img6/7776/xvidconfig7hl.png
Cheers
mwahal
9th November 2005, 22:15
After emailing you, I did see interlacing option in the xvidencopts in mencoder. So, I've turned off external "pp=ci" [post process, cubic deinterlacing] filter and turned on the xvid internal interlacing option. Will see how is the quality of the encoding.
Thanks for your help !
Mudit
SeeMoreDigital
9th November 2005, 22:35
After emailing you, I did see interlacing option in the xvidencopts in mencoder. So, I've turned off external "pp=ci" [post process, cubic deinterlacing] filter and turned on the xvid internal interlacing option. Will see how is the quality of the encoding.
Thanks for your help !
MuditNo problem....
Here's a 2.8MB 1920x1088 @ 29.970fps interlaced MPEG-4 (http://homepage.ntlworld.com/seemoredigital/Temp_Test_Files/MPEG-4_@_29.970i_1920x1088.zip) sample encode for you to try with your IOData LinkPlayer2.
And a link to an on-going discussion (http://www.avsforum.com/avs-vb/showthread.php?t=515917&page=1&pp=30) about this very subject over on the AVS Forum.
Cheers
mwahal
9th November 2005, 23:46
I remember seeing the "train" images and discussion before. Will look into it again. Need to check if LP2 can play 720i video.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.