View Full Version : HC encoder
Pages :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
[
16]
dragongodz
15th October 2007, 21:49
so if You use in content (which is HD) a 601 color space this is ok but not default. HDMI transmiter simply set proper color space signaling and everything is ok, You not loose anything... But as i say earlier from uknown to me reason SD by assumption is 601 and HD is 709.
If Your DVD uspcale SD DVD (which is 601) to the eg 1080i then simply signaling that 1080i is on 601 color space.
then havent you killed your own request ? mpeg2 can carry colourimetry aswell.
I was asking just something similar to CCE's AQM
try Hc's method and see if it suitable for your needs or not.
hank315
15th October 2007, 23:58
IMO the effect of AQM and LUMGAIN is pretty similar, AFAIK AQM will be active when the bitrate can't be hold even with low quantizers so the matrix coefficients are lowered but as Boulder already said, no-one really knows how it works.
LUMGAIN in HCenc is always active and will do a mild or more agressive matrix change dependent of the luma values, it's meant do give a bit-boost on low lit scenes, not specifically meant to keep the bitrate but it will certainly help.
If anyone could come up with a good algorithm (no actual code necessarily but the maths), I'm sure he would consider adding it to the encoder.absolutely...
To flag a stream to be non Rec.709 an encoder needs to write the sequence_display_extension header with the proper settings.
If this header isn't in the bitstream the colorimetry will be Rec.709 by default according to the MPEG2 specs.
HCenc doesn't write this header, neither do QuEnc and CCE basic AFAIK.
Just tested 10 DVD's, 9 are Rec.709 (regular movies), 1 is Rec.470-2, that one is a compilation of TV episodes (Bottom by Adrian Edmondson & Rik Mayall).
Seems DVD-MPEG2 can have all kind of colorimetry flavors.
pandy
16th October 2007, 09:38
then havent you killed your own request ? mpeg2 can carry colourimetry aswell.
Hmmm... im not requesting anything - i only say that 601 is assumed as default for SD and 709 for HD in digital video industry.
So making assumption that 709 is for SD is maybe not good idea but... if 709 or 601 is properly signaled then everything is ok. IMHO creating possibility to set in HC all valid fields in MPEG-2 syntax will be nice (especially when add this functionality will not be problem for Hank - He is author of HC and He decide what and when will (or not) be implemented in HC).
**
Hank Thank You again, HC is a great software, appreciate Your work very much.
dragongodz
16th October 2007, 12:26
i only say that 601 is assumed as default for SD and 709 for HD in digital video industry.
which of course flies right in the face of
If this header isn't in the bitstream the colorimetry will be Rec.709 by default according to the MPEG2 specs.
so that would make the digital industry the real problem. at least with dvd specs they just used a more restricted subset of the mpeg2 specs rather than this silly assume 601 nonsense.
IMHO creating possibility to set in HC all valid fields in MPEG-2 syntax will be nice
yes thats 1 option for later. its just a pity that it should even have to be thought about.
Hank - He is author of HC and He decide what and when will (or not) be implemented in HC.
i know who Hank is thanks. :sly:
kumi
19th October 2007, 08:06
Hello,
It seems HCenc cannot load any HC.INI that has a *CQ_MAXBITRATE directive, and probably any other directive that has decimal number values, when Windows XP numbers configuration (in Regional Settings) is set to
Decimal Symbol: , (comma)
Digit Grouping Symbol: . (period)
The only way to load such an HC.INI is to ensure that the numbers configuration in Windows XP is set to
Decimal Symbol: . (period)
Digit Grouping Symbol: , (comma)
For example, I tried to load this HC.INI file:
*PROFILE NORMAL
*INFILE E:\Temp\D2VAVS\V01_Q_ANALYSIS.avs
*OUTFILE E:\Temp\D2VAVS\V01_Q_ANALYSIS.m2v
*BITRATE 0
*MAXBITRATE 6820
*WAIT 0
*BIAS 20
*CQ_MAXBITRATE 2.3
*LUMGAIN 0
*ASPECT 16:9
*GOP 12 2
*INTERLACED
I tested three combinations of the Windows Numbers settings. Only one of them was compatible with the above HC.INI.
ERROR, input not complete
http://img140.imageshack.us/img140/3117/naamloos3wp2.th.png (http://img140.imageshack.us/img140/3117/naamloos3wp2.png)
ERROR, input not complete
http://img515.imageshack.us/img515/6447/naamloos4jd7.th.png (http://img515.imageshack.us/img515/6447/naamloos4jd7.png)
HC.INI loaded successfully
http://img509.imageshack.us/img509/2654/naamloos5qy9.th.png (http://img509.imageshack.us/img509/2654/naamloos5qy9.png)
- - - - -
Might a workaround be possible?
tom942
23rd October 2007, 12:19
Excuse me if this question has been asked before, but I've been unable to find the answer in the forum.
It's about HVS matrices, HC and HClow matrices.
For HVS (Good, Better, Best), I found something related on XviD forum, and I understand that they are indicated for medium to high bitrates, donīt I?.
But about HC matrices (HC and HCLOW), I donīt find anything, so what bitrates are indicated for?.
Thanks in advance.
Regards.
Edit: I would like to add a sugestion. It could be a good idea to add in the pdf, in the matrices section, what bitrates are indicated for in each matrix.
fjhdavid
26th October 2007, 14:11
the big problem is that wellknown DVD manufacturer like oppodigital always use bt.601 for internal YCB to RGB conversion (for DVD video).
then if HC uses bt.709 to encode, it will be problematic?
for information, the CCE owner's manual say that they use bt.601 (p.51 of the manual)
and this link too:
http://forum.doom9.org/showthread.php?s=&threadid=53770
(Question 12)
doxville
27th October 2007, 13:03
Hello!
I don't know why, but recently I have problems encoding with HC0.21 via commandline. I never encoded d2v-files directly, normally I use an avs-script, but the following problem came to show with a direct encode of a DGIndex 1.4.9. project:
The the following ini-file can be started with the 'encode'-button in the HCGUI, but when i try to start it directly from the HCenc.exe via commandline D:\HC021\HCenc_021.exe -ini D:\HC021\HC.ini, I get an error message, that there is no MPEG2 decoder.
The ini-file:*INFILE d:\filme\input.d2v
*OUTFILE D:\Filme\output.m2v
*BITRATE 3124
*MAXBITRATE 6500
*FRAMES 0 262257
*PROFILE best
*ASPECT 4:3
*AUTOGOP 15
*INTERLACED
*TFF
*BIAS 30
*LASTIFRAME
*CUSTOMMATRIX
8 10 16 20 25 28 33 44
10 10 14 26 27 29 34 47
16 14 18 27 29 34 37 48
20 26 27 31 36 37 38 50
25 27 29 32 37 40 48 58
28 33 36 42 45 50 58 68
33 37 39 44 48 56 66 79
37 39 45 48 56 66 79 83
16 18 20 22 23 27 32 40
18 20 22 24 26 32 36 42
20 22 24 26 33 38 42 44
22 24 26 34 38 42 44 46
23 26 33 38 42 44 46 48
27 32 38 42 44 46 48 50
32 36 42 44 46 48 50 52
40 42 44 46 48 50 52 58
*LUMGAIN 2
*CPU mmx
Here (http://tinypic.com/view.php?pic=2daxa8p&s=2) both of the encoding screens, one with error-message from the ini-/HCenc.exe-combination, one without error message from the encode-from-GUI-combination.
Any ideas what is wrong? Where is HCenc.exe looking for the right dgdecode.dll?
Wilbert
27th October 2007, 13:58
for information, the CCE owner's manual say that they use bt.601 (p.51 of the manual)
Could you post a screenshot of that page of this manual?
If this is really true, then this is a bug in CCE and should be reported to them. CCE doesn't write any colorimetry in the header of the resulting MPEG-2 streams. Which means that they are Rec.709 by default. This also implies that Rec.709 should be used when feeding RGB stuff to CCE (assuming that CCE does the color conversion).
hank315
27th October 2007, 16:03
Any ideas what is wrong? Where is HCenc.exe looking for the right dgdecode.dll?
HCenc uses the normal dll search path so it will first look in the directory from which it is loaded.
Normally it won't be there, HCenc can handle different version of DGIndex/DGDecode so the GUI reads the first line from the D2V file and copies the right version from the dgdecode directory as dgdecode.dll.
If the GUI isn't used just make sure the right dll is in the HCenc directory, or copy it to the windows/system32 directory as dgdecode.dll.
doxville
27th October 2007, 17:41
@hank315
Thanx, copying DGdecode in the 'normal' HC021 folder did it! Furthermore, thanx for your great work! I really like HCenc!
45tripp
27th October 2007, 21:44
Could you post a screenshot of that page of this manual?
I believe it's this being quoted:
http://img141.imageshack.us/img141/6265/ccemanpej2.jpg (http://imageshack.us)
Wilbert
27th October 2007, 22:30
Ok, thanks! So for YCbCr [0,255] <-> RGB [0,255], they use (rounded to four decimals):
Y = 0.3008*R + 0.5859*G + 0.1133*B
etc ...
which is very close to the Rec.601 coefficients. Someone should send them a mail asking them to correct their stuff (either use the Rec.709 coefficients in the conversion or write the appropriate coefficients in the header).
fjhdavid
29th October 2007, 02:19
I read somewhere that DVD color matrix is bt.601 because it is SD
for example, oppodigital guys told me that their DVD players are bt.601 compliant for SD output
then it seems normal that CCE use bt.601 as it is wriiten in their owner manual
I think they omit to write the color matrix bt.601 header
anyway, maybe with getgray dvd calibration (which is bt.601), we can see if CCE output bt.601 or bt.709?
dragongodz
29th October 2007, 12:36
lets please continue this conversation here
http://forum.doom9.org/showthread.php?p=1059703
as this is basically just cross posting.
IanB
30th October 2007, 06:37
@Wilbert,
Not to confuse but Cinema Craft are just using rounded 8 bit coefficients.
0.299 * 256 = 76.544 => 77
0.587 * 256 = 150.272 => 150
0.114 * 256 = 29.184 => 29
Which incidently is not recomended unless performance is an issue.
jdobbs
30th October 2007, 17:03
It's also talking about "source" not "output"... which is where the Rec.709 requirement comes in.
tom942
1st November 2007, 00:48
@hank315
What bitrates are "HC" and "HClow" recommended for?.
Please, dispel me this doubt :).
Thanks and regards.
chrishallowell
2nd November 2007, 18:21
Hi all,
I'm hoping someone might be able to help me here...
I'm using HCGUI with an avs file that uses soundOut()
When I hit the Encode button, the Soundout Gui window pops up but when I click on the save as button to encode it as an AC3, I get this error: "Could not initialize encoder. Probably invalid input."
I'm guessing I'm missing a program or it's in the wrong directory....
Any ideas?
I can save it as a wav file.
Here's my test script:
LoadPlugin("degrainmedian.dll")
LoadPlugin("fft3dfilter.dll")
LoadPlugin("ColorMatrix.dll")
LoadPlugin("AudioLimiter.dll")
LoadPlugin("soxfilter.dll")
loadplugin("SoundOut.dll")
avisource("E:\Orginal with audio -480ms delay.AVI",audio=true)
AssumeFPS("ntsc_video",sync_audio=true)
Trim(101,4458).Fadeio(30)
ConvertAudioToFloat().SSRC(41000)
fl = GetRightChannel()
fr = GetRightChannel()
cc = mixaudio(GetRightChannel(),GetRightChannel(),0.707,0.707)
lfe = GetRightChannel() #ConvertToMono(a).SoxFilter("lowpass 120","vol 1.2")
sl = GetRightChannel() #.amplify(-1.0)
sr = GetRightChannel() #.amplify(-1.0)
sl = DelayAudio(sl,0.02)
sr = DelayAudio(sr,0.02)
MergeChannels( fl, fr, cc, lfe, sl, sr).wavgainlimiter(1.0)
SoundOut()
Thanks,
Chris
LigH
23rd November 2007, 08:11
a) HCEnc does not care about audio. It may be safer to feed it a stripped-down script which outputs only video. Else there could be too many possible reasons for failing.
b) HCEnc requires YV12 video output. Ensure this either via AviSource(pixel_format="YV12"), or by adding ConvertToYV12(interlaced=true/false).
fjhdavid
8th January 2009, 12:09
Hank, do you plan an another upgrade to HC encoder? and what would be the improvements?
as you maybe read in the DVD forum, I found that DVD-RB with HC-encoder scaled better with dualcore than with quadcore (my dualcore is around 20% speeder than my quadcore, both having same frequency when I use multiple encoder setting in DVD-RB)
is it possible to improve HC encoder in this way? (but maybe it is inherent to processor architecture)?
Boulder
8th January 2009, 12:19
See the 024 beta thread in this very forum ;)
zeropc
13th January 2009, 09:40
say, is there any chance that the new version of hcenc will accept .dga as input?
btw, how do you crop on the sides to add new black bars (reduces encoding time, etc.) and center the video/film?
zeropc
4th February 2009, 05:50
can no one tell me how to crop the sides to add fresh black bars?
LigH
4th February 2009, 07:39
AviSynth has all the functions you'll need to change the size of the "active" video area inside the whole video dimensions: Several "Resize" filters, "Crop" and "AddBorders" (or even "Letterbox" to simply tint a frame without resizing). Tools like "Fit2Disc" may help you creating a script which has macroblock optimized letterbox or even framebox sizes.
HC will encode any video of acceptable dimensions and properties. Optimizing the content is the job of AviSynth, not of HC Encoder.
Guest
4th February 2009, 15:13
say, is there any chance that the new version of hcenc will accept .dga as input? There's no point. You can just make an Avisynth script that serves the video and open that.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.