1-pass VBR plugin for DVDStyler

Help
Manolito
2015-02-15
2016-12-21
1 2 3 .. 9 > >> (Page 1 of 9)
  • Manolito

    Manolito - 2015-02-15

    Hi everybody,

    while DVDStyler has its main strength in menu creation and authoring, the transcoding using ffmpeg is somewhat limited (only CBR is supported).

    So I decided to write a small plugin which expands DVDStyler's transcoding abilities (Windows only):

    Important:
    Starting with DVDStyler v. 3.0.1 the plugin is included in the DVDStyler installation. No need to download and install anything. Maybe read the PDF manual for the plugin...

    Older versions of the plugin are deprecated and will no longer be maintained. For the current version I will not bother Alex Thuering to include smaller updates in his distribution, I will instead provide updates here.

    The latest update is in the attachment...
    Just extract the new files to the corresponding folders overwriting the older files.
    (The attached update is meant for DVDStyler 3.02 Beta2 and higher)

    Note:
    When DVDStyler is updated overinstalling over the old version, all settings will be preserved. This is not true for the VBR plugin. If you want to keep the changes you have made to ff_vbr.ini, change the properties of the file to Read-Only before updating DVDStyler. During installation the DVDStyler installer will then ask if you want to overwrite or keep the file.

    Cheers
    manolito

     
    Last edit: Manolito 2017-01-01
    • Xathan

      Xathan - 2015-11-19

      Hi manolito,
      thanks for all the excellent work, I use your add-on all the time.
      Using an ini file is a good idea.
      Though I still use the .bat version because I modify the cmd command lines to display a
      title (first pass, second pass) so I can readily evaluate the progress of the two-pass transcoding process. Very usefull for episodic DVDs.
      If you could in a future version of the ini version....
      Thanks again for the plug-in

       
      • Manolito

        Manolito - 2015-11-19

        Hi Xathan,
        thanks for the kind words...
        Could you please tell me how you modified the batch file to display a title?

        Cheers
        manolito

         
    • Xathan

      Xathan - 2015-11-19

      Hi Manolito
      it's an option on the cmd command
      START "FIRST" /W _ffmpeg.exe %FIRST%
      START "SECOND" /W _ffmpeg.exe %SECOND%
      Cheers

       
      • Manolito

        Manolito - 2015-11-19

        Oh, I see...
        Will implement it in the next version.

        Cheers
        manolito

        //EDIT//
        Done, new version uploaded...
        And thanks again for the suggestion, looks much better now.

         
        Last edit: Manolito 2015-11-20
  • Manolito

    Manolito - 2015-02-19

    I did not implement a 2-pass VBR mode, mainly because this would be a little tricky (the video and audio encoding would probably have to be done separately).

    Well, this decision did not last very long...

    Here is a major update to this plugin, and this time 2-pass VBR encodes are fully supported. (It was not that tricky after all).

    This version was tested with DVDStyler 2.9.2. Older versions should also work, but unlike the previous version this new version no longer makes any attempts to fix DVDStyler issues.

    Download link in the first post of the thread...

    Enjoy
    manolito

     
  • rjd0309

    rjd0309 - 2015-02-19

    Manolito, many thanks for your contributions towards making DvdStyler even better. Much appreciated!

    Robert

     
  • JMJ

    JMJ - 2015-02-20

    Thanks.

    However I believe you should change the name of the 2pass_threshold variable to something like twopass_threshold as %2pass_threshold% seems to get confused with the second argument to ff_vbr.bat always giving 2-pass vbr encoding. (Windows Vista)

    Cheers

     
  • Manolito

    Manolito - 2015-02-20

    Already done (before your post), please redownload... And thanks!

    Meanwhile I found another bug which looks like it will be hard to fix: The plugin is not compatible with DVDStyler's Normalize feature. The method´I have to use to intercept the ffmpeg call breaks the way DVDStyler uses to pass the detected loudness correction to the encoding pass. I'll see what I can do, but not looking good right now...

    Cheers
    manolito

     
  • Manolito

    Manolito - 2015-02-22

    New version with support for Audio Normalizing.
    (only 1 audio track supported right now, sorry...)

    This was a tough one...
    Analyzing the audio using ffmpeg turned out to be impossible, because DVDStyler blocks the redirect character > very effectively (escaping the character with ^ did not work), so I had no way to export the analyzing result to a file.

    The solution was to use BS1770Gain by Peter Belkner, since this tool allows to write the results directly to a file without using redirection.

    Download link in the first post of the thread...

    Enjoy
    manolito

     
    Last edit: Manolito 2015-02-22
  • Manolito

    Manolito - 2015-02-23

    New version, now supports audio normalizing for multiple audio tracks

    Hopefully the final version of this plugin (unless someone detects some major bugs)...

    Audio analyzing is done by ffmpeg again, BS1770Gain is no longer necessary. Up to 10 audio tracks per source file are supported.

    Download link again in the first post of this thread...

    Enjoy
    manolito

    //EDIT
    New version, some exception handling, added basic logging, code cleanup
    Please redownload...

     
    Last edit: Manolito 2015-02-25
  • Manolito

    Manolito - 2015-02-27

    Uploaded a new version which corrects the ffmpeg parameters for interlaced encodes.

    DVDStyler correctly uses the parameters for interlaced DCT and motion estimation, but it still uses zigzag scan. You get better quality with interlaced encodes if alternate scan is used instead.

    So I added the parameter "-alternate_scan:v:0 1" for all interlaced encodes.

    Download link in the first post...

    Cheers
    manolito

     
  • JMJ

    JMJ - 2015-02-28

    Thanks again.

    Just a note:

    REG QUERY HKEY_CURRENT_USER\Software\DVDStyler\Generate /v OutputDir

    This key doesn't exist in the portable version (unless it exist from a previous installer version). Also I believe there is a risk of a "mix up" if an ISO image is created.

    Cheers

     
  • Manolito

    Manolito - 2015-02-28

    Thanks JMJ for your feedback...

    I know that my method of retrieving the output folder will not work with the portable version. In this case the folder variable will be "\", so the log file will be created in the root folder of the drive where DVDStyler resides.
    I will probably download the portable version and try to come up with something.

    About the risk of a "mix up" when creating an ISO, could you elaborate?

    Cheers
    manolito

     
    Last edit: Manolito 2015-02-28
  • JMJ

    JMJ - 2015-02-28

    About the risk of a "mix up" when creating an ISO, could you elaborate?

    Say a user have used "Just generate" and after a while in a new project use "Create ISO" then the log file will end up in the latest folder used for "Just generate" which may be confusing.

    But I wonder why not just use a variable in ff_vbr.bat to hold the destination folder for the logfile and make that part of the settings? (Also I like to have my settings shown - perhaps my memmory isn't what it used to be :-))

    Cheers

     
  • Manolito

    Manolito - 2015-02-28

    Thanks JMJ,

    having the settings in the log file is a good idea, will do it. Just one thing: The settings entry will be repeated for every conversion, because the plugin has no way to know if _ffmpeg is called for the first time in a project, or if the current job is the third title in a project.

    For the log file destination I want to store the log file in the same folder where the dvdstyler.log is stored. I was under the impression that DVDStyler stores its log in the folder defined by the "OutputFolder" entry in the registry. Is this not correct? Will do some tests...

    Right now I am pondering another idea for improving the normalize feature. DVDStyler does not do peak limiting, it uses the ReplayGain algorithm instead with a target loudness of -18 LUFS. This insures even loudness over various clips, but it does not protect against audio clipping. In some of my test conversions I ended up with heavy and very audible clipping.

    For ffmpeg I did not find any setting for the volume adjustment filter which provides clipping protection (like SoX does for example). So my idea is to run a first analyzing pass with the "volumedetect" parameter to determine the audio peak level. The second "replaygain" pass determines the volume correction for -18 LUFS, and then I could easily calculate the maximum volume adjust value which does not cause clipping. Of course I would then end up with clips which are not all at -18 LUFS, but IMO this is much better than audible clipping. What do you think?

    Cheers
    manolito

     
    Last edit: Manolito 2015-02-28
  • JMJ

    JMJ - 2015-02-28

    "OutputFolder" entry in the registry. Is this not correct?

    No. It uses the TempDir. However AFAIK it uses the same key (Generate/TempDir) both for "Just generate" and "Create ISO".

    What do you think?

    I havn't used normalize that much to hear audiable clipping (just seen it's runing) but if you can see your way out of avoiding it I think it's worth it. And I truely don't know that much about FFMpeg's audio filters to be any expert on how to avoid it.

    Cheers

     
  • Manolito

    Manolito - 2015-03-01

    New version...

    Now uses the TempDir reg value for the log file destination.

    Improved the log to include the plugin settings. I avoided the repeated settings entry by only adding it if the log file does not exist yet. This means that the log file should be deleted before starting a new project. If you don't, all log entries will be appended to the existing file.

    DVDStyler knows when a new project is started, and it will start a new log file as needed. My plugin does not know this, so I have only two options:
    Start a new log for every new conversion (only the log for the last title in a project would be kept), or always append log entries to an existing log file. I prefer the second option.

    For the normalize option I did find an option "replaygain_noclip", but so far all my attempts to use it did not work... Yeah, this is ffmpeg, its documentation is pure chaos.

    Cheers
    manolito

    //EDIT
    Updated version, now supports the portable version of DVDStyler

     
    Last edit: Manolito 2015-03-01
  • Manolito

    Manolito - 2015-04-28

    Small bug fix:

    If the DVDStyler TempDir is left at the default (Windows System Temp Folder) the plugin could not detect the Temp folder.

    Please redownload...
    (Link in the first post of the thread)

    Cheers
    manolito

     
    • Manolito

      Manolito - 2015-05-24

      Another update:

      My previous string replacement method did not work under newer versions of Windows. Thanks to JMJ for detecting and fixing it...

      As usual download link in the first post of this thread...

      Cheers
      manolito

       
      • Manolito

        Manolito - 2015-06-11

        New version with the following changes:

        1. Matrix selection is now independent of the encoding mode
        2. Log improvements

        Download link in the first post of the thread...

        Cheers
        manolito

         
  • Manolito

    Manolito - 2015-08-19

    New version adds clipping protection for the DVDStyler normalizing mode.

    Background:
    The DVDStyler normalizing is NOT peak normalizing as the name suggests. Instead it uses the ReplayGain normalizing method which ensures even loudness levels for different sources, but it does not offer any clipping protection.

    The new version of my plugin additionally analyzes the maximum peak level of the source and makes sure that the maximum gain can never exceed the clipping level.

    Download link in the first post of this thread...

    Cheers
    manolito

     
    Last edit: Manolito 2015-08-19
  • Manolito

    Manolito - 2015-10-14

    New version:

    The plugin is now compatible with the "Use Mplex - YES" option. There is one
    restriction:
    If "Use Mplex - YES" is selected and the "Normalize" option is also checked, then the ReplayGain Normalizing will only be applied to the first audio track of the source file.

    Download link in the first post of this thread...

    Cheers
    manolto

     
    Last edit: Manolito 2015-10-14
  • Robert Slapar

    Robert Slapar - 2015-10-16

    Manolito, seems like you have done a great job here. I don't understand a lot of the technical stuff about CBR vs VBR, so I have a couple of basic questions:
    1. If I create a DVD using 2-Pass VBR High Quality will I see a difference (better) compared to the standard DVDStyler ?
    2. If I get the same quatlity video output, will the file size be smaller
    3. Does the content of the video have a significant impact on how effectice the 2-Pass VBR High Quality is ?
    4. Does the 2 pass take about twice as long to render than the CBR ?
    5. How easy is it to use if I install it ?

    Cheers.

     
    • Manolito

      Manolito - 2015-10-16

      Hi Robert,

      if you want to get the best possible quality from your source files, it does help a lot if you familiarize yourself with some basic methods like CBR, VBR, 1-pass and multi-pass, custom quant matrices and some other stuff. But I do not want to intimidate you, my plugin is easy to use, and for medium and low bitrate encodes you will most likely see a better quality.

      Now for your questions:
      1. For bitrates below 5000 kbps (depends also on the source characteristics) you will probably see a difference.
      2. DVDStyler automatically calculates the bitrate to fill a DVD blank as much as possible. And at the same bitrate the file size will also be the same, but at a better quality.
      3. Yes it does. Content with low complexity (talking heads) will profit much less than high action or high detail content.
      4. It will take a little less than twice as long because the first pass uses a constant quantizer and does not encode audio.
      5. You set it up once (or use the defaults), and it is transparent from now on. To set it up you define bitrate thresholds to switch between CBR, VBR, 1-pass and 2-pass. You can also define thresholds for switching between different custom quant matrices, but the defaults work nicely.

      You should however know how to edit a text file in Notepad. And after every update of DVDStyler you need to reinstall the plugin.

      Cheers
      manolito

       
1 2 3 .. 9 > >> (Page 1 of 9)

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks