• Most new users don't bother reading our rules. Here's the one that is ignored almost immediately upon signup: DO NOT ASK FOR FANEDIT LINKS PUBLICLY. First, read the FAQ. Seriously. What you want is there. You can also send a message to the editor. If that doesn't work THEN post in the Trade & Request forum. Anywhere else and it will be deleted and an infraction will be issued.
  • If this is your first time here please read our FAQ and Rules pages. They have some useful information that will get us all off on the right foot, especially our Own the Source rule. If you do not understand any of these rules send a private message to one of our staff for further details.
  • Please read our Rules & Guidelines

Captain Khajiit's Basic Guide to Encoding with HCenc

TV's Frink

You Catch On Pretty Quick
Staff member
Donor
Faneditor
Messages
23,676
Reaction score
406
Trophy Points
193
Ok, so...let's go back a step. My source was HD, but I accidentally rendered out of vegas as a lag avi at 720 x 480 instead of 1280 x 720. Not realizing I had done so, I then followed your guide for an HD souce, using this script:

Code:
Avisource("C:\AustinIMoMSanitized.avi")
ConverttoYV12()
Spline36Resize(704,480).AddBorders(8,0,8,0)

The resulting video looks fine, but I'm not always the sharpest eye when it comes to video quality. Could this workflow have caused problems I might not be noticing?
 

Captain Khajiit

Well-known member
Donor
Messages
2,685
Reaction score
8
Trophy Points
48
Aside from artifacts caused by the unnecessary resizing (i.e. from 1280x720 to 720x480), there shouldn't be a problem.
 

TV's Frink

You Catch On Pretty Quick
Staff member
Donor
Faneditor
Messages
23,676
Reaction score
406
Trophy Points
193
So let's say I want to create two versions, a DVD-5 and an AVCHD. For the DVD-5, I assume I would render out in 720 x 480 and then encode with a bitrate based on the average rate given by the calculator for the DVD-5, correct? And can HCenc make an AVCHD compliant file or do I need to use another program for that?
 

Captain Khajiit

Well-known member
Donor
Messages
2,685
Reaction score
8
Trophy Points
48
I would render out a single 1280x720 (which seems to be the resolution at which you are editing) lagarith AVI. Use that with the script that you posted above to make the DVD. Use another program to make the AVCHD.
 

TV's Frink

You Catch On Pretty Quick
Staff member
Donor
Faneditor
Messages
23,676
Reaction score
406
Trophy Points
193
Thanks as always, good sir!
 

reave

Well-known member
Staff member
Messages
4,404
Reaction score
207
Trophy Points
68
Worked great for me. Rendering to a lower resolution in Vegas always looks worse.
 

TV's Frink

You Catch On Pretty Quick
Staff member
Donor
Faneditor
Messages
23,676
Reaction score
406
Trophy Points
193
Running an encode today and this happened:

capturewbe.png


Pass 1 seemed to go fine, but Pass 2 never started. I eventually had to exit the encode because my PC was in danger of overheating.

"VBV at critical level" sounds particularly ominous. Any idea what might have happened? I might be able to find the log if that will help.
 

TV's Frink

You Catch On Pretty Quick
Staff member
Donor
Faneditor
Messages
23,676
Reaction score
406
Trophy Points
193
Well, I seem to have isolated the problem, even though I have no idea how to fix it. The issue is being caused by the first few seconds of video, which is the custom logo that L8wrtr made for me. The weird thing is that it's the same exact video that I used in both my Ridiculous edits, right down to the fact that I didn't even bother to make a copy of the video or move it to a new folder (i.e. I just dropped it into my timeline from the original TRM location). I did a 10 second render and the encode still failed at the start of pass 2, but when I removed the custom logo part, the encode went just fine.

I cannot fathom why the video would cause this problem now when it has worked multiple times in the past. :(

Just for completion sake, here's the log for both runs (bad and good).

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

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

MPEG profile@level: MP@ML
input: c:\apimtest.avs
output: C:\APIMtest.m2v

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

profile: BEST
frames: 0 - 500
framerate: 23.976
aspect ratio: 16:9
chroma format: 4:2:0
bitrate Kb/s: 5200
max. bitrate Kb/s: 8000
pulldown: yes, 23.976 --> 29.97
closed gops: yes
VBV check: yes
scene change det: yes
interlaced: no, TFF
goplen,B-pic: AUTO 12
dc_precision: 9
intraVLC: auto
scan method: zigzag
bias: 30
chapter frames: 0
time code: 0 0 0 0
CPU: SSE4 (4.2)
priority: idle
SMP active: yes
matrix: FOX3, adaptive
luminance gain: yes, level 3
adaptive quantization: yes, strength 3
deadzone quantization: auto

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

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

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

pass 1 encoding time: 0:00:12 (12.03 s)
fps: 41.7

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

bitrate set to: 5200 kb/s
estimated output file length: 13264 kB
intermediate encoding time: 0.00 s

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



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

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

MPEG profile@level: MP@ML
input: c:\apimtest.avs
output: C:\APIMtest.m2v

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

profile: BEST
frames: 0 - 321
framerate: 23.976
aspect ratio: 16:9
chroma format: 4:2:0
bitrate Kb/s: 5200
max. bitrate Kb/s: 8000
pulldown: yes, 23.976 --> 29.97
closed gops: yes
VBV check: yes
scene change det: yes
interlaced: no, TFF
goplen,B-pic: AUTO 12
dc_precision: 9
intraVLC: auto
scan method: zigzag
bias: 30
chapter frames: 0
time code: 0 0 0 0
CPU: SSE4 (4.2)
priority: idle
SMP active: yes
matrix: FOX3, adaptive
luminance gain: yes, level 3
adaptive quantization: yes, strength 3
deadzone quantization: auto

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

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

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

pass 1 encoding time: 0:00:07 (6.72 s)
fps: 47.9

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

bitrate set to: 5200 kb/s
estimated output file length: 8525 kB
intermediate encoding time: 0.00 s

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

pass 2 encoding time: 0:00:09 (8.70 s)
fps: 37.0

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


adapted intra matrix used
adapted non-intra matrix used

nr. of gops: 27
nr. of frames: 322
nr. of I-frames: 27
nr. of P-frames: 107
nr. of B-frames: 188
average bitrate: 5057
minimum bitrate: 582
maximum bitrate: 7954

bytes in bitstream: 8493959
bits in bitstream: 67951672

average Quantizer: 2.358

total CPU time: 0:00:22 (21.67 s)
total elapsed time: 0:00:16 (15.63 s)
 

Gatos

Well-known member
Faneditor
Messages
3,467
Reaction score
1
Trophy Points
46
Maybe try re-encoding that vid and then try encoding the project with HC
 

TV's Frink

You Catch On Pretty Quick
Staff member
Donor
Faneditor
Messages
23,676
Reaction score
406
Trophy Points
193
I'm not sure I understand what you mean.
 

Gatos

Well-known member
Faneditor
Messages
3,467
Reaction score
1
Trophy Points
46
TV's Frink said:
I'm not sure I understand what you mean.

The custom clip that L8 made for you, try re-encoding that clip as a lagarith avi (or whatever file format you need, not sure what you are editing with). Re-encoding it may fix whatever inherent issue there is with that custom logo clip. So re-encoding, putting it at the beginning of your timeline and then trying to render again with HC Encoder, the problem might be fixed. Sorry if my explanation sucks.
 

Captain Khajiit

Well-known member
Donor
Messages
2,685
Reaction score
8
Trophy Points
48
So you put the custom logo at the beginning of your timeline, rendered a lossless AVI from Vegas and are encoding from that. If so, the logo is now part of the rendered AVI, not something that you are splicing in, in the script. Is that right, Frink?
 

TV's Frink

You Catch On Pretty Quick
Staff member
Donor
Faneditor
Messages
23,676
Reaction score
406
Trophy Points
193
Correct.

Gatos, I'll respond when have more time. I think your terminology is what's confusing me.
 

Captain Khajiit

Well-known member
Donor
Messages
2,685
Reaction score
8
Trophy Points
48
Try changing lumgain to 2 and AQ to 2 and switching the matrix to manono1. If that doesn't work, could you render out just the very beginning of your edit and upload it? I know lagarith AVIs are big, but you don't have to render/upload much.
 

Captain Khajiit

Well-known member
Donor
Messages
2,685
Reaction score
8
Trophy Points
48
[MENTION=6348]TV's Frink[/MENTION]

I've just noticed that you are running an old version of HCenc. Use the link at the start of the guide and reinstall.
 

TV's Frink

You Catch On Pretty Quick
Staff member
Donor
Faneditor
Messages
23,676
Reaction score
406
Trophy Points
193
Captain Khajiit said:
I've just noticed that you are running an old version of HCenc. Use the link at the start of the guide and reinstall.
I didn't know if that was considered current since it's beta, but I will try it tonight.
 

Captain Khajiit

Well-known member
Donor
Messages
2,685
Reaction score
8
Trophy Points
48
TV's Frink said:
I didn't know if that was considered current since it's beta, but I will try it tonight.

It is a beta, and it's the most current version. Try it with the changes that I suggested above and let me know. :)
 

TV's Frink

You Catch On Pretty Quick
Staff member
Donor
Faneditor
Messages
23,676
Reaction score
406
Trophy Points
193
New version installed, changes made, it finishes now but the logo only works on the fade-in and fade-out, in-between it looks like garbled noise. However...I bet I know what I'm doing wrong.

My source and my script are HD. The logo is SD. I'm guessing this is a problem.

Ideally I would have an HD version of the logo (maybe [MENTION=8664]L8wrtr[/MENTION] still has the source and can re-render in HD, or maybe not), but if not, is there an easy workaround?
 

TV's Frink

You Catch On Pretty Quick
Staff member
Donor
Faneditor
Messages
23,676
Reaction score
406
Trophy Points
193
Gatos said:
The custom clip that L8 made for you, try re-encoding that clip as a lagarith avi (or whatever file format you need, not sure what you are editing with). Re-encoding it may fix whatever inherent issue there is with that custom logo clip. So re-encoding, putting it at the beginning of your timeline and then trying to render again with HC Encoder, the problem might be fixed. Sorry if my explanation sucks.

I think I understand what you are suggesting, although I use the terms in reverse. AFAIK I render out of Vegas as a lagarth avi, and then use HCEncoder to encode to m2v.

If that's what you mean, then yeah, I already tried it. But I suspect I have figured out the root cause of the problem now...
 

Gatos

Well-known member
Faneditor
Messages
3,467
Reaction score
1
Trophy Points
46
TV's Frink said:
I think I understand what you are suggesting, although I use the terms in reverse. AFAIK I render out of Vegas as a lagarth avi, and then use HCEncoder to encode to m2v.

If that's what you mean, then yeah, I already tried it. But I suspect I have figured out the root cause of the problem now...

Yeah that is basically what I meant. But glad it got sorted out.
 
Top Bottom