VideoHelp Forum


Try DVDFab Video Downloader and rip Netflix video! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 20 of 20
Thread
  1. When I use hard limiter in Audition with settings -0.1dB, 5ms, 40ms I get small amount of artifacts:

    Image
    [Attachment 56468 - Click to enlarge]


    When I did the same thing in ffmpeg I get a lot more artifacts:
    Code:
    ffmpeg -i inp.wav -af "compand=attacks=0:decays=0:points=-80/-80|-0.1/-0.1|20/-0.1" -c:a pcm_f64le out.wav
    Image
    [Attachment 56469 - Click to enlarge]


    Can I fix it somehow?
    Quote Quote  
  2. First off, are we talking about dbv or dbfs? It is possible you are overdriving the limiter and introducing distortion.
    Canon G40 - Dell XPS8700 i7 - Win 10 - 24gb RAM - GTX 1060/6GB - Resolve 17.0b6
    Dell dual Xeon Workstation - Win 7 - 16gb ECC RAM - GTX 650 - Pro Tools 2018.3
    Quote Quote  
  3. I'm not sure I understand what you mean. Input signal has a peak about +3db. After limiter it decreases to -0.1dB in both Audition and ffmpeg.
    Quote Quote  
  4. Are we talking about -0.1db VU or -0.1db full scale as in digital metering? You can overload the input to a plug-in such as a limiter so causing distortion.Image
    [Attachment 56470 - Click to enlarge]
    Canon G40 - Dell XPS8700 i7 - Win 10 - 24gb RAM - GTX 1060/6GB - Resolve 17.0b6
    Dell dual Xeon Workstation - Win 7 - 16gb ECC RAM - GTX 650 - Pro Tools 2018.3
    Quote Quote  
  5. I only ask this to get an idea of the levels you are working at. Post a screen shot of your meter showing this particular bit of audio.
    Canon G40 - Dell XPS8700 i7 - Win 10 - 24gb RAM - GTX 1060/6GB - Resolve 17.0b6
    Dell dual Xeon Workstation - Win 7 - 16gb ECC RAM - GTX 650 - Pro Tools 2018.3
    Quote Quote  
  6. I suppose it's dBFS. Amplitude statistics:

    Image
    [Attachment 56471 - Click to enlarge]
    Quote Quote  
  7. Well it does say 11 possible clipped peaks. Though a view of a channel showing the meter reading would be more helpful.
    Try reducing the channel level and set the limiter to -3db. You should not have the audio banging the meters at the top of the scale as it will not achieve anything.
    Canon G40 - Dell XPS8700 i7 - Win 10 - 24gb RAM - GTX 1060/6GB - Resolve 17.0b6
    Dell dual Xeon Workstation - Win 7 - 16gb ECC RAM - GTX 650 - Pro Tools 2018.3
    Quote Quote  
  8. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    Whenever (audio, but applies to video, photo too) signals are modified, particularly when they are mixed or a dsp effect is applied (as is your case), it has to do adding/multiplying of samples in the interim math of the algorithm.

    If the tool is VERY GOOD, it will operate at a higher bit level (e.g. 48bits int or 32/64bit float instead of the usual 24bits int) to provide headroom for intermediate/temporary sample values which could get higher than 0dBFS. It will also introduce dither prior to the stage where it returns to its normal bit value upon completion of the operation, as that prevents quantization distortion being introduced to the process during the bit reduction.

    Good tools might not apply dither in every bit reduction (shame, they will incur little bits of distortion or harshness along the way), but they still have the increased interim bit depth to accommodate the math's potentially higher temp sample values (which still get readjusted at the end of the operation).

    Fair or poor tools do not incorporate a higher bit depth in their mix calculations, nor do they dither.


    What you are seeing here COULD be the exemplar result of such underlying processes and one of the differences between the tools. You could of course verify this at least with ffmpeg's source code (I don't have the time).


    Scott
    Quote Quote  
  9. I tried ffmpeg alimiter, it works even worse than ffmpeg compand, it changes the waveform even below the threshold. I'm not going to dig into ffmpeg source code.
    All I want is to find a way to hard limit an audio without clipping artifacts. It may be a Python library, numpy, ffmpeg or another command line tool.
    Quote Quote  
  10. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    Sox would probably be good.

    Scott
    Quote Quote  
  11. SOX can't handle more than 24 bit.
    Quote Quote  
  12. Are there any other options?
    Quote Quote  
  13. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    Don't think so, not for command line. I read deeper the sox and ffmpeg docs, and neither is fully fleshed out for higher levels of quality necessary for what you are asking.

    But, what's your opposition to using a gui anyway?
    As you demonstrated, you could use Audition and have already been done by now. Or ProTools, or any of a score of other audio-centric editors and DAWs.


    Scott
    Quote Quote  
  14. Audition was used for testing purposes. I need to do the same with Python. I'm sure that underlying mathematical formula for hard limiter is not so fancy.

    I found a few examples:
    https://stackoverflow.com/a/34840218/11713857
    https://gist.github.com/bastibe/747283c55aad66404046
    https://www.hackaudio.com/digital-signal-processing/distortion-effects/soft-clipping/

    But Idk what fits best.
    Quote Quote  
  15. Multimedia storyteller bigass's Avatar
    Join Date
    Dec 2006
    Location
    London, Ontario Canada
    Search Comp PM
    Does the situation improve if you change the 5 ms reaction time to 0 ms? Even though you're intending it to be a hard limiter, you're still giving the sound five milliseconds get past the compressor and distort. If you need a brick wall, build a brick wall.
    Quote Quote  
  16. I set 0 ms:
    Code:
    attacks=0:decays=0
    Quote Quote  
  17. Member
    Join Date
    Dec 2006
    Location
    United States
    Search Comp PM
    Try Loudmax, a free audio hard limiter plugin, https://loudmax.blogspot.com/. I used it years ago extensively. It's fast, lightweight and simple. But best of all, as brickwall limiters go it is the most transparent I have heard. And it's free.
    Quote Quote  
  18. Originally Posted by boardbuilder View Post
    Try Loudmax, a free audio hard limiter plugin, https://loudmax.blogspot.com/. I used it years ago extensively. It's fast, lightweight and simple. But best of all, as brickwall limiters go it is the most transparent I have heard. And it's free.
    Can I run it without GUI from command line or python?
    Quote Quote  
  19. Member
    Join Date
    Dec 2006
    Location
    United States
    Search Comp PM
    Loudmax is a VST plugin. In order to run it from a command line, you would need some kind of VST host that works from a command line, perhaps this: http://teragonaudio.com/MrsWatson. I have not tried this. Maybe you could let us know your results. Hope this helps.
    Quote Quote  
  20. LoudMax is a compressor though, not just a limiter as such.

    If you can handle a GUI, you could try the portable version of foobar2000 I uploaded a while back. It includes compression and limiter presets.
    https://forum.videohelp.com/threads/396860-foobar2000-portable-%28for-audio-encoding%29

    Load the track into the playlist, right click on it, select Convert, then click on the three dots at the bottom of the conversion presets list.
    That opens the converter configuration, where you can select an encoder and add DSPs to the conversion chain. I think LoudMax is one of them for the version I uploaded, but there should be a few peak limiting presets using foobar2000's Advanced Limiter. If they're the same as the presets I use currently, there should be Peak Limiter -1.5dB, -3dB and -6dB presets. Load one and convert the file.
    Each one boosts the volume (either by 1.5dB, 3dB or 6dB), then sends the audio to the Advanced Limiter, the volume is reduced by the same amount again, and it's off to the encoder. The reason for having those presets is the Advanced Limiter doesn't kick in until right on 0dB, so increasing the volume before limiting then reducing it again effectively means it's kicking in below 0dB. The DSP processing is 32 bit float, so it won't cause clipping if the peaks exceed 0dB during processing.

    Image
    [Attachment 56527 - Click to enlarge]
    Last edited by hello_hello; 30th Dec 2020 at 08:01.
    Quote Quote  



Similar Threads