Lyrics & Knowledge Personal Pages Record Shop Auction Links Radio & Media Kids Membership Help
The Mudcat Cafemuddy

Post to this Thread - Sort Descending - Printer Friendly - Home


Tech: ffmpeg batch process volume increase

Bonzo3legs 06 Sep 17 - 07:02 AM
Joe Offer 07 Sep 17 - 04:05 AM
Bonzo3legs 07 Sep 17 - 05:41 AM
GUEST 07 Sep 17 - 06:22 AM
punkfolkrocker 07 Sep 17 - 08:00 AM
punkfolkrocker 07 Sep 17 - 08:03 AM
Bonzo3legs 07 Sep 17 - 08:05 AM
Bonzo3legs 07 Sep 17 - 09:50 AM
DaveRo 07 Sep 17 - 11:16 AM
Bonzo3legs 07 Sep 17 - 12:22 PM
DaveRo 07 Sep 17 - 12:50 PM
DaveRo 08 Sep 17 - 12:00 PM
Bonzo3legs 09 Sep 17 - 08:45 AM
punkfolkrocker 09 Sep 17 - 09:23 AM
GUEST,Jon 09 Sep 17 - 09:39 AM
GUEST,Jon 09 Sep 17 - 09:46 AM
DaveRo 09 Sep 17 - 11:07 AM
punkfolkrocker 09 Sep 17 - 11:17 AM
GUEST,Jon 09 Sep 17 - 11:31 AM
punkfolkrocker 09 Sep 17 - 01:01 PM
Bonzo3legs 09 Sep 17 - 01:11 PM
DaveRo 09 Sep 17 - 02:42 PM
GUEST,Jon 09 Sep 17 - 02:55 PM
Bonzo3legs 09 Sep 17 - 03:57 PM
Bonzo3legs 09 Sep 17 - 04:55 PM
Share Thread
more
Lyrics & Knowledge Search [Advanced]
DT  Forum
Sort (Forum) by:relevance date
DT Lyrics:









Subject: Tech: ffmpeg batch process volume increase
From: Bonzo3legs
Date: 06 Sep 17 - 07:02 AM

Is it possible to batch process a volume increase on several wav files with a command line, or is a batch file needed?


Post - Top - Home - Printer Friendly - Translate

Subject: RE: Tech: ffmpeg batch process volume increase
From: Joe Offer
Date: 07 Sep 17 - 04:05 AM

Gee, that's not something I'd dream would be possible. It will be interesting to see responses.
I use Audacity to increase volume on individual files, and Nero Burning Rom to equalize track volume when I'm burning a CD.
How can it be done with a command line or batch file? If it can be done with a command line, it would be a very complicated command to work on multiple files. Seems to me a batch file or a copy-pasted command line would be better.
-Joe-


Post - Top - Home - Printer Friendly - Translate

Subject: RE: Tech: ffmpeg batch process volume increase
From: Bonzo3legs
Date: 07 Sep 17 - 05:41 AM

I just need something "simple" that our 2005 laptop will run while on holiday that is not too memory guzzling for our 2005 laptop! I found examples of code for a batch file but I don't understand those!


Post - Top - Home - Printer Friendly - Translate

Subject: RE: Tech: ffmpeg batch process volume increase
From: GUEST
Date: 07 Sep 17 - 06:22 AM

On Linux/ bash, I guess you could put all your files in one directory and try something along these lines (with your full ffmpeg command).

for f in *.wav; do\
ffmpeg -i $f;\
done


Post - Top - Home - Printer Friendly - Translate

Subject: RE: Tech: ffmpeg batch process volume increase
From: punkfolkrocker
Date: 07 Sep 17 - 08:00 AM

Bonz - considering your keen interest in 'live' music,
I'd guess you have already installed and tried Trader's Little Helper ...???

I don't know if it performs the exact function you are looking for,
but maybe on related blogs other expert users may have answers...???

I mainly used this freeware prog for batch converting flac to wav to test if the source was genuine lossless or mp3.


Post - Top - Home - Printer Friendly - Translate

Subject: RE: Tech: ffmpeg batch process volume increase
From: punkfolkrocker
Date: 07 Sep 17 - 08:03 AM

CORRECTION - "other far more expert users than me"...


Post - Top - Home - Printer Friendly - Translate

Subject: RE: Tech: ffmpeg batch process volume increase
From: Bonzo3legs
Date: 07 Sep 17 - 08:05 AM

Thanks, how would that fit into the ffmpeg command?


Post - Top - Home - Printer Friendly - Translate

Subject: RE: Tech: ffmpeg batch process volume increase
From: Bonzo3legs
Date: 07 Sep 17 - 09:50 AM

It's only for my " not getting bored" music by the hotel pool during my wife's sunbathing routine!!!


Post - Top - Home - Printer Friendly - Translate

Subject: RE: Tech: ffmpeg batch process volume increase
From: DaveRo
Date: 07 Sep 17 - 11:16 AM

I think what you're asking is: can you include wildcards in file names in ffmpeg commands - i.e something like *.wav. I didn't think so, and a bit of googling seems to confirm that - but I'm not absolutely certain.

So you would need to use a script - which is what I assume you mean by a batch file. Something like Guest's bash script, which is just a loop that applies the ffmpeg command to every wav file - though I'm pretty sure that windows scripts have different syntax to bash scripts.

A .bat file doesn't have to contain any logic. It could be just a list of almost-identical ffmpeg commands, as Joe suggested. So once you've got a command working do a bit of copy/paste/editing of the filenames in notepad then run it. Google for how to run it. Tip: make your source files read-only before you run it ;)

It might interest those with somewhat newer computers that you can run bash scripts on Windows 10. I would guess that bash scripts are more often published on stackexchange and similar places than windows scripts.


Post - Top - Home - Printer Friendly - Translate

Subject: RE: Tech: ffmpeg batch process volume increase
From: Bonzo3legs
Date: 07 Sep 17 - 12:22 PM

Thanks very much all, I'll give that a go later this evening.


Post - Top - Home - Printer Friendly - Translate

Subject: RE: Tech: ffmpeg batch process volume increase
From: DaveRo
Date: 07 Sep 17 - 12:50 PM

Vaguely relevant to this thread, I wrote a bash script that converts all sound files of a specified type in a folder - e.g. flac - to mp3 - so I could put them on an SD card. It's here.

It contains the same loop as Guest's script. The ffmpeg command could be modified to add other processing - e.g. a volume filter - and 'mp3' could be changed to another file type.

As I said, you can run bash in Windows 10 - I've tried it. There is a utility called Cygwin which runs bash scripts in earlier versions of Windows - though I've never used it.


Post - Top - Home - Printer Friendly - Translate

Subject: RE: Tech: ffmpeg batch process volume increase
From: DaveRo
Date: 08 Sep 17 - 12:00 PM

Another way to create a script (.bat file) if you have a lot of files is to start with a list of filenames and turn them into commands using a spreadsheet and/or text editor.

For example this windows command
dir *.flac /b > filelist.csv
will create a text file called 'filelist.csv' containing a list of the flac files. Make it a csv file so that you can load it into a spreadsheet.

In the spreadsheet turn each row into a command, save the csv, remove the commas, and rename to .bat


Post - Top - Home - Printer Friendly - Translate

Subject: RE: Tech: ffmpeg batch process volume increase
From: Bonzo3legs
Date: 09 Sep 17 - 08:45 AM

I played around with batch commands offered and parial success with this:

for %%F in (*.mp3) do ffmpeg -y -i "%%F" -filter:a "volume=1.5" "%%~dF%%~pF%%~n1.mp3"
pause

I tried this with just 2 mp3 files, which I could see were being processed when I ran the batch file, but there is only one processed file appearing in the same folder as %~n1.mp3.

The command is lacking something!! Both mp3 files are aprox 13-14000kb but the processed file %~n1.mp3 is only 5500kb, and the second one seems to overwrite the first! How do I need to change the command in order to dump both processed files into a sub-folder called newmp3?


The text appearing on the cmd screen is:


C:\Users\Windows User\a_his stuff\MP3\Newfolder>for %F in (*.mp3) do ffmpeg -y -
i "%F" -filter:a "volume=1.5" "%~dF%~pF%~n1.mp3"

C:\Users\Windows User\a_his stuff\MP3\Newfolder>ffmpeg -y -i "%newfolder%~n1.mp3
" -filter:a "volume=1.5" "C:\Users\Windows User\a_his stuff\MP3\Newfolder\%~n1.m
p3"
ffmpeg version N-87130-g2b9fd15 Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 7.1.0 (GCC)
configuration: --enable-gpl --enable-version3 --enable-cuda --enable-cuvid --e
nable-d3d11va --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --
enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv
--enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-li
bfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug -
-enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enabl
e-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-li
bsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolam
e --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx
--enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable
-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-zlib
libavutil      55. 74.100 / 55. 74.100
libavcodec    57.104.100 / 57.104.100
libavformat    57. 79.100 / 57. 79.100
libavdevice    57. 8.100 / 57. 8.100
libavfilter    6.101.100 / 6.101.100
libswscale      4. 7.103 / 4. 7.103
libswresample   2. 8.100 / 2. 8.100
libpostproc    54. 6.100 / 54. 6.100
Input #0, mp3, from '%newfolder%~n1.mp3':
Metadata:
    title          : Only Wanna Be With You
    artist          : Darius Rucker
    album          : Audience recording from Delawa
    date            : 2017
    track          : 2
    genre          : Country
    encoder         : Lavf57.79.100
Duration: 00:00:01.65, start: 0.025057, bitrate: 129 kb/s
    Stream #0:0: Audio: mp3, 44100 Hz, stereo, s16p, 128 kb/s
    Metadata:
      encoder         : Lavc57.10
Stream mapping:
Stream #0:0 -> #0:0 (mp3 (native) -> mp3 (libmp3lame))
Press [q] to stop, [?] for help
Output #0, mp3, to 'C:\Users\Windows User\a_his stuff\MP3\Newfolder\%~n1.mp3':
Metadata:
    TIT2            : Only Wanna Be With You
    TPE1            : Darius Rucker
    TALB            : Audience recording from Delawa
    TDRC            : 2017
    TRCK            : 2
    TCON            : Country
    TSSE            : Lavf57.79.100
    Stream #0:0: Audio: mp3 (libmp3lame), 44100 Hz, stereo, fltp
    Metadata:
      encoder         : Lavc57.104.100 libmp3lame
[libmp3lame @ 04321080] Trying to remove 1152 samples, but the queue is empty
size=      26kB time=00:00:01.61 bitrate= 132.0kbits/s speed=8.65x
video:0kB audio:26kB subtitle:0kB other streams:0kB global headers:0kB muxing ov
erhead: 1.526718%

C:\Users\Windows User\a_his stuff\MP3\Newfolder>ffmpeg -y -i "%~n1.mp3" -filter:
a "volume=1.5" "C:\Users\Windows User\a_his stuff\MP3\Newfolder\%~n1.mp3"
ffmpeg version N-87130-g2b9fd15 Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 7.1.0 (GCC)
configuration: --enable-gpl --enable-version3 --enable-cuda --enable-cuvid --e
nable-d3d11va --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --
enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv
--enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-li
bfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug -
-enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enabl
e-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-li
bsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolam
e --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx
--enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable
-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-zlib
libavutil      55. 74.100 / 55. 74.100
libavcodec    57.104.100 / 57.104.100
libavformat    57. 79.100 / 57. 79.100
libavdevice    57. 8.100 / 57. 8.100
libavfilter    6.101.100 / 6.101.100
libswscale      4. 7.103 / 4. 7.103
libswresample   2. 8.100 / 2. 8.100
libpostproc    54. 6.100 / 54. 6.100
Input #0, mp3, from '%~n1.mp3':
Metadata:
    title          : Only Wanna Be With You
    artist          : Darius Rucker
    album          : Audience recording from Delawa
    date            : 2017
    track          : 2
    genre          : Country
    encoder         : Lavf57.79.100
Duration: 00:00:01.65, start: 0.025057, bitrate: 129 kb/s
    Stream #0:0: Audio: mp3, 44100 Hz, stereo, s16p, 128 kb/s
    Metadata:
      encoder         : Lavc57.10
Stream mapping:
Stream #0:0 -> #0:0 (mp3 (native) -> mp3 (libmp3lame))
Press [q] to stop, [?] for help
Output #0, mp3, to 'C:\Users\Windows User\a_his stuff\MP3\Newfolder\%~n1.mp3':
Metadata:
    TIT2            : Only Wanna Be With You
    TPE1            : Darius Rucker
    TALB            : Audience recording from Delawa
    TDRC            : 2017
    TRCK            : 2
    TCON            : Country
    TSSE            : Lavf57.79.100
    Stream #0:0: Audio: mp3 (libmp3lame), 44100 Hz, stereo, fltp
    Metadata:
      encoder         : Lavc57.104.100 libmp3lame
[libmp3lame @ 0403f620] Trying to remove 1152 samples, but the queue is empty
size=      26kB time=00:00:01.61 bitrate= 132.0kbits/s speed=7.89x
video:0kB audio:26kB subtitle:0kB other streams:0kB global headers:0kB muxing ov
erhead: 1.526718%

C:\Users\Windows User\a_his stuff\MP3\Newfolder>ffmpeg -y -i ".mp3" -filter:a "v
olume=1.5" "C:\Users\Windows User\a_his stuff\MP3\Newfolder\%~n1.mp3"
ffmpeg version N-87130-g2b9fd15 Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 7.1.0 (GCC)
configuration: --enable-gpl --enable-version3 --enable-cuda --enable-cuvid --e
nable-d3d11va --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --
enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv
--enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-li
bfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug -
-enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enabl
e-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-li
bsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolam
e --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx
--enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable
-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-zlib
libavutil      55. 74.100 / 55. 74.100
libavcodec    57.104.100 / 57.104.100
libavformat    57. 79.100 / 57. 79.100
libavdevice    57. 8.100 / 57. 8.100
libavfilter    6.101.100 / 6.101.100
libswscale      4. 7.103 / 4. 7.103
libswresample   2. 8.100 / 2. 8.100
libpostproc    54. 6.100 / 54. 6.100
Input #0, mp3, from '.mp3':
Metadata:
    title          : Only Wanna Be With You
    artist          : Darius Rucker
    album          : Audience recording from Delawa
    date            : 2017
    track          : 2
    genre          : Country
    encoder         : Lavf57.79.100
Duration: 00:00:01.65, start: 0.025057, bitrate: 129 kb/s
    Stream #0:0: Audio: mp3, 44100 Hz, stereo, s16p, 128 kb/s
    Metadata:
      encoder         : Lavc57.10
Stream mapping:
Stream #0:0 -> #0:0 (mp3 (native) -> mp3 (libmp3lame))
Press [q] to stop, [?] for help
Output #0, mp3, to 'C:\Users\Windows User\a_his stuff\MP3\Newfolder\%~n1.mp3':
Metadata:
    TIT2            : Only Wanna Be With You
    TPE1            : Darius Rucker
    TALB            : Audience recording from Delawa
    TDRC            : 2017
    TRCK            : 2
    TCON            : Country
    TSSE            : Lavf57.79.100
    Stream #0:0: Audio: mp3 (libmp3lame), 44100 Hz, stereo, fltp
    Metadata:
      encoder         : Lavc57.104.100 libmp3lame
[libmp3lame @ 040dfbe0] Trying to remove 1152 samples, but the queue is empty
size=      26kB time=00:00:01.61 bitrate= 132.0kbits/s speed=8.65x
video:0kB audio:26kB subtitle:0kB other streams:0kB global headers:0kB muxing ov
erhead: 1.526718%

C:\Users\Windows User\a_his stuff\MP3\Newfolder>ffmpeg -y -i "01 - Homegrown Hon
ey.mp3" -filter:a "volume=1.5" "C:\Users\Windows User\a_his stuff\MP3\Newfolder\
%~n1.mp3"
ffmpeg version N-87130-g2b9fd15 Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 7.1.0 (GCC)
configuration: --enable-gpl --enable-version3 --enable-cuda --enable-cuvid --e
nable-d3d11va --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --
enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv
--enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-li
bfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug -
-enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enabl
e-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-li
bsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolam
e --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx
--enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable
-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-zlib
libavutil      55. 74.100 / 55. 74.100
libavcodec    57.104.100 / 57.104.100
libavformat    57. 79.100 / 57. 79.100
libavdevice    57. 8.100 / 57. 8.100
libavfilter    6.101.100 / 6.101.100
libswscale      4. 7.103 / 4. 7.103
libswresample   2. 8.100 / 2. 8.100
libpostproc    54. 6.100 / 54. 6.100
Input #0, mp3, from '01 - Homegrown Honey.mp3':
Metadata:
    title          : Homegrown Honey
    artist          : Darius Rucker
    album          : Audience recording from Delawa
    date            : 2017
    track          : 1
    genre          : Country
Duration: 00:05:44.87, start: 0.025057, bitrate: 320 kb/s
    Stream #0:0: Audio: mp3, 44100 Hz, stereo, s16p, 320 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (mp3 (native) -> mp3 (libmp3lame))
Press [q] to stop, [?] for help
Output #0, mp3, to 'C:\Users\Windows User\a_his stuff\MP3\Newfolder\%~n1.mp3':
Metadata:
    TIT2            : Homegrown Honey
    TPE1            : Darius Rucker
    TALB            : Audience recording from Delawa
    TDRC            : 2017
    TRCK            : 1
    TCON            : Country
    TSSE            : Lavf57.79.100
    Stream #0:0: Audio: mp3 (libmp3lame), 44100 Hz, stereo, fltp
    Metadata:
      encoder         : Lavc57.104.100 libmp3lame
[mp3 @ 0342c720] Header missing3 bitrate= 122.7kbits/s speed=11.5x
Error while decoding stream #0:0: Invalid data found when processing input
size=    5389kB time=00:05:44.84 bitrate= 128.0kbits/s speed=11.5x
video:0kB audio:5389kB subtitle:0kB other streams:0kB global headers:0kB muxing
overhead: 0.007159%

C:\Users\Windows User\a_his stuff\MP3\Newfolder>ffmpeg -y -i "03 - Only Wanna Be
With You.mp3" -filter:a "volume=1.5" "C:\Users\Windows User\a_his stuff\MP3\New
folder\%~n1.mp3"
ffmpeg version N-87130-g2b9fd15 Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 7.1.0 (GCC)
configuration: --enable-gpl --enable-version3 --enable-cuda --enable-cuvid --e
nable-d3d11va --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --
enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv
--enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-li
bfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug -
-enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enabl
e-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-li
bsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolam
e --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx
--enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable
-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-zlib
libavutil      55. 74.100 / 55. 74.100
libavcodec    57.104.100 / 57.104.100
libavformat    57. 79.100 / 57. 79.100
libavdevice    57. 8.100 / 57. 8.100
libavfilter    6.101.100 / 6.101.100
libswscale      4. 7.103 / 4. 7.103
libswresample   2. 8.100 / 2. 8.100
libpostproc    54. 6.100 / 54. 6.100
Input #0, mp3, from '03 - Only Wanna Be With You.mp3':
Metadata:
    title          : Only Wanna Be With You
    artist          : Darius Rucker
    album          : Audience recording from Delawa
    date            : 2017
    track          : 2
    genre          : Country
Duration: 00:05:58.16, start: 0.025057, bitrate: 320 kb/s
    Stream #0:0: Audio: mp3, 44100 Hz, stereo, s16p, 320 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (mp3 (native) -> mp3 (libmp3lame))
Press [q] to stop, [?] for help
Output #0, mp3, to 'C:\Users\Windows User\a_his stuff\MP3\Newfolder\%~n1.mp3':
Metadata:
    TIT2            : Only Wanna Be With You
    TPE1            : Darius Rucker
    TALB            : Audience recording from Delawa
    TDRC            : 2017
    TRCK            : 2
    TCON            : Country
    TSSE            : Lavf57.79.100
    Stream #0:0: Audio: mp3 (libmp3lame), 44100 Hz, stereo, fltp
    Metadata:
      encoder         : Lavc57.104.100 libmp3lame
[mp3 @ 0412c760] Header missing9 bitrate= 124.9kbits/s speed=11.5x
Error while decoding stream #0:0: Invalid data found when processing input
size=    5596kB time=00:05:58.11 bitrate= 128.0kbits/s speed=11.4x
video:0kB audio:5596kB subtitle:0kB other streams:0kB global headers:0kB muxing
overhead: 0.007015%

C:\Users\Windows User\a_his stuff\MP3\Newfolder>pause
Press any key to continue . . .

The command is lacking something!! Both mp3 files are aprox 13-14000kb but the processed file %~n1.mp3 is only 5500kb


Post - Top - Home - Printer Friendly - Translate

Subject: RE: Tech: ffmpeg batch process volume increase
From: punkfolkrocker
Date: 09 Sep 17 - 09:23 AM

Bonz - i'm just a software end user - all that above is a foreign language to me...

but i do remember using Nero 5 back in the bygone era of CD burning..
and a simple check box command to 'normalise' all audio files...

I'd be very confident there are now similar easy off the shelf freewares to perform the task you need...???


Post - Top - Home - Printer Friendly - Translate

Subject: RE: Tech: ffmpeg batch process volume increase
From: GUEST,Jon
Date: 09 Sep 17 - 09:39 AM

I can't try it on Win atm and would need to install mpeg, etc. This is working or me on Linux.

for f in *.mp3; do
ffmpeg -i $f -filter:a 'volume=1.5' test/$f
done

That would loop trough each mp3 in the current directory and save the files using the same name in the (already created) test subdirectory.


Post - Top - Home - Printer Friendly - Translate

Subject: RE: Tech: ffmpeg batch process volume increase
From: GUEST,Jon
Date: 09 Sep 17 - 09:46 AM

As an alternative to pfr's idea, you might want to search for "ffmpeg gui". It might find something useful to you.


Post - Top - Home - Printer Friendly - Translate

Subject: RE: Tech: ffmpeg batch process volume increase
From: DaveRo
Date: 09 Sep 17 - 11:07 AM

Well - I've never used Windows 2000 scripting - which I think this is - but the concepts are similar in any command shell. And I don't have a Win box here either. I found this which explains most of it.

I'm puzzled by '%%~n1' - was this originally a script with arguments, of which %%1 would be the first?

I suggest:
- CD to the folder with your source files in (so you don't need all this drive and path stuff)
- make them all read-only so you can't overwrite them, or make sure you have a backup in case you do
- create a folder 'test' in that folder for the output (like Jon's script)
- try this as the output: "test\%%~nxF"

I don't know why the files are so much smaller; I would solve that afterwards.


Post - Top - Home - Printer Friendly - Translate

Subject: RE: Tech: ffmpeg batch process volume increase
From: punkfolkrocker
Date: 09 Sep 17 - 11:17 AM

I'm just throwing in the odd idea that might be of more use to any casual non specialist software 'end product' users,
who may be interested in reading this thread...

I suspect most of the fun in coding your own DIY solution is in the 'eureka' of getting it to work successfully...


Post - Top - Home - Printer Friendly - Translate

Subject: RE: Tech: ffmpeg batch process volume increase
From: GUEST,Jon
Date: 09 Sep 17 - 11:31 AM

Understood, pfr. In case I was missunderstood, I suppose I was just expanding on your thoughts. There can be graphical frontends for some of the mysterious command line things.

My CD burner btw is k3b. That just runs common command line programs I don't understand in the background.


Post - Top - Home - Printer Friendly - Translate

Subject: RE: Tech: ffmpeg batch process volume increase
From: punkfolkrocker
Date: 09 Sep 17 - 01:01 PM

This is stuff i should have, and would have been expected to take an interest in.
But an unemployment day centre crash course coding on the commodore 64 in 1983 or 84 killed all interest in computers...
until I discovered midi software on macs in 1996; and music tech sequencers & soft synths on win 98...

I envy you coders for your skills, but now can't be arsed learning...


Post - Top - Home - Printer Friendly - Translate

Subject: RE: Tech: ffmpeg batch process volume increase
From: Bonzo3legs
Date: 09 Sep 17 - 01:11 PM

Thanks DaveRo that worked! The output files are 128kbps whereas the input files were
320kbps, maybe that accounts for the drop in file size.


Post - Top - Home - Printer Friendly - Translate

Subject: RE: Tech: ffmpeg batch process volume increase
From: DaveRo
Date: 09 Sep 17 - 02:42 PM

I wonder why it changed the bitrate? Presumably the ffmpeg/libavcodec default. If you look at my script, linked in my 2nd post, you'll see the -aq (audio quality) parameter; I don't remember what the numbers mean but you can probably use that to get it back to 320 - or perhaps 192.

If you're going to do a lot of this I suggest you try cygwin. Three of us on this thread can quote you bash off the top of our heads - and probably test it too.


Post - Top - Home - Printer Friendly - Translate

Subject: RE: Tech: ffmpeg batch process volume increase
From: GUEST,Jon
Date: 09 Sep 17 - 02:55 PM

Hope your not counting me in there, Dave. I have to look everything up. Still, a loop's a loop, etc. And if/when I'm around here am willing to try/test this sort of thing on Linux.


Post - Top - Home - Printer Friendly - Translate

Subject: RE: Tech: ffmpeg batch process volume increase
From: Bonzo3legs
Date: 09 Sep 17 - 03:57 PM

Thanks again DaveRo, I'll try that.


Post - Top - Home - Printer Friendly - Translate

Subject: RE: Tech: ffmpeg batch process volume increase
From: Bonzo3legs
Date: 09 Sep 17 - 04:55 PM

Yes that's fantastic, I included -aq value as 0 which gave me up to about 200kbps. I did a little research on -aq and found mention of
-b:a which seems to be used with a bitrate, so I changed the batch file to include -b:a 320k which now gives output file sizes identical to input files!

So my batch command is now
for %%F in (*.mp3) do ffmpeg -i "%%F" -filter:a "volume=1.5" -b:a 320k "test\%%~nxF"
done

Thanks again for all the help.

Now to prepare a nice loud folder of music for our flight back to London Gatwick tomorrow evening!


Post - Top - Home - Printer Friendly - Translate
  Share Thread:
More...

Reply to Thread
Subject:  Help
From:
Preview   Automatic Linebreaks   Make a link ("blue clicky")


Mudcat time: 19 November 9:30 AM EST

[ Home ]

All original material is copyright © 1998 by the Mudcat Café Music Foundation, Inc. All photos, music, images, etc. are copyright © by their rightful owners. Every effort is taken to attribute appropriate copyright to images, content, music, etc. We are not a copyright resource.