VideoHelp Forum
+ Reply to Thread
Results 1 to 20 of 20
Thread
  1. Member hydra3333's Avatar
    Join Date
    Oct 2009
    Location
    Australia
    Search Comp PM
    Hello.

    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.
    Last edited by hydra3333; 24th Sep 2017 at 02:00. Reason: spelling
    Quote Quote  
  2. Member
    Join Date
    Aug 2006
    Location
    United States
    Search Comp PM
    Try AVStoDVD to make an mpg file. If you are OK with a simple menu or no menu, it authors as well as converts. It allows adding some AVISynth scripting and uses HCEnc for VBR encoding.
    Ignore list: hello_hello, tried, TechLord, Snoopy329
    Quote Quote  
  3. Member hydra3333's Avatar
    Join Date
    Oct 2009
    Location
    Australia
    Search Comp PM
    Thank you.

    I was hoping to get away without installing avisynth (avstodvd "Requires AVISynth(included in package)").
    Quote Quote  
  4. Member hech54's Avatar
    Join Date
    Jul 2001
    Location
    Yank in Europe
    Search PM
    Originally Posted by hydra3333 View Post

    I was hoping to get away without installing avisynth
    It's 6MB and does absolutely nothing unless a program needs to use it.
    Quote Quote  
  5. Originally Posted by hydra3333 View Post
    although I suppose nowadays that ffmpeg could have staabilized and be OK.
    Depends on your definition of "OK"

    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
    Quote Quote  
  6. Member DB83's Avatar
    Join Date
    Jul 2007
    Location
    United Kingdom
    Search Comp PM
    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.

    Commercial over.

    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.
    Quote Quote  
  7. Member
    Join Date
    Aug 2006
    Location
    United States
    Search Comp PM
    Originally Posted by hech54 View Post
    Originally Posted by hydra3333 View Post

    I was hoping to get away without installing avisynth
    It's 6MB and does absolutely nothing unless a program needs to use it.
    It has been a while since I converted from 1080i to DVD, but I think AVStoDVD would use avisynth for down-scaling HD video to DVD resolution.
    Ignore list: hello_hello, tried, TechLord, Snoopy329
    Quote Quote  
  8. Originally Posted by poisondeathray View Post
    Originally Posted by hydra3333 View Post
    although I suppose nowadays that ffmpeg could have staabilized and be OK.
    Depends on your definition of "OK"

    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
    https://forum.doom9.org/showthread.php?p=1809116#post1809116
    Quote Quote  
  9. Member hydra3333's Avatar
    Join Date
    Oct 2009
    Location
    Australia
    Search Comp PM
    Originally Posted by DB83 View Post
    Commercial over.
    All input valued.

    Originally Posted by DB83 View Post
    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.
    Yes, Nero does. I am in the process of burning my first native blue-ray, via Nero, just because I can ... but currently can't afford to buy a blu-ray player given the minimal use it'd get

    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.

    Originally Posted by poisondeathray View Post
    Depends on your definition of "OK".
    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.
    Ah. Jolly, Bother and Dash it all.

    Originally Posted by usually_quiet View Post
    It has been a while since I converted from 1080i to DVD, but I think AVStoDVD would use avisynth for down-scaling HD video to DVD resolution.
    OK, I'll put avstodvd on my list of things to try.

    My goodness, what a really timely and interesting looking thread. Thank you ! I reckon my first port of call is to visit over there and poke around and maybe experiment a bit.
    Quote Quote  
  10. Member hydra3333's Avatar
    Join Date
    Oct 2009
    Location
    Australia
    Search Comp PM
    Originally Posted by DB83 View Post
    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.
    Well, so much for the 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
    Quote Quote  
  11. Member hydra3333's Avatar
    Join Date
    Oct 2009
    Location
    Australia
    Search Comp PM
    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:
    http://rationalqm.us/board/viewtopic.php?f=7&t=597

    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.php?p=1720075#post1720075

    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 .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.3 Create/edit a new file g:\hc\HC-pal-dvd-interlaced.ini as a copy of the hc.ini above.

    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
    4.6 create a new .bat file something like this g:\hc\test-HD-Q3.bat
    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
    4.7 double click on the .bat file and watch it run

    There you go.
    Last edited by hydra3333; 24th Sep 2017 at 02:14. Reason: spelling
    Quote Quote  
  12. 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.
    Quote Quote  
  13. Member hydra3333's Avatar
    Join Date
    Oct 2009
    Location
    Australia
    Search Comp PM
    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 ?
    Quote Quote  
  14. Originally Posted by pandy View Post
    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.
    But you can't really use it by itself, because it doesn't correct the field offset . It can be used as an interpolater with something like yadifmod or tdeint, but ffmpeg doesn't have it. But when you are downsizing 1920x1080 for DVD, it really doesn't matter that much as long as the field offset is corrected - you're not going to be able to tell the difference between yadif and something like qtgmc

    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
    https://forum.doom9.org/showthread.php?p=1809116#post1809116

    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.
    Quote Quote  
  15. Originally Posted by poisondeathray View Post
    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
    Encode 23.976 fps progressive with ffmpeg then use dgpulldown to add pulldown flags.
    Quote Quote  
  16. Originally Posted by jagabo View Post
    Originally Posted by poisondeathray View Post
    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
    Encode 23.976 fps progressive with ffmpeg then use dgpulldown to add pulldown flags.
    That's what I mean by you still need "other tools" . ffmpeg cannot do it alone, even though it was on the to-do list for about 10 years
    Quote Quote  
  17. Member
    Join Date
    Aug 2006
    Location
    United States
    Search Comp PM
    Originally Posted by hydra3333 View Post
    Yes, Nero does. I am in the process of burning my first native blue-ray, via Nero, just because I can ... but currently can't afford to buy a blu-ray player given the minimal use it'd get
    I should probably mention that if your TV was purchased after 2011, it may have a built-in media player capable of playing HDTV files. I have a 2011 LG TV and a 2012 Samsung TV which are both capable of playing HDTV captures (from my PC TV tuner devices) via their USB ports. I use a USB stick, but a small 2.5" USB hard drive could work. A 3.5" USB hard drive with its own power supply would work too.
    Ignore list: hello_hello, tried, TechLord, Snoopy329
    Quote Quote  
  18. Originally Posted by poisondeathray View Post
    But when you are downsizing 1920x1080 for DVD, it really doesn't matter that much as long as the field offset is corrected - you're not going to be able to tell the difference between yadif and something like qtgmc.
    Can't disagree - with HD source yadif is sufficient and way faster.

    Originally Posted by poisondeathray View Post
    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.
    Can't disagree - this is one of few main weaknesses of the 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).
    Quote Quote  
  19. Member hydra3333's Avatar
    Join Date
    Oct 2009
    Location
    Australia
    Search Comp PM
    Originally Posted by usually_quiet View Post
    I should probably mention that if your TV was purchased after 2011, it may have a built-in media player capable of playing HDTV files. I have a 2011 LG TV and a 2012 Samsung TV which are both capable of playing HDTV captures (from my PC TV tuner devices) via their USB ports. I use a USB stick, but a small 2.5" USB hard drive could work. A 3.5" USB hard drive with its own power supply would work too.
    Ah, yes. This is the path I'll take then for time-shifted viewing, the original on a portable hard drive.

    Originally Posted by poisondeathray View Post
    For the settings suggested here
    https://forum.doom9.org/showthread.php?p=1809116#post1809116

    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.
    Well well, beaut ! Thank you. I'll give this a try, now that I've done the HCEnc thing and compare them (for longer term time-shifted viewing dvd seems best, disk drives seem to die every few years).
    Quote Quote  
  20. Member
    Join Date
    Aug 2006
    Location
    United States
    Search Comp PM
    Originally Posted by hydra3333 View Post
    Originally Posted by usually_quiet View Post
    I should probably mention that if your TV was purchased after 2011, it may have a built-in media player capable of playing HDTV files. I have a 2011 LG TV and a 2012 Samsung TV which are both capable of playing HDTV captures (from my PC TV tuner devices) via their USB ports. I use a USB stick, but a small 2.5" USB hard drive could work. A 3.5" USB hard drive with its own power supply would work too.
    Ah, yes. This is the path I'll take then for time-shifted viewing, the original on a portable hard drive.
    Originally Posted by poisondeathray View Post
    Well well, beaut ! Thank you. I'll give this a try, now that I've done the HCEnc thing and compare them (for longer term time-shifted viewing dvd seems best, disk drives seem to die every few years).
    I store HD recordings that I want to keep indefinitely on Blu-ray, DVD-R (if the files are small enough), or DVD+R DL, but without authoring or downscaling. Watching them again with a PC is acceptable to me. Authoring is reserved for recordings made by my DVD recorder from SD channels, as there is no reduction in resolution or significant quality loss.
    Ignore list: hello_hello, tried, TechLord, Snoopy329
    Quote Quote  



Similar Threads

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