Log in

View Full Version : HCEnc problem with Interlaced Content @ Low Bitrate


peterhuh
26th February 2008, 20:49
Hi!

I'm trying to squeeze four eps of my local TV drama onto 1 DVD. This comes to an average bitrate of about 3000 kbps. When viewing the disc with my CRT TV, i notice a slight but irritating problem.

In a scene, areas with fast motion, like people waving their hands around while talking, the motion stays fluid. Just like what 50i suppose to look.
But within the same scene, areas with slow motions, like the cheeks on people faces when they are sitting, the motion seems to judder a little. Very much like what i get when i deinterlace my source to 25p prior to encoding.
This is a little irritating because the areas that judder and those that don't, appear within the very same scene. You know, when you are comparing pictures side-by-side, the difference is very noticeable.

Ok, here are the details:-


video = MPEG2Source("VTS_01_1.d2v").AssumeTFF()
audio = WAVSource("VTS_01_1 T01 2_0ch 384Kbps 48KHz.wav")
AudioDub(video,audio)
Trim(1469,21718)+Trim(26749,42687)+Trim(47438,59512)+Trim(64636,73534)+Trim(78165,90898)
FFT3DGPU(interlaced=true)


Encoder: HCgui 0.22
Avg Bitrate: 3000
Profile: Best
DC Prec: 9
GOP: 15
Interlacing: TFF
Matrix: MPEG

To determine if the problem really lies with HCEnc, I have done four different encodes with the same .avs source. All 2-pass.

-HCEnc @ 9000 kbps
-HCEnc @ 3000 kbps
-CCE @ 3000 kbps
-TMPGEnc @ 3000 kbps

HCEnc @ 9000 kbps - no judder at all
HCEnc @ 3000 kbps - judder, but only in areas with slight motion.
CCE @ 3000 kbps - no judder, but shows more MPEG artifacts like ringing...
TMPGEnc @ 3000 kbps - judder, and shows ringing as well.

Sorry, i'm unable to provide an absolute index of "judder-ness". I don't think PSNR or SSIM will show. Neither can i upload pictures showing the problem, because the problem lies with its motion. I can probably upload a short mpeg clip onto some filesharing website if there is a need to. But you will need to watch them on a CRT TV because, i have difficulty identifying the problem on my computer's monitor.

My best guess is that HCEnc codes two fields with only one motion vector in areas with little motion. I might be wrong.

Thanks for reading. ^^

Boulder
27th February 2008, 07:06
Please save your encoding settings in an ini file and post the contents here.

peterhuh
27th February 2008, 10:43
tv.ini

*OUTFILE C:\Documents and Settings\Min Jie\Desktop\3000.m2v
*BITRATE 3000
*PROFILE best
*ASPECT 4:3
*AUTOGOP 15
*INTERLACED
*MATRIX mpeg


that's all? lolz, i don't think it really helps~ =p

Boulder
27th February 2008, 10:51
Nope, didn't help much ;)

If I remember correctly, ffdshow has the option to show the motion vectors. If you can get it to decode the m2v file, using VDub for viewing, you might be able to figure out why HC at 9Mbps doesn't show jitter whereas 3Mbps does.

20-40
28th February 2008, 11:21
I always squeeze six captured episodes on one DVD... but (sorry) using mencoder. Anyhow, mpeg2 part is common, and here is my drag&drop bat which is saved on my desktop. Such DVDs are playable on ALL standalones I've owned, and if someone cann pull ideas from it, so be it..
It looks long and scary, but infact, only two lines were relevant.

@rem #####################################################################################
@rem ### DRAG&DROP to av2mpeg2 [23.976 fps to 25 fps with frame size 480x576] ##
@rem ## (PAL SVCD format) in two pass (HQ) encoding for 5 hours as DVD (3 movies). ##
@rem ### If needed, limit range in "preparation-time" by adding -ss 0:60 -endpos 2:00 ###
@rem ### INPUT can be almost anything - BUT - filenames MUST be without blank (white) ###
@rem ### spaces (for example; my.video.avi or my_video.avs is OK but my video.flv NOT) ###
@rem #####################################################################################
@rem 1st-pass...
set PATH=C:\xvid_encraw;%PATH%
@rem ####### ADJUST path as you need (I have almost all vid. stuff in this folder) ########
mencoder %1 -sub %1.srt -subpos 92 -sws 9 -spuaa 4 -vf hqdn3d,pp=0x77,expand=:::::4/3,scale=480:576,harddup -ovc lavc -nosound -lavcopts vcodec=mpeg2video:vpass=1:lmin=1:lmax=10:vrc_eq=tex:keyint=12:vmax_b_frames=2:mbd=2:vstrict=-1:vrc_buf_size=917:intra_matrix=8,9,12,22,26,27,29,34,9,10,14,26,27,29,34,37,12,14,18,27,29,34,37,38,22,26,27,31,36,37,38,40,26,27,29,36,39,38,40,48,27,29,34,37,38,40,48,58,29,34,37,38,40,48,58,69,34,37,38,40,48,58,69,79:inter_matrix=16,18,20,22,24,26,28,30,18,20,22,24,26,28,30,32,20,22,24,26,28,30,32,34,22,24,26,30,32,32,34,36,24,26,28,32,34,34,36,38,26,28,30,32,34,36,38,40,28,30,32,34,36,38,42,42,30,32,34,36,38,40,42,44:aspect=4/3:vrc_maxrate=3600:vbitrate=1848 -mpegopts format=mpeg2:vframerate=25:muxrate=3048 -of mpeg -ofps 25 -fps 24000/1001 -o %1%.mpg
@rem 2nd-pass...
mencoder %1 -sub %1.srt -subpos 92 -sws 9 -spuaa 4 -vf hqdn3d,pp=0x77,expand=:::::4/3,scale=480:576,harddup -ovc lavc -oac lavc -lavcopts acodec=mp2:abitrate=128:vcodec=mpeg2video:vpass=2:lmin=1:lmax=10:vrc_eq=tex:keyint=12:vmax_b_frames=2:mbd=2:vstrict=-1:vrc_buf_size=917:intra_matrix=8,9,12,22,26,27,29,34,9,10,14,26,27,29,34,37,12,14,18,27,29,34,37,38,22,26,27,31,36,37,38,40,26,27,29,36,39,38,40,48,27,29,34,37,38,40,48,58,29,34,37,38,40,48,58,69,34,37,38,40,48,58,69,79:inter_matrix=16,18,20,22,24,26,28,30,18,20,22,24,26,28,30,32,20,22,24,26,28,30,32,34,22,24,26,30,32,32,34,36,24,26,28,32,34,34,36,38,26,28,30,32,34,36,38,40,28,30,32,34,36,38,42,42,30,32,34,36,38,40,42,44:aspect=4/3:vrc_maxrate=3600:vbitrate=1848 -mpegopts format=mpeg2:vframerate=25:muxrate=3048 -srate 48000 -channels 2 -of mpeg -ofps 25 -fps 24000/1001 -o %1%.mpg
@rem ################################# LEGEND: (short) ###################################
@rem ## %1 dragged and dropped input file (mplayer/mencoder can read almost everything) ##
@rem ## "-sub" is for subtitles (if needed), file-name must be for example xxxx.avi.srt ##
@rem ## "-subpos" is a position of subs in percents of frame height ##
@rem ## "-spuaa" is subtitles filter, "4" gives the best look ##
@rem ## REMARK: If you don't need/have/want subtitles, omit all related switches. Also, ##
@rem ## recent SVN revisions (after 24874 for sure) of mencoder are unable to find ##
@rem ## config files AND fonts (valid for Win for sure) AND are unable to perform ##
@rem ## needed "expand" before "scaling" for subtitle's "living space". ##
@rem ## "-sws" is a scaler, "9" is for Lanczos ##
@rem ## "-vf" is/are line-up of video filters, hqdn3n is HQ denoiser, pp=0x77 is for ##
@rem ## deblocking & deringing, ##
@rem ## "expand=" is a way to add borders for subtitles, "scale=" is obvious. ##
@rem ## "-ovc" video codec is "lavc" (libavcodec which can encode in almost all formats ##
@rem ## "-lavcopts" here comes all options of chosen codec; "acodec" is mp2, "abitrate" ##
@rem ## is audio bitrate, "vcodec" is mpeg2, "vpass" is first or second, "lmin" and ##
@rem ## "lmax" are min/max quantiziers, "vrc_eq=tex" is a chosen main ratecontrol ##
@rem ## equation ("tex" is for constant quality), "keyint" is 12 (keyframe interval ##
@rem ## needed by many authoring programs), "vmax_b_frames" is obvious 2, "mbd" is for ##
@rem ## macroblock decision algorithm and choice is "2" (HQ), "vstrict=-1" is default ##
@rem ## already, "vrc_buf_size" is SVCD's 917 kB, "intra" and "inter" are matrices of ##
@rem ## choice, "aspect" is player's 4:3, "vrc_maxrate" is upper bitrate limit, ##
@rem ## "vbitrate" is a chosen bitrate for mpeg2. ##
@rem ## "-mpegopts" are output format/mux. options of fps and muxrate ##
@rem ## "-srate" is audio sampling rate, we use 48 kHz and stereo ("-channels") ##
@rem ## "-ofps" is important IF input/output FPS differs (many inputs are 23.976 but ##
@rem ## now mencoder will take care about a/v synch. and add frames to achieve chosen ##
@rem ## number of 25 fps (PAL) (-ofps as output frame rate). REMARK: If INPUT is 29.970 ##
@rem ## (DEinterlaced, BUT NOT "decimated" avi) add "pullup," as FIRST in the video ##
@rem ## filters line-up ("-vf") and change "-fps" in 30000/1001 (do not change "-ofps").##
@rem ## "-o" is output, filename is d&d-ed input with .mpg extension and acceptable for ##
@rem ## DVD-authoring programs - such DVD is playable on all standalone DVD players. ##
@rem ######################## http://man.cx/mencoder(1) #################################
@rem #####################################################################################