Log in

View Full Version : HCEnc Living FAQ


Trahald
2nd October 2007, 01:54
Being HCEnc was voted the most used mpeg-2 encoder currently, Id figure id supply a living faq. Current stable version is 023. Current beta is 024

The thread will be closed but anyone liking to contribute, please pm me.

FAQ:
1.
Q.Where did this application come from?

A.
Base Info:
HCEnc was created a few years ago by HANK315 written in Fortran95 (with a small amount of C and a bit of assembler for CPU optimization.) The project is currently free. First public test version released January 2005. Fortran being a math concentrated language works well for this purpose delivering a very fast encoder considering its quality.

Releases have generally featured a gui version, and a cli version (helpful for batch support.)

HCEnc supports encoding at SD(main @ main) and HD (main @ high) 4:2:0. 024 beta supports 4:2:2 output.

Since version 022 HCEnc supports multi processor encoding.

2.
Q.What applications will I need or will be helpful when I get started.

A.
Support Utilities:

Avisynth/DGIndex:
HCEnc supports input from Avisynth(.avs) and .d2v(dvd2avi/dgindex) files.
http://neuron2.net/dgmpgdec/dgmpgdec.html
http://avisynth.org

EncSchedGui
Video encoder batch processing
http://forum.doom9.org/showthread.php?t=128312&highlight=EncSchedGui



more to come...

Jackie
16th December 2009, 22:52
Thanks alot, is there a quality comparison about the quality it produces compared to others, especially commercial encoders?

verydoomed
18th March 2011, 21:07
Its an mpeg2 encoder but what sort of files will it accept as input?

Emulgator
19th March 2011, 09:33
HCEnc relies on a avisynth frontend, so takes .avs scripts as input.
Just one line of script will do.

Or you can add preprocessing to your liking, refine, resize, crop, add borders...

Everything that can be decoded by avisynth source filters and comes out there
in DVD or MPEG-2 Blu-ray legal resolution, colour space and framerates can be accepted as HC input.

Richard1485
26th December 2011, 02:22
The "Make BD Compliant" button checks both progressive sequence and 3:2 pulldown. Are both of these required in the BD spec? I especially want to know about the 3:2 pulldown.

EDIT: I came across an old thread that mentioned that 3:2 pulldown is not a requirement for 23.976/24 fps sources. Given that this is the case, I wonder why clicking the "Make BD Compliant" button checks the 3:2 pulldown option. Is this a hangover from the "Make DVD Compliant" button, which it is presumably based on?

From looking at retail BDs, it seems that the progressive_sequence flag should be set and that TFF should not be set. It should be possible to remove it with Restream.

hartford
21st February 2012, 02:36
See here: http://forum.doom9.org/showthread.php?t=154533

Look at the charts.

If your source has height of 480 or 576 and is the PRIMARY video then you must make it interlaced to be BD compliant.

The SECONDARY video can be 23.976 fps.

Biggiesized
21st February 2012, 06:44
Can you use the fake interlaced encoding mode for SD resolutions in primary video mode?

Richard1485
22nd February 2012, 21:14
See here: http://forum.doom9.org/showthread.php?t=154533

Look at the charts. If your source has height of 480 or 576 and is the PRIMARY video then you must make it interlaced to be BD compliant. The SECONDARY video can be 23.976 fps.

Thanks, but I knew that already. My videos are 1920x1080, so the question remains.

sven_x
24th May 2012, 15:41
Many thanks for the fine encoder!

I had interlacing problems with this workflow:
avisynth -> hc enc (progressive) -> TMPG author

A video that was encoded with hc enc as progressive allways was flagged as interlaced. This leads to the bad mistake that TMPG author is re-coding the whole video when you change the clip properties to progressive (takes 2.5 h of work instead of 10 minutes and probably the new encoding is not so good as the hc enc output file).
Analyzing the hc enc output file with GSPOT gives the same information: stream is flagged as interlaced, not as progressive.

I found this intermediate solution:
There is a freeware "Restream v.0.9" that can change the flags of MPG streams without recoding. I load the file into Restream, change the picture coding extension to Frametype = progressive and also the Sequence extension = progressive. The resulting new output file works fine.

see: http://forum.doom9.org/showthread.php?t=164111 (another file, but same problem)

Perhaps you can change the flags that hc enc is setting.

TheSkiller
25th May 2012, 16:26
Actually, HCEnc does set those two flags accrodingly if you say so. Under "Settings 1" in "interlacing options" set it to "progressive" and set field order to BFF (TFF + progressive is not allowed). Then under "Settings 2" tick "progressive sequence".

If you used Restream you should make very sure that "top field first" is unchecked if you check both "Frametype progressive" and "Progressive sequence" because otherwise it would be an illegal combination of flags that is known to get refused by some DVD-Players.

hydra3333
24th September 2017, 02:00
The HCEnc faq isn't so living any more :) However, just for interest,

There's a "new" version v0.28 at http://hank315.nl/ with the manual at http://hank315.nl/files/HC_028/HC028.pdf per this thread https://forum.doom9.org/showthread.php?t=172098

It seems we can use Donald Graft's DGIndexNv and DGDecodeNV (DGSource) with an nvidia GPU to hugely speed up decoding and also use some GPU based filters. The caveat seems to be per the manual which says "Avisynth 2.6 RC1 or higher is required to run HCenc 0.28" which I guess must be 32bit. Here's a link where I was given the info by gonca http://rationalqm.us/board/viewtopic.php?f=7&t=597&p=7192#p7192

I'll search and if I find a way to install portably install that version of avisynth then that'd be really really nice and I'll edit/post it here.

edit 1: reviewed this thread https://forum.doom9.org/showthread.php?t=172124 I'd forgotten about, and have decided to go down that track specifying the HCEnc folder to put things into.

edit 2: Success using HCEnc and avisynth and Donald Graft's GPU tools, without installing avisynth https://forum.doom9.org/showthread.php?p=1819518

tyee
10th July 2020, 19:46
I'm trying to input an HD video to HCenc via avisynth but the source is 10 bits. The HCenc error says "input is not YV12, YUY2, YV16 or YV24 color space". So.... is my problem 10 bits or color space? I tried adding Colormatrix as shown below but I get another error of "input to filter must be YV12 or YUY2".

FFVideoSource("source.mkv")
Colormatrix(mode="rec.709->rec.601",clamp=0)

manolito
10th July 2020, 22:10
Try this:
FFVideoSource("source.mkv", colorspace="YV12")

tyee
13th July 2020, 04:57
Thanks, works good!