Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
|
|
Thread Tools | Search this Thread | Display Modes |
24th September 2017, 07:00 | #1 | Link |
Registered User
Join Date: Oct 2009
Location: crow-land
Posts: 540
|
lovely HCEnc:-PAL 1080i mpeg4 -> avisynth/dgsource -> HCEnc -> PAL 576i mpeg2 for DVD
I have PAL 1080i TV captures in .mp4 files - lots of very fast sports movement across a large grassed field with lots and lots of fast panning and zooming in and out and the ball tumbling in the air and bouncing around on the ground whilst beefy blokes crunch each other to get it and give it to their mates and kick goals.
I needed to convert and burn these PAL 1080i (interlaced) .mp4 onto PAL DVDs for "timeshifted viewing", which means converting from 1080i-mpeg4-avc into 576i-mpeg2 (leaving as interlaced to maintain "motion fluidity" as I was once told years and years ago). I still read around the place that HCEnc is the goto tool for mpeg2 (DVD) encoding ... but how to feed it .mp4 files ? After some angst it turned out to be relatively easy after all, thanks to some beaut tools like HCEnc/avisynth/DG's-tools and some wonderful help from gonca here http://rationalqm.us/board/viewtopic.php?f=7&t=597 about using avisynth/GPU to feed HCEnc, and info at these on how to not install avisynth, only needing to copy a few things into the right folders. https://forum.doom9.org/showthread.php?t=172124 https://forum.doom9.org/showthread.p...75#post1720075 And, on top of that, it uses the GPU to achieve results much much faster. For posterity, in case it's handy for someone else, an example which worked in Win10 x64 :- 1. download and extract the latest HCEnc stuff from http://hank315.nl/ into a folder. In my case it was v0.28 into, say, g:\HC This will create these folders g:\hc g:\hc\DGDecode g:\hc\matrix g:\hc\misc g:\hc\plugins 2. Download avisynth universal installer from here https://forum.doom9.org/showthread.php?t=172124 No need to run the batch file or use any admin privileges ... 2.1 Open the avisynth universal installer .7z file and extract the folder tree somewhere. 2.2 Copy these files/folder into the same folder as HCEnc - g:\hc AVSPLUS_x86\plugins AVSPLUS_x86\AviSynth.dll AVSPLUS_x86\DevIL.dll 3. After donating to Donald Graft to use seriously GPU accelerated avisynth plugins (not an ad, this is what I needed to get huge FPS decode/encode speed, .mp4 input file support, other gpu plugins) Download dgdecnv, refer here: http://rationalqm.us/dgdecnv/dgdecnv.html and here http://rationalqm.us/board/viewforum.php?f=8 And extract the 32bit .dll and .exe files etc into folder g:\hc\plugins Remember to create the DG licence file in the same plugins folder as the .exe's are in - g:\hc\plugins 4. The rest can be automated by batch files and using different folders (and I will), however I did this by hand to see if it worked. It did. 4.1 Create a scratch folder eg D:\TEMP on a drive with lots and lots and lots of spare disk space 4.2 Create/edit the g:\hc\hc.ini file to look a bit like this, remembering my input is PAL 1080i mpeg4 and my ouput is to be PAL 576i mpeg2 The custom matrix I chose was "Fox New" just because someone recommended it for high bitrates. You could remove the line *PREVIEW if you wanted it to go a tad quicker. Depending on my prevailing video card's GPU I may try omitting *LOSSLESS to see if it's any faster. Code:
*DBPATH D:\TEMP *LLPATH D:\TEMP *BITRATE 9200 *MAXBITRATE 9400 *PROFILE best *AUTOGOP 15 *DC_PREC 10 *INTERLACED *TFF *CHROMADOWNSAMPLE 1 *CLOSEDGOPS *BIAS 50 *LASTIFRAME *PREVIEW *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 2 *LOSSLESS *PRIORITY normal *WAIT 30 4.4 Run DGIndexNV.exe over the input file g:\hc\test-HD-Q3.mp4 to save a .dgi file g:\hc\test-HD-Q3.dgi 4.5 Create a new .AVS file something like this g:\hc\test-HD-Q3.avs which is used as input to HCEnc and intends to use the GPU to do most of the hard work of: read the .mp4, deinterlace double framerate, resize HD to SD, sharpen a tad, re-interlace Code:
LoadPlugin("g:\hc\plugins\DGDecodeNV.dll") DGSource("g:\hc\test-HD-Q3.dgi", use_top_field=true, deinterlace=2, fieldop=0, resize_w=720, resize_h=576) Blur(0,0.25) DGSharpen(last, strength=0.3) SeparateFields().SelectEvery(4,0,3).Weave() #reinterlace - ASSUMED TFF HERE # BLUR(0,1) per http://forum.doom9.org/showthread.php?p=1488308#post1488308 Code:
@echo on G: cd "g:\HC" del "g:\HC\test-HD-Q3.mpv" type "g:\HC\HC-pal-dvd-interlaced.ini" type "g:\HC\test-HD-Q3.avs" HCenc_028.exe -i "g:\HC\test-HD-Q3.avs" -o "g:\HC\test-HD-Q3.mpv" -ini "g:\HC\HC-pal-dvd-interlaced.ini" -wait 10 pause exit There you go. Related post with others' suggestions here https://forum.videohelp.com/threads/...or-dvd-burning Last edited by hydra3333; 24th September 2017 at 07:14. |
Thread Tools | Search this Thread |
Display Modes | |
|
|