VideoHelp Forum
+ Reply to Thread
Results 1 to 9 of 9
  1. Hi, I always use useac3to in order to encode a DTS MA 2.0 to a FLAC -down16.

    But now I have deleted a frame in the BD and I want to cut and encode a DST MA with a script and MeGUI and the FLAC "plugin" 1.4.3.
    what is the correct CUSTOM command line to add in order to get a 16bits FLAC instead of a 24?

    this one gives me an error:
    [Attachment 72925 - Click to enlarge]
    Last edited by maudit; 5th Aug 2023 at 17:12.
    Quote Quote  
  2. ok, adding
    in the script, apparently works.

    but using MeGUI instead of useac3to it is much more faster, does it maintain the same quality?
    Last edited by maudit; 6th Aug 2023 at 02:31.
    Quote Quote  
  3. Member Ennio's Avatar
    Join Date
    May 2005
    Search Comp PM
    It's been a while but I remember MeGUI also using eac3to for audio under the hood. I wouldn't know why it would be faster then.
    DTS-MA and FLAC are both lossless encoders, so basically conversion between them is lossless - in both directions. Of course, by definition downsampling is not. I can imagine different tools using different algorithms, so quality perception may be different.
    Quote Quote  
  4. As far as I know, MeGUI only uses eac3to for audio via it's HD Streams Extractor Tool. For format's from which it can extract the audio, which I think it can only do with MKVToolNix for MKVs and the various flavours of DGindex and the formats they support. For everything else, an Avisynth script and a source filter are used to decode the audio.

    eac3to often runs 2 passes, because it checks to see if there's an audio delay or gaps in the audio stream and if it finds any, it runs a second pass to fix them.
    When eac3to is decoding and re-encoding the audio, rather than simply extracting it, it probably checks to make sure there's no clipping, especially after downmixing, and it may apply peak normalization by default.... and that'd require 2 passes. MeGUI's audio encoder configurations also have a peak normalization option. Is it enabled?

    Just a thought, but could you have still done this:
    "I always use useac3to in order to encode a DTS MA 2.0 to a FLAC -down16".
    You could have re-encoded the flac ouput as flac again (with MeGUI), to applying your edit. Not that it matters.
    Last edited by hello_hello; 15th Aug 2023 at 16:24.
    Quote Quote  
  5. sorry if I up this again but I'm getting mad trying to convert DTS-MA 2.0 to FLAC -down16 with MeGUI.

    I'm using this script that should work as the previous time, but it always output a 24Bit file.
    what I'm doing wrong this time?

    HTML Code:
    #A=LWLibavAudioSource("C:\.source\audio\00004 - [0] English.dts")
    V=V.crop(0, 20, 0, -20)
    Return VA
    edit: ok I found where the issue is, it's cause this time I'm using the MeGUI FLAC option "Time Modification".
    If I keep it original all is good, it does a FLAC 16Bit, but as soon as I change it to speedup or speedup with pitch correction, the output file becomes 24Bit. I've no idea why. Can it be fixed somehow?

    I can add AssumeFPS(25,1,sync_audio=true) but how to correct the pitch in Avisynth? Is it possible?

    I'm now trying to understand how to use
    any help will be appreciated.

    According to instruction and examples:
    float tempo = 100.0

    Changes speed while maintaining the original pitch.
    If tempo=200, the audio will play twice (200%) as fast; if tempo=50, the audio will play half (50%) as fast.
    The effect is also known as time-stretching.
    Raise playback tempo from NTSC Film speed (23.97 fps) to PAL speed (25 fps) without changing pitch:

    ok it works very good, anyway I would like to use the MeGUI options instead, but why I'm not able to keep it 16Bits?
    and also, why TimeStretch(tempo=100*(960.0/1001.0)) does not work? why it can't be written that way?
    any ideas?

    final script:
    V=V.crop(0, 20, 0, -20)
    Return VA
    Last edited by maudit; 11th Nov 2023 at 13:38.
    Quote Quote  
  6. Shouldn't it be this? TimeStretch(tempo = 100.0 * (1001.0 / 960.0))

    It might pay to look at MeGUI's log file as it's quite detailed and should tell you exactly what it's doing. If it's not obvious it's fairly easy to copy the log file and paste it here.
    The log file should also include the script MeGUI uses to encode the audio, so you'd be able to confirm your TimeStretch arguments are correct if you get MeGUI to change the speed while you run a sample encode.

    Have you tried encoding the audio by loading the audio file itself into MeGUI's audio section and configuring the flac encoder? Maybe the fact you're loading a script instead is causing MeGUI to output a 24 bit flac, although if that's the reason I'm not sure why.

    If you haven't extracted the audio from the MKV you can extract it manually with something like gMKVExtractGUI (although if you open the MKV with MeGUI's File Indexer, MeGUI should extract it for you by default). Thinking about it though, you should be able to load the MKV itself into the Audio section as the input file and let MeGUI take it from there, but if that fails for some reason, try extracting the DTS and using it as the audio input instead of a script.
    Quote Quote  
  7. By the way, a while ago I uploaded a version of foobar2000 with lots of conversion presets and encoder configurations ready to use, and it's easy to copy/edit them to change the command line to suit your needs.

    There's presets for standard speedups and slowdowns using ffmpeg, SoundTouch and SoX. The closest to what you're after would be a SoX preset. It's configured to output 24 bit flac so you'd only need to change -b 24 in the command line to -b 16. Foobar2000 is far more versatile than MeGUI and can encode multiple files simultaneously, either to the same output format or even to different formats. It also includes a plugin that allows it to open and play/encode Avisynth scripts. That plugin only comes in a 32 bit flavour, and the version of foobar2000 I uploaded is also 32 bit, but that doesn't matter because it can still use 64 bit encoders via the command line. It means if you want to open scripts though, you'll need to have the 32 bit flavour of Avisynth installed, but by default the Avisynth+ installer installs both 32 and 64 bit versions anyway. Oh... and it's a good idea to add KillVideo() to the end of a script before opening it with foobar2000, because sometimes if the script also includes video foobar2000 will crash.

    [Attachment 74820 - Click to enlarge]

    PS I recently noticed the included TagBox plugin doesn't work with the version of foobar2000 I uploaded, but using the "Help/Check for updated components" menu should get foobar2000 to update TagBox to a version that does.

    PPS You might also be interested in the Avisynth AudioSpeed function I've linked to in my signature.
    Last edited by hello_hello; 12th Nov 2023 at 07:54.
    Quote Quote  
  8. Use clever FFmpeg-GUI instead.
    Load your dts (or video with dts), click main, click encode audiostream, select your audiostream (if serveral), click >>>.
    Set flac as encoder, click settings (below), set 16 bit, source fps field is already filled (change it to 25 if it's 50), set target fps to 23.976, set length & pitch, click encode. Done.

    [Attachment 74821 - Click to enlarge]
    Quote Quote  
  9. thank you both, hello and prowo, I'll give them a look.
    Quote Quote  

Similar Threads

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