VideoHelp Forum
+ Reply to Thread
Page 1 of 2
1 2 LastLast
Results 1 to 30 of 37
Thread
  1. Member
    Join Date
    Jun 2012
    Location
    New Zealand
    Search Comp PM
    Hi, I have a bunch of mp3's at various levels and want to make the 'same'.
    However I don't want to a program to 'normalise' or change them in any way... just get
    an idea what their level is and then manually + or - in Mp3pro Trim as needed.

    Is there anything that might do this?
    Otherwise I can batch load 20 or so at a time into Audition, but it'd be tedious as there's several hundred.
    Thanks
    Quote Quote  
  2. Member netmask56's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Search Comp PM
    Last edited by netmask56; 22nd Oct 2018 at 00:42.
    SONY 75" Full array 200Hz LED TV, Yamaha A1070 amp, Zidoo UHD3000, BeyonWiz PVR V2 (Enigma2 clone), Chromecast, Windows 11 Professional, QNAP NAS TS851
    Quote Quote  
  3. Member Budman1's Avatar
    Join Date
    Jul 2012
    Location
    NORTHWEST ILLINOIS, USA
    Search Comp PM
    Since audio files tend to vary throughout, you can use ffmpeg to get a relative indication of how many frames will be affected by the +/- setting.
    The mean volume below is -18.5 but has roughly 25000 out of 11823104 total that may be distorted if raised too high.

    Code:
    "ffmpeg" -i "C:\video.mp4" -af volumedetect -f null NUL
    Data: [Parsed_volumedetect_0 @ 00274240] n_samples: 11823104
    Data: [Parsed_volumedetect_0 @ 00274240] mean_volume: -18.5 dB
    Data: [Parsed_volumedetect_0 @ 00274240] max_volume: 0.0 dB
    Data: [Parsed_volumedetect_0 @ 00274240] histogram_0db: 698
    Data: [Parsed_volumedetect_0 @ 00274240] histogram_1db: 2774
    Data: [Parsed_volumedetect_0 @ 00274240] histogram_2db: 7673
    Data: [Parsed_volumedetect_0 @ 00274240] histogram_3db: 15107
    NOt a visual indication you would have to weatch all the way through but a snapshot of the whole file.
    Quote Quote  
  4. Originally Posted by kirkmc View Post
    Hi, I have a bunch of mp3's at various levels and want to make the 'same'.
    However I don't want to a program to 'normalise' or change them in any way... just get
    an idea what their level is and then manually + or - in Mp3pro Trim as needed.

    Is there anything that might do this?
    Otherwise I can batch load 20 or so at a time into Audition, but it'd be tedious as there's several hundred.
    Thanks
    It'd be easiest to run an EBUR128 scan. You can then adjust the volume losslessly, and/or still load the mp3s into another program and manually + or - etc.

    You can run an R128 scan with ffmpeg.

    ffmpeg.exe -nostats -i audio.mp3 -filter_complex ebur128=peak=true -f null -

    Someone will probably be able to tell you how to create a batch file to make it more automated. I'm not clever at that sort of thing.

    ffplay can show you a graph, but I think it has to play through the files in real time.

    ffplay.exe" -f lavfi -i "amovie=audio.mp3,ebur128=video=1:meter=18 [out0][out1]"

    Or you can scan multiple files simultaneously with foobar2000. It can also adjust the volume losslessly (the only limitation is it has to be done in 1.5dB increments).

    Screenshot 1 is an ffmpeg scan. The volume is -16.9 LUFS (effectively -16.9 dB).
    Screenshot 2 is after a foobar2000 scan. The scan resulted in the same volume, but it's shown as the adjustment required to achieve the ReplayGain target volume of 89dB, or -18 LUFS (effectively -18 dB).
    Image Attached Thumbnails Click image for larger version

Name:	scan1.gif
Views:	452
Size:	16.7 KB
ID:	47007  

    Click image for larger version

Name:	scan2.gif
Views:	122
Size:	7.7 KB
ID:	47008  

    Last edited by hello_hello; 22nd Oct 2018 at 17:46.
    Quote Quote  
  5. Member
    Join Date
    Aug 2010
    Location
    San Francisco, California
    Search PM
    [QUOTE=hello_hello;2532208]
    Originally Posted by kirkmc View Post
    You can run an R128 scan with ffmpeg.

    ffmpeg.exe -nostats -i audio.mp3 -filter_complex ebur128=peak=true -f null -

    Someone will probably be able to tell you how to create a batch file to make it more automated. I'm not clever at that sort of thing.
    for /f %%F in (*.mp3) do (
    rem Put whatever you want to do with each file here.
    rem The param %%F stands for the name of the file.
    )
    Quote Quote  
  6. You can try this:
    Code:
    for %%A in (%*) do ffmpeg -vn -nostats -filter_complex ebur128=peak=true -report -v 0 -f null - -i %%A
    Save as something.bat

    Drag and drop any audio file over it, to get a report like this at the source folder for each file.
    Code:
    ffmpeg started on 2018-10-27 at 04:16:58
    Report written to "ffmpeg-20181027-041658.log"
    Command line:
    "ffmpeg" -vn -nostats -filter_complex "ebur128=peak=true" -report -v 0 -f null - -i "01. All That She Wants.m4a"
    ffmpeg version N-92266-gbf324359be Copyright (c) 2000-2018 the FFmpeg developers
      built with gcc 8.2.1 (GCC) 20181017
      configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth
      libavutil      56. 20.100 / 56. 20.100
      libavcodec     58. 33.102 / 58. 33.102
      libavformat    58. 19.102 / 58. 19.102
      libavdevice    58.  4.106 / 58.  4.106
      libavfilter     7. 37.100 /  7. 37.100
      libswscale      5.  2.100 /  5.  2.100
      libswresample   3.  2.100 /  3.  2.100
      libpostproc    55.  2.100 / 55.  2.100
    Splitting the commandline.
    Reading option '-vn' ... matched as option 'vn' (disable video) with argument '1'.
    Reading option '-nostats' ... matched as option 'stats' (print progress report during encoding) with argument 0.
    Reading option '-filter_complex' ... matched as option 'filter_complex' (create a complex filtergraph) with argument 'ebur128=peak=true'.
    Reading option '-report' ... matched as option 'report' (generate a report) with argument '1'.
    Reading option '-v' ... matched as option 'v' (set logging level) with argument '0'.
    Reading option '-f' ... matched as option 'f' (force format) with argument 'null'.
    Reading option '-' ... matched as output url.
    Reading option '-i' ... matched as input url with argument '01. All That She Wants.m4a'.
    Finished splitting the commandline.
    Parsing a group of options: global .
    Applying option nostats (print progress report during encoding) with argument 0.
    Applying option filter_complex (create a complex filtergraph) with argument ebur128=peak=true.
    Applying option report (generate a report) with argument 1.
    Applying option v (set logging level) with argument 0.
    Successfully parsed a group of options.
    Parsing a group of options: input url 01. All That She Wants.m4a.
    Successfully parsed a group of options.
    Opening an input file: 01. All That She Wants.m4a.
    [NULL @ 000001bdf8b1b300] Opening '01. All That She Wants.m4a' for reading
    [file @ 000001bdf8b1c340] Setting default whitelist 'file,crypto'
    [mov,mp4,m4a,3gp,3g2,mj2 @ 000001bdf8b1b300] Format mov,mp4,m4a,3gp,3g2,mj2 probed with size=2048 and score=100
    [mov,mp4,m4a,3gp,3g2,mj2 @ 000001bdf8b1b300] ISO: File Type Major Brand: M4A 
    [mov,mp4,m4a,3gp,3g2,mj2 @ 000001bdf8b1b300] Unknown dref type 0x206c7275 size 12
    [mov,mp4,m4a,3gp,3g2,mj2 @ 000001bdf8b1b300] stream 0, timescale not set
    [mov,mp4,m4a,3gp,3g2,mj2 @ 000001bdf8b1b300] Before avformat_find_stream_info() pos: 2056089 bytes read:2086965 seeks:0 nb_streams:2
    [mov,mp4,m4a,3gp,3g2,mj2 @ 000001bdf8b1b300] demuxer injecting skip 2112 / discard 0
    [aac @ 000001bdf8b2d480] skip 2112 / discard 0 samples due to side data
    [aac @ 000001bdf8b2d480] skip whole frame, skip left: 1088
    [mov,mp4,m4a,3gp,3g2,mj2 @ 000001bdf8b1b300] All info found
    [mov,mp4,m4a,3gp,3g2,mj2 @ 000001bdf8b1b300] After avformat_find_stream_info() pos: 2056095 bytes read:2086965 seeks:0 frames:2
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '01. All That She Wants.m4a':
      Metadata:
        major_brand     : M4A 
        minor_version   : 0
        compatible_brands: M4A mp42isom
        creation_time   : 2018-06-29T14:34:38.000000Z
        encoder         : qaac 2.65, CoreAudioToolbox 7.10.9.0, AAC-LC Encoder, TVBR q118, Quality 96
        Encoding Params : vers
        iTunSMPB        :  00000000 00000840 000001B0 0000000000908610 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
        AYGAIN_REFERENCE_LOUDNESS: 89.0 dB
        AYGAIN_TRACK_GAIN: +0.28 dB
        AYGAIN_TRACK_PEAK: 0.60839844
        AYGAIN_ALBUM_GAIN: +0.28 dB
        AYGAIN_ALBUM_PEAK: 0.60839844
        DISCCONFIDENCE  : 37/42;42/47
        TRACKCONFIDENCE : 41/42;46/47
        C               : C+BB+3FA7+838B+C8F0+10150+142DF+18321+1C7B9+20C03+2572B+291C6+2DB79+3261A;C+BB+3FA7+838B+C8F0+10150+142DF+18321+1C7B9+20C03+2572B+291C6+2DB79+3261A
        ASE DATE        : 1993-11-23
        ASECOUNTRY      : JP
        ISHER           : Arista
        LNO             : 07822-18740-2
        track           : 1/12
        title           : All That She Wants
        album           : The Sign
        artist          : Ace of Base
        disc            : 1/1
        date            : 1992
        cBrainz Album Release Date: 1993-11-23
        cBrainz Album Release Country: JP
        L               : Arista
        LOGNUMBER       : 07822-18740-2
      Duration: 00:03:34.83, start: 0.047889, bitrate: 285 kb/s
        Stream #0:0(und), 1, 1/44100: Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 208 kb/s (default)
        Metadata:
          creation_time   : 2018-06-29T14:34:38.000000Z
        Stream #0:1, 1, 1/90000: Video: png, rgb24(pc), 1200x1200 [SAR 2835:2835 DAR 1:1], 90k tbr, 90k tbn, 90k tbc
    Successfully opened the file.
    ...
    [Parsed_ebur128_0 @ 000001bdf8b7a640] Summary:
    
      Integrated loudness:
        I:         -18.1 LUFS
        Threshold: -28.3 LUFS
    
      Loudness range:
        LRA:         3.9 LU
        Threshold: -38.3 LUFS
        LRA low:   -20.4 LUFS
        LRA high:  -16.6 LUFS
    
      True peak:
        Peak:       -4.3 dBFS
    [AVIOContext @ 000001bdf8b24600] Statistics: 7654449 bytes read, 0 seeks
    You can also try other options:
    https://bytesandbones.wordpress.com/2017/03/16/audio-nomalization-with-ffmpeg-using-lo...bur128-filter/
    Last edited by amaipaipai; 27th Oct 2018 at 16:55.
    Quote Quote  
  7. Member
    Join Date
    Jun 2012
    Location
    New Zealand
    Search Comp PM
    Thanks very much for the replies and ideas. This is all a bit new, both running these .bat files and interpreting what they show.
    But if I can get some idea of levels I can focus on just those overly high (or low).

    I'm not having any luck with something.bat. I drag an mp3 file to it in explorer? That flashes the dos window momentarily.
    I did copy ffmpeg.exe and dll to the same folder, but no change.

    Then tried "ffmpeg.exe -nostats -i audio.mp3 -filter_complex ebur128=peak=true -f null -" changing audio.mp3 to my filename and that shows

    H:\1980\A-Sides>ffmpeg.exe -nostats -i The Whispers - My Gir
    l.mp3 -filter_complex ebur128=peak=true -f null -
    FFmpeg version SVN-r26071, Copyright (c) 2000-2010 the FFmpeg developers
    built on Dec 22 2010 04:07:12 with gcc 4.4.2
    configuration: --enable-gpl --enable-version3 --enable-libgsm --enable-libvorb
    is --enable-libtheora --enable-libspeex --enable-libmp3lame --enable-libopenjpeg
    --enable-libschroedinger --enable-libopencore_amrwb --enable-libopencore_amrnb
    --enable-libvpx --disable-decoder=libvpx --arch=x86 --enable-runtime-cpudetect -
    -enable-libxvid --enable-libx264 --enable-librtmp --extra-libs='-lrtmp -lpolarss
    l -lws2_32 -lwinmm' --target-os=mingw32 --enable-avisynth --enable-w32threads --
    cross-prefix=i686-mingw32- --cc='ccache i686-mingw32-gcc' --enable-memalign-hack

    libavutil 50.35. 0 / 50.35. 0
    libavcore 0.16. 0 / 0.16. 0
    libavcodec 52.100. 0 / 52.100. 0
    libavformat 52.88. 0 / 52.88. 0
    libavdevice 52. 2. 2 / 52. 2. 2
    libavfilter 1.69. 0 / 1.69. 0
    libswscale 0.12. 0 / 0.12. 0
    ffmpeg.exe: unrecognized option 'nostats'


    So looks better, but maybe it's an older version and should be upgraded? Then I might see the same screen as hello_helloo?
    I also don't know what those numbers mean. Maybe just compare the LUFS value of each (when I see them)?
    Quote Quote  
  8. Originally Posted by kirkmc View Post
    FFmpeg version SVN-r26071, Copyright (c) 2000-2010 the FFmpeg developers
    Yes, your version is too old, get a new one and try again.
    http://ffmpeg.org/download.html#build-windows
    Quote Quote  
  9. Member
    Join Date
    Jun 2012
    Location
    New Zealand
    Search Comp PM
    Hmmm kind of lost at that site, sorry. Could you tell me where/what to download?
    Quote Quote  
  10. Member netmask56's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Search Comp PM
    SONY 75" Full array 200Hz LED TV, Yamaha A1070 amp, Zidoo UHD3000, BeyonWiz PVR V2 (Enigma2 clone), Chromecast, Windows 11 Professional, QNAP NAS TS851
    Quote Quote  
  11. Member
    Join Date
    Jun 2012
    Location
    New Zealand
    Search Comp PM
    Thank you, got it.
    Quote Quote  
  12. Member
    Join Date
    Jun 2012
    Location
    New Zealand
    Search Comp PM
    There's a folder called ffmpeg-4.0.2-win32-static and 3 subfolders. Where should that go ? Does it matter ? I see no setup file.. .
    My older ffmpeg is in C:\Program Files\VideoPerformer. Should I get rid of that (I don't use it)?
    Do I need the DLL ?
    LOL sorry for all the questions.
    Quote Quote  
  13. There's no setup file. On the VideoHelp page, "Download ffmpeg 4.0.2 Windows" is the 32 bit version. "Download ffmpeg 4.0.2 Windows 64-bit" is the 64 bit version.
    Download the appropriate one, unzip the zip file, and you can just copy ffmpeg.exe from the "bin" folder to wherever you want it.
    Quote Quote  
  14. It doesn't matter, all you need to do is to extract and use the ffmpeg.exe, nothing else.
    Quote Quote  
  15. Member
    Join Date
    Jun 2012
    Location
    New Zealand
    Search Comp PM
    I copied ffmpeg.exe to same folder as the mp3 and batch files, but when I run the batch file I get:

    This application has failed to start because bcrypt.dll was not found. Re-installing the application may fix this problem.
    Quote Quote  
  16. Member
    Join Date
    Jun 2012
    Location
    New Zealand
    Search Comp PM
    Oh, I'm using Windows XP. Would that be why ?
    Quote Quote  
  17. Member Budman1's Avatar
    Join Date
    Jul 2012
    Location
    NORTHWEST ILLINOIS, USA
    Search Comp PM
    According to a hit at room that is correct. https://forum.doom9.org/showthread.php?t=175173. There is also a link for a converted xp 32bit version but untested.
    Quote Quote  
  18. Originally Posted by kirkmc View Post
    Oh, I'm using Windows XP. Would that be why ?
    The standard ffmpeg is no longer XP compatible. There's a link in this post for a recent version that is.
    https://forum.videohelp.com/threads/390537-what-would-xp-supporting-ffmpeg-exe-be-and-...10#post2531626
    Quote Quote  
  19. Member
    Join Date
    Jun 2012
    Location
    New Zealand
    Search Comp PM
    Why do these people make it so hard to find download links... apart from a freescan from driver.com ?
    Again I can't find the program. Just pages full of rocket science talk with everything except what you want.
    Quote Quote  
  20. Member Budman1's Avatar
    Join Date
    Jul 2012
    Location
    NORTHWEST ILLINOIS, USA
    Search Comp PM
    https://ffmpeg.zeranoe.com/forum/viewtopic.php?p=12998#p12998

    Try this one static legacy 32bit xp compatible.
    Quote Quote  
  21. Member
    Join Date
    Jun 2012
    Location
    New Zealand
    Search Comp PM
    My last message never showed up here ! I've changed computers and now using Win 10 and teh file I got yesterday. I can get an output similar to hello hello but nothing from drag and drop like amaipaipai said.
    However I can't pipe the ouput to a file e.g.

    ffmpeg.exe -nostats -i u80_258a.mp3 -filter_complex ebur128=peak=true -f null - 2>&1>outputfile9.txt

    writes an empty file.

    At one stage it wrote a log, but I can't get that again. Is there an instruction to always wrote a log ?
    If I can export the data somehow my aim now is to run a batch and compare Summarys, This may identify when files need levels adjusted.

    PS Is it possible to get a Summary only ?
    Quote Quote  
  22. Make sure you copy and paste the command exactly. You should get .log files with all the info.
    Quote Quote  
  23. Download foobar2000. Load the MP3s into a playlist. Highlight them all, right click and select "ReplayGain/Scan per file Track Gain". The ReplayGain scanner uses the newer EBU R128 scanning method.
    When it's done, save the results (it's saved to MP3 tags). Right click again and select "ReplayGain/Apply Track Gain to file content". You might find that's job done,

    I'm pretty sure that by default, after the ReplayGain info is saved, fb2k adjusts the playback volume according to the ReplayGain info, so you'll be able to tell if the result is what you're hoping for just by playing the MP3s after saving the tags, before you losslessly adjust them. The right click menu has an option to remove the ReplayGain data from the MP3s.

    The volume is adjusted losslessly, but of course you should make a backup copy of the MP3s first in case you want to go back to their original state. Foobar2000 can be installed as a "portable" version as well as a regular program.
    Quote Quote  
  24. Member
    Join Date
    Jun 2012
    Location
    New Zealand
    Search Comp PM
    Hi. I will certainly try that out. Need to check what's done to the tag though.
    At the moment I've had some success - the ffmpeg output is piped to a text file and I grab that in Excel and write the summary to a worksheet. It's run as a batch so I can compare several at once. Looking at the files in Abode Audition there's correlation between the waveshape and the True Peak value in the ffmpeg Summary.
    However your foobar suggestion may be simpler and quicker.
    Just as a matter of interest though, can I use ffmpeg to increase the mp3 volume by, say, 3 db?
    Quote Quote  
  25. Member
    Join Date
    Jun 2012
    Location
    New Zealand
    Search Comp PM
    It certainly has worked. Attached image shows 8 files- first 4 before FB, and next 8 afterwards. It appears to reduce the loudest to match the rest. Now all could do with a slight increase.
    I need to do more tests with low/high extremes levels and see what happens
    Image Attached Thumbnails Click image for larger version

Name:	Image1.jpg
Views:	172
Size:	233.0 KB
ID:	47032  

    Quote Quote  
  26. Member Budman1's Avatar
    Join Date
    Jul 2012
    Location
    NORTHWEST ILLINOIS, USA
    Search Comp PM
    There is a nice write up for Foobar and MP3tag (both freeware) use to modify the ID3 tags and explains what the tags names actually used are. It's a good page to read if you have spare time and has some good information.

    http://trevinchow.com/blog/2009/10/25/normalize-volume-of-mp3-songs-for-use-in-itunes/
    Quote Quote  
  27. Member
    Join Date
    Jun 2012
    Location
    New Zealand
    Search Comp PM
    Thanks Budman that was a good read, even though it's target is iTunes, it gave me some ideas. It may be easier than my VBA script with ffmpeg.
    I increased vol by 9db in mp3ProTrim, and reduced it by 9db in a second mp3, then applied Foobars Track Replay Gain. Which If I understand it correctly, doesn't change anything but writes data in the tag area that's used by the player to adjust levels. (Existing tags are preserved.).
    FB very accurately reversed my level changes.. (see below, before and after) but seems to set the max level to somewhat less than optimum. A 3db increase would be a good thing. From Googling ffmpeg can adjust levels but I can't find the correct command. Does anyone know it. Ideally the track gain figures from FB could be used to set this ? My goal is to have the mp3 level changed, so no input from the player is needed.
    Image Attached Thumbnails Click image for larger version

Name:	Image2.jpg
Views:	273
Size:	244.0 KB
ID:	47033  

    Quote Quote  
  28. Member Budman1's Avatar
    Join Date
    Jul 2012
    Location
    NORTHWEST ILLINOIS, USA
    Search Comp PM
    ffmpeg will adjust the level of the audio but if you use the
    Code:
    -af volume=3db
    format, this calls for re-encoding audio. The other option would be to use ffmpeg to write the correct tag or add it if that is possible for ffmpeg.

    Tested below for reencode:

    Image
    [Attachment 47034 - Click to enlarge]
    Quote Quote  
  29. Member
    Join Date
    Jun 2012
    Location
    New Zealand
    Search Comp PM
    If ffmpeg re-encodes the audio that's no good. I can use mp3TrimPro, which doesn't. Just not in a script (but you can't have everything!)
    Quote Quote  
  30. Member Budman1's Avatar
    Join Date
    Jul 2012
    Location
    NORTHWEST ILLINOIS, USA
    Search Comp PM
    Ill experiment to see if ffmpeg can add/change the REPLAYGAIN_TRACK_GAIN type metadata.
    Quote Quote  



Similar Threads

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