I'm a bit stuck, and in need of some good advice.
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 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.
I need to convert and burn these to 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 rather fancy not installing using all-in-one type tools such as handbrake etc, even though they are marvellous.
I suppose Vapoursynth could be used to downsize via any of a few methods, eg
- qtgmc to deinterlace into double framerate progressive, then resize, then re-interlace
- yadifmod to deinterlace into double framerate progressive, then resize, then re-interlace
- DGDecodeNV which uses nvidia's cuda "purevideo" to deinterlace into double framerate progressive, then resize, then re-interlace
- DGDecodeNV which uses nvidia's cuda "purevideo" to deinterlace and resize in one go into double framerate progressive, then re-interlace
- a close-enough "pure" non-deinterlacing interlaced resizing method discussed briefly years ago
... but then, what tool to use to re-encode into PAL 576i-mpeg2 with bitrate circa 9400 Mbps, and how ??
Apparently HCenc is still considered by some to be the "best" mpeg2 encoder around, although I suppose nowadays that ffmpeg could have stabilized and be OK.
The thing is,
- I no longer have avisynth installed, only vapoursynth
- HCenc at http://hank315.nl/ says "Input can be a DGIndex/DGDecode d2v project or input using Avisynth" (a specific version of avisynth) ... so, no mp4 input file support available to me
- I have VideoReDo TVSuite V5 but it produced horrible results
- I have ffmpeg but am now unsure what commandline settings to use (and matrix, if one can be specified), it has been years since I did mpeg2 encoding
- I could pipe from vapoursynth/vspipe into something (I do now, into ffmpeg for other non-mpeg2 encoding)
- I do have the new Nero 2018 platinum (and am willing to try the Nero Recode, if you recommend it)
So, kind persons, may I have your good (and specific) advice on what tools and settings to use.
An example of the right settings on a commandline would be especially valued.
Our website is made possible by displaying online advertisements to our visitors. Consider supporting us by disable your adblocker or try DVDFab and copy, convert or make Blu-rays and DVDs! :)
+ Reply to Thread
Results 1 to 20 of 20
Last edited by hydra3333; 24th Sep 2017 at 02:00. Reason: spelling
ffmpeg MPEG2 for DVD encoding is still poor. It's not as if there is a flurry of development for MPEG2 encoding. It produces about the same quality as it did 4-5 years ago. Which was pretty badô. It's even worse for "film" DVD, no soft pulldown
I do not understand your reluctance to install avisynth (for use within avstodvd) since you already use a variant of it.
And, as stated, the program only uses it when it needs to. Although you can edit the avs file within the program if you want to tweak it.
Offers several mpeg2 encoders as well.
But, if you have a Blu-ray player, use the original recordings (unless they are too large) to make a avchd file with multiavchd and burn that to a dvd. Your Nero program might even be able to do that as well.
I did try Nero Recode but it came out looking quite grainy and the rich colours looked a bit washed out when viewed in mpc-hc which I'm guessing means some minor colour standard conversion also needs to happen (HD->SD) ? I'll need to google that in avisynth and vapoursynth, I guess.
Nero 2018 Platinum "Nero Video" program to create a blu-ray from 1080i interlaced .mp4 files.
It right royally, and with great panache, screwed up the video (it tried to smart encode, which was nice of it).
Here's a jpg screenshot when a .m2ts is played with mpc-hc https://drive.google.com/open?id=0B5RV2aJ2vdhSMFJpdFNxbW1qNEk
Well, that turned out to be relatively easy after all, thanks to some wonderful help from gonca over here, 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.
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,
This will create these folders
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 .7z file and extract the folder tree somewhere.
2.2 Copy these files/folder into the same folder as HCEnc - g:\hc
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.
*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
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
@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.
Last edited by hydra3333; 24th Sep 2017 at 02:14. Reason: spelling
This matrix is bit insane in case of DVD where strict max bitrate for video (going over 9100kbps is not recommended) limitation exist, MP@ML has internal limitation to 15000kbps - with such quantization matrix you may frequently go over MP@ML limit (btw pushing this kind of relatively flat matrix you may force encoder to use overall high quantization which affect seriously video quality - i would focus on lowering overall quantizer instead as it will be directly related to quality).
ffmpeg nowadays has also hq deinterlacer (NNEDI https://ffmpeg.org/ffmpeg-filters.html#nnedi ) available so Avisynth may be not needed at all and whole signal path can be closed within ffmpeg.
OK, that's really good information, thank you. If you have a preferred matrix for that kind of material, what would it be ? I'll start looking at what's available in HCEnc, and likely start with its default mpeg matrix at a guess.
In regard to nnedi, ok yes that'd make it able to be done all within ffmpeg, and I was indeed eyeing off ffmpeg as a possibility albeit with vapoursynth for processing due to the variety of plugins available.
I wonder, posts around the place seem to suggest that HCEnc is still the "go to" mpeg2 encoder of choice for quality over ffmpeg, and DG's GPU avisynth plugin toolset is phenomenal at speeding things up. A trade-off ?
For progressive "film" DVD you still need other tools, because no soft pulldown. Or suffer the inefficiency hit of encoding 25% more fields and interlaced encoding
For the settings suggested here
They need to be adjusted for "interlaced" encoding by adding "-flags +ilme+ildct -alternate_scan 1 -top 1" . But on some quick tests, they are actually not that bad. In some scenes maybe even slightly better than hcenc, but overall actually close. There are some issues, but I would say it's definitely usable now.
Ignore list: hello_hello, tried, TechLord
ffmpeg presently (colour conversion is another very important part and reason why ffmpeg can't be considered as fully and complete solution for video signal processing).
Ignore list: hello_hello, tried, TechLord