VideoHelp Forum
+ Reply to Thread
Results 1 to 15 of 15
Thread
  1. Hi, I have a 352x576 analog capture from TV of some concert footage so it is mostly dark scenes and also using multiple portable cameras so the footage is moving around alot. It is a metal concert and so the moving with the cameras and panning and zooming and quick changes between camera's is suppose to increase the intensity I guess.

    So darks scenes and alot of movement in the footage.

    Luckily the bitrate for the video encoding I can go up to maximum of 8000kb/s give or take about 200kb/s which I will keep as a maximum allowed overshoot safety buffer.

    Anyhow, these are the settings I was going to go with based on the limited information I have been able to find:
    I am using HCenc to encode and here are my settings:

    interlacing options = progressive
    chroma downsampling = progressive
    progressive sequence = ticked
    colorimetry = BT.470-2BG
    MPEG profile@level = MP@ML
    --------------------
    | encoder settings |
    --------------------
    profile: BEST
    framerate: 25.000
    aspect ratio: 4:3
    chroma format: 4:2:0
    bitrate Kb/s: 7000
    max. bitrate Kb/s: 8000
    pulldown: no
    closed gops: no
    VBV check: yes
    VBV size (bits): 1835008
    scene change det: yes
    interlaced: no, BFF
    goplen,B-pic: AUTO 15
    dc_precision: 10
    intraVLC: auto
    scan method: zigzag
    bias: 100
    chapter frames: 0
    time code: 0 0 0 0
    CPU: SSE2
    priority: idle
    SMP active: yes
    matrix: MANONO1, adaptive
    luminance gain: yes, level 4
    adaptive quantization: yes, strength 4
    deadzone quantization: auto
    width*height: 352x576
    fps: 25.000
    *BITRATE 7000
    *MAXBITRATE 8000
    *FRAMES 4500 5999
    *PROFILE best
    *ASPECT 4:3
    *AUTOGOP 15
    *AQ 4
    *DC_PREC 10
    *PROGRESSIVE
    *PROG_SEQ
    *BFF
    *FRAMELOG psnr
    *BIAS 100
    *MPEGLEVEL MP@ML
    *INTRAVLC 2
    *CUSTOMMATRIX
    8 8 9 9 10 10 11 11
    8 9 9 10 10 11 11 12
    9 9 10 10 11 11 12 12
    9 10 10 11 11 12 13 13
    10 10 11 11 12 13 13 14
    10 11 11 12 13 13 14 15
    11 11 12 13 13 14 15 15
    11 12 12 13 14 15 15 16

    8 8 9 9 10 10 11 11
    8 9 9 10 10 11 11 12
    9 9 10 10 11 11 12 12
    9 10 10 11 11 12 13 13
    10 10 11 11 12 13 13 14
    10 11 11 12 13 13 14 15
    11 11 12 13 13 14 15 15
    11 12 12 13 14 15 15 16
    *LUMGAIN 4
    *COLOUR 5

    Are there any improvements I could make for the type of video I am encoding? Or have I got everything about right?

    I originally was using avg and max bitrate both set at 8000kb/s but recently I have been trying more 'detail keeping' matrix's and have noticed messages like this; " *** INFO, adjusting average bitrate: -2.78 %" or similar coming up. So I thought maybe keep the max at 8000kb/s and drop the avg down to 7000kb/s might help? No idea what the error message means though. Dropping the average bitrate decreased the number of messages popping up but I still get the odd one so not doesn't completely solve the problem.

    Also, a couple of things I am not sure about:
    1) When encoding 2nd pass I see Q: I=xxx P=xxx B=xxx can someone give me an idea what number ranges I should be trying to aim for there? I have heard something around 2-3, will different matrix's for a given bitrate make these numbers go up or down?

    2) Does 'average Quantizer' in my log file mean PSNR value and I guess the same reasoning for reading this will be like 1) above? My last 1 minute test has a 'average Quantizer' of 4.310

    3) I am using AQ4 because otherwise there is not enough 'padding' for my high 7000 to 8000 bitrates.

    4) I am using Lumigain4 because I hope it will give me the most quality, but can it also be detrimental going that high?

    PS: I read about "Rebuilder Matrix Editor" but I can't find it, is there a similar tool that people use now-a-days?

    Edit:
    Just noticed with avg 7000 and max 8000 the "*** INFO, adjusting average bitrate" message still comes up sometimes. Do I need to take notice of this at all or what is the problem and how would one fix it?

    Thanks.
    Last edited by jclampy; 4th Jan 2012 at 06:47. Reason: Dropping average bitrate doesn't solve the problem.
    Quote Quote  
  2. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    The message is informational, not an error. The encoder was not able to meet your specified bitrate .
    Perhaps you should post this at doom9, the developer and other internals type guys hang out there.
    Quote Quote  
  3. Hi Davexnet,

    Thanks for the response, I won't worry too much about it then.

    I wonder if it is a good idea to use avg 7000, max 8000 for the final encode as I like the idea of giving the encoder a little room to move. Although I just ran another test at 8000 avg and 8000 max and from the .log file it turns out avg encoded was 7374kb/s. It also adjusted the average bitrate 5 times in the 2nd pass. Unless because of that 7347kb/s maybe I should use 7500 avg and 8000 max instead?
    ~~~~~~~~~~~~~~~~~~~~~
    Edit:
    Results after two more test runs:
    avg 8000 max 8000 = average bitrate adjusted 5 times + average encoded bitrate 7292kb/s + avg quant 4.249
    avg 7500 max 8000 = average bitrate adjusted 4 times + average encoded bitrate 7307kb/s + avg quant 4.262
    avg 7000 max 8000 = average bitrate adjusted 2 times + average encoded bitrate 6907kb/s + avg quant 4.569
    So, looks like avg 7500 and max 8000 could be the sweet spot for this video?
    ~~~~~~~~~~~~~~~~~~~~~

    I'll probably keep using the Matrix above and AQ=4 and LumGain=4 since I am using high bitrates, I can't see any 'artifacts' although the documentation doesn't elaborate on what they might be.

    Still not sure about these few things though;
    1) When encoding 2nd pass I see Q: I=xxx P=xxx B=xxx can someone give me an idea what number ranges I should be trying to aim for there?

    2) Does 'average Quantizer' in my log file mean PSNR value and I guess the same reasoning for reading this will be like 1) above? My last 1 minute test has a 'average Quantizer' of 4.310

    What is a tool or filter for a quick measure of clip quality as it is very hard to see the 'tiny?' differences that could be happening when I am using settings that are pushing things to the limits.

    Thanks for any help, yes I have tried on Doom9 but there MPEG2 encoding forum is almost non-existant and I got no response yet. Maybe no-one encodes to MPEG2 anymore?
    Last edited by jclampy; 4th Jan 2012 at 22:51. Reason: small correction
    Quote Quote  
  4. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    Are you trying to create a DVD? If so, why not specify the full 9mbps max and try 8000 average.
    Why are you using 1/2 D1?. Why not use the full 720*576?
    What is the resolution of the source?

    I don't really think HCenc is supposed to be used this way. Specifying a BIAS of 100 forces it to almost CBR.
    Try not using BIAS at all and let the program decide.

    I don't think average quantizer and PSNR are the same, although both can be considered a measurement of quality.

    Perhaps you should post a 15 second clip of the source and allow the forum members a better chance at advising you.
    Quote Quote  
  5. Using 8000 because I want audio as PCM 1536.

    Source is 352x576 so am just keeping at source resolution.

    I will try a test without overiding bias defaults now and see what happens.

    Source is an analog capture that I have had to do heaps of filtering on to clean up interference and rainbowing. I could provide a sample but only if it is really deemed necessary to answer these questions? Certainly someone who has alot of experience or knowledge of using high bitrates encoding with HCenc could probably speak from experience?

    Source is 24GB and 10secs is about 50MB. If you really need this sample let me know and I'll post the link.
    Quote Quote  
  6. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    jclampy, I don't think anybody here knows the HCenc to the level you're asking. If you're sensitive about posting a source clip,
    fair enough - because I can't really promise you it will help. Did you capture your source from videotape?
    Did you get the best capture you possibly could?
    I took a look at your doom9 post and you got a response from Hank. He is the HCenc author. Follow up your questions
    with him. He might be able to advise you on the usage of AQ and Lumgain. I'm pretty sure AQ4 and LUMGAIN 4 are not the answer.
    Quote Quote  
  7. I am not sensitive about posting a sample, it is just the sample I already have on the net is 50MB 10 seconds long and I don't have the bandwidth to upload anything bigger for another week. Also 10 seconds would not be long enough to measure any differences with encoding settings.

    Source was not video tape but from an analog broadcast. My brother made the capture back in 2005. I have just decided to do something with it now. Capture was probably not the best it could have been but I was not involved with it back then.

    I will see if Hank can shed some light on my questions, but if someone here could answer them as well or in the meantime that would be great.

    I tried a test run with VBR bias set at default 0:
    avg 8000 max 8000 = average bitrate adjusted 5 times + average encoded bitrate 7290kb/s + avg quant 4.249

    Suprisingly no real difference between that and the previous test using bias 100.

    All my tests are with 6 minutes of footage. With the heavy filtering 2 passes takes about 1 hour.
    Quote Quote  
  8. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    Well to get any effect out of BIAS you have to have a spread between the max and average bitrate.
    Post the URL and I'll take a look. Is the clip your source, or is your HCenc encode? A clip of both would be helpful
    to understand what's happening.

    What is the main problem in your encode? Is it blocking in dark area's ?
    I assume you're trying to create DVD compliant mepg-2 ?
    Quote Quote  
  9. It probably won't help me with these encoding settings but maybe it might help someone with the interference/derainbowing and denoising I have done in the script for those that might have similar issues.

    Ok here is a link to the sample of SOURCE; http://www.mediafire.com/?fjd08d2na26jot0

    Sorry, didn't want to put that much time on the logo at the beginning of the clip but it was to show how the logo would jitter up and down if the tff or bff wasn't set the right way around when encoded DVD played back on old Analog CRT television set.

    Here is my script:
    Code:
     
    AviSource("H:\capture.avi",false,pixel_type="RGB32") #[AUDIO DISABLED]
    Trim(16924,20521) ++ Trim(20522,25731) ++ Trim(25732,33505) ++ Trim(33506,39819) ++ Trim(42296,49053) ++ Trim(49054,55847) ++ Trim(58722,66339) ++ Trim(66340,72319) ++ Trim(74670,79749) ++ Trim(79750,88489) ++ Trim(88490,92975) ++ Trim(92976,102025)
    AssumeFrameBased()
    AssumeTFF() #[CAPTURE IS TOP FIELD FIRST]
    Converttoyv24(interlaced=true,matrix="REC601") #lossless conversion?
    Converttoyv12(interlaced=true,matrix="REC601",chromaresample="bicubic",ChromaOutPlacement="mpeg2") #lossy conversion?
    ChromaShiftSP(0.25,0.75) #Chroma fix original source errors including after colour conversion and after strong SmoothUV settings offset Chroma
    QTGMC(Preset="medium",NoisePreset="medium",EZDenoise=0,EZKeepGrain=0,NoiseProcess=0,ShowSettings=false)
    SelectEven()
    DeFreq(fx=14.5,fy=0,dx=1.5,dy=0.5,sharp=1.0,plane=2,show=0,info=false) #Derainbow LARGE Set for Chroma (V) only ***DONE***
    DeFreq(fx=62.5,fy=-49,dx=1.5,dy=0.0,sharp=1.0,plane=2,show=0,info=false) #Derainbow SMALL Set for Chroma (V) only ***DONE***
    DeFreq(fx=63,fy=50.5,dx=1.5,dy=0.0,sharp=1.0,plane=1,show=0,info=false) #Derainbow SMALL Set for Chroma (U) only ***DONE***
    DeFreq(fx=65,fy=12.5,dx=20,dy=0.0,sharp=1.0,plane=0,show=0,info=false) #Deinterference Set for Chroma (Y) only ***DONE***
    FluxSmoothT(6) #Temporal Smoother
    SmoothUV(5,50) #Spatial Smoother Chroma only (UV) Derainbow, not luma (Y)
    BilateralFilter(1,3,3.0) #Spatial GPU Smoother
    SmoothTweak(smooth=100,saturation=0.9,hue1=2,hue2=2,limiter=false,useOPT=1,show=false) #hue1=yellow/blue  hue2=green/red
    Letterbox(14,14,x1=2,x2=2,color=$000000)
    Limiter()
    No, I don't have problems with blocking. Just want to make sure I am encoding with proper settings for high bitrate. Basically want maximum quality where size/time is not an issue.

    Yes is fully "DVD compliant mepg-2" as far as I am aware.

    My encoding settings are in the post at top of page, unless I missed anything out.

    I am currently using DVDLab-Pro2 and Nero although probably swap Nero for Imgburn (or whatever it is called).
    Quote Quote  
  10. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    Interesting - that's your filtered source? How was the original? Seriously though, when you made your DVD and
    watched it on the TV was it acceptable ? Did you try a lower aq/lumgain, 2,2 for example?
    Did you try any other encoders?

    I don't think you have to do anything special to encode at those bitrates. Beyond some knowledge of when/how to
    use AQ and Lumgain and whether to use a different matrix, I don't see what else you can do.
    I appreciate you're trying to squeeze out the best quality you can. Perhaps someone else will
    comment, and advise you further...
    Quote Quote  
  11. The file is from my source.
    The script provided will show you how I have cleaned it up.
    You have to use both together to see what it looks like now.

    Yes, seems you understand what I am asking about now, what AQ/LG/bias/etc settings for best quality at high bitrates.

    Sorry you can't help me, hopefully by looking at my script you might get some tips how to use defreq/smoothuv etc.
    Maybe I have helped you?
    Cheers.
    Quote Quote  
  12. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    Assistance with the script is a whole different thing. I thought the script was set and the mpeg encoding was the issue.
    I'll try running your script later today, but I'm not a script expert. (there are some here though)
    If I were you, I'd start a new thread with your source and the script a the subject - you'll probably get more takers.
    Good luck!
    Quote Quote  
  13. No, I don't need any help apart from answers to these questions:
    1) When encoding 2nd pass I see Q: I=xxx P=xxx B=xxx do you have an idea what number ranges I should be trying to aim for there? If I am not getting numbers I should be what would adjust this?

    2) Does 'average Quantizer' in my log file mean PSNR value and I guess the same reasoning for reading this will be like 1) above?

    3) I am using AQ4 because I am using a high 7000 to 8000 bitrate. The should be nothing wrong with that right?

    4) I am using Lumigain4 because I hope it will give me the most quality, but can it also be detrimental going that high? The documentation says something about artifacts may appear, but what type of artifacts as I got no idea what to look for?

    I just thought my script might have helped you or others see what can be done with defreq/smoothuv/etc...

    Cheers.
    Quote Quote  
  14. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    OK. what version of Hcenc 25 or 26? Where do you see "Q: I=xxx P=xxx B=xxx" - is it the log or during the encode in the window?

    There is no right or wrong re: AQ and Lumgain, *it depends on the source*. You'll have to trust your eyes. (that answers your
    questions 3 and 4) See the post at 4th January 2009, 13:32 http://forum.doom9.org/archive/index.php/t-143928.html
    Quote Quote  
  15. Banned
    Join Date
    Oct 2004
    Location
    Freedonia
    Search Comp PM
    Originally Posted by jclampy View Post
    Certainly someone who has alot of experience or knowledge of using high bitrates encoding with HCenc could probably speak from experience?
    I've used HCenc tons of times and at higher bit rates than you, though not for DVD, and never had the problem you report. You are WAY beyond anything I ever do. The ONLY time I ever used a custom matrix was in the past when I would sometimes do VCD encodes, but those were with TMPGenc. I just need my videos encoded to a lower bit rate and I set a very small number of settings in the GUI like MPEG Profile. You may just need to go to Doom9 and hope you can interest someone there as you are getting down to technical details that few of us are qualified to answer. No offense but to me you're just splitting hairs with what you are doing as I doubt seriously that you can really tell any difference between a quant of 4.249 and 4.262. The general consensus I've read is that when your bit rate starts getting near 8000 it's basically impossible to tell any difference in DVD video if you go any higher.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!