Log in

View Full Version : HCenc 025


Pages : [1] 2 3 4

hank315
21st September 2010, 18:11
A new HCenc (025) release can be found here: http://hank315.nl
HCenc 024 sometimes hangs at the end of the encode, this is fixed in release 025.

Please post all comments about HCenc 025 in this thread.

MrC
21st September 2010, 19:21
Thanks for the new build.

Tried a couple of time (simple avs scripts, no external filters) without issues.

;)

Bye

soneca
21st September 2010, 22:06
Thank you!

Rob100
21st September 2010, 23:50
Excellent, thanks. I use HCEnc for all my DVD encoding these days.

Midzuki
22nd September 2010, 00:22
:thanks: again.

Dkruskie
22nd September 2010, 04:28
Thanks

Hagbard23
22nd September 2010, 06:41
Thanks...

Yobbo
22nd September 2010, 08:59
Thanks!

MatLz
22nd September 2010, 11:41
Thanks !!!

yup
23rd September 2010, 07:25
hank315:thanks:
Now 025 work fine without hang at end.
yup.

tom942
23rd September 2010, 19:39
Thank you Hank for this and previous version :)

Alex-Kid
23rd September 2010, 23:23
Thanks Hank!!

For this new version, and the previous ones that let me burn to DVD my growing family footage with great quality.

nevragain
1st October 2010, 23:24
Thanks very much I've been awaiting a stable version to use. I am curious about the *NOUSERDATA option mentioned in the previous thread does it still work in the latest version? Also could you clarify if calling HC directly is required or if the gui can be used?

hank315
2nd October 2010, 20:07
HCenc 025 doesn't write user data anymore, so the *NOUSERDATA command is obsolete.
It means the stream now is completely anonymous.
Also could you clarify if calling HC directly is required or if the gui can be used?
Both can be used, using the GUI is just an easy way to generate the required info for the encoder.

nevragain
2nd October 2010, 20:19
OK thanks very much. Since *NOUSERDATA is obsolete the issue raised in the previous thread about needing to call HC directly in order to not have user data is not relevant.

Rashik
6th October 2010, 21:19
I used this program but I got no sound. how can I get sound when I use this program? Can anyone help me?

um3k
6th October 2010, 23:46
You have to encode the sound in another program, HCenc is only a video encoder.

me@work
7th October 2010, 17:15
First of all, of course, a big THANKS. For this new version, but also for all versions before.

One absolutely minor issue I think I found in HC025 is that its log files still quote to be created by rel. 0.24.0.

---------------------------------------
| HCenc - MPEG2 encoder - rel. 0.24.0 |
---------------------------------------

Man, I searched all my batches why they were refusing to pick up the latest hc025, until I tried a manual encode and checked the log... :rolleyes:

hank315
8th October 2010, 07:22
Yep, a few days ago I also found this one :o
Also the manual has some references to 024.
Will change that, thanks for the report.

Rashik
8th October 2010, 21:28
You have to encode the sound in another program, HCenc is only a video encoder.

Thanks for the explanation.

MilesAhead
21st October 2010, 16:55
Thanks hank for HC. I've only done a couple runs with the latest but all seems as expected. I've been using it with very simple .avs scripts and muxing/authoring the video and audio "by hand" more or less. What I was curious about, is there a guide or other info that would give me insight on creating a simple mechanism to calculate frame ranges so I could launch a copy of HC per core, as is done in apps like FAVC and DVD-RB?

I'm starting with the assumption I would have to detect I-frames to know which frames to pick in the general range of 1/4 the playing time for my quad core to run 4 instances concurrently? All I'm thinking of doing is something extremely simple for my own use. I have a quad so I'd like to launch a copy of HC per core processing a range of frames of say, an .mkv file, to output .m2v files. I don't care at this point if I have to mux the sections together by hand afterward. I'd just like to be able to max out my cores since sizing the frame down when going from HD to SD really slows the throughput.

I'd appreciate any pointers. :)

mariush
21st October 2010, 17:09
The website doesn't load in Romania at my home ISP (UPC), it says the server takes too much time to respond - it loads however from my server in US.

So in case someone else has problems connecting to the website, I've uploaded the encoder here: http://savedonthe.net/download/230/HC025.html

sneaker_ger
21st October 2010, 17:13
You don't have to look for I-frames as AviSynth outputs uncompressed video - every frame is like an I-frame for the calling application. I don't have any handy tips for splitting the script up, but instead you could also try to use AviSynthMT (http://forum.doom9.org/showthread.php?t=148117) to use multi-threaded resizing instead of serveral HC instances.

MilesAhead
21st October 2010, 20:35
You don't have to look for I-frames as AviSynth outputs uncompressed video - every frame is like an I-frame for the calling application. I don't have any handy tips for splitting the script up, but instead you could also try to use AviSynthMT (http://forum.doom9.org/showthread.php?t=148117) to use multi-threaded resizing instead of serveral HC instances.

Thanks for the info. :)

LogicDeLuxe
26th October 2010, 13:24
I've upgraded from 0.23 to 0.25. I previously tried 0.24, but it crashed a lot. 0.25 didn't so far. :thanks:

I already encoded many movies with 0.23 and now with 0.25, and the quality is just great. I only once encountered some troublesome material so far: The under water scenes at the beginning of Titanic (SE, PAL). Even at 4900 avg, those scenes just have far too low bitrates at times. Bias, lumgain and AQ don't seem to have much effect on those.

Midzuki
27th October 2010, 02:33
I only once encountered some troublesome material so far: The under water scenes at the beginning of Titanic (SE, PAL). Even at 4900 avg, those scenes just have far too low bitrates at times. Bias, lumgain and AQ don't seem to have much effect on those.

Have you already tried a High-Bitrate quantization matrix http://forum.doom9.org/images/icons/icon5.gif

Nexin
17th November 2010, 03:40
@Hank315

Is there any plans for hcenc to use one of the virtualdub frameservers. This would help greatly to encode frameservered virtualdub files with hcenc.

Anyway i'm sure i think about this it has many more huge benefits than first thought of. Such as what i read on the net mostly is people needed to convert x to upload to video view sites. And equal or more than that how do i convert x video to mpeg2 for dvd. Since virtualdub can use ffdshow users could input any x conatiner into virtualdub. With tweaks (filters etc) or without frameserve to use with hcenc. After all i have used mpeg2 with dgindex and hcenc. And it beats the pants of ffmpeg encoder any day. And that's the main point since all those softwares out there use ffmpeg to convert x to dvd compatible files. Also virtualdub can be used to edit files if needed before frameserving, many users would like that feature.

For me its about atm uncompressed avi getting into hcenc. Yes also would be used for x containers to mpeg2 using hcenc, would fill a a big missing hole. That all there is now, is the poor ffmpeg encoder or buggy mencoder for x conatiners to mpeg2. Then i also forever have the problem of avisynth like i read other users have. No time to learn it's comands via a manual or other or want to script them. I know the old one avisynth should have had a gui from the start. Then again we have virtualdub frameserver so this alone would fill the divide we all have, then able to encode any x container with hcenc.

mariush
17th November 2010, 19:58
HCEnc can already use Avisynth scripts. Almost everything Virtualdub has at filters is already present in Avisynth and external Virtualdub plugins can also be called from Avisynth scripts so there's no need to go through Virtualdub when you can use directly AVS scripts.

poisondeathray
17th November 2010, 20:10
@nexin - avisynth isn't difficult to load a video, you type 1 line in notepad, save it, rename extension to .avs

AVISource("video.avi")

That's it

If you can't handle that 1 line :) , then you can try avs2dvd for a GUI, and it will generate the script for you and can use hcenc as the encoder

(if your video isn't yv12, then you need to type another line, ConvertToYV12() , or ConvertToYV12(interlaced=true) if it's interlaced )

MilesAhead
17th November 2010, 21:52
Another program that generates nice .avs scripts is d2mp

I used to copy and paste from the d2mp log. Then modify to suit my needs.

Nexin
18th November 2010, 06:06
@nexin - avisynth isn't difficult to load a video, you type 1 line in notepad, save it, rename extension to .avs

AVISource("video.avi")

That's it

If you can't handle that 1 line :) , then you can try avs2dvd for a GUI, and it will generate the script for you and can use hcenc as the encoder

(if your video isn't yv12, then you need to type another line, ConvertToYV12() , or ConvertToYV12(interlaced=true) if it's interlaced )

What that is to easy, no working out anything there or complicated command to learn.

So we are able to with just these simple commands frameserve from virtualdub using avs script to many more softwares including hcenc.

Wonder then why this is information i haven't read on the net before, when looking for a sollution. For many years i have had the need for softwares. Now can load video and make adjustments from virtualdub then frameserve it via avs simple script (as above) to mnay more softwares. If this is what you are saying then this for me is big Thank You :)


Avs2DVD i will take a look at that just download the install. Maybe of no use if doesn't have full range of gui editing, such as what vdub filters are able to do. That is what i need from a avisynth editor, though sollution above is just be the key. ;)

Incase it gets mentioned i know it could as has done previously. Avidemux does have intergration with avisynth, don't know if makes scripts or just a processor. If doesn't make scripts for use in other softwares maybe it should have that ability (and so should virtualdub). For various other reasons bugs and avidemux screen never staying static full screen, wait for it to improve. Though someday i hope it might all be fixed and then use it since it also has some nice filters.

Right then i will go and install the latest avisynth again, since i will now be needing it. :D


Update:

I have found that both avisource and directshowsource work very well with an uncompressed avi, with using the extra command ConvertTOYV12() for non interlaces and ConvertToYV12()(interlaced=true) for interlaced. Though not yet through virtualdub frameserver proxy mode avi. For now easy enough to process file first to uncompressed avi (huffy). Will get to grips with frameserve via proxy avi of virtualdub soon.

MilesAhead
20th November 2010, 21:46
I seem to have run into a bit of a mystery. I have several .m2ts files that seem to have identical stats as shown by MediaInfo:
1.778 video display AVC codec AC-3 audio 640 kbps video frame rate 23.976

Using this avs script for all:


SetMTMode(2,0)
DirectShowSource("movie.m2ts",audio=false)
BilinearResize(720,480)


When I pull some into HCgui it shows 3:2 pulldown disabled with a warning not DVD compliant fps.
Others 3:2 pulldown is enabled, I can check it and process with no problem.

As far as I can tell looking at the other tabs, the settings are the same.
I'm baffled at this point.

hank315
20th November 2010, 22:30
If you use

DirectShowSource("movie.m2ts",audio=false,fps=23.976)

does it work OK?

MilesAhead
20th November 2010, 22:38
If you use

DirectShowSource("movie.m2ts",audio=false,fps=23.976)

does it work OK?

Yup. Pulldown box is enabled now.
Thanks Hank.

edit: hmm, the side effect is the throughput is only about 1/2.
Instead of averaging about 60 fps I'm only getting 28 with films
where the Pulldown was enabled without specifying fps in
DirectShowSource.

I'll have to experiment a bit I guess.

edit2: interesting. If I put it through HC indirectly using BDRB I get the same throughput. Either it's coincidence or correct loading without the frame rate spec seems to indicate if SetMTMode() will work. Specifying the frame rate in DirectShowSource() seems to nullify SetMTMode. Of course this is only trying a few samples.

edit3: more likely I'm jumping to conclusions. The average bit rate differences may be the factor. I'd have to try the same flick with the different settings to really see. Since the source is so rich I'm trying out the one pass vbr mode. See if I can shave off 1/2 hour without losing too much picture. See how it goes. :)

edit4: don't mind me. I still have a lot to learn.. esp. with AviSynth. :)

Nexin
21st November 2010, 03:16
I'm thinking of pushing other videos containers/formats through avisynth script using avisource("filename") or directshowsource("filename") modes. But most videos will need resolution and some fps set for dvd compatible encoding. I push the make dvd compliant to check and does report reloution and fps needs changing.

GUI what tab and option is the set video resolution size.

What tab and option is the video framerate, i haven't found either.

Midzuki
21st November 2010, 04:40
I'm thinking of pushing other videos containers/formats through avisynth script using avisource("filename") or directshowsource("filename") modes. But most videos will need resolution and some fps set for dvd compatible encoding. I push the make dvd compliant to check and does report reloution and fps needs changing.

GUI what tab and option is the set video resolution size.

What tab and option is the video framerate, i haven't found either.

You will have to tweak your AVS files, so that they output "DVD-compliant" framerates and resolutions. DVD-V~compliant framerates: 23.976 (with pulldown flags), 25, and 29.97 fps. MPEG-2~compliant framerates: 23.976, 24, 25, 29.97, 30, 50, 59.94, and 60 fps.

Nexin
21st November 2010, 17:01
Re: Changing resolution and fps

That would be scripting avs more than i want to, happy with the two commands i use now. Asking hank, as other encoders do have these. Maybe hcenc has them now, just not yet available in the gui.

Richard1485
21st November 2010, 20:11
Thanks, Hank for the great encoder. :-)

I don't understand how zones work though. I understand that you have to find the start frame and click "set zone" but I don't understand how long this zone lasts. How do you set where the zone ends? I have a video with a number of sections that the encoder finds difficult and makes too blocky. I am setting the bitrate higher for those sections.

I have tried various matrices, lumgain and AQ without significant improvement, so that is why I am looking at zones.

EDIT: I found this in the manual.

Example *ZONE 3
1200 1.3
1500 1.
2700 0.5
This command raises or lowers the bitrate for parts of the video.
The example will raise the bitrate starting at frame 1200, reset to normal at frame 1500 and lowers
the bitrate starting at frame 2700.


I think I understand this. I click "set zone" every time I want to input a value. Quite which of these values is Zone 3, I don't know, because I cannot seem to see zone numbers in the GUI.

I don't understand what 1.0 is 1.0 of. Is it the value that you input for the maximum bitrate or for the average bitrate? When you set a maximum bitrate of of 8000 and you input 1.1 is the bitrate now 8800?

MilesAhead
21st November 2010, 20:31
Re: Changing resolution and fps

That would be scripting avs more than i want to, happy with the two commands i use now. Asking hank, as other encoders do have these. Maybe hcenc has them now, just not yet available in the gui.

I don't know much about changing frame rate, but resolution change is done with resizing and sometimes cropping.

There are many different resize filters available to AviSynth. Some work better for sizing up, and others better for sizing down. To just pick one for each scenario would limit the versatility of the encoder. The most agreement I've seen on resizers is that the Lanczos family of resizers is generally considered good for sizing up. Other than that it's in the eye of the beholder.

It may be good to look at some generated avs scripts for starting points. For example programs like FAVC, d2mp and for sizing down BD Rebuilder. Also Quick Avi Creator generates skeleton avs scripts with stuff you need like color space stuff and so may be worth a look. Quick Avi Creator is a bit unusual in that it outputs the same resolution that's input. If you have 720P .mkv input you'll get 720P xvid output if you select xvid encoding.

I haven't gotten into doing cropping and adding borders myself in scripts. If the source is 1080 and I'm downsizing to standard NTSC dvd then I'm just resizing to 720x480. If you have to adjust like fixing letterboxing then it's more complicated and you may want to use a program that generates avs script like FitCD.

edit: like you, I'm still at the point of using very simple scripts. I've been experimenting with this one and HC...


SetMTMode(2,0)
DirectShowSource("movie.m2ts",audio=false,fps=23.976)
BilinearResize(720,480)

Nexin
22nd November 2010, 18:59
While ok for avisynth what of dgindex.

I'm not saying hcenc should be an editor and do what an editor can do. BUt to have same or similar tools that others encoders have, that we are used to using.

MilesAhead
22nd November 2010, 20:04
While ok for avisynth what of dgindex.

I'm not saying hcenc should be an editor and do what an editor can do. BUt to have same or similar tools that others encoders have, that we are used to using.

I only used this Gui a few times awhile ago(I haven't gotten into batch processing.) But it may have some useful features:

http://forum.videohelp.com/threads/271726-Batch-processing-GUI-for-HCEnc

Nexin
23rd November 2010, 20:29
Batch processing (a hint maybe ?) ok will take a look at the help to see how. Normal process so far with hcenc is do one file, then move onto the next job.

MilesAhead
23rd November 2010, 21:16
Batch processing (a hint maybe ?) ok will take a look at the help to see how. Normal process so far with hcenc is do one file, then move onto the next job.

Programs like AvsToDVD use HC as encoder but offer one or two resizers. A Gui outside of HC to give it structure was more the idea.

One of the fastest one click encoders is FAVC. Unfortunately I seem to have the bad luck that about 10% of my encodes quit the remux before they are 100% done or the authoring is not totally complete. I might get a VIDEO_TS folder with 1:58 of movie instead of 2 hours. Others tell me it doesn't happen to them.

Might be what you want. You can insert stuff in the Advanced Tab like custom user resizer, and other avs lines at certain locations without doing it by hand. Then just kick off the batch file.

It's no longer being developed it seems. Which is a shame. You can set it to launch a copy of HC for each core. Kicks ass, when it completes.

Nexin
25th November 2010, 01:08
A Gui outside of HC to give it structure was more the idea.
Its' sounding more like hcenc gui isn't able to stand up, on it's own two feet.

AlanHK
1st December 2010, 15:54
I'm getting lockups when encoding some MKVs.

HC gets to "100%" and the M2v is apparently complete (it plays and seems to be the full length), but HC is in a loop: it sits at 100%, and consumes 100% of the processor, doing God knows what.
This has happened a few times, each time it was stuck for over half an hour before I noticed it and killed the HC process (the only way -- the HC window would never come up).

Nothing strange in the log (except that it reports version 0.24 instead of 0.25):

==================================================

---------------------------------------
| HCenc - MPEG2 encoder - rel. 0.24.0 |
---------------------------------------

MPEG profile@level: MP@ML
input: O:\Zipang_01.avs
output: s:\mpg\Zipang_01.m2v

--------------------
| encoder settings |
--------------------

profile: BEST
frames: 0 - 34070
framerate: 23.976
aspect ratio: 16:9
chroma format: 4:2:0
bitrate Kb/s: 2061
max. bitrate Kb/s: 8000
pulldown: yes, 23.976 --> 29.97
closed gops: no
VBV check: yes
scene change det: yes
interlaced: auto, TFF
goplen,B-pic: AUTO 12
dc_precision: 9
intraVLC: auto
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
adaptive quantization: yes, strength 2
deadzone quantization: auto

------------------
| source stats |
------------------

nr. of frames in source: 34071
width*height: 720x480
fps: 23.976
nr. of frames to encode: 34071
frames to encode: 0 - 34070

---------------------
| encoding - pass 1 |
---------------------

pass 1 encoding time: 0:34:46 (2086.16 s)
fps: 16.3

--------------------------------
| encoding - intermediate pass |
--------------------------------

bitrate set to: 2061 kb/s
estimated output file length: 357516 kB
intermediate encoding time: 0.23 s

---------------------
| encoding - pass 2 |
---------------------

pass 2 encoding time: 0:27:49 (1668.62 s)
fps: 20.4

------------------
| 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: 3098
nr. of frames: 34071
nr. of I-frames: 3098
nr. of P-frames: 9559
nr. of B-frames: 21414
average bitrate: 2061
minimum bitrate: 135
maximum bitrate: 7752

bytes in bitstream: 366610034
bits in bitstream: 2932880272

average Quantizer: 6.131

total CPU time: 0:54:08 (3248.44 s)
total elapsed time: 1:02:40 (3759.94 s)


==================================================
==================================================

---------------------------------------
| HCenc - MPEG2 encoder - rel. 0.24.0 |
---------------------------------------

MPEG profile@level: MP@ML
input: O:\Zipang_02.avs
output: s:\mpg\Zipang_02.m2v

--------------------
| encoder settings |
--------------------

profile: BEST
frames: 0 - 28855
framerate: 23.976
aspect ratio: 16:9
chroma format: 4:2:0
bitrate Kb/s: 2061
max. bitrate Kb/s: 8000
pulldown: yes, 23.976 --> 29.97
closed gops: no
VBV check: yes
scene change det: yes
interlaced: auto, TFF
goplen,B-pic: AUTO 12
dc_precision: 9
intraVLC: auto
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
adaptive quantization: yes, strength 2
deadzone quantization: auto

------------------
| source stats |
------------------

nr. of frames in source: 28856
width*height: 720x480
fps: 23.976
nr. of frames to encode: 28856
frames to encode: 0 - 28855

---------------------
| encoding - pass 1 |
---------------------

pass 1 encoding time: 0:23:28 (1407.78 s)
fps: 20.5

--------------------------------
| encoding - intermediate pass |
--------------------------------

bitrate set to: 2061 kb/s
estimated output file length: 302794 kB
intermediate encoding time: 0.20 s

---------------------
| encoding - pass 2 |
---------------------

pass 2 encoding time: 0:22:23 (1343.13 s)
fps: 21.5

------------------
| 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: 2641
nr. of frames: 28856
nr. of I-frames: 2641
nr. of P-frames: 7984
nr. of B-frames: 18231
average bitrate: 2061
minimum bitrate: 161
maximum bitrate: 7038

bytes in bitstream: 310479944
bits in bitstream: 2483839552

average Quantizer: 4.914

total CPU time: 0:44:34 (2674.08 s)
total elapsed time: 0:45:56 (2756.00 s)


==================================================

The first file completed normally, the second froze. Though the log shows "total elapsed time" so it apparently froze AFTER completing the encode.

This was part of a batch encode, using a command line :

P:\HCenc\HCenc_025 -i O:\Zipang_02.avs -o s:\mpg\Zipang_02.m2v -b 2061 -aspectratio 16:9 -pulldown -profile best -matrix qlb -frames all -noini -2pass -maxbitrate 8000 -log O:\henc.log -avsreload

And the AVS file was :


FFmpegSource2("Zipang_02.mkv",atrack=1)++DirectShowSource("Zipang_02.mkv").AssumeFPS("ntsc_film")
AmplifydB(4.16)
TextSub("Zipang_02_Track5.ass")
AddBorders(8,0,8,0)
Trim(3044,31879)
AudioFadeIn(50)
last ++ BlankClip(last,20)

The DirectShowSource() is hack to load the fonts embedded in the MKV in Windows, to be used in the ASS file, HC sees only the video from FFMPEGSource.

Though I realise that this complexity may be the cause of the problem.

I haven't experimented to simplify the script yet, I may if I have time.

poisondeathray
1st December 2010, 16:16
alanhk - can you try a different encoder to rule out avisynth/script/filter issue? or is it really a hcenc compatibility issue ? e.g. try xvid vfw in vdub, or x264 and see if it "hangs"

AlanHK
1st December 2010, 16:31
alanhk - can you try a different encoder to rule out avisynth/script/filter issue? or is it really a hcenc compatibility issue ? e.g. try xvid vfw in vdub, or x264 and see if it "hangs"

It may well be -- I also get hangs when encoding audio from the same scripts.

I'll try other video encoders tomorrow.

It's strange, and perhaps fortunate, that HC doesn't lock at the end of the first pass, but after (?) the second -- it can restart, but seems unable to just shut down the Avisynth process.

==========
I ran the same command line script on the same source file that had hung before, and this time it completed.
The M2V file was identical (I did a binary compare).

So presumably the hang is due to some weirdness with codecs in Windows. Still; HC has finished the encode, has written the log, but is somehow still waiting for something to let it shut down. Could it be a bit more aggressive and not just wait for a signal that obviously does not always come?

AlanHK
9th December 2010, 18:46
This thread doesn't look terribly active.

Anyway, different files, different error:
I'm just encoding an MP4 file, using FFmpegSource2.

FFmpegSource2("4_B.mp4",atrack=-1)
SSRC(48000,false)
AmplifydB(0.82)
Trim(741,0)
FreezeFrame(0,1,1)
BlankClip(last,32) ++last
LanczosResize(704,480).AddBorders(8,0,8,0)


I'm getting about 90% of the frames with
"Warning: Small mismatch found in pass 2".
HCenc - MPEG2 encoder - rel. 0.24.0
---------------------------------------

MPEG profile@level: MP@ML
input: O:\4_B.avs
output: s:\mpg\4_B.m2v

--------------------
| encoder settings |
--------------------

profile: BEST
frames: 0 - 64347
framerate: 23.976
aspect ratio: 16:9
chroma format: 4:2:0
bitrate Kb/s: 1800
max. bitrate Kb/s: 8000
pulldown: yes, 23.976 --> 29.97
closed gops: no
VBV check: yes
scene change det: yes
interlaced: auto, TFF
goplen,B-pic: AUTO 12
dc_precision: 9
intraVLC: auto
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
adaptive quantization: yes, strength 2
deadzone quantization: auto

------------------
| source stats |
------------------

nr. of frames in source: 64348
width*height: 720x480
fps: 23.976
nr. of frames to encode: 64348
frames to encode: 0 - 64347

---------------------
| encoding - pass 1 |
---------------------

pass 1 encoding time: 1:01:34 (3693.52 s)
fps: 17.4

--------------------------------
| encoding - intermediate pass |
--------------------------------

bitrate set to: 1800 kb/s
estimated output file length: 589713 kB
intermediate encoding time: 0.26 s

---------------------
| encoding - pass 2 |
---------------------

pass 2 encoding time: 1:00:42 (3641.91 s)
fps: 17.7

------------------
| encoding stats |
------------------

*** WARNING, 58314 frames found with small mismatch errors
*** ERROR, 1568 frames found with large mismatch errors


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: 5794
nr. of frames: 64348
nr. of I-frames: 5794
nr. of P-frames: 18376
nr. of B-frames: 40178
average bitrate: 1800
minimum bitrate: 134
maximum bitrate: 6204

bytes in bitstream: 604824107
bits in bitstream: 4838592856

average Quantizer: 8.562

total CPU time: 1:54:32 (6872.45 s)
total elapsed time: 2:02:20 (7340.14 s)




I've never seen more than a handful of frames with that error before.

The resulting M2V file seems okay... but obviously I'm wary after seeing all these errors.

I'll rerun it later to see if it's reproducible.

AlanHK
12th December 2010, 06:46
I notice that you can set the database location in the ini file, (*DBPATH) but doesn't seem to be a corresponding command line option.

Would be useful as my program files are on a drive without a lot of extra space. Just had to restart a 10 hour encode when the database filled it up.

Mug Funky
15th December 2010, 05:56
i've always just used echo commands and batch files to make my encodes through CLI. you can generate a .ini, run HC, then delete the ini (or keep it for logging purposes) from a batch file.

[edit]

try this:


@ECHO OFF
ECHO.
ECHO Encoding %~n1...
ECHO.
SET /P bitrate= please enter average bitrate:
ECHO.
SET /P max= enter max bitrate:
ECHO.
SET /P ratio= enter aspect ratio (enter 4:3 or 16:9):
ECHO.
SET interlaced=n
SET /P interlaced= interlaced? (y/n):
SET panscan=n
IF "%ratio%" NEQ "4:3" SET /P panscan= pan and scan? (y/n):

ECHO *INFILE %~dpn1.avs>"%~dpn1_settings.ini"
ECHO *OUTFILE %~dpn1.HCenc.m2v>>"%~dpn1_settings.ini"
ECHO *LOGFILE %~dpn1.log>>"%~dpn1_settings.ini"
ECHO *BITRATE %bitrate% >>"%~dpn1_settings.ini"
ECHO *MAXBITRATE %max% >>"%~dpn1_settings.ini"
ECHO *1PASS >>"%~dpn1_settings.ini"
ECHO *PROFILE best>>"%~dpn1_settings.ini"
ECHO *AUTOGOP 12 >>"%~dpn1_settings.ini"
ECHO *AQ 4 >>"%~dpn1_settings.ini"
ECHO *DC_PREC 10 >>"%~dpn1_settings.ini"
ECHO *CLOSEDGOPS>>"%~dpn1_settings.ini"
ECHO *NOSEQ_ENDCODE>>"%~dpn1_settings.ini"
ECHO *PREVIEW>>"%~dpn1_settings.ini"
ECHO *MATRIX mpeg>>"%~dpn1_settings.ini"
ECHO *ASPECT %ratio% >>"%~dpn1_settings.ini"
if %interlaced%==y ECHO *INTERLACED>>"%~dpn1_settings.ini"
if %interlaced%==n ECHO *PROGRESSIVE>>"%~dpn1_settings.ini"
ECHO *TFF>>"%~dpn1_settings.ini"
if %panscan%==y ECHO *PANSCAN 540 576 0>>"%~dpn1_settings.ini"
ECHO *WAIT 0 >>"%~dpn1_settings.ini"

ECHO "c:\Program Files\HC\HCenc_025_SSE4.exe" -ini "%~dpn1_settings.ini" -i "%~dpn1.avs" -o "%~dpn1.HCenc.m2v" >>"%~dp1\encode.bat"



just copypaste into an empty text file and save as .bat, then drag avs files onto it.

you'll have to add the DBPATH parameter and remove the 1pass line. not difficult.