View Full Version : HCenc 022 released
hank315
12th November 2007, 20:54
Major changes:
- multiprocessor support
- improved interlaced encoding
- more CLI input
- as usual some bug fixes
Also added settings for:
- priority
- colorimetry
- MPEG level
- Avisynth
http://hcencoder.bitburners.com
neuron2
12th November 2007, 21:02
Thank you, Hank!
Lorax2161
12th November 2007, 21:14
Major changes:
- multiprocessor support
- improved interlaced encoding
Gratefully appreciated. Looking forward to many hours of encoding this week!
- Lorax2161
Dkruskie
12th November 2007, 21:27
Thanks
video_magic
12th November 2007, 21:45
Thanks Hank! Especially for a priority option :)
45tripp
12th November 2007, 21:49
very nice additions
:thanks:
Adub
12th November 2007, 22:33
Holy Smiling Cows, Batman!
Thanks a lot, Hank! Know that your work is always appreciated!
urvieh
12th November 2007, 22:48
This is excellent, man. Encoding (BEST level) at 160 fps with one encoder window only ... And the processor shows 85 percent ... Great! Thank you!
linx05
13th November 2007, 01:17
Thank you so much. I was going through the threads last night wondering when a new release was going to happen.
Sharc
13th November 2007, 01:58
The colorimetry settings are most appreciated. Thanks!
tom942
13th November 2007, 02:12
Thank you for the new release :).
Pookie
13th November 2007, 08:05
Hank, you're a great man. Thanks so much. :)
kumi
13th November 2007, 08:22
Thanks Hank, it's great to have a new version.
Can you give us some more details about the nature of your improvements to interlaced encoding? What differences should we look for, if we're comparing HC 0.21 to 0.22?
Malcolm
13th November 2007, 10:51
Great!
AlanHK
13th November 2007, 12:07
Thanks. Using it now.
However, it still has the "feature" of forcing the name of output files all lower case.
FrontierDK
13th November 2007, 13:19
Major changes:http://hcencoder.bitburners.com
Is there a chance that we'll one day see a normal AVI import? This encoder is truky one of the best around, but doing something as simple as opening an AVI and encode it...is quitle a hazzle, especially for newbies...
So...why not implement .AVI (and maybe even frameserving from VirtualDub)? :-)
AlanHK
13th November 2007, 14:11
So...why not implement .AVI (and maybe even frameserving from VirtualDub)? :-)
In the meantime, just use FitCD to make an AVS script. That's how I start most of my scripts.
Actually, to do what you want, Hank would have to make a front end pretty much like FitCD.
There are several apps like AVI2DVD and FAVC that can take an AVI and generate a DVD fileset, using HCEnc to make the MPEG.
MrC
13th November 2007, 15:12
- multiprocessor support
Great!
- more CLI input
Great^2!
Keep up your wonderful job!
:thanks:
Bye
buzzqw
13th November 2007, 15:21
:thanks: hank315!!!
BHH
smok3
13th November 2007, 16:36
:thanks:
how would i go with autodetect interlacing? (from cmd)
buzzqw
13th November 2007, 16:49
i suppose you must firstly know your source file...
like for DV
BHH
Rippraff
13th November 2007, 18:11
:cool: Thank you very much, Hank! :)
Cu Rippraff
totya
13th November 2007, 19:12
Multiprocessor support... Thank you! :)
...and small question, which mpeg2 matrix recommended for low, average, and high bitrate?
phXql
13th November 2007, 20:39
Thank you, Hank!
hank315
13th November 2007, 22:09
About interlaced encoding:
It now has settings for:
- progressive, stream is handled as completely progressive
- interlaced, default TFF (can be set to BFF)
- DV source, default BFF (can be set to TFF)
If no setting is given it will auto detect the nature of each frame and then encode it as progressive or interlaced.
TFF is default but can be set to BFF.
Using it from the command line the same applies, possible parameters:
-progressive
-interlaced
-dvsource
If none of these are given it runs in auto detect mode.
Using the *FRAMELOG command you can get info about the encoding:
- frame type and frame size
- progressive or interlaced
If a frame is encoded interlaced the % column shows the percentage of MBs which are done with DCT field encoding.
Is there a chance that we'll one day see a normal AVI import?
It's not as easy as it seems, using Fortran it's not possible to call the AVIFile API directly AFAIK, I need to write a lot of interface routines for that.
But maybe, some day...
...and small question, which mpeg2 matrix recommended for low, average, and high bitrate?
It's very dependent of the source and personal taste.
This what I use most:
- high bitrate FOX1 or FOX2
- average bitrate MPEG or BACH1
- low bitrate HCLOW or BACH1
Most of the time I also use *LUMGAIN 3.
But it's all a matter of taste.
totya
13th November 2007, 23:00
It's very dependent of the source and personal taste.
This what I use most:
- high bitrate FOX1 or FOX2
- average bitrate MPEG or BACH1
- low bitrate HCLOW or BACH1
Most of the time I also use *LUMGAIN 3.
But it's all a matter of taste.
Very thank you!
Then next question, which matrix recommended of high/med/low quality avi?
six13
14th November 2007, 01:17
Nice work Hank !! but what bit range do you consider high, medium and low for a DVD source?
thanks, good work.
SquallMX
14th November 2007, 01:49
HCEnc 0.22 Bug?:
"HCEnc: (6) ERROR, canīt not load Avisynth CreateScriptEnvironment"
# SOURCE
mpeg2source("E:\Temp\DVDTemp\Ratatoille\FullDisc\RATATOUILLE\VTitle 1\Ok.d2v")
#Telecide(order=1,guide=1).Decimate()
#FieldDeinterlace()
#FieldDeinterlace(blend=false)
#TomsMoComp(1,5,1)
#KernelDeInt(order=1,sharp=true)
#DGBob(order=1,mode=0)
#GreedyHMA(1,0,0,0,0,0,0,0)
#Telecide()
#SeparateFields()
# CROPPING
#crop(0,0,720,480)
#VobSub("FileName")
Undot()
#Temporalsoften(2,3,3,mode=2,scenechange=6)
#mergechroma(blur(1.3))
#FluxSmoothST(5,7)
#Temporalsoften(3,5,5,mode=2,scenechange=10)
#Convolution3d("moviehq")
#FluxSmoothST(7,7)
#Temporalsoften(4,8,8,mode=2,scenechange=10)
#Convolution3d("movielq")
#FluxSmoothST(10,15)
#SelectRangeEvery(280,14)
# FOOL CCEnc
#empty = BlankClip()
#AudioDub(last,empty)
converttoyv12()
Only with AVS scripts, version 0.21 works fine.
:thanks:
buzzqw
14th November 2007, 08:15
trim it to
mpeg2source("E:\Temp\DVDTemp\Ratatoille\FullDisc\RATATOUILLE\VTitle 1\Ok.d2v")
Undot()
(converttoyv12 isn't needed since mpeg2source already outputted yv12..)
and open in virtualdub
any errors ?
BHH
SquallMX
14th November 2007, 15:27
Hi buzzqw, VirtualDub load the script fine, same with HC 0.21.
:thanks:
buzzqw
14th November 2007, 16:31
SquallMX
i have test some more coplex avs script AND it's working
i suggest to reinstall avisynth 2.5.7, redo d2v with latest dgindex AND load the correct dgindex
BHH
cweb
14th November 2007, 17:15
Thanks for the new version!
smok3
14th November 2007, 19:05
If no setting is given it will auto detect the nature of each frame and then encode it as progressive or interlaced.
TFF is default but can be set to BFF.
tnx for explanation, another question: is there a way to get TTF/BFF info from avisynth to HC?
tom942
14th November 2007, 19:36
This what I use most:
- high bitrate FOX1 or FOX2
- average bitrate MPEG or BACH1
- low bitrate HCLOW or BACH1
Most of the time I also use *LUMGAIN 3.
But it's all a matter of taste.
High bitrate I suppose that it is over 4000
But, what is medium bitrate, a range between 3000 and 4000?
And what is low bitrate, a range between 2000 and 3000?
I ask this because each one got a different idea of what, high, medium an low is :).
Regards.
SquallMX
14th November 2007, 20:01
i have test some more coplex avs script AND it's working
i suggest to reinstall avisynth 2.5.7, redo d2v with latest dgindex AND load the correct dgindex
BHH
I was using Avisynth 2.5.6, with avisynth 2.5.7 works fine, thank you.
:thanks::thanks::thanks:
totya
14th November 2007, 20:06
High bitrate I suppose that it is over 4000
But, what is medium bitrate, a range between 3000 and 4000?
And what is low bitrate, a range between 2000 and 3000?
I ask this because each one got a different idea of what, high, medium an low is :).
Regards.
I think low is under 3500, 3500-6000 is med, high is above 6000.
Boulder
14th November 2007, 21:22
As has been said many times, high/medium/low bitrate depends on the material in question. For some material, 4000kbps is low but for some it is more than enough.
tom942
14th November 2007, 21:33
So Boulder, you are saying that is more reliable to take into account the average quantization, using for instance, Bitrate Viewer (I donīt know if there is a better tool).
Regards.
Chumbo
15th November 2007, 02:28
Many thanks. :)
disturbed1
15th November 2007, 07:51
Nice, SMP works great, allocated 720MB of RAM to avisynth.
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
9322 disturbed 18 0 2640m 807m 13m S 188 39.8 32:28.73 HCenc_022.exe
Boulder
15th November 2007, 08:56
So Boulder, you are saying that is more reliable to take into account the average quantization, using for instance, Bitrate Viewer (I donīt know if there is a better tool).
Regards.I usually set a level of quantization that is acceptable to my eyes, then either encode a sample large enough to represent the whole video or encode the whole video using constant quantization. I have P-factor at 1.05 and B-factor at 1.60 for this analysis phase. Then I check the average bitrate of the sample and compare it to the bitrate that I can allocate to the video.
archaeo
15th November 2007, 18:10
working great - thanks Hank
six13
16th November 2007, 03:26
@Boulder
so then you prefer to look at average quantization rather than bitrate. I ran a .VOB the source file was a TV capture interlaced that was authored to DVD files. With Bitrate Viewer the info. I got was Bitrate peak => 7736 and the Avg. bitrate was 4870 The Q level peak was 4.22 and the Avg. was 1.98
I tried it with a .VOB from a DVD rip Progressize and the #'s were.
Bitrate peak => 10179 and the Avg. bitrate was 8989 The Q level peak was 15.76 and the Avg. was 4.08
How should I read these #'s and how could I apply them to selecting a matrix, since you consider this a better method than high/medium/low when refering to bitrate?
Boulder
16th November 2007, 04:35
I don't use the characteristics of an existing encode, I use the sampling method in which I use the filters and matrix that I wish to use. Most of the time I use the MPEG standard.
In your first example, you probably could use a high-bitrate matrix. In the second one, I would first try a mid-bitrate matrix and see how it performs.
six13
16th November 2007, 07:19
thanks Boulder, but I am trying to understand how you determine that based on the #'s I provided. IE use a high bitrate for the first one and a medium for the second one.
With the first example it was encoded at 90%, the second one I haven't done yet, I have the files from the rip on my HDD.
thanks for the help.
SpazzHH
16th November 2007, 15:39
:thanks: Thanks Hank so much for all your hard work. I can't even begin to tell you how much enjoyment your encoder has given me.
Terranigma
16th November 2007, 18:05
I have a request. In future builds, could you allow for us to use more than 2 b-frames?
nvm, I found it. :D
It's in "Settings 2". :)
Kudos for such a great encoder.
Now all we need is for the ability to specify a minumum bitrate.
Boulder
16th November 2007, 19:29
thanks Boulder, but I am trying to understand how you determine that based on the #'s I provided. IE use a high bitrate for the first one and a medium for the second one.The quantization levels are very low in the first case, you might even notice encoder saturation. The second one has a rather low quantization level too, but I would be careful and play with MPEG standard first. Of course, the matrices that have been used in these videos play a big part. I assume that the MPEG standard or something similar has been applied.
starkhouse33
17th November 2007, 04:02
hi
When converting an vc1 evo to mpeg2 using hc.22 im getting an error source mismatch in pass 2 starting at frame: 109 in my log.this has happened twice now. encoding completes and everything looks correct just wondering what that error means.
Thanks
heres what it looks like in my log
---------------------
| encoding - pass 2 |
---------------------
*** ERROR, source mismatch in pass 2 starting at frame: 109
*** INFO, adjusting average bitrate: -0.03 %
*** INFO, adjusting average bitrate: -0.05 %
*** INFO, adjusting average bitrate: -0.06 %
*** INFO, adjusting average bitrate: -0.08 %
*** INFO, adjusting average bitrate: -0.10 %
*** INFO, adjusting average bitrate: -0.12 %
*** INFO, adjusting average bitrate: -0.14 %
*** INFO, adjusting average bitrate: -0.16 %
*** INFO, adjusting average bitrate: -0.19 %
pass 2 encoding time: 6:54:09 (24848.83 s)
fps: 8.8
hank315
17th November 2007, 23:29
*** ERROR, source mismatch in pass 2 starting at frame: 109
This means Avisynth didn't serve the same frame in the second pass, the mismatch starts at frame 109, this is most probably a codec issue.
The result might look good but it's not, the info which was gathered from the first pass is now applied on the wrong frames.
Try to solve it by checking "Reload Avisynth" in the settings 3 tab.
Nomolu
18th November 2007, 01:39
Like many of the other posts, I'm glad that SMP support has been added to HCenc. It made it possible to find the following problem in half the time. :sly: Sometimes the MPEG2 stream created by HCenc 0.22 results in the following error when the audio and video are being muxed by the dvdauthoring s/w I use (which is GUI for DVDauthor in the Muxman mode):
P-STD buffer underflow by 2639 bytes at 25736978, sector 109169.
P-STD buffer underflow by 6032 bytes at 25739981, sector 109189.
...
Resulting DVD will probably not play smoothly.
If I switch GfD back to it's "dvdauthor" mode where it uses mplex to do the muxing, I get the following warnings:
++ WARN: [???] Stream e0: data will arrive too late sent(SCR)=25730779 required(DTS)=0
++ WARN: [???] Video e0: buf= 193632 frame=008564 sector=00105224
++ WARN: [???] Audio bd: buf= 7363 frame=008940 sector=00003406
...
**ERROR: [???] MUX STATUS: Frame data under-runs detected!
And I'm left with a corrupted, unplayable DVD files.
My system has two Althon MP processors, and I've tried running HC 0.22 with SMP disabled. But it didn't fix the problem. Running HC 0.21 produced a fine/valid MPEG2 file. It just took twice as long. :(
By the process of elimination, I found that there is one minute of frantic action in the video that HC 0.22 is having trouble encoding. Is this the result of a bug within the VBV portion of HC?
Here are my encoding settings:
profile: BEST
frames: 0 8990
framerate: 29.970
aspect ratio: 4:3
bitrate Kb/s: 6000
max. bitrate Kb/s: 8000
pulldown: no
closed gops: no
VBV check: yes
scene change det.: yes
interlaced: yes, TFF
goplen,B-pic: AUTO
dc_precision: 9
scan method: alt
bias: 0
chapter frames: 0
time code: 0 0 0 0
CPU: MMX
priority: idle
SMP active: yes
matrix: MPEG
luminance gain: no
FYI: It makes no difference if I specify interlaced or if I set HC to auto. The only MPEG profile which produces a valid MPEG2 stream is the "normal" setting. Fast & Best produce corrupt streams.
BTW, I prefer the old VB Verifer tally that was displayed in versions 0.20 and earlier to the new flickering LED type of display. Please consider changing it back. At the very least, could the tally be written out to the log file again? Thanks.
Mazer Rackham
19th November 2007, 13:47
HC Enc 21 gave me an error message I've never had before, that's why I searched and found the new HC Enc 22. Same error message unfortunately:
ERROR, can't read from dbs file, aborting...
It happens during 2nd pass:
---------------------
| encoding - pass 1 |
---------------------
pass 1 encoding time: 1:48:32 (6511.76 s)
fps: 27.6
--------------------------------
| encoding - intermediate pass |
--------------------------------
bitrate set to: 4000 kb/s
est. outfile length: 3506836 kB
intermediate encoding time: 1.0 s
---------------------
| encoding - pass 2 |
---------------------
*** ERROR, can't read from dbs file, aborting...
*** ERROR, can't read from dbs file, aborting...
---
Any ideas what's causing the error?
blutach
20th November 2007, 15:41
A belated thank you from me Hank!
Having no problems at all using AVISynth 2.5.8
Very much appreciate the full use of multi cored CPUs.
Regards
pandy
20th November 2007, 17:30
Thank You very much. Superb piece of software!
hank315
20th November 2007, 21:16
@Nomolu
I tried to replicate this with some difficult sources, all muxed OK.
Seems I need your source for it, could you make it available?
@Mazer Rackham
It means HC can't read the database file which was written in the first pass, most probable cause the disk is full??
With HC022 you can redirect the dbs file to another disk.
Mazer Rackham
20th November 2007, 21:49
@Mazer Rackham
It means HC can't read the database file which was written in the first pass, most probable cause the disk is full??
With HC022 you can redirect the dbs file to another disk.
Thanks for your reply, hank315!
Hmm, strange. The video I try to encode is about 4 Gig big and I have about 11 Gig disc space left. I will increase the amount of free disc space and try again though.
Edit: Okay, freeing more disc space solved the problem. Thanks again! Good to know: 11 Gig free disc space is not enough for a 2-pass encoding of a 4 Gig video.
Nomolu
21st November 2007, 07:30
@Nomolu
I tried to replicate this with some difficult sources, all muxed OK.
Seems I need your source for it, could you make it available?
hank315: I just sent you a PM with the upload links.
MrC
26th November 2007, 20:58
@hank315
Is it possible to have the "AVSRELOAD" argument from the CLI in the next release?
:thanks:
Bye
manolito
27th November 2007, 20:41
Even though I have been following HC's development from the very beginning I have rarely used it for productive tasks, simply because my computer is rather slow and HC does not offer a true one-pass mode. But now it looks like Santa will have a new computer for me, so I did a couple of test encodes with HC 0.22 during the last few days. There were no problems whatsoever, great quality, and Muxman did not complain one single time even though I always used the "Fast" profile.
I use HC with DVD2SVCD and with DVD-RB free. In both cases HC is controlled by QuEnc commandline parameters, and I have full control over the HC.ini settings.
I still could not find answers in the forum for a couple of questions I have. Here they are in random order:
1. HC 0.21 had some issues with scene change detection. Have these problems been addressed in the current version? (The change log does not mention it)
2. Some users reported that HC 0.22 needs Avisynth 2.57 or higher. In my tests I used 2.56a without any problems. Does HC 0.22 contain any code which will not work with Avisynth 2.56 ?
3. When using HC with DVD-RB I remember that there were problems when HC inserted a sequence end code after every segment. It was recommended to use the "*NOSEQ_ENDCODE" statement in HC.ini to avoid these problems. Is this still true?
4. In previous versions I usually used a bias setting of 30 or higher to give static scenes more bitrate. When I now use the "*LUMGAIN" parameter (set to 2 or 3) is it recommended to set bias to 0 (full VBR) ?
5. Does HC somehow allow to have the TFF flag set for a progressive encode? I know that in progressive mode this flag is meaningless, but CCE does set the TFF flag in this case, and it really helps me for some conversions (Movie is progressive, end credits are interlaced TFF).
Anyway, thanks Hank for a great encoder!
Cheers
manolito
hank315
27th November 2007, 23:10
HC 0.21 had some issues with scene change detection. Have these problems been addressed in the current version? (The change log does not mention it)
Yes, the scene change detection algorithm is changed, it's one of the minor changes that never made it to the change log.
Some users reported that HC 0.22 needs Avisynth 2.57 or higher. In my tests I used 2.56a without any problems. Does HC 0.22 contain any code which will not work with Avisynth 2.56 ?
I've seen this reported also a couple of times, here it's working OK with Avisynth 2.5.6a and 2.5.7.
Rather strange because nothing really changed in the code which creates the script environment for Avisynth.
When using HC with DVD-RB I remember that there were problems when HC inserted a sequence end code after every segment. It was recommended to use the "*NOSEQ_ENDCODE" statement in HC.ini to avoid these problems. Is this still true?
By default it still inserts a sequence endcode because it's the proper way to end a sequence but this issue was addressed by jdobbs long time ago, DVD-RB simply removes the end code (00 00 01 B7) from the stream.
In previous versions I usually used a bias setting of 30 or higher to give static scenes more bitrate. When I now use the "*LUMGAIN" parameter (set to 2 or 3) is it recommended to set bias to 0 (full VBR) ?
I still use bias settings of approx. 30 in combination with lumgain 3, also depends on the source.
Does HC somehow allow to have the TFF flag set for a progressive encode? I know that in progressive mode this flag is meaningless, but CCE does set the TFF flag in this case, and it really helps me for some conversions (Movie is progressive, end credits are interlaced TFF).
For a real progressive encode the answer is no, BFF is set as default (has no real meaning) and the progressive sequence flag is set.
AFAIK CCE never sets the progressive sequence flag, it only sets flags for frames (progressive/interlaced).
If you set HC to 'auto detect', the progressive sequence flag isn't set and TFF is default, progressive frames are encoded progressive and interlaced frames are encoded interlaced.
Is it possible to have the "AVSRELOAD" argument from the CLI in the next release?
Will do, no problem.
boywondr16
28th November 2007, 11:35
Please forgive me if this has been answered before, but in using HCenc with DVD Forger or AVS to DVD, I can't seem to figure out how to pass a command to set the resolution size.
That said, Hank, you've done a great job with HC. I use it exclusively.
Boulder
28th November 2007, 11:57
HC doesn't do any resizing.
MrC
28th November 2007, 14:02
Please forgive me if this has been answered before, but in using HCenc with DVD Forger or AVS to DVD, I can't seem to figure out how to pass a command to set the resolution size.
If for resolution size you mean video frame width and height, you have to change it by editing the AviSynth script (in AVStoDVD click on "AVS Script" icon).
;)
Bye
Chumbo
28th November 2007, 16:08
I wanted to report that I too have received:*** ERROR, source mismatch in pass 2 starting at frame: 70251
using 022. My .ini file does contain*AVSRELOAD
I use avisynth 2.57. For this encode, my sources were muxed into one mkv file first and then fed into hc. Normally, I just encode the parts separately, so I don't know if that had anything to do with this problem cropping up.
AlanHK
28th November 2007, 19:12
If for resolution size you mean video frame width and height, you have to change it by editing the AviSynth script (in AVStoDVD click on "AVS Script" icon).
IN more detail: you would add a resize command to the AVS. Eg:
AVISource("sja-100.avi")
LanczosResize(720,576,0,0,640,352)
See Avisynth docs for details.
Or use the excellent FitCD utility.
Chumbo
28th November 2007, 19:54
I wanted to report that I too have received:*** ERROR, source mismatch in pass 2 starting at frame: 70251
using 022. My .ini file does contain*AVSRELOAD
I use avisynth 2.57. For this encode, my sources were muxed into one mkv file first and then fed into hc. Normally, I just encode the parts separately, so I don't know if that had anything to do with this problem cropping up.
I wanted to follow up to this. I just tried reencoding part 1 directly from the EVO, via a graphedt file through an avs script, and the same error popped up on pass #2. Again, the reload avisynth is checked. This time, though, it started at frame 0:*** ERROR, source mismatch in pass 2 starting at frame: 0
I'm going to retry this in 021.
MrC
28th November 2007, 20:28
IN more detail: you would add a resize command to the AVS. Eg:
AVISource("sja-100.avi")
LanczosResize(720,576,0,0,640,352)
See Avisynth docs for details.
Or use the excellent FitCD utility.
Ehm, AVStoDVD just does that job.... and then you can change the script automatically generated.
;)
Bye
kolak
29th November 2007, 00:03
Why I have only about 30% usage of my 8 core PC (110 FPS) when encoding with HC?
I use 2.57 avisynth with 2 lines: avisource line and convertyv12 line.
Source is uncompressed PAL YUY2.
kolak
totya
29th November 2007, 00:41
Why I have only about 30% usage of my 8 core PC (110 FPS) when encoding with HC?
I use 2.57 avisynth with 2 lines: avisource line and convertyv12 line.
Source is uncompressed PAL YUY2.
kolak
8 core???
Chumbo
29th November 2007, 02:17
I wanted to follow up to this. I just tried reencoding part 1 directly from the EVO, via a graphedt file through an avs script, and the same error popped up on pass #2. Again, the reload avisynth is checked. This time, though, it started at frame 0:*** ERROR, source mismatch in pass 2 starting at frame: 0
I'm going to retry this in 021.
With 0.21, HC kept crashing on the first EVO, and would either continue with the 2nd or crash with the 2nd. I just have a batch file that runs the command line with the .ini file. But even with the GUI, the first EVO kept crashing HC. I tried to change the .grf file a bit, i.e., add the audio decoder to the audio out pins (both with and without the audio renderer) and still crashed. I even rebooted the PC and cleaned out the temp folder and that didn't help.
I was able to get it going by muxing the video into a single MKV container and used it as a source and now 0.21 is encoding. This should work fine w/out any errors as usual.
six13
29th November 2007, 05:51
Can someone please expaline this to me? I was reading some posts by Boulder and jdobbs and was trying to understand if using this setting with HCenc 22 would benefit my output.
My source is a NTSC Sat. rec SD TV interlaced capture recorded with MS Media Center and the .dvr-ms file is converted to MPEG2 for demuxing and authoring to process with DVD-RBa nd HCenc 22.
Considering my source would this benfit my output and if so which setting to start with? Would this feature benfit a progressice source DVD rip and if so which setting to start with? I would alter HCenc with the GUI.
Thanks to everyone.
Six13
mikenadia
29th November 2007, 19:05
Excellent program, Hank. I noticed that when I click on suspend , the internal clock does not stop, the average FPS decreases and the time left to encode will increase when you click on resume.Just a notice.
hank315
29th November 2007, 21:15
Why I have only about 30% usage of my 8 core PC (110 FPS) when encoding with HC?
I use 2.57 avisynth with 2 lines: avisource line and convertyv12 line.
Source is uncompressed PAL YUY2.
That's as expected, input via Avisynth or d2v takes about 30%, encoding and output is 70%.
Decoding and encoding are done simultaneous, encoding is also frame based multi-threaded.
In the case of uncompressed sources or heavy filtering, the encoder probably has to wait for input.
At best the whole process will max out at approx. 80% CPU on a quad core and at 40% on 8 cores.
@mikenadia
I will put it on the todo list.
Chumbo
29th November 2007, 21:21
If you think worthwhile, it would be great to be able to change the priority while HC is encoding. That way rather than suspend, we can set it to Idle while doing something else for a bit and then set it back to normal or high or whatever. :)
Irakli
30th November 2007, 01:48
If you think worthwhile, it would be great to be able to change the priority while HC is encoding. That way rather than suspend, we can set it to Idle while doing something else for a bit and then set it back to normal or high or whatever. :)
You can do this with HC 0.22 (it's in 'Settings 3').
Chumbo
30th November 2007, 02:14
You can do this with HC 0.22 (it's in 'Settings 3').
You must read it as it's written young padawan. ;) The key words are "while HC is encoding" which you cannot do. You can set it, true, prior to the encoding starting, but once it starts, you cannot change it.
A good example of programs that do that are VritualDub and Nero Vision.
Irakli
30th November 2007, 12:10
You must read it as it's written young padawan. ;) The key words are "while HC is encoding" which you cannot do. You can set it, true, prior to the encoding starting, but once it starts, you cannot change it.
A good example of programs that do that are VritualDub and Nero Vision.
Sorry, I misread your post. I guess that's because I was trying to prepare for my university presentation and browse doom9.org at the same time.
Yes, that could be really nice feature to add (although I am perfectly fine with CTRL+ALT+Del approach for setting priority).
Regards,
Irakli
Chumbo
30th November 2007, 19:53
Sorry, I misread your post. I guess that's because I was trying to prepare for my university presentation and browse doom9.org at the same time.
Yes, that could be really nice feature to add (although I am perfectly fine with CTRL+ALT+Del approach for setting priority).
Regards,
Irakli
No problem. Yeah, it's just more convenient than Task Manager. ;)
kolak
1st December 2007, 13:49
That's as expected, input via Avisynth or d2v takes about 30%, encoding and output is 70%.
Decoding and encoding are done simultaneous, encoding is also frame based multi-threaded.
In the case of uncompressed sources or heavy filtering, the encoder probably has to wait for input.
At best the whole process will max out at approx. 80% CPU on a quad core and at 40% on 8 cores.
It's a simple encoding, no filtering or other preprocessing.
Encoder doesn't have to wait for data because it comes from RAID which can deliver 400MB/s.
Elecard Studio Converter encodes 12 times faster than RT with 50% CPU usage.
x264 uses 100% all the time :)
Mr_Odwin
1st December 2007, 14:12
Hey Hank.
I seem to be taking a speed hit with this release, without doing anything different. Would there be any reason for that?
In particular I would run multiple instances of HC; now when I run multiple instances, (regardless of SMP setting) I get much lower speeds (about 2/3 what it was).
Mr_Odwin
2nd December 2007, 19:02
I have some actual numbers and details.
Using an Intel e4300 overclocked to 2.4GHz with 1GB RAM.
Using a fairly standard avs script that serves a 720x576 file at 23.976 FPS. Ini file:
*CQ_MAXBITRATE 8
*MAXBITRATE 8000
*PROFILE FAST
*DC_PREC 8
*MATRIX MPEG
*ASPECT 16:9
*AUTOGOP 12
*NOSCD
*WAIT 0
Command line is just avs location, desired location of m2v and where the ini file is.
HC 0.22: 3 Instances, No SMP = 87 FPS
HC 0.22: 3 Instances, SMP = 77 FPS
HC 0.22: 1 Instance, No SMP = 45 FPS
HC 0.22: 1 Instance, SMP = 73 FPS
HC 0.21: 1 Instance = 71 FPS
HC 0.21: 3 Instances = 184 FPS
There's quite a difference.
Boulder
2nd December 2007, 19:39
Out of interest, what does Task Manager show regarding CPU usage?
Mr_Odwin
2nd December 2007, 19:52
0.22 3 Instances, No SMP = 100%
0.22 3 Instances, SMP = 100%
0.22 1 Instance, No SMP = 50%
0.22 1 Instance, SMP = about 90%
0.21 3 instances = 100% CPU
0.21 1 instance = 50% CPU
G_M_C
2nd December 2007, 20:30
Ive been trying HC 022 on SMP, and im very pleased with the results. Having "switched over" from CCE SP i must say that HC really is a good alternative to it, speed-wise and quality-wise.
But ive got a question about the adaptive matrix dll' s supplied with the release:
When i use AQ through one of the supplied DLL's or with the luminance-slider, the Q-matrix gets adapted based on luma in a GOP. But how much change does it make to the matrix, and more important; Does it revert back to my original custom matrix when a "normal scene" is found ?
mikeytown2
2nd December 2007, 23:11
Feature request for 2 pass encodes:
On the first pass, have HC output a huffyuv/Lagarith file. Then on the second pass instead of re-running the avs script it would use the huffyuv/Lagarith stream. This has the potential to speed up 2 pass encodes.
If you do decide to implement this then some of the request to support avi files might be doable... just have the program create a temp avs file and use that to load the avi file.
IMHO only downside to using huffyuv/Lagarith for the 2nd pass would be massive space usage.
Any Thoughts?
hank315
2nd December 2007, 23:17
@Mr_Odwin
Just did a test and couldn't find a significant difference in speed between HC021 and HC022 running multiple instances (also tested it with 3 instances).
But there's a difference how time and fps is measured, with HC021 fps is measured relative to CPU time used, with HC022 it's measured relative to wall clock time, this means the fps in HC021 isn't accurate when running multiple instances.
Do you also find a large difference if you measure the real time?
And if you're running multiple instances with HC022, make sure *NOSMP is present in the ini file.
@G_M_C
The matrix switching is done on a GOP basis, so on average it can switch 2 times every second and yes it will use the original matrix on normal scenes.
Maybe better to use the *LUMGAIN command which does almost the same.
The change depends on the average luma values in a GOP, the max change using the dlls is a factor 0.6, using *LUMGAIN 4, the max change is a factor 0.5, so half of the original matrix values.
Encoder doesn't have to wait for data because it comes from RAID which can deliver 400MB/s.
400MB/s is nice... but that's not the speed at which Avisynth delivers frames, disk speed isn't the main issue.
Getting the input takes 30% on average, processing/decoding it just takes time.
Elecard Studio Converter encodes 12 times faster than RT with 50% CPU usage.
I tested the Elecard encoder on a dual core and it didn't run faster than HC022.
Main goal was to create effective SMP encoding on main stream processors (dual/quad core).
And if you can get 12 speed out of the Elecard encoder with 8 cores, best to use that one... well, speedwise of course...
x264 uses 100% all the time :)
Cool :), sure you're getting 12 speed also with some descent quality settings :D
Just as you will get 50% or more CPU with CCE ;)
G_M_C
2nd December 2007, 23:48
@G_M_C
The matrix switching is done on a GOP basis, so on average it can switch 2 times every second and yes it will use the original matrix on normal scenes.
Maybe better to use the *LUMGAIN command which does almost the same.
The change depends on the average luma values in a GOP, the max change using the dlls is a factor 0.6, using *LUMGAIN 4, the max change is a factor 0.5, so half of the original matrix values.
Hope there is a max to how low the matrix can be adapted, since i allread use an insane matrix;
8 10 11 12 12 13 14 15
10 11 12 13 13 15 15 16
11 12 12 14 15 15 16 17
12 13 14 15 15 16 17 18
12 13 15 15 16 17 18 19
13 15 15 16 17 18 19 19
14 15 16 17 18 19 19 20
15 16 17 18 19 19 20 20
8 8 8 9 9 9 9 10
8 8 9 9 9 9 10 10
8 9 9 9 9 10 10 10
9 9 9 9 10 10 10 10
9 9 9 10 10 10 10 11
9 9 10 10 10 10 11 11
9 10 10 10 10 11 11 11
10 10 10 10 11 11 11 11
Project=NTSC DVD, 120 minutes, 23.976fps / pull-up, 720x480 / 16:9, avg. bitrate=7000 / maximum=8200.
The project has approx 30% ~ 40% "dark scenes", and most are important to the storyline; That's why i'd like to try the option. I' ll set the LUMGAIN @ 1 and see what happens.
2 last questions though; Do the end-credits (black scene with small white text) also count as a "dark scene" for the adjustment to kick in ? And what about, for instance, scene-transition with a short moment of black screen ( a sequence of "blanc frames" ) ?
AlanHK
3rd December 2007, 02:05
IMHO only downside to using huffyuv/Lagarith for the 2nd pass would be massive space usage.
That "massive space usage" would be a killer for me. I have to do a search and destroy session to clear space before I make every DVD as it is.
just have the program create a temp avs file and use that to load the avi file.
There are plenty of third-party apps that will do that, and even run HC and make your coffee while burning a DVD. I hope Hank can resist the pressure to add such features, spending time on that can only be at the expense of improving the core function of creating excellent MPEGs.
kolak
3rd December 2007, 12:45
Cool :), sure you're getting 12 speed also with some descent quality settings :D
Just as you will get 50% or more CPU with CCE ;)
Hehehe- I'm getting 6FPS with the best settings.
CCE uses below 20% :( and the speed is 6.
If my source will be YUV12 will this increase speed?
Why do I have to go through avisynth?
Thanks
Chumbo
3rd December 2007, 16:14
I wanted to report that I too have received:*** ERROR, source mismatch in pass 2 starting at frame: 70251
using 022. My .ini file does contain*AVSRELOAD
I use avisynth 2.57. For this encode, my sources were muxed into one mkv file first and then fed into hc. Normally, I just encode the parts separately, so I don't know if that had anything to do with this problem cropping up.
Just wanted to add another response to this. I'm still getting these errors and this weekend I had to do an encode 3 times. First with 022 with AVSRELOAD which still failed, then 022 without AVSRELOAD and then with 021 which was fine. ---------------------
| encoding - pass 2 |
---------------------
*** ERROR, source mismatch in pass 2 starting at frame: 1292
*** ERROR, source mismatch in pass 2 starting at frame: 1292
*** INFO, adjusting average bitrate: -0.48 %
*** INFO, adjusting average bitrate: -0.85 %
...
If there's anything I can do to help, extra debugging or logging or whatever, please let me know. Many thanks.
G_M_C
4th December 2007, 11:35
I've got a question for Hank;
Is it possible to set a "minimum bitrate", some encodes for DVD seem to require a minimum (allthough my DVD-player doesnt seem to mind).
Mr_Odwin
4th December 2007, 21:41
@Mr_Odwin
Just did a test and couldn't find a significant difference in speed between HC021 and HC022 running multiple instances (also tested it with 3 instances).
But there's a difference how time and fps is measured, with HC021 fps is measured relative to CPU time used, with HC022 it's measured relative to wall clock time, this means the fps in HC021 isn't accurate when running multiple instances.
Do you also find a large difference if you measure the real time?
And if you're running multiple instances with HC022, make sure *NOSMP is present in the ini file.
Real time results with a stopwatch:
(Mins:Secs)
(Same source obviously)
HC 0.22: 3 Instances, No SMP = 8:25
HC 0.22: 1 Instance, No SMP = 13:50
HC 0.22: 1 Instance, SMP = 9:16
HC 0.21: 1 Instance = 12:09
HC 0.21: 3 Instances = 7:39
Still a bit of a speed drop. Similar in magnitude between the different cases too. (i.e. 8:25/7:39 ~= 13:50/12:09)
The cli and ini files are identical, except the 0.22 ini files also contain:
*NOSMP
*PROGRESSIVE
(Or the *SMP command.)
dragongodz
4th December 2007, 21:50
Feature request for 2 pass encodes:
IMHO only downside to using huffyuv/Lagarith for the 2nd pass would be massive space usage.
to say the least.
frankly if someone is going to be using filters etc, which is where this would really show a difference, then they should have the knowledge to create the avi themselves and just use that from the beginning.
this is not the sort of jumping through hoops an encoder should have to do.
mikeytown2
7th December 2007, 00:10
this is not the sort of jumping through hoops an encoder should have to do.
Good point! Thankfully IMHO there is a good solution now for a speed boost on 2 pass encodes
http://forum.doom9.org/showthread.php?p=1073371#post1073371
Calimari
18th December 2007, 16:36
The Bitburners site is hosting v0.21 again? Where is v0.22?
Fishman0919
18th December 2007, 17:17
Just noticed that too... you can download HC v0.22 from the http://www.doom9.org/ download section
Calimari
18th December 2007, 23:04
There it is back.
rendez2k
26th December 2007, 20:12
Not sure if this has been asked before, but is there much difference between the NORMAL and BEST profile in the latest version and how much does it impact on time as a rule (is it say double the time for the best profile?).
shirohamada
30th December 2007, 00:31
kinda late, but,
キタ━━━━━━(゚∀゚)━━━━━━!!!!!
hartford
30th December 2007, 03:16
@Hank
Could HC22 _not_ take focus when finished with a job? Perhaps a switch to do so?
I ask because it happens that I often get to encoding a vid at the time that I play a game online. When HC22 takes focus, my game halts until it is shutdown.
Thanks.
45tripp
30th December 2007, 09:25
drag and drop for gui input.
smok3
30th December 2007, 10:10
ok, one more: dear santa, please bring me: fast, 1pass bitrate-managed vbr (compatible with dvd).
buzzqw
30th December 2007, 10:30
ok, one more: dear santa, please bring me: fast, 1pass bitrate-managed vbr (compatible with dvd).
i do 1 pass CQ with constraint max bitrate...
BHH
smok3
30th December 2007, 13:32
i do 1 pass CQ with constraint max bitrate...
buzzqw: that would be more like CBR?
buzzqw
30th December 2007, 14:37
no propely.. since is based on constant quality ,the bitrate will be heavily variable.. since every frame will be encododed in cq..
like crf in x264 .. but with the possibility of specify the maxbitrate
BHH
smok3
31st December 2007, 02:18
ok, so how would you do it if calculated avearge bitrate is 2500kbps? (just an example)
dragongodz
31st December 2007, 11:12
since is based on constant quality ,the bitrate will be heavily variable.. since every frame will be encododed in cq
please, will people get it through their heads. CQ does NOT mean Constant Quality, it means Constant Quant. they are NOT the same thing.
while CQ is VBR because of the difference in size different frames can be it is lacking in desired size targeting. a simpler possible way to add such would be to do ABR over something like 4 GOPs.
hank315 already knows this since he and i talked about it some time ago.
manono
31st December 2007, 22:50
Hi-
Anyone know what this message means when the .avs is opened in HCEnc:
"error loading Avisynth script,MPEG2Source:,Force Film mode not supported for frame repeats (C:\Documents and Settings\...\t2.avs, line2)."
I'm trying to help a guy do an NTSC2PAL conversion and he's run into a roadblock. Here's his full script (with a D2V made using Forced film):
LoadPlugin("C:\Programmi\dgmpgdec149\DGDecode.dll")
MPEG2Source("I:\T2_DGIndex\t2_movie.d2v")
Lanczos4Resize(720,576)
http://forum.videohelp.com/topic342775-30.html#1793453
Thanks.
kumi
31st December 2007, 22:58
The manual says:
Force Film - This option is intended for the special case of film content encoded at 23.976 fps but pulled down for display at 29.97 fps, i.e., 3:2 pulldown. This option will restore the 23.976 fps film rate while keeping audio and video in sync throughout the clip. This option works by ignoring pulldown flags and inserting/removing frames to maintain a constant and sync'ed output stream. Do not use this option on non-3:2 pulled-down material, and, therefore, never use it on PAL or MPEG1. Also do not use this option on streams containing frame repeats.
and also:
Fix D2V
[...]
Note that field order correction should not be applied to streams containing frame repeat RFFs.
manono
31st December 2007, 23:13
Thanks, kumi. Maybe I should have read the manual and figured it out myself. So, what's the answer? Would not fixing the D2V be enough, do you think? Or is he going to have to perform a full IVTC? I think this is basically a progressively encoded DVD, with a very little bit of video, perhaps at the very beginning.
kumi
31st December 2007, 23:16
I'm not sure, but aren't repeat flags a sign of soft telecine?
That is, maybe his source is 3:2 soft pulldown, and all he has to do to output a progressive 23.976 FPS stream is turn on "Honor Pulldown Flags". And not use the Fix D2V tool, of course.
manono
31st December 2007, 23:21
I'm not sure, but aren't repeat flags a sign of soft telecine?
When he ran the preview for a short time he got 98% Film. So I'm pretty sure there's only hard telecine (or true video) at the very beginning, some black frames or perhaps a studio logo or some such.
buzzqw
1st January 2008, 11:58
latest dgindex version will not prompt/flag d2v with this message if used in command line mode
BHH
manono
1st January 2008, 14:06
Thanks, buzzqw,
I'll have him upgrade his DGMPGDec package.
manolito
1st January 2008, 22:47
After many encodes with HCenc 0.22 which did not cause any problems today I finally could replicate Nomolu's findings.
Original post: http://forum.doom9.org/showthread.php?p=1066474#post1066474
My clip was an interlaced MPEG file (DVB-T capture). HC settings:
CQ_MAXBITRATE 2.13
CQ_PFACTOR 1.01
CQ_BFACTOR 1.45
LUMGAIN 3
Scene Change detection ON
DC Precision 10
Auto GOP and Auto Interlaced
PROFILE FAST
Max bitrate 8500
(TargetAVG bitrate around 7600)
Muxman had the following complaints:
Bytes remaining in buffer = 29784.
Bitrate - avg: 7577388, min: 354986 (lba 0), max: 8864914 (lba 508043).
Shortest GOP has 4 fields, longest GOP has 30 fields.
Fields: 249710, VOBU: 8494, Sectors: 2309753.
Video decoder buffer underflowed 2 times.
Check c:\muxman.log for details.
Resulting DVD will probably not play smoothly.
I should mention that muxing with Imago and authoring with DVDAuthor worked just fine, also no stuttering on my SA. But still it looks like the VBV buffer check does not always work reliably in 0.22.
Cheers
manolito
Chumbo
4th January 2008, 04:35
Following up again per some of my earlier posts. I just went back to 022 again to try it and got this again:
---------------------
| encoding - pass 2 |
---------------------
*** INFO, adjusting average bitrate: -0.16 %
*** INFO, adjusting average bitrate: -0.33 %
*** INFO, adjusting average bitrate: -0.38 %
*** INFO, adjusting average bitrate: -0.45 %
*** ERROR, source mismatch in pass 2 starting at frame: 25826
*** INFO, adjusting average bitrate: -1.01 %
*** INFO, adjusting average bitrate: -1.08 %
*** INFO, adjusting average bitrate: -1.35 %
*** INFO, adjusting average bitrate: -1.40 %
Am I the only one who consistently gets this error? I'm finding it difficult to move to 022 from 021 because I get these errors. I then have to redo the project in 021 or take my chance and run it through 022 again to see if it goes through cleanly.
Do we know why this keeps happening? Is there any info I can provide to help narrow down why I keep getting these? Let me know how I can help please. Thanks.
Boulder
4th January 2008, 05:12
There is something different between the sources in the two passes. Looking at your earlier posts, I think you need to find a different way to process your sources. I'm quite sure that the same error occurs in HC021 as well (because it belongs to the source decoding chain) but it's just not shown in the log.
squid_80
4th January 2008, 08:43
If you're using directshowsource, that's probably where the problem is. Another possible cause is using unpacked divx/xvid avi files as sources in your script.
smok3
4th January 2008, 12:09
Chumbo, try with *AVSRELOAD
Chumbo
4th January 2008, 16:51
Chumbo, try with *AVSRELOAD
I do use this. Per my earlier posts, I've gotten this with and without this setting. Currently I am using this setting.
I reran the encode last night and got it again, but early on in the 2nd pass: ---------------------
| encoding - pass 2 |
---------------------
*** ERROR, source mismatch in pass 2 starting at frame: 916
*** INFO, adjusting average bitrate: -0.16 %
*** INFO, adjusting average bitrate: -0.32 %
*** INFO, adjusting average bitrate: -0.37 %
*** INFO, adjusting average bitrate: -0.94 %
*** INFO, adjusting average bitrate: -1.00 %
*** INFO, adjusting average bitrate: -1.26 %
*** INFO, adjusting average bitrate: -1.30 %
@squid_80,
My sources are always avs scripts loading a grf file via directshowsource. My grf files are always either avc or vc1 sources. My scripts are pretty simple, for example:directshowsource("video.grf",fps=23.976,audio=false)
converttoyv12()
@Boulder,
Thanks for the info on 021. I wasn't aware that this wasn't logged. I thought it was logged which was a bad assumption on my part. When you say find a different way to process my sources, what exactly do you mean? Because I've tried moving streams into an MKV container and I still had the same problem. Is that what you mean?
Thanks for the ideas and info. :)
DeeZiD
4th January 2008, 19:24
@Hank:
Thank you for this incredible piece of software.
I'm filming in HDV with a Canon A1 and HV20.
Both are great cams and deliver HD Quality.
Converting to DVD was always a dilemma.
Before using avisynth plus hcenc I've used Virtualdubmod (for resizing, msharpen and neatvideo) and Canopus Procoder or squeeze (for mpeg2 encoding).
Canopus mpeg2s were artifact-free and had the right colours (after playing around with the colourshrink filter) but they were too soft.
Squeeze mpeg2s had many artifacts and too high contrast but they were crisp.
Avisynth (spline36, msharpen) + HCenc delivers the crispest picture, correct colours and an absolutely artifact-free picture !!! :thanks::thanks::thanks:
Opensource rulez.
regards Dennis
halsboss
7th January 2008, 08:48
Hi. HC is fantastic. :thanks:
Just a possible bug report for 022... An encode using 022 has started caused problems with multiple SONY DVD players "freezing" and "skipping" at certain points.
In the attached extracted clip, at about the point the red book opens. In the full encode at many points thereafter. Same encode with 021 works OK. (No longer have access to the source file.)
I'm back to 021 for the time being.
Download-Link: http://rapidshare.com/files/81896471/cut.vob.html
Delete-Link: http://rapidshare.com/files/81896471/cut.vob?killcode=12017906609541193058
*INFILE D:\HDTV\cut-CQ3.avs
*OUTFILE D:\HDTV\cut.mpv
*PROFILE BEST
*ASPECT 16:9
*BITRATE 9200
*MAXBITRATE 9400
*LASTIFRAME
*AUTOGOP
*PULLDOWN
*CLOSEDGOPS
*DC_PREC 10
*LUMGAIN 3
*PRIORITY NORMAL
*CQ_MAXBITRATE 3
*MATRIX MPEG
Boulder
7th January 2008, 08:54
Try authoring the HC022 encoded video in MuxMan and see what it reports.
halsboss
7th January 2008, 09:02
OK, thanks. Will demux the "bad" VOBs with the latest DGIndex and do that. Had used DVDlab to author this one, although usually use VideoReDo TV Suite. Am I looking for something particular like a log file or something or just to see how it plays ? 1st time I've had any problem with any of the s/w... :)
edit: PS the downloadable "cut" was created from VideoRedo's "Trim and Copy" from the 1st VOB, so I hope it hasn't mucked up the example.
Boulder
7th January 2008, 09:06
MuxMan should provide you with a warning if there are underflows, and it also outputs a log file (on my system it's c:\muxman.log). I suspect that you have underflowing when the skipping occurs but MuxMan will verify that.
manolito
7th January 2008, 09:25
@halsboss
There are several things you could try. A while ago Nomolu had the same issue (original post: http://forum.doom9.org/showthread.php?p=1066474#post1066474 ), and he solved it by switching to the "Normal" profile.
And your bitrate settings do seem a little high, especially considering that you are in CQ_MAXBITRATE mode. In this mode HC will always overshoot the max bitrate by about 500 kbps (much less than CCE in OPV mode or QuEnc in 1-pass VBR mod).
And please do what Boulder said and use Muxman. For me Muxman has become the ultimate compliance checker. If Muxman has no problems with the source streams then you can be 100% sure that every player will play it without stuttering.
Good luck
manolito
Boulder
7th January 2008, 10:08
And your bitrate settings do seem a little high, especially considering that you are in CQ_MAXBITRATE mode. In this mode HC will always overshoot the max bitrate by about 500 kbps (much less than CCE in OPV mode or QuEnc in 1-pass VBR mod).I've never seen this happen..or does it happen in HC022 only? I've done lots of CQ encodes with CQ_MAXBITRATE and the maximum bitrate according to the logfile has always stayed under the specified limit.
halsboss
7th January 2008, 10:51
Thankyou Boulder and manolito. MuxMan log below. Interesting about the 30 gopsize, I'd thought it was supposed to be PAL compliant so I'd understood that wrong. :) Should use "*AUTOGOP 15" I guess.
MuxMan version 0.15R
Accepted video D:\HDTV\c02\bad\bad.m2v size = 2393019636
no multichannel extension found.
Accepted audio D:\HDTV\c02\bad\bad.mpa
20:10:19 Begin multiplex VTS01.
Title Segment List
Segment_1
Maximum audio duration 167092 fields.
Starting scene Segment_1_scn1 at 00:00:00:00
End of video file
Bytes remaining in buffer = 0.
Bitrate - avg: 6030451, min: 1146880 (lba 1229973), max: 9803093 (lba 985404).
Shortest GOP has 14 fields, longest GOP has 30 fields.
Fields: 167096, VOBU: 5624, Sectors: 1230059.
20:16:30 Begin multiplex VMG.
20:16:30 End multiplex.
Let me re-do that test from a known bung DVD, just in case.
PS @halsboss
And your bitrate settings do seem a little high, especially considering that you are in CQ_MAXBITRATE mode. In this mode HC will always overshoot the max bitrate by about 500 kbps (much less than CCE in OPV mode or QuEnc in 1-pass VBR mod).
:) I figured high bitrate can't hurt and can only help. For a lot of my encodes the CQ in the HC window seems to spend a lot of time floating above the "3", which I thought it does when it needs to limit to the nominated bitrate, so I guess it needs it a fair size anyway ? I my arithmetic is right, with overshoot it's still within PAL spec assuming 192kbs audio.
Boulder
7th January 2008, 10:53
Thankyou Boulder and manolito. MuxMan log below. Interesting about the 30 gopsize, I'd thought it was supposed to be PAL compliant so I'd understood that wrong. :)15 frames == 30 fields ;)
halsboss
7th January 2008, 11:12
30 ... silly me. :)
Confirmed, that's the one with mpv and mpa extracted from DVDlab created DVD's VOBS using DGindex. Those DVDs (2 copies) stutter and whatnot on 3 independent standalone DVD players.
Next step I suppose, I'll burn the muxman produced files and see if the same result arises.
halsboss
7th January 2008, 11:28
I'll burn the muxman produced files and see if the same result arises.
Yes, same problem arose with the newly burned DVD from the muxman authoring. Stuttered at the same places - within a few secs and then again at about the red book opening.
Can't fault the discs as tried 2 different disc brands, also noting the 021 encode worked ... :confused: :o Oh well HC is still a fantastic product. Back to 021 I suppose as I'm stumped. PS VOBS play "fine" on PC with PowerDVD4...
Boulder
7th January 2008, 11:31
Could you please upload a sample of the same scene with HC021 as the encoder? I think it would be useful if hank (and us amateurs :)) could compare the two different encodes since you have proven that there are no underflows but it's something else.
halsboss
8th January 2008, 00:16
Sure ! :thanks: Searched and found the original input file too.
Below are the files demonstrating a potential issue with HC 022 vs HC 021. Both HC 022 outputs stutter etc on both auto and progressive whereas 021 work fine. I can't remember if *PROGRESSIVE is in 021, so I tried it as a variation anyway.
The input .AVI file chopped to 10secs zipped with the .INI files, the .BAT file, the .AVS file, the .LOG file, and the .MP2 file (note slight differences in the .INI files) - (1.5mb) -
Download-Link: http://rapidshare.com/files/82078014/test.zip.html
The .AVS
SetMemoryMax(256)
#
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins-dcw\mt_masktools.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins-dcw\RemoveGrainSSE2.dll")
Import("C:\Program Files\AviSynth 2.5\LimitedSharpenFaster.avsi")
#
FRAMERATE=25
WIDTH=704
HEIGHT=576
#
global resizeWidth = 704
global resizeHeight = 576
global resizeBorderHalfHeight = 0
#
AviSource("D:\HDTV\c03\test.avi", audio=false)
AssumeFPS(25)
#
#Trim(0,-1500)
#
LimitedSharpenFaster(smode=4, dest_x=resizeWidth, dest_y=resizeHeight)
#
Converttoyv12()
#
SetPlanarLegacyAlignment(True)
The .BAT :-
echo on
"C:\SOFTWARE\ffmpeg\ffmpeg.exe" -i "D:\HDTV\c03\test.avi" -ab 192k -ar 48000 -ac 2 -acodec mp2 -y "D:\HDTV\c03\test.mp2"
"C:\SOFTWARE\HC\HCenc_021.exe" -ini "D:\HDTV\c03\test-021.ini"
"C:\SOFTWARE\HC\HCenc_021.exe" -ini "D:\HDTV\c03\test-021-progressive.ini"
"C:\SOFTWARE\HC\HCenc_022.exe" -ini "D:\HDTV\c03\test-022.ini"
"C:\SOFTWARE\HC\HCenc_022.exe" -ini "D:\HDTV\c03\test-022-progressive.ini"
pause
The output .MPVs range between 6.5Mb and 7.5Mb each -
Download-Link #2: http://rapidshare.com/files/82078015/test-021.mpv.html
Download-Link #3: http://rapidshare.com/files/82078016/test-021-progressive.mpv.html
Download-Link #4: http://rapidshare.com/files/82078017/test-022.mpv.html
Download-Link #5: http://rapidshare.com/files/82078018/test-022-progressive.mpv.html
Delete Links :-
Delete-Link #1: http://rapidshare.com/files/82078014/test.zip?killcode=16676761579340406147
Delete-Link #2: http://rapidshare.com/files/82078015/test-021.mpv?killcode=11572470511075943680
Delete-Link #3: http://rapidshare.com/files/82078016/test-021-progressive.mpv?killcode=7649425213280276128
Delete-Link #4: http://rapidshare.com/files/82078017/test-022.mpv?killcode=8225979848388166894
Delete-Link #5: http://rapidshare.com/files/82078018/test-022-progressive.mpv?killcode=5361686554984333942
edit: the 022 DVD worked on one standalone player (brand unknown), however it stuttered badly on 2 late-model Sonys and 3rd "other" too.
ron spencer
8th January 2008, 17:42
any update on this?
Boulder
8th January 2008, 18:29
You might want to try lowering the maximum and average bitrates and test that too. I'm sure hank will respond when he has the time :)
cweb
8th January 2008, 21:32
Does anyone have problems running hcenc 022 (gui) via a remote desktop? Encoding stops if hcenc has been started before the connection is started.
halsboss
8th January 2008, 22:52
You might want to try lowering the maximum and average bitrates and test that too. I'm sure hank will respond when he has the time :)
OK. :thanks: I authored a DVD with all of the clips and a menu, so I could compare the effect. Adding the clip created with the settings below resulted in the same stuttering at the same places for that clip ...
*INFILE D:\HDTV\c03\test.avs
*OUTFILE D:\HDTV\c03\test-022-6000.mpv
*LOGFILE D:\HDTV\c03\test.log
*PROFILE BEST
*ASPECT 16:9
*BIAS 30
*BITRATE 6000
*MAXBITRATE 6400
*LASTIFRAME
*AUTOGOP
*PULLDOWN
*CLOSEDGOPS
*DC_PREC 10
*LUMGAIN 3
*PRIORITY NORMAL
*CQ_MAXBITRATE 3
*MATRIX MPEG
hank315
8th January 2008, 23:22
@halsboss
Just looked at the clips, I couldn't find any errors in all four.
The main difference between the HC021 and HC022 encodes is the bitrate for HC022 is a bit higher but not too high.
The higher bitrate using HC022 is caused by the LUMGAIN command which adapts the matrices.
Some players don't like that, it's similar to the adaptive Q-matrix switching by CCE, in HC022 it's applied more frequently.
Please try the HC022 encode without the LUMGAIN command.
@manolito
About the VBV underflow issue Nomulu reported, I can replicate that one, got the source file from Nomulu.
It will be fixed in the next release, it's the last thing to do, always best to do the most difficult part last :(
halsboss
9th January 2008, 01:00
Please try the HC022 encode without the LUMGAIN command.
:thanks: hank.
Yes, removing *LUMGAIN 3 and leaving the rest at high bitrate etc did resolve the problem on the standalone players. I liked the *LUMGAIN too, but cannot be confident whether a result will play on standalone DVD players (previous encodes had worked !). This encode with *LUMGAIN 3 worked on only 1 of 4 standalone DVD player models tried, with the Aus n and n-1 model Sony's failing. Jolly, bother, and dash it all :). Oh well, I'll move to 022 and omit the problematic *LUMGAIN from now on even though HC is producing "the right thing" with it.
Thanks once again for a terrific software, hank.
ron spencer
9th January 2008, 02:56
I have never used LUMGAIN. Can someone tell me exactly what it is for and when to use it...perhaps a sticky is needed on this as it seems to be all the rage. It alters bitrate right? Is that what the issue is with standalones?
thanks!!!
halsboss
9th January 2008, 05:19
022 pdf manual says
*LUMGAIN
parameter sensitivity (0 - 4) type integer
Status not required
Default 0
Example *LUMGAIN 2
This command adapts the quantization matrices on dark scenes so the bitrate will be raised.
• 0 no change
• 1 mild change
• 2 moderate change
• 3 heavy change
• 4 hit dark scenes real hard
Not sure of the exact issue, hank said
caused by the LUMGAIN command which adapts the matrices
ron spencer
9th January 2008, 15:56
duh...I am an idiot.....never read the manual...sorry.
I guess one needs to know the bitrate gain for the options set, so that the stuttering problems some have faced are avoided.
thanks....
halsboss
9th January 2008, 23:18
I don't know how to find the bitrate gain :)
The mpv's are in this post http://forum.doom9.org/showthread.php?p=1084341#post1084341
and the latest mpv without the *LUMGAIN is at http://rapidshare.com/files/82567023/test-022-no-lumgain.mpv.html which I guess one could compare to http://rapidshare.com/files/82078017/test-022.mpv.html
Are you sure it's only bitrate gain and not matrices changing or something ? (I don't know what's in an mpv, so I don't know if that's a valid question). The reason I ask is that muxman accepted the mpv as valid.
The 1st stutter is within the first few seconds. The audio keeps going but the picture freezes for a second or two.
Delete-Link #1: http://rapidshare.com/files/82567023/test-022-no-lumgain.mpv?killcode=16058216441092167457
ron spencer
9th January 2008, 23:53
hank may need to document the gain....and then we can alter our encode.
mashiwen
15th January 2008, 20:49
"DirectShowSource ("main1.grf",fps=23.976,framecount=158725,audio=false)"
I think framecount is a new command in avis v 2.5.7,and HCenc 022 says that DirectShowSource doesn't have a named argument"framecount":thanks:
cweb
15th January 2008, 21:44
Did anyone else encounter a problem connecting via remote desktop to a running hc encoder, since this seems to just stop and not continue encoding when you do this?
MrC
16th January 2008, 13:33
Constant Quantization issue.
AVS Script:
DirectShowSource("E:\Movies\clip.avi", convertfps=true)
ConvertToYV12
Lanczos4Resize(720,576)
SSRC(48000)
Using HCenc thru CLI, output is very very flickering and blocky:
-i "C:\Documents and Settings\CORSIE\Desktop\prova.avs" -o "E:\Movies\VideoCQP.m2v" -maxbitrate 8000 -profile fast -aspectratio 4:3 -nointerlaced -dc_prec 8 -matrix MPEG -cq_maxbitrate 4.667 -wait 2
Using HCenc thru INI file, output is fine and encoding is faster:
______________________________________________
*infile C:\Documents and Settings\CORSIE\Desktop\prova.avs
*outfile E:\Movies\videocqp.m2v
*maxbitrate 8000
*profile fast
______________________________________________
*cq_maxbitrate 4.667
*matrix MPEG
______________________________________________
*dc_prec 8
*progressive
*aspect 4:3
*bias 30
______________________________________________
I think that encoding options are exactly the same... So why that difference?
:confused:
Bye
Mr_Odwin
16th January 2008, 14:59
Constant Quantization issue.
AVS Script:
DirectShowSource("E:\Movies\clip.avi", convertfps=true)
ConvertToYV12
Lanczos4Resize(720,576)
SSRC(48000)
Using HCenc thru CLI, output is very very flickering and blocky:
-i "C:\Documents and Settings\CORSIE\Desktop\prova.avs" -o "E:\Movies\VideoCQP.m2v" -maxbitrate 8000 -profile fast -aspectratio 4:3 -nointerlaced -dc_prec 8 -matrix MPEG -cq_maxbitrate 4.667 -wait 2
Using HCenc thru INI file, output is fine and encoding is faster:
______________________________________________
*infile C:\Documents and Settings\CORSIE\Desktop\prova.avs
*outfile E:\Movies\videocqp.m2v
*maxbitrate 8000
*profile fast
______________________________________________
*cq_maxbitrate 4.667
*matrix MPEG
______________________________________________
*dc_prec 8
*progressive
*aspect 4:3
*bias 30
______________________________________________
I think that encoding options are exactly the same... So why that difference?
:confused:
Bye
I had this problem too. I don't think I speak out of turn when I say that hank is now aware and has already implemented a fix for the next release.
Graigddu
21st January 2008, 12:08
Can i ask whether there would be a better matrix for xvid encoding than the default MPEG or BACH 1 which i have tried,
i have also changed autogop to 12 and set lumigain to 2 and bias to 30 in the HCGui and use Mr Odwin's FAVC for the main setting changes but would another matrix work better at smoothing macroblocking in darker scenes.
Sorry if this is posted in wrong area still a newbie on here
foustapfe
25th January 2008, 21:31
Just for the record, the problem I reported some time ago ( 1 (http://forum.doom9.org/showthread.php?p=1039444#post1039444) and 2 (http://forum.doom9.org/showthread.php?p=1041798#post1041798)) is fixed in 0.22.
I don't know it is has been fixed actively or as a side effect of some other changes. Anywas, thanks Hank for this encoder that gets better every day!
AlanHK
28th January 2008, 02:18
I also had a problem with CQ mode.
I got underruns when muxing the resulting file. After a long time spent making new audio files, thinking that was the problem, I finally realised that the video bitrate was too high, (the logfile showed it to be 12,000) and that was because I had not selected the "max bitrate" option on "Settings 1" . It would be nice if this was selected by default.
But later a related problem. I then ran a batch job with my usual options (2-pass) overnight. I was surprised and annoyed to find that the jobs were done in CQ mode, though I had not specified this in the command line. Of course, I found that the default ini file now had a *CQ line.
There appears to be no way to override this on the command line. So to protect myself against this I must make a minimal ini file and tack a "-ini" option to all my batch commands.
Could there be an option like "2pass=yes", or "cq=0" that will override any *CQ in the ini?
Also something like "frames=all"; I am bodging that now with
"-frames 0 999999" in case there is an old "*FRAMES" line in the ini.
hank315
17th February 2008, 22:51
New (beta) release of HC022.
This release (HC022.1) fixes most of the reported bugs and has some new features.
Bug fixes:
- CQ as parameter input fixed
- possible VBV underflow errors fixed
- reported time using suspend/resume fixed
- error in framelog file fixed
New stuff:
- lossless intermediate file for 2 pass encodes
- VBV progress bar changed, now shows the buffer fullness
- added return code, returns 0 on normal exit, 1 on error
- small bitrate control tweaks
- XML format chapter input
- added -2pass, -frames all, -noini and -lossless as parameter for CLI input
- user data skipped for HD encodes
- some optimizations for SSSE3, reducing the number of non-aligned memory reads
This one is released as a beta first because of a *lot* of internal changes.
It does OK running my usual tests, but some extra testing won't hurt :) so please do...
Can be downloaded here: www.mediafire.com/?9pozg2ynimz (link updated)
Sharc
17th February 2008, 23:51
I am getting the ERROR:
No MMX detected, aborting .....
neuron2
17th February 2008, 23:56
What is your processor?
Sharc
18th February 2008, 00:07
Intel P4 2533 MHz Northwood :(
neuron2
18th February 2008, 00:17
Ha ha, I get the same error and I have an FX-55.
mikeytown2
18th February 2008, 03:20
hank315
I did a quick test, it works on my box. specs in sig.
Also I'm a little curious about the lossless option. Are you using huffyuv, uncompressed, ect? You might want to have an option to put the lossless file somewhere. In my case i have multiple harddrives. And the one with the temp dir might be full. A very simple estimation of the temp file size might be helpful as well. Thanks for implementing this btw!
AlanHK
18th February 2008, 07:20
I am getting the ERROR:
No MMX detected, aborting .....
Me too.
I have an AMD, 2400 MHz, and quite definitely it DOES have MMX.
Fluffbutt
18th February 2008, 10:04
Working fine here, Q6600.
AlanHK
18th February 2008, 11:11
Looks like Intel is okay, AMD is no-go.
Boulder
18th February 2008, 11:13
Sharc has an Intel processor so that cannot be the problem.
EDIT: It looks more like a problem where older CPUs are not treated correctly.
cweb
18th February 2008, 11:54
Sharc has an Intel processor so that cannot be the problem.
EDIT: It looks more like a problem where older CPUs are not treated correctly.
My AMD is working in fact..
hank315
18th February 2008, 17:26
Small typo in the cpu_identify routine :(
It now only recognizes SSE3 and SSSE3 capable CPUs.
Fixed, package updated: www.mediafire.com/?9pozg2ynimz
Also I'm a little curious about the lossless option. Are you using huffyuv, uncompressed, ect? You might want to have an option to put the lossless file somewhere. In my case i have multiple harddrives. And the one with the temp dir might be full. A very simple estimation of the temp file size might be helpful as well. Thanks for implementing this btw!
No, it's not huffyuv. It's a just a 'quick and dirty' compression scheme, compression varies from 25 - 60% dependent of the source.
It isn't very optimized yet, think I can get more compression out of it. Speed is comparable with huffyuv.
Because the amount of compression is dependent of the source it's hard to estimate the size but I can provide a very rough estimate.
The file is now written in the same directory as the database file, maybe better to give it it's own disk/directory.
Sharc
18th February 2008, 19:28
Works like a charm now. :thanks:
Nomolu
19th February 2008, 05:15
This new version, 22.1, does indeed fix the VBV underflow error that I reported. But, Hank, you probably knew that already from using the sample I provided for your own testing. :cool:
Sounddude
21st February 2008, 08:27
HC 22 keeps crashing on me..the older versions do not. Any ideas?
Boulder
21st February 2008, 08:32
Keeps crashing - in what way?
Sounddude
21st February 2008, 18:57
Keeps crashing - in what way?
As soon as I add an .avs file it (HC22) closes and windows wants to send an error report.
Boulder
21st February 2008, 19:26
What is your script, and what Avisynth version do you have installed?
G_M_C
22nd February 2008, 09:55
Dark Shikari is on a roll, he's adapted the X264 VAQ-patch to Xvid. So i ask myself if the same idea might be used on HCEnc (making/replacing the luminance filter/adapter, for a more teature-rich idea ?)
See my question to Dark Shikari here: http://forum.doom9.org/showthread.php?p=1103569#post1103569
About the VAQ-idea, see here: http://forum.doom9.org/showthread.php?t=132760
Mods: Sorry for the cross-posting :)
LigH
22nd February 2008, 19:37
Dear hank315,
are you able to implement a support for the "Pan&Scan" flag (some DVD players recognise such a flagged material "4:3 P&S" in contrast to "16:9 Widescreen")?
I can imagine that it may not be as trivial as it seems... the "Picture Display Extension" specs are not easy to understand (for me). For example, I don't know if there is a "default" display window position (top left, or centered)... You could cross-check with the result of "ReStream".
This is a request of your favourite german fan lady... ;)
peter100m
22nd February 2008, 19:44
I just want to second the request LigH has. Ability to set the sequence display extension (Pan & Scan info) would be a nice addition to fine HC.
Lorax2161
22nd February 2008, 20:48
Many thanks to hank315 for his contribution of a high quality program such as HCEnc. I haven't missed the programs I've stopped using since I found this. As noted in the title of this post, you've seen my feature request. First, I'll say I don't program so I have no idea how much work is involved. I do respect your time and only offer this request as a suggestion for future thought.
There is already a preview window in the GUI version of the program that could possibly be used to display a bit rate/quant graph with an extra toggle option added to "OFF" and "Preview." This would not have to be incredibly detailed, just something that updated every "X" GOPs, seconds, or minutes... whichever was easier. As a bar or line graph, it would allow the end user to see in CQ mode when the bit rate spiked or plummeted, and during the second pass in the two pass method it could show the same for the quantizer.
An advantage of having this in the encoder vs running the resulting video file through a different program is that if the results are coming to you in near real time, you can act on them sooner rather than waiting for the entire encoding to finish. This could allow for a more immediate switch in CQ, filters, matrix's, or average bit rate to get the results one was looking for.
My main use for HCenc is tv captures: DV, NTSC, 720x480, 29.971fps, interlaced. Unlike a movie backup, I have natural divisions in my projects due to the commercial breaks. After removing the commercials, for my example below we will assume there are six clips of 7min 30sec duration each, comprising the 45 minute episode. I'm speculating that I could exploit the benefit of VBR even more if I knew that the bit rate or quant (depending on encoding method) spiked during most of Clip 5 of my six clips. I could then encode it as a separate movie and author it as it's own VTS. This would, as I understand it, allow me to use a different CQ, bit rate, matrix, or filter/function/script combo on this one part of the tv episode.
Example of 1 hour tv show edited, now totaling 45 min (7min 30sec each):
Clip 1 - Treatment "A" (filters, matrix, CQ), VTS 1
Clip 2 - Treatment "A" (filters, matrix, CQ), VTS 1
Clip 3 - Treatment "A" (filters, matrix, CQ), VTS 1
Clip 4 - Treatment "A" (filters, matrix, CQ), VTS 1
Clip 5 - Treatment "B" (filters, matrix, CQ), VTS 2
Clip 6 - Treatment "A" (filters, matrix, CQ), VTS 3
The purpose of doing it this way is that I could use a very slow but high quality script to denoise and/or sharpen the one segment whose scenes demanded it the most.
In an action tv show, this might be the last segment going for the "big finish" of fist fights, car chases, machine guns, explosions, etc. In a documentary about earthquakes, it might be the middle segment that features actual footage of a natural disaster or computer graphics simulating a hypothetical one. In neither case would I need to run a script of 20 or 30 times real time on a scene where a scientist was talking about seismology from behind a desk or a family was having dinner. It's overkill. But I would consider running that kind of script on the most visually demanding seven and half minutes of the show, while leaving speedier filters to run on the less demanding clips.
If nothing stood out, I could just encode the episode as one movie. If the bit rate/quant graph showed that one portion spiked above the others I could make the decision that I wanted to split the episode into multiple movies, author as separate VTS pieces, and filter that most demanding clip with a special treatment, while the other clips received a more mild and speedier treatment.
As long as the quiet "dinner scenes" or "smart guy behind a desk" scenes looked good, I don't think that 25 minutes later when the high drama/fast action took place that the average viewer would think anything had changed--just that the episode looked pretty good at all times, whether they were demanding scenes or not. And by using the time consuming treatment on only 1/6 of my episode, I've saved a considerable amount of encoding time.
There may be flaws in some of my logic and I am open to all viewpoints, but I will just part with saying that I am grateful to hank315 for the encoder as it was made available to us.
hank315
22nd February 2008, 23:05
are you able to implement a support for the "Pan&Scan" flag (some DVD players recognise such a flagged material "4:3 P&S" in contrast to "16:9 Widescreen")?
I can imagine that it may not be as trivial as it seems... the "Picture Display Extension" specs are not easy to understand (for me). For example, I don't know if there is a "default" display window position (top left, or centered)... You could cross-check with the result of "ReStream".
This is a request of your favourite german fan lady...
Hi Ligh,
Well, I can't refuse a request from a nice lady but it isn't very straightforward:confused:, is there a software player out there which supports it? (for testing purposes)
hartford
24th February 2008, 04:44
I encoded 2 vids today using v.022 and when I authored them with DVDMaestro I got an error: bit rate too high. BitRateView gave rates over 11.1K.
I used 4000K ave, 9000k max, Best Profile, 9-bit dc. Lowering Max bitrate to 8500 fixed the problem.
Just providing info on my experience because this hasn't happened previously.
Audio was 192K ac3.
Just checked my last encode using BitRateView: max was 10.254k with HCenc set for 8.5K max.
Boulder
24th February 2008, 09:34
Regarding Sharc's post here: http://forum.doom9.org/showthread.php?p=1104478#post1104478, does the source mismatch mean that all frames starting from that frame do not match the ones that were analyzed during the 1st pass?
LigH
24th February 2008, 18:05
@ hank315:
We are testing hardware players (http://forum.gleitz.info/showthread.php?t=36908), and bigotti5 added a few notes about which places need to get changes or additions in the streams. There are two "extensions" with some effect here (sequence and display).
Most players will possibly only recognise the existence of P&S, but not the location, and center it.
hank315
24th February 2008, 20:44
@hartford
This isn't enough info :(
Please:
- re-encode at 9000 max. bitrate with framelog file enabled
- mux it with Muxman
Can't PM you, could you please enable it...
@Ligh
OK, read the stuff at the Gleitz forum, think it can be done...
BTW, about that test sequence by Bigotti5, the square didn't move using SW players :)
@Lorax2161
Nice idea...
Something to implement when I have a lot of spare time.
So it might take a while :)
AlanHK
25th February 2008, 02:15
A couple requests:
The name-case bug was briefly fixed, but came back a few versions ago: using command line, the output m2v filename is forced lowercase.
(Episode_One.m2v becomes episode_one.m2v)
Please make it use the case I give it.
Requested command line option: in the gui you can choose the final filesize and the bitrate is calculated.
I would like to be able to specify the target size in kb (instead of the bitrate) on the command line:
-filesize 602525
It would save loading the file in the GUI or using an external rate calculator.
And yes, the latest bugfix now recognises my 2-year-old AMD.
fib0by
25th February 2008, 04:00
hi
When converting an vc1 evo to mpeg2 using hc.22 im getting an error source mismatch in pass 2 starting at frame: 109 in my log.this has happened twice now. encoding completes and everything looks correct just wondering what that error means.
Thanks
heres what it looks like in my log
---------------------
| encoding - pass 2 |
---------------------
*** ERROR, source mismatch in pass 2 starting at frame: 109
I was getting the same error with 0.22
I tried "Reload Avisynth" but that causes the SoundOut plugin to be run twice instead of once (I'm using that plugin to generate the AC3 track out of the DV file).
I tried 0.22.1 with the -lossless option. It seems to eliminate the "source mismatch", but it causes a different and interesting failure mode: SoundOut runs quickly and finishes the job while HCenc is still processing the first few frames - and while SoundOut is still running, sometimes I get corrupted frames in the video stream. Badly corrupted, as in just a mess of colored squares. The corruption never occurs later, after SoundOut has finished.
I believe the source mismatch errors used to occur the same way - only for the fist frames, while SoundOut was running, but I'm not 100% sure.
I ended up running SoundOut and HCenc -lossless in two separate steps, and then there's no corruption.
By the way, with -lossless the transcoding job becomes disk-bound instead of CPU-bound.
EDIT: I am actually running all this stuff on Linux, under WINE. There seems to be no problem with the emulation, but anyway, take my findings with a grain of salt.
LigH
25th February 2008, 15:20
OK, read the stuff at the Gleitz forum, think it can be done...
That will make katjarella http://cosgan.de/images/smilie/froehlich/e025.gif
Boulder
26th February 2008, 07:49
I've also been getting source mismatch errors with HC0.22.1, even with the *AVSRELOAD option. The mismatch is always reported to happen during the first tens of frames or so.
I just left HC022 and HC022.1 to run a series of 2-pass encodes using the exact same script and ini file and see how the log files look when I get back home. IIRC I've not seen the error under the same circumstances in HC022.
LigH
26th February 2008, 08:10
Never use "DirectShowSource" in your script if you want to get a repeatable result. Never!
...
And if you really have no other choice, use "seek=true" or "seekzero=true" and check if they help.
If you did not, I have no other good guess about the reason.
Boulder
26th February 2008, 08:18
Never use "DirectShowSource" in your script if you want to get a repeatable result. Never!
...
And if you really have no other choice, use "seek=true" or "seekzero=true" and check if they help.
If you did not, I have no other good guess about the reason.Hehe, I wasn't born yesterday:) My method is MPEG2Source -> motion compensated denoising -> HC so that can probably be ruled out..but I need to doublecheck that too by using a script with only MPEG2Source in it. Then again, if HC022 shows no errors and HC022.1 does, there's something in the new HC version.
cweb
26th February 2008, 08:56
Never use "DirectShowSource" in your script if you want to get a repeatable result. Never!
...
And if you really have no other choice, use "seek=true" or "seekzero=true" and check if they help.
If you did not, I have no other good guess about the reason.
Hehe just encoded a short clip with directshowsource, all went well..
Sharc
26th February 2008, 15:38
Regarding Sharc's post here: http://forum.doom9.org/showthread.php?p=1104478#post1104478, does the source mismatch mean that all frames starting from that frame do not match the ones that were analyzed during the 1st pass?
Yes.
If you get the frame mismatch error, the output can be *very* bad, all calculated values from the first pass (Motion Vectors, quants etc.) are applied on the wrong frames in the second pass. The result will still be a valid MPEG file but bad quality... *AVSRELOAD sometimes solves the problem.
hank315 is currently investigating further.
Added:
Apparently there are cases with "small errors" caused by avs filters where only few (1 to 3) consecutive frames are affected (perhaps a couple of times during the movie), and there are "large errors" with directshowsource where everything following the first misalignment is screwed up.
Boulder
26th February 2008, 16:17
Unfortunately my initial test shows that both 0.22 and 0.22.1 have the error. I'm now going to run a series of tests with only MPEG2Source and Trim and see what happens.
Boulder
26th February 2008, 17:12
A quick test shows no errors with a simple MPEG2Source-only script:confused:
Boulder
26th February 2008, 17:42
For example this one causes the issue:mpeg2source("D:\TEMP\DVD-RIP\REBUILDER\D2VAVS\V03.D2V",idct=3)
source=last
fields=source.AssumeTFF().SeparateFields() # or AssumeBFF
backward_vec2 = fields.MVAnalyse(isb = true, delta = 2, pel = 2, overlap=4, sharp=2, idx = 1)
forward_vec2 = fields.MVAnalyse(isb = false, delta = 2, pel = 2, overlap=4, sharp=2, idx = 1)
fields.MVDegrain1(backward_vec2,forward_vec2,thSAD=400,idx=1)
Weave()
This one doesn't:mpeg2source("D:\TEMP\DVD-RIP\REBUILDER\D2VAVS\V03.D2V",idct=3)
source=last
backward_vectors = source.MVAnalyse(isb = true, truemotion=true, delta = 1, idx = 1)
# we use explicit idx for more fast processing
forward_vectors = source.MVAnalyse(isb = false, truemotion=true, delta = 1, idx = 1)
forward_compensation = source.MVFlow(forward_vectors, idx=1, thSCD1=500) # or use MVCompensate
backward_compensation = source.MVFlow(backward_vectors, idx=1, thSCD1=500) # or use MVCompensate
# create interleaved 3 frames sequences
interleave(forward_compensation, source, backward_compensation)
DeGrainMedian() # place your preferred temporal (spatial-temporal) denoiser here
selectevery(3,1) # return filtered central (not-compensated) frames only
It seems that all that include MVDegrain cause the issue - could there be some variable conflict between the encoder and the function?
hank315
26th February 2008, 19:08
There are no changes how the mismatch is calculated between HC022 and HC022.1.
How it's done:
- there's one check MacroBlock per frame, it's in the middle of the frame
- in the first pass, the 256 Y (luminance) values for that MB are summed, sum is stored
- in the second pass the same MB is checked and the sum is compared, should be exactly the same
So I don't check if there's a large difference which could mean a completely different frame is served (bad) or a very small difference which could be a filter hiccup.
Boulder
26th February 2008, 19:13
The mismatch error occurs in both HC022 and HC022.1 using the above script:( What about HC021, does it report the mismatch in the log file?
hank315
26th February 2008, 19:20
No, HC021 doesn't check for it at all.
Sharc
26th February 2008, 21:47
Never use "DirectShowSource" in your script if you want to get a repeatable result. Never!
...
And if you really have no other choice, use "seek=true" or "seekzero=true" and check if they help.
Adding "seekzero=true" has helped in my case. Anyway it seems to better not to use DirectShowSource at all.
Thanks for the hint.
Chumbo
1st March 2008, 20:40
Adding "seekzero=true" has helped in my case. Anyway it seems to better not to use DirectShowSource at all.
Thanks for the hint.
I've run into this with avs files that use avisource too. I've muxed vc1 streams into an avi container and a simple script like this also generates this error:avisource("file.avi")
converttoyv12()
I've noticed that the MS VC-1 decoder sometimes decodes a frame as all green when seeking randomly just trying to see what happens. Can this be the cause?
Also, and please correct me if I'm wrong, that this error can actually only impact one frame and not everything after assuming the served frames continue sequentially as they did in the first pass. So if the error is on frame 9, but frame 10, on the second pass is the same frame 10 served on the 1 pass, things should match up for the remainder of the encode right?
phXql
2nd March 2008, 12:29
The ffdshow huffyuv implementation has the same issue, some frames are decoded wrong. If you reload the script, the same frame will then decoded right. So this should only impact one frame, and the rest is okay.
ron spencer
2nd March 2008, 23:44
is anyone using 0.22.1 beta? Just curious how "safe" is it
rcubed
4th March 2008, 08:51
Hank,
If there are two instances of HC022 running on a dual processor, and the shutdown option is selected in one of them, what happens if that instance finishes before the other one (without shutdown selected) finishes? Will both be allowed to finish before the shutdown occurs or does the shutdown happen when the one checked finished regardless.
Thanks
rucbed
cweb
4th March 2008, 08:54
is anyone using 0.22.1 beta? Just curious how "safe" is it
I'm using it and had no problems. I don't use huffyuv at the moment.
mparter
9th March 2008, 13:38
Newbie question alert :eek:
I'm encoding a VC-1 source which has an aspect ratio of 2.40:1. Which aspect ration should I use, 16.9:1 or 2.21:1?
Also, I have a dual core Athlon X64, should I enable the SMP option or use the HCEnc^n front-end to ensure that both cores are used?
Thanks for an excellent free tool :)
cweb
9th March 2008, 14:00
Also, I have a dual core Athlon X64, should I enable the SMP option or use the HCEnc^n front-end to ensure that both cores are used?
Thanks for an excellent free tool :)
I enable the SMP option. I haven't tried the HCENC^n front-end.
Irakli
9th March 2008, 21:47
Newbie question alert :eek:
I'm encoding a VC-1 source which has an aspect ratio of 2.40:1. Which aspect ration should I use, 16.9:1 or 2.21:1?
I think it's better to add black bars to top and bottom of your source to make it 16:9 and encode as 16:9 in HC.
Otherwise, the aspect ratio will be distorted. Also, 2.21:1 is not supported for DVD.
Regards,
Irakli
Boulder
9th March 2008, 22:09
A little bug in HC022.1: when the lossless option is enabled and you abort the encoder during the first pass, the temporary lossless file is not deleted from the db directory.
A feature request regarding the lossless file: would it be possible to show an estimated final size for the file?
mparter
10th March 2008, 15:24
I've been getting the source mismatch errors on my first attempts at using HC to encode a VC-1 source to MPEG2.
Last night, I installed the latest version of AviSynth (2.8 Alpha2 I think). Also, when using EvoDemux, I removed everything from the source and left only the main movie in and remuxed this to a single EVO file.
I then created a graph using the Haali Media Splitter as the input for the EVO and the WMVideo decoder as the output. I then used this in a basic AviSynth script using a DirectShowSource with the usual parameters, e.g. framerate, seek, etc
I then ran this through HC setting the avg bitrate at 10000 with a max of 20000, a DC Prec of 10, the MPEG matrix and the Normal profile.
I haven't had a chance to check the file yet but this time I got no errors, with the ecnode taking around 9.5 hrs :)
In essence the only things I did different were;
Updated AviSynth to 2.5.8 (Alpha2)
Made sure the EVO contained only video
Used the Normal profile in HC instead of Best
Chumbo
10th March 2008, 22:25
I've been getting the source mismatch errors on my first attempts at using HC to encode a VC-1 source to MPEG2.
Last night, I installed the latest version of AviSynth (2.8 Alpha2 I think). Also, when using EvoDemux, I removed everything from the source and left only the main movie in and remuxed this to a single EVO file.
I then created a graph using the Haali Media Splitter as the input for the EVO and the WMVideo decoder as the output. I then used this in a basic AviSynth script using a DirectShowSource with the usual parameters, e.g. framerate, seek, etc
I then ran this through HC setting the avg bitrate at 10000 with a max of 20000, a DC Prec of 10, the MPEG matrix and the Normal profile.
I haven't had a chance to check the file yet but this time I got no errors, with the ecnode taking around 9.5 hrs :)
In essence the only things I did different were;
Updated AviSynth to 2.5.8 (Alpha2)
Made sure the EVO contained only video
Used the Normal profile in HC instead of Best
Thanks for sharing this info. I've had nothing but problems with vc1 and this error. I've tried several containers, splitters, and on and on. This weekend alone, I tried reencoding my vc1 source 5 or 6 times with each one having the mismatch error.
I'm going to try avisynth 2.5.8 alpha 2 and see if that makes a difference.
btw, if you're doing HBR reencodes, consider using the Professional matrix. :)
mparter
10th March 2008, 22:43
No problem. Don't know much about this stuff but happy to share my findings, etc
My encode was fine. When muxed with the ac3 the audio was out of sync but fixed this by using a delay of 1000ms :)
Is the "Professional" matrix a custom one because I don't have it in my list of matrices?
Chumbo
11th March 2008, 02:20
...Is the "Professional" matrix a custom one because I don't have it in my list of matrices?
You have to browse and select the file professional.cqm from the matrix folder.
Rogi
11th March 2008, 19:04
First of all, many thanks for this wonderful piece of software, and must admit I use it exclusively.
I have one small question, do you consider implementation of minimum bitrate option?
Thank you in advance for your answer.
ron spencer
11th March 2008, 19:52
min bitrate could be good, but most use VBR Bias of 30 to achieve a reasonable effect in this case
mparter
12th March 2008, 08:59
Thanks for sharing this info. I've had nothing but problems with vc1 and this error. I've tried several containers, splitters, and on and on. This weekend alone, I tried reencoding my vc1 source 5 or 6 times with each one having the mismatch error.
I'm going to try avisynth 2.5.8 alpha 2 and see if that makes a difference.
btw, if you're doing HBR reencodes, consider using the Professional matrix. :)
Did you get any further with this? Since changing, I've done 3 encodes and all have been fine.
Chumbo
13th March 2008, 03:18
Did you get any further with this? Since changing, I've done 3 encodes and all have been fine.
LOL, I just got on to provide the info. :) Thanks for asking.
No luck unfortunately. I did several encode runs with 2.5.8 of avisynth and it made no difference. If anything, one thing seemed consistent, the error always apeared very early on in the 2nd pass, in the first 2000 frames. Also, the error mismatch message is now "printing" twice, back-to-back in the log.
I was using the professional matrix in all the cases. I'm running another one now using the MPEG STANDARD matrix just out of curiosity. If it doesn't show the error, I'll run it a couple more times just to be sure.
btw, I've never run into this issue with anything but vc-1 sources. And it doesn't matter what splitter, container, decoder and so on I use, I very rarely get a clean 2-pass encoding with vc-1. Just agonizing.
Boulder
13th March 2008, 05:28
What script did you use, and did you enable the Avisynth script reloading in HC? You could use the lossless file mode if you have the extra HD space for it.
Chumbo
13th March 2008, 15:34
Well, I've used many scripts with different setting when I started having this problem. Mainly tried every seek setting and different containers, e.g., avi. But here's my usual script that I use:directshowsource("video.grf",fps=23.976,audio=false,seekzero=true,framecount=xxxxxx)
converttoyv12()My graphedt graph is usually Haali Simple Splitter->WMVideo Decoder DMO, but I've had the problem too with others, e.g., File Async->Sonic HD Demuxer->Sonic Video Decoder.
Yes, I've tried both, reloading and not reloading AVS. Per my message above, I just tried installing 2.5.8 Alpha 2 to see if it impacts anything. I tried a different matrix too and that didn't help.
I'll use the 22.1 Beta and select the lossless option now and see if that makes a difference. Thanks for that suggestion. :)
mparter
13th March 2008, 18:10
Well, I've used many scripts with different setting when I started having this problem. Mainly tried every seek setting and different containers, e.g., avi. But here's my usual script that I use:directshowsource("video.grf",fps=23.976,audio=false,seekzero=true,framecount=xxxxxx)
converttoyv12()My graphedt graph is usually Haali Simple Splitter->WMVideo Decoder DMO, but I've had the problem too with others, e.g., File Async->Sonic HD Demuxer->Sonic Video Decoder.
Yes, I've tried both, reloading and not reloading AVS. Per my message above, I just tried installing 2.5.8 Alpha 2 to see if it impacts anything. I tried a different matrix too and that didn't help.
I'll use the 22.1 Beta and select the lossless option now and see if that makes a difference. Thanks for that suggestion. :)
I'm using the same script as you bar the converttoyv12() setting. Have (can) you tried it without that?
Chumbo
13th March 2008, 19:59
I'm using the same script as you bar the converttoyv12() setting. Have (can) you tried it without that?
HC expects yv12 input, so you have to use either the pixel_type DirectShowSource property set to "YV12" or the ConvertToYV12(). I've tried both.
I'm curious how you're able to use HC. I have tried to not use the yv12 convert but HC gave an error in every case where I omitted converttoyv12(). Are you using something in your graph like the color space converter to do that rather than in the script?
mparter
13th March 2008, 20:25
I'm curious how you're able to use HC. I have tried to not use the yv12 convert but HC gave an error in every case where I omitted converttoyv12(). Are you using something in your graph like the color space converter to do that rather than in the script?
Nope. As mentioned above, I'm only using the Haali Media Splitter and the WMVideo Decoder in my graphs.
Everything works fine. :confused:
Chumbo
14th March 2008, 04:38
Nope. As mentioned above, I'm only using the Haali Media Splitter and the WMVideo Decoder in my graphs.
Everything works fine. :confused:
Ah, you're right. I was thinking of the ones that use other decoders like Sonic's. WMVideo Decoder DMO outputs yv12 already. Duh, on my part. Sorry, I've done so many different scenarios, I'm getting them confused.
Good news though, the 22.1 Beta seems to have worked just fine using the lossless method. Used almost 100Gig for a movie that's 1hr 40min. It was faster too. So a big THANK YOU to Boulder for that suggestion. :)
I'm going to run a few more that had the mismatch errors using lossless over the next week and see how those go as well. Gotta dig up a drive for this now. ;)
phXql
14th March 2008, 11:30
Sure these mismatch errors disappear when you use the lossless file. Mismatch errors are no bug in HCEnc, they are bugs in the decoder. If the decoder doesn't output the same picture in 2nd pass as in 1st pass, a mismatch error is reported. With lossless file HCEnc doesn't use the encoder in the 2nd pass, it stores the output from the 1st pass in the lossless file and use it as source for second pass. So the picture from the 2nd pass equals the picture from the 1st pass, because it is the same picture... ;)
Chumbo
14th March 2008, 15:16
Sure these mismatch errors disappear when you use the lossless file. Mismatch errors are no bug in HCEnc, they are bugs in the decoder. If the decoder doesn't output the same picture in 2nd pass as in 1st pass, a mismatch error is reported. With lossless file HCEnc doesn't use the encoder in the 2nd pass, it stores the output from the 1st pass in the lossless file and use it as source for second pass. So the picture from the 2nd pass equals the picture from the 1st pass, because it is the same picture... ;)
I figured as much. :) Thanks for the confirmation.
AlanHK
16th March 2008, 09:20
HC crash:
I've just encoded a 13 similar files (TV episodes).
I use a batch file command:
set rate=1727
set ar=4:3
set hc=P:\HCenc\HCenc_022
set mpgd=s:\mpg\
for %%A in ( a1.avs a2.avs a3.avs a4.avs d1.avs d2.avs d3.avs d4.avs d5.avs d6.avs d7.avs e1.avs e2.avs)
do (
%hc% -i %%~fA -o %mpgd%%%~nA.m2v -b %rate% -aspectratio %ar% -pulldown -profile best -matrix qlb -frames all -noini -2pass -maxbitrate 8000 -log %%~dpAhenc.log
call avsaften %%~fA
move %%~dpnA.ac3 %mpgd%
)
12 of the files worked fine. One however failed, the encode simply aborting with no error messages.
It also crashed if it was the only file listed in the batch.
The AVS opened in VDub without any problems;
AVISource("e2.avi")
EnsureVBRMP3sync()
LanczosResize(672,552)
AddBorders(24, 16,24, 8)
AmplifydB(-1.5)
Identical to the other files except for the filename and audio amp.
So I tried HCGui and it encoded with the same settings , no problems.
The respective log files are :
Failed batch file encode log:
-----------------------------------------
| HCenc - MPEG2 encoder - rel. 0.22.1.0 |
-----------------------------------------
MPEG profile@level: MP@ML
input: p:\dvd\e2.avs
output: s:\mpg\e2.m2v
--------------------
| encoder settings |
--------------------
profile: BEST
frames: 0 - 33182
framerate: 25.000
aspect ratio: 4:3
bitrate Kb/s: 1727
max. bitrate Kb/s: 8000
pulldown: no
closed gops: no
VBV check: yes
scene change det.: yes
interlaced: auto, TFF
goplen,B-pic: AUTO
dc_precision: 9
scan method: auto
bias: 0
chapter frames: 0
time code: 0 0 0 0
CPU: MMX
priority: idle
SMP active: no
matrix: QLB
luminance gain: no
------------------
| source stats |
------------------
nr. of frames in source: 33183
width*height: 720x576
fps: 25.000
nr. of frames to encode: 33183
frames to encode: 0 - 33182
Successful HCGui log:
-----------------------------------------
| HCenc - MPEG2 encoder - rel. 0.22.1.0 |
-----------------------------------------
MPEG profile@level: MP@ML
input: p:\dvd\e2.avs
output: S:\mpg\e2.m2v
--------------------
| encoder settings |
--------------------
profile: BEST
frames: 0 - 33182
framerate: 25.000
aspect ratio: 4:3
bitrate Kb/s: 1727
max. bitrate Kb/s: 8000
pulldown: no
closed gops: no
VBV check: yes
scene change det.: yes
interlaced: no, BFF
goplen,B-pic: AUTO
dc_precision: 9
scan method: zigzag
bias: 0
chapter frames: 0
time code: 0 0 0 0
CPU: MMX
priority: idle
SMP active: no
matrix: QLB
luminance gain: no
------------------
| source stats |
------------------
nr. of frames in source: 33183
width*height: 720x576
fps: 25.000
nr. of frames to encode: 33183
frames to encode: 0 - 33182
---------------------
| encoding - pass 1 |
---------------------
pass 1 encoding time: 0:33:10 (1989.81 s)
fps: 16.7
--------------------------------
| encoding - intermediate pass |
--------------------------------
bitrate set to: 1727 kb/s
est. outfile length: 279820 kB
intermediate encoding time: 0.03 s
---------------------
| encoding - pass 2 |
---------------------
pass 2 encoding time: 0:30:35 (1835.28 s)
fps: 18.1
------------------
| encoding stats |
------------------
intra matrix used
8 16 19 22 26 27 29 34
16 16 22 24 27 29 34 37
19 22 26 27 29 34 37 39
22 22 26 27 29 34 38 42
22 26 27 29 32 36 40 50
26 27 29 32 36 40 50 61
26 27 29 35 40 50 59 75
27 29 35 40 50 59 75 89
non-intra matrix used
16 17 18 19 20 21 22 23
17 18 19 20 21 22 23 25
18 19 20 21 22 23 24 26
19 20 21 22 23 24 26 28
20 21 22 23 25 26 28 29
21 22 23 24 26 28 29 31
22 23 24 26 28 29 31 34
23 24 25 28 29 31 34 38
nr. of gops: 2265
nr. of frames: 33183
nr. of I-frames: 2265
nr. of P-frames: 8966
nr. of B-frames: 21952
average bitrate: 1727
minimum bitrate: 156
maximum bitrate: 5358
bytes in bitstream: 286812667
bits in bitstream: 2294501336
average Quantizer: 6.618
total CPU time: 1:00:46 (3645.83 s)
total elapsed time: 1:03:46 (3826.26 s)
The only difference I can see is that the batch encode used
"scan method:auto" while the GUI method used "scan method:zigzag".
Trying HCGui using the "scan auto" setting did not crash, though I didn't run it to completion (the batch crashed almost immediately).
---------------
Postscript:
I made some changes in the AVS.
Original (crashes):
AVISource("e2.avi")
EnsureVBRMP3sync()
LanczosResize(672,552)
AddBorders(24, 16,24, 8)
AmplifydB(-1.5)
Delete Amplify line: DOES NOT crash:
AVISource("e2.avi")
EnsureVBRMP3sync()
LanczosResize(672,552)
AddBorders(24, 16,24, 8)
#AmplifydB(-1.5)
Delete EnsureVBRMP3sync line: DOES NOT crash:
AVISource("e2.avi")
#EnsureVBRMP3sync()
LanczosResize(672,552)
AddBorders(24, 16,24, 8)
AmplifydB(-1.5)
Delete AddBorders and simplify resize line: DOES NOT crash:
AVISource("e2.avi")
EnsureVBRMP3sync()
LanczosResize(720,576)
AmplifydB(-1.5)
However, as mentioned, the other 12 files were almost identical to the original, and did not crash.
mparter
16th March 2008, 21:40
Is it possible to use this with an h264 file? If so, can someone give me some pointers?
Thanks.
hartford
27th March 2008, 02:06
For h264 use DGAVCIndex. Feed HCenc the avs containing the result. Worked fine for me.
@hank315
Request feature
Could you add an option to CLI and INI file to setup HCenc window status? Something like:
*STATUS
parameter maximized, normal, minimized
Status not required
Default normal
Example *STATUS minimized
Thanks for your great app
:)
Bye
45tripp
2nd April 2008, 13:40
Request feature
i'll ask for gui drag and drop again please
fib0by
4th April 2008, 06:16
However, as mentioned, the other 12 files were almost identical to the original, and did not crash.
Something similar happened to me a while ago, the files were DV made with my digital camcorder.
But when I launched HCenc manually on the file that previously failed, it worked fine. :confused:
It was an isolated occurrence anyway.
EDIT: Oh, and I'm running it on Linux under WINE.
video_magic
5th April 2008, 12:14
Request feature
i'll ask for gui drag and drop again please
Is that just for the initial avs, or the avs plus an ini - or is it for a batch 'queue of jobs' feature?
45tripp
5th April 2008, 20:49
Is that just for the initial avs, or the avs plus an ini - or is it for a batch 'queue of jobs' feature?
are you going to implement it? :)
i'd be happy with drag and drop of input to gui.
although it could be done for ini as well,
and there could be a 'preset save' function added,
and batch queuing i'm sure has been requested before,
and will continue to be requested.
fib0by
5th April 2008, 21:59
and batch queuing i'm sure has been requested before
As in processing more than one file? But that's easily achievable with an external script.
I could be biased since I'm a Linux user and I'm really running HCenc under WINE (Windows Emulator) on Linux, and scripting is very strong on Linux, but I'm sure it can be done on Windows too. Just read one of the many Windows Scripting tutorials on the net, either for BAT files or VBScript it doesn't matter, then write your own script. It will be more powerful and much more flexible than any batch queuing that will ever be implemented in HCenc.
http://msdn2.microsoft.com/en-us/library/ms950396.aspx
http://www.pctools.com/guides/scripting/
http://www.pctools.com/guides/article/id/2/
My script takes a bunch of edited DV files, runs HCenc to create a video track out of each one, runs SoundOut/AviSynth to create their respective audio tracks, runs a multiplexer on each audio/video pair to create VOB files, runs a DVD authoring program on all VOB files. What's left to do at the end is just burn the DVD. And that's all in one script that I wrote in 30 minutes one day. It makes it so easy to create a DVD, since the only manual part is editing the initial DV files. Then I run the script, test the DVD image, then burn - the biggest portion of this process is fully unsupervised.
mikeytown2
6th April 2008, 00:04
I made a batch program for HCenc, its simple
http://www.autoitscript.com/forum/index.php?showtopic=58691&st=0&p=444330&#entry444330
The code needs some work, but it is functional & simple. Uses the default ini, so all files get processed the same.
phXql
6th April 2008, 08:34
If you need HCEnc batch processing, try EncSchedGui (http://forum.doom9.org/showthread.php?t=128312).
45tripp
7th April 2008, 09:34
As in processing more than one file? But that's easily achievable with an external script.
no doubt
It will be more powerful and much more flexible than any batch queuing that will ever be implemented in HCenc.
still the request will pop up,
batching within the main interface,
uncomplicated for end user.
click click click
that there were quick replies just to the hint of the feature,
and that secondary programs have been written to handle the job,
just shows how much integrating a batch tool would be appreciated.
i don't batch,
i'm a fan of the manual,
and painfully slow.
i just want drag and drop :)
but i'll be sure to check out your guys' solutions,
give them a taste.
thanks
AlanHK
7th April 2008, 10:55
still the request will pop up,
batching within the main interface,
uncomplicated for end user.
click click click
i don't batch,
i'm a fan of the manual,
and painfully slow.
i just want drag and drop :).
See HCbatchGUI (http://www.videohelp.com/tools/HCbatchGUI)
This does exactly what you want.
that there were quick replies just to the hint of the feature,
and that secondary programs have been written to handle the job,
just shows how much integrating a batch tool would be appreciated.
Actually, it shows that people can easily use HC in their own workflow.
Integrate it into a nice GUI and you lose the flexibility.
In any case Hank is a one man show, and if he spends time on that, he won't be spending time on the engine.
Since several people have made elaborate GUIs for it, why should he waste his time?
Personally, I have a couple of batch files I use. This for instance:
echo: input AVS files
echo: output m2v at constant Q and AC3
set CQrate=4.5
set ar=16:9
::set ar=4:3
set hc=P:\HCenc\HCenc_022
set mpgd=s:\mpg\
:LOOP
for %%A in (
%1
) do (
%hc% -i %%~fA -o %mpgd%%%~nA.m2v -aspectratio %ar% -pulldown -profile best -matrix qlb -frames all -cq_maxbitrate %CQrate% -maxbitrate 8000
rename %mpgd%%%~nA.m2v %%~nA.m2v
call avsaften %%~fA
move %%~dpnA.ac3 %mpgd%
)
SHIFT
if %1X==X goto END
goto LOOP
:END
type
cq avsfile1.avs avsfile2 avsfile3.avs
and it creates an m2v at constant Q and an AC3 for each AVS.
I can then drop these into GuiforDVDAuthor and generate and burn a DVD.
I make the inital AVS using FitCD, and then modify to taste. Filters, trims, etc.
It might not suit everyone, but it suits me, and the flexibility of the command line makes that possible.
I have a similar one for batching several files for a normal two-pass encode; I usually run that overnight.
45tripp
8th April 2008, 00:28
See HCbatchGUI (http://www.videohelp.com/tools/HCbatchGUI)
This does exactly what you want.
it doesn't
Actually, it shows that people can easily use HC in their own workflow. Integrate it into a nice GUI and you lose the flexibility.
why? is cli to die?
It might not suit everyone, but it suits me, and the flexibility of the command line makes that possible.
exactly.
i know
In any case Hank is a one man show,
i know
Since several people have made elaborate GUIs for it, why should he waste his time?
always reason if you look for it.
just a reminder.
i'm not requesting a batch utility,
i'm not planning on using a batch utility.
thanks for the suggestions anyway though :)
AlanHK
8th April 2008, 04:43
it doesn't
And if Hank wasted his time writing a nicer front end it probably wouldn't do what you want either.
What is it that you want, anyway?
why? is cli to die?
If Hank spends his time on a GUI, he spends less time on the core.
Quote:Originally Posted by AlanHK
Since several people have made elaborate GUIs for it, why should he waste his time?
always reason if you look for it.
Sorry, I still don't understand.
Really, why not use one of the several third-party GUIs?
just a reminder.
i'm not requesting a batch utility,
i'm not planning on using a batch utility.
thanks for the suggestions anyway though :)
Since you never say what you do want, makes it hard to make any suggestions.
45tripp
8th April 2008, 09:09
Since you never say what you do want, makes it hard to make any suggestions.
if you read back about 10 posts you;ll see
:)
video_magic
8th April 2008, 19:00
Hmmm.. this is quite interesting :)
When You say "drag input files" do You mean drag video files (rather than a created avs script)?
I guess that is what You would like to use Drag 'N' Drop for? And perhaps you have some ini files as templates to drag rather than having to click through and set each individual encode.
If we are looking at D'N'D as a time-saver and You don't really want it for batch-encoding :)
mikeytown2
9th April 2008, 09:08
Updated my Program... can auto generate avs files if needed. Once again this is used for only one ini file. if u want multiple ini files, the code gets vastly more complicated; thats what the other programs are there for.
http://img341.imageshack.us/img341/8752/screenshoteq1.th.png (http://img341.imageshack.us/my.php?image=screenshoteq1.png)
http://www.autoitscript.com/forum/index.php?showtopic=58691&st=0&p=503684&#entry503684
Dkruskie
9th April 2008, 21:39
Thanks for the update Mike
45tripp
10th April 2008, 01:27
oh my God...
my request is for drag and drop of input files into the gui,
d'n'd of already supported formats.
i'm not asking to extend support of input formats.
(although avi input was requested if i recall, and Hank said he'd consider, time permitting)
And perhaps you have some ini files as templates to drag rather than having to click through and set each individual encode.
that's probably a good idea.
You don't really want it for batch-encoding :)
no.
i'm not interested in batching.
but.
My script takes a bunch of edited DV files, runs HCenc...
post it if you'd like to set people in the right direction.
See HCbatchGUI (http://www.videohelp.com/tools/HCbatchGUI)
This does exactly what you want.
as it stands i don;t like it.
If you need HCEnc batch processing, try EncSchedGui (http://forum.doom9.org/showthread.php?t=128312).
i think it needs a lot of polish. a lot.
Updated my Program... can auto generate avs files if needed. Once again this is used for only one ini file. if u want multiple ini files, the code gets vastly more complicated; thats what the other programs are there for.
http://www.autoitscript.com/forum/index.php?showtopic=58691&st=0&p=503684&#entry503684
not bad.
half the game is freedom of multiple templates...
you make it sound like there are dozens of programs for the job... :)
regarding HC_Batch.
i find 'always on top' very annoying.
option to set destination folder?
you have a bug:
add a file with the 'add files' button and nothing works.
furthermore, you have to kill the program and restart to get things working again.
thanks
mikeytown2
10th April 2008, 04:04
oh my God...
regarding HC_Batch.
i find 'always on top' very annoying.
option to set destination folder?
you have a bug:
add a file with the 'add files' button and nothing works.
furthermore, you have to kill the program and restart to get things working again.
thanks
Responded here, Didn't want this to get too off topic.
http://forum.doom9.org/showthread.php?p=1124011#post1124011
Chumbo
12th April 2008, 06:48
@hank,
I noticed this in my last log and wanted to let you know about it. :) I quickly looked through a few of my previous logs and did not see this. Please let me know if you need any other info.
I am using the lossless file option btw which is very nice. Thank you much for that.
-----------------------------------------
| HCenc - MPEG2 encoder - rel. 0.22.1.0 |
-----------------------------------------
...
---------------------
| encoding - pass 2 |
---------------------
*** INFO, adjusting average bitrate: -0.02 %
*** INFO, adjusting average bitrate: -0.04 %
*** INFO, adjusting average bitrate: -0.05 %
*** INFO, adjusting average bitrate: -0.08 %
*** INFO, adjusting average bitrate: -0.09 %
*** INFO, adjusting average bitrate: -0.11 %
*** INFO, adjusting average bitrate: -0.13 %
*** INFO, adjusting average bitrate: -0.15 %
pass 2 encoding time: **:**:** (-46952.31 s)
fps: -4.4
...
total CPU time: 35:33:39 (128018.62 s)
total elapsed time: 0:**:** (-176.31 s)
rcubed
10th May 2008, 00:35
@Hank,
edited: Sorry for screwing around with this post so much. I finally found the entry in the thread that has the link to HC022.1. From what I've been able to gather the use lossless check box in Settings 3 would accomplish what I have been trying to do by building an intermediate file. Would it be possible to put the link to any beta versions that you are willing to share into the 1st entry of the thread to make it easier to find them, and possibly a link to the discussion around it?
I had been building an intermediate file using VirtualDub with direct stream copy since the source was a capture and in avi form. I've noticed other approaches that were doing this, but encoding using Huffy. Just for information is there something wrong with using direct stream copy?
Also Hank could you elaborate on what the differences are in the Settings 1 tab, interlacing options. For example why one might select them. Sorry if this seems like a dumb newbie question but I've always been confused on this topic.
Thanks, I really appreciate the effort you've taken with the development of this encoder, and I use it almost exclusively and as the encoder of choice with DVD-RB.
rcubed
rcubed
10th May 2008, 19:41
Hank,
Version 22.1 with lossless selected solves the mismatch problem very nicely, plus really speeds up the total encode time. Thanks again. The file size of the temp file seems reasonable give the original size of the input file, good compression.:):cool:
One or two requests. If two instances of HC are being run with the lossless option, it's necessary to specify different folders for the lossless files, the current implementation tries to create a temp file with the same name (or is this by design?) and errors out. Would it be possible to allocate a different temp file name in this case? In the Gui could an interactive option be given to specify the lossless folder, or change the one that may be currently assigned?
Again thanks for the excellent work, and for providing features that solve user problems.:thanks::thanks::thanks:
rcubed
Chumbo
11th May 2008, 19:10
I wanted to report a strange issue that just popped up. I'm wanting to convert some of my 007 movies I've recorded from transport streams to DVD. I normally don't use HC for DVD-compliant conversions, so this is the first time.
When I use the LOSSLESS option, the encoder starts then crashes with a typical application crash that wants to launch the debugger, etc. When I don't use the lossless option, the encoder works fine.
My source is an mpeg2 TS file with one AC3 audio track. Here's what my avs script looks like:LoadPlugin("d:\PROGRA~1\AutoGK\DGMPGDec\DGDecode.dll")
LoadPlugin("d:\PROGRA~1\AutoGK\filters\autocrop.dll")
LoadPlugin("d:\PROGRA~1\AutoGK\filters\decomb.dll")
LoadPlugin("d:\PROGRA~1\AutoGK\filters\ColorMatrix.dll")
LoadPlugin("d:\PROGRA~1\AutoGK\filters\RemoveGrainSSE3.dll")
movie = directshowsource("l:\hd movies\007.08.ts",audio=false)
fixed_aspect = 1.5
c_width = width(movie)
c_height = round(height(movie) / fixed_aspect)
input_par = float(c_width)/float(c_height)
input_par = (input_par > 1.4) || (input_par < 1.25) ? input_par : (4.0/3.0)
out_width = 720
out_height = round(float(out_width) / input_par)
hmod = out_height - (floor(out_height / 16 ) * 16)
out_height = (hmod > 4) ? (out_height + (16 - hmod)) : (out_height - hmod)
new_aspect = (float(out_width) / float(out_height)) / fixed_aspect
Telecide(movie,guide=1,post=2).Decimate(mode=0)
LanczosResize(out_width,out_height)
bNeedBorders = (out_height < 480)
border = bNeedBorders ? (480-out_height)/2 : 0
AddBorders(0, border, 0, border)
ColorMatrix("Rec.709->Rec.601",opt=0,hints=false,threads=0)
converttoyv12()
Here's one of my .ini files:*INFILE d:\media\movies\dvds\sd\007\08.avs
*OUTFILE D:\Media\movies\DVDs\SD\007\08.m2v
*LOGFILE D:\Media\movies\DVDs\SD\007\08.log
*DBPATH K:\HD MOVIES\dbpath
*BITRATE 4830
*MAXBITRATE 8000
*FRAMES 0 174822
*AUTOGOP 12
*PROGRESSIVE
*MASK_SHIFT 32 50 -8
*LOSSLESS
*PULLDOWN
*MATRIX mpeg
*PRIORITY normal
Any ideas? Thank you.
btw, I noticed that the input file always gets forced to lowercase. Any chance the next release can keep it as is please? Thanks.
Boulder
11th May 2008, 20:15
Have you tried processing the normal way, that is, using DGIndex to create a d2v project file out of the transport stream and then MPEG2Source instead of DirectShowSource to load the source?
hank315
12th May 2008, 00:33
Also Hank could you elaborate on what the differences are in the Settings 1 tab, interlacing options. For example why one might select them. Sorry if this seems like a dumb newbie question but I've always been confused on this topic.
HCenc gets planes from Avisynth or DGDecode in YV12 format. It scans all frames for interlacing effects, if interlaced is set to auto it will encode pure progressive frames as progressive and interlaced frames as interlaced.
When it's set to interlaced or DVsource all frames are encoded interlaced, interlaced has standard TFF, DVsource has BFF as standard.
When it's set to progressive all frames are encoded progressive and the whole sequence is marked as progressive in the sequence header.
If you don't know what your source is, auto mode will be the most appropriate setting.
One or two requests. If two instances of HC are being run with the lossless option, it's necessary to specify different folders for the lossless files, the current implementation tries to create a temp file with the same name (or is this by design?) and errors out. Would it be possible to allocate a different temp file name in this case? In the Gui could an interactive option be given to specify the lossless folder, or change the one that may be currently assigned?
The next release has an option to set the path for the lossless file.
@Chumbo
I don't know what makes it crash, I never got a crash using the lossless option, maybe the next release solves it.
The case sensitivity is solved in the next release.
Chumbo
13th May 2008, 05:47
Have you tried processing the normal way, that is, using DGIndex to create a d2v project file out of the transport stream and then MPEG2Source instead of DirectShowSource to load the source?
I have not, but a very good suggestion. I only bypassed it because I had a bunch of these to do and wanted to save some time. I guess if I did that in the first place, it probably would've worked and actually saved a lot of encoding time. ;) I'll have to try at least one just to provide an answer for this issue so we all know. :)
@hank,
I've used the lossless exclusively with no issues in converting directshow sources that are HD to HD, e.g., vc-1 and/or avc to mpeg2. Those scripts, though, were basic, i.e., the directshowsource and converttoyv12.
This is the first time I've tried to go to DVD-compliant encoding with HC and using a bit more complicated script. It's working fine, just not with the lossless option. :( Looking forward to the next version. Thanks so much for all your hard work.
bshater
24th May 2008, 19:17
hello, can someone explain why im getting a warning error during the second pass of encoding my avi file? i don't remember exactly what the error message was, but i believe it goes somewhat like this:
"warning: source mismatch starting at frames...."
i didn't get this error message till i upgraded HC to the lastest version, .23.
any help would be highly appreciated.
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.