VideoHelp Forum
+ Reply to Thread
Results 1 to 22 of 22
Thread
  1. ----------------------------------------------------------------------------
    ----------------------------------------------------------------------------

    AudioSpeed 2022-09-23.zip
    There's a link in the help file for TimeStretch.dll for Avisynth 2.6

    AudioMeter & AudioWave 2022-09-23.zip
    There's a link in the help file for Waveform.dll, required for the AudioWave functions, and a link for GRunT.dll, required for displaying the frame number and position in time.

    ----------------------------------------------------------------------------
    ----------------------------------------------------------------------------

    AudioSpeed() is intended as a way to more easily change the audio duration by non standard amounts to match the video, or to apply standard PAL speedup or slowdown etc. It has no effect on the video. To change the video duration in combination with AudioSpeed(), use AssumeFPS() or ConvertFPS() etc. If the source has no video, a blank clip is created to display the info when Info=true (the default).

    When a delay is specified, if DelayFirst=true (the default) the delay is applied before the audio is resampled. DelayFirst=false does the resampling before the delay is applied.

    Usage is fairly straightforward, but there's a help file included.

    AudioSpeed(25.0, 24.0/1.001, Delay=-114)




    ----------------------------------------------------------------------------

    The AudioMeter and AudioWave functions don't support high bitdepth video, however they include a check for Avisynth+ and high bitdepth sources are automatically converted to 8 bit and to a supported color format as required.

    AudioMeter() displays the audio levels over the top of the video. It's exactly the same as using Histogram("audiolevels") in a script that contains video, but if the source is "audio only" it'll create a blank clip to display the audio levels. The same applies to the following functions when no video exists.

    AudioMeterL(), AudioMeterR(), AudioMeterT() & AudioMeterB() display the audio levels to the left, right, above or below the video.
    The output resolution never changes, so the video width or height is reduced, however the script can crop/resize and/or add borders to the video with the CropResize script as required (using CropResize is the default). If CropResize isn't loaded, the script reverts to "squishing" the picture with Spline36Resize and Borders=true has no effect, which isn't necessarily a bad thing, given the object of the exercise is mainly to view the audio levels.

    AudioWave(), AudioWaveL(), AudioWaveR(), AudioWaveT() & AudioWaveB() display the audio waveform rather than the audio levels. There's two additional options. "Zoom" for zooming in and out of the waveform and "Window" for specifying the number of frames either side of the current frame for displaying the waveform. The AudioWave functions require the Waveform plugin.

    The examples below all make use of the CropResize script for resizing and adding borders, although it's not required.

    AudioMeterL(FT=true)




    AudioWaveT(Split=1.3, Size=2, FT=true)




    AudioWave(Split=0.5, Size=1.5, FT=true)




    AudioWave(Split=0.3)
    AudioMeterR(FT=true)





    AudioWaveT()
    AudioMeterL(FT=true)


    Last edited by hello_hello; 14th Nov 2023 at 23:45.
    Quote Quote  
  2. I've updated the link in the opening post with a new version (2017-09-14). The only change is if the source contains no video, instead of creating a blank 10 second clip when Info=true is specified, the blank clip created will have the same duration as the audio (give or take a few ms).
    Quote Quote  
  3. While I'm here, this is another little script that might come in handy for someone. All it does is display the audio levels over the top of the video. It's exactly the same as using Histogram("audiolevels") in a script that contains video, but if the source is "audio only" it'll create a blank clip to display the output meters.
    There's no options.

    AudioMeter() overlays the meters on the video (or creates a blank clip)
    AudioMeterL() displays the output meters to the left of the video
    AudioMeterT() displays the output meters above the video

    The latter two simply reduce the width or height of the video by half to display the meters at the left or top without changing the over-all resolution.

    Link & image removed. See the opening post instead.
    Last edited by hello_hello; 14th Aug 2019 at 11:50.
    Quote Quote  
  4. I've attached anewer version of the AudioSpeed script to the opening post, and also here: Link Removed

    It fixes a problem where Info=true would sometimes display the duration of the resampled audio as being an hour longer than the real duration (the resampling function was working as it should though).

    I also changed the duration of the blank clip created when the source is audio-only and Info=true to match the duration of the resampled audio rather then the original audio.
    Last edited by hello_hello; 14th Aug 2019 at 11:49.
    Quote Quote  
  5. I've updated the AudioMeter script in post #3 to this version: Link Removed
    When the source didn't contain video, it wasn't always creating a blank clip as expected.
    Last edited by hello_hello; 14th Aug 2019 at 11:48.
    Quote Quote  
  6. There's two new versions of the AudioSpeed script in the opening post and also attached here.

    Link Removed
    The same as the previous version (2017-10-02) but I fixed a stupid that caused the script to produce an error when Info=false and the source contains no video. Other than that it was working fine so the link remains in case the new version introduces gremlins.

    Link Removed
    Changed the way the input/output bitdepth is handled. The Output option can now be set to -1 (which is the default).
    See the description of the Output option in the opening post or in the included text file for details.
    Last edited by hello_hello; 14th Aug 2019 at 11:48.
    Quote Quote  
  7. For anyone who might be interested, I've given the AudioSpeed and AudioMeter scripts a bit of a refresh. There's download links and some new screenshots in the opening post. The new versions are dated 2019-08-15.
    Last edited by hello_hello; 15th Aug 2019 at 15:37.
    Quote Quote  
  8. I've updated the AudioSpeed script a little again. The new version is dated 2019-08-16. I'll leave the link for yesterday's version in the opening post for a while just in case I did something silly, but the new version should be fine.

    There's now a DelayFirst argument. When DelayFirst=true (the default) any audio delay specified is applied before the audio is resampled (before the speed/duration is changed), otherwise the delay is applied after the resampling. The order in which "Post Delay Duration" and "Resampled Duration" are displayed when Info=true changes accordingly.

    The picture dimming with Avisynth's Levels() is bypassed completely when PicDim=0 or when a blank clip is created when Info=true, possibly saving a few CPU cycles.
    Quote Quote  
  9. There's new versions of the AudioSpeed and AudioMeter scripts dated 2019-11-05. Links are in the opening post.

    For AudioSpeed, the Avisynth TimeStretch plugin version 2.5.8.0 is now only required for Avisynth 2.58 and Avisynth 2.6. The script will use the version of TimeStretch.dll that comes with Avisynth+ when Avisynth+ is being used.
    The PicDim argument should now scale properly for Avisynth+ when the video bitdepth is greater than 8 (PicDim darkens the picture a little to make the text easier to read when Info=true).

    For AudioMeter there's no changes to functionality. I just moved the usage instructions to a separate help file.
    Quote Quote  
  10. Member Budman1's Avatar
    Join Date
    Jul 2012
    Location
    NORTHWEST ILLINOIS, USA
    Search Comp PM
    Thank you Thank You hello_hello. This is such a wonderful addition to avisynth. I added a couple lines to this already perfect script and it makes it so easy to check sound sync now, something that has eluded many of us. Below are 2 images of increased audio during speaking part (Mouth open) and decreased audio during non-speaking part (Mouth closed) . Your script even works frame by frame. Kudos! Again THANK YOU!

    Image
    [Attachment 50783 - Click to enlarge]


    Image
    [Attachment 50784 - Click to enlarge]
    Quote Quote  
  11. There's new versions of the AudioSpeed and AudioMeter scripts dated 2020-01-02. Links are in the opening post.

    The AudioMeter script is now called "AudioMeter & AudioWave.avsi" as I've added a function called AudioWave, much like the original AudioMeter function. There's several variations, similar to the AudioMeter functions, but they display the audio waveform rather than the levels. See the opening post for examples.

    The AudioSpeed functionality hasn't changed from the previous version, but I changed some of the script syntax so I've updated the version number to match.
    Quote Quote  
  12. Inspired by Budman1's earlier screenshots I updated the AudioWave and AudioMeter functions to add the ability to display the current frame number and position in time over the video. They both need to be enabled independently as they can be CPU intensive and prevent the script from running in real time. It might depend how CPU intensive decoding the source is, and the resolution, but sometimes a script may run in real time when displaying the frame number or time, but not both.

    There's a link for the new version dated 2020-01-10 in the opening post.
    Quote Quote  
  13. There's another update for the AudioMeter & AudioWave script. It's dated 2020-01-17.

    Fixed a silly that meant the displaying of the position in time couldn't always be disabled with Time-false (the default), and added another argument to save some typing.

    Frame=true - Displays the current frame number.
    Time=true - Displays the time (position)
    FT=true - Sets Frame=true and Time=true together so there's no need to use them individually to enable both, and because I couldn't think of a better name than "FT".
    Quote Quote  
  14. Inspired by Budman1, there's another update for the AudioMeter & AudioWave script. It's dated 2020-01-29. I'll update the opening post with a link and new screenshots to show off the new look shortly, and to celebrate a new season of Rick And Morty.

    The new version has options for specifying how the frame is split between the meters/waveform and the picture, and the size and placement of the subtitles. When the CropResize script is resizing the video, borders are now enabled by default.

    Enabling the Frame or Time options now requires GRunT.dll
    http://avisynth.nl/index.php/GRunT

    There's an updated help file explaining the new options.
    Last edited by hello_hello; 29th Jan 2020 at 14:40.
    Quote Quote  
  15. AudioMeter & AudioWave
    I made a mistake with the name of the option for specifying the subtitle size. The option should have simply been named "Size".
    To make up for it, I added an option named "Color" for changing the default subtitle color.

    The new version is dated 2020-01-31.
    Last edited by hello_hello; 13th Feb 2020 at 19:43.
    Quote Quote  
  16. A couple of very minor updates to both scripts, dated 2020-02-14. Links in the opening post.

    AudioSpeed
    Times should round to the nearest millisecond the same way as they do for the Avisynth ShowTime() function.
    Reduced the default picture dimming a little and changed the value for specifying the dimming to a positive integer to match some other scripts.

    AudioMeter & AudioWave
    Changed the Zoom argument so float values are allowed (decimals), which should have been the case previously.
    Quote Quote  
  17. Is AudioSpeed a lossy process?
    Quote Quote  
  18. The audio has to be decoded and if you're re-encoding it with a lossy encoder then obviously that part is lossy.

    As far as the change of speed goes, the audio has to be lengthened or shortened, then resampled. I'm actually not sure if it's mathematically reversible. That is, if you lengthen the audio by "X" amount, then shorten the output for the same duration you started with, whether you'd end up with exactly the same audio. I suspect not, but is that something you'd worry about? I assume you'd either need to change the audio duration/speed, or you don't.
    Quote Quote  
  19. I wasn’t sure if there was a compression function going on and, if so, by how much. It sounds as though there isn’t. I’ll be able to tell once I run it through. It shouldn’t matter, as long as it sounds good. More a point of curiosity.
    Quote Quote  
  20. There's an option to normalise, but that adjusts the volume of the entire audio up or down by a specific amount so the loudest peak is at 0dB (it might be -3dB, I'd have to check). Normalisation will slow the opening of scripts, as it requires an additional pass to check the audio peaks. It's disabled by default.

    There's no compression.
    Quote Quote  
  21. There's links to new versions dated 2022-01-30 in the opening posts. No major functional changes.

    AudioMeter & AudioWave
    Added an argument for specifying the frame rate of the blank clip when an audio-only source is opened.
    Switched to ShowTime() for displaying the position in time as the script previously calculated the time itself, but for videos over 3 or 4 hours duration it could sometimes be out by a few milliseconds due to the lack of 32 bit floating point math precision.

    AudioSpeed
    Added a couple of new choices for the "Output" argument, for controlling the bitdepth of the resampled audio.
    Added a "Peak" argument for specifying the peak level when peak normalising. The default is still 0.9, or in human speak, roughly -1dB.
    Quote Quote  
  22. There's new versions of the functions dated 2022-09-23 in the opening post. Minor cosmetic changes, but not in functionality.
    Quote Quote  



Similar Threads

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