My goal is to have a script that takes an audio file and increases its volume by 50%.
I currently use the following AutoHotKey snippet to encode a file to MP3:
How can I modify this line to not only encode to mp3, but also increase the volume of the file by 50%? I tried setting
--volume 150 but it just made the file play, while I don't want to play, I want to have it saved with that volume.
If you have suggestions for other Windows-compatible tools to modify audio that can do this, (along with instructions on how to do this) I'll be happy to hear about them.
Ram RachumRam Rachum
27.2k6363 gold badges188188 silver badges306306 bronze badges
5 Answers
I suggest you to use ffmpeg. it is very powerful, cross platform 32 or 64 bit, audio and video converter. Can be downloaded from Zeranoe FFmpeg - Builds
Below sample commands work for audio extracting from video, or audio converter with volume increasing or decreasing support.
Extract audio from video to MP3, or convert audio to MP3 (sample InputFilePath_VideoOrAudio = 'e:video.mp4' or 'e:audio.m4a')
Extract audio from video to MP3 and increase volume 150% while extracting add -af 'volume=1.5' parameter.
List of audio converter parameters (mp3,ogg,ac3,wma,flac,wav,aiff,m4a..). to change volume level while converting to audio add -af 'volume=VolumeValue' parameter.
VolumeValue=0.5 decrease volume %50
VolumeValue=1.5 increase volume %150
VolumeValue=2.0 increase volume %200 and so on.
Note 1: some codecs can be experimental in such case you should use -strict experimental or -strict -2 parameters.
Note 2:-ab parameter means audio bit rate. Some devices can not play audio file that bit rate greater than -ab 192k. Use -ab 128k or -ab 192k with -ar 44100 parameters to produce audio file that can be playable most of the mobile devices. -ac 2 parameter means stereo -ac 1 means mono.
to convert specific part of the input file use -ss 00:00:00 and -t parameters. -ss means Start From -t means duration. Important: parameter -ss should placed before the -i parameter, otherwise ffmpeg seeks to -ss position slowly.
Samples: assume that input file duration is 00:20:00 (20 minutes)
![]()
using only -ss 00:05:00 means convert input file starting from 5th minute to end of the input file. Duration of the output file will be 15 minutes.
using -ss 00:05:00 with -t 120 or -t 00:02:00 means convert 120 seconds, starting from 5th minute. Duration of the output file will be 120 seconds.
Note:-y means in advance YES to ffmpeg's yes/no questions such as output file already exist, over write? with -y parameters ffmpeg over writes the output file if it is already exist without asking the user.
-sn disables subtitle, -vn disable video, -dn disable data streams for output file.
khankhan
2,52111 gold badge1010 silver badges77 bronze badges
If you just want a CLI tool then you could use ffmpeg:
If you'd like to be able to do it programmatically, looking at your profile I deduced that python should not be a problem :)
So you can use the nice
pydub module together with ffmpeg (or avconv which it also supports) for your task.
E.g:
The reason for
384 is that the ffmpeg doc states that
-vol volume change audio volume (256=normal)
So
256*1.5 = 384
Tested this on my windows 7 machine just now..
Hope this helps.
ScisScis
2,50322 gold badges1717 silver badges3232 bronze badges
The '--volume' option in VLC doesn't actually change the volume of the output video as you would think it would. What you want to do is add the compressor filter and then set the 'compressor-makup-gain'. Set it to a value from 1-24 depending on how loud you want the video to be. So your command would be something like this:
By the way, for anyone who is trying to figure out how to use VLC to increase the volume of the audio in a video file, here's how you can do that:
'C:Program Files (x86)VideoLANVLCvlc.exe' yoursourcefile.mp4 :sout=#transcode{acodec=mp3,ab=128,channels=2,samplerate=44100,afilter=compressor}:file{dst=outputfilename.mp4} :sout-all :sout-keep --compressor-makeup-gain=20
Replace 'yoursourcefile.mp4' and 'outputfilename.mp4' with your own file names. In my experience, VLC crashed about half the time I ran this command, so you may need to try it more than once if it crashes on you.
orrdorrd
5,24911 gold badge3030 silver badges2525 bronze badges
Run this on a dir to increasing all files volume on that dir, one by one (or else it would eat up all CPU)
FOR %f IN (*) DO (start /wait ' 'C:Program Files (x86)VideoLANVLCvlc.exe' %f :sout=#transcode{acodec=mp3,afilter=compressor}:file{dst=Boost%f} :sout-all :sout-keep --play-and-exit --compressor-makeup-gain=10)
MPauloMPaulo
I believe mp3gain has a command line option for this. You could run this as a separate pass over the generated file:
MonkeyPushButtonMonkeyPushButton
Not the answer you're looking for? Browse other questions tagged audiovlc or ask your own question.
A user of itechtics asks the following question: “Just wondering if I can increase the volume of Windows beyond the maximum limit?”
The question can be divided into two parts, whether you want to increase the sound of the multimedia playback on your system or increase the maximum volume of the overall system. I will discuss three methods to boost sound in Windows beyond 100% default.
Using Audio Enhancements
This method will enhance the maximum volume of the overall system. In Windows, there is a loudness equalization option supported by most sound cards which needs to be configured in order to make audio louder. Let’s go through the process step by step:
This should increase the overall system sound effect to be more louder. But for any reason, your sound card does not support equalization, then you’ll need to go with the other options mentioned in this article.
How much mfc tokens cost. Please go to your My Account area for much more details.The moment you've tokens as part of your account, you'll be able to get a model right into a personal demonstrate or if a model is inside a personal demonstrate previously you'll be able to spy on it working with our voyeur present characteristic (except if the TruePrivate selection is staying employed). As an example, you will be most likely limited in the number of tokens it is possible to obtain or hold with your account, likewise as what token possibilities you happen to be permitted to obtain. You'll be able to also initiate or join a group display or send a model a tip.Personal exhibits price one per 2nd, or 60 tokens per minute.
Using Sound Booster Plugins
Second method is to use sound booster plugins. This is the most reliable and exciting option. But the problem is that there are not many free sound booster plugins available which have many options available for free. But we will list down a few plugins which can be used for boosting the overall volume of the system.
Audio Enhancer Bongiovi DPS Plugin
This is a commercial plugin but you can test it out using the trial version. It supports a lot of sound enhancement and equalization options. Bongiovi DPS plugin is available for Windows 7, Windows 8 and Windows 8.1. It also support Max OSX.
![]() DFX Audio Enhancer Plugin
DFX Audio Enhancer is my favorite tool for enhancing the system volume on my system. DFX Audio Enhancer boosts the sound quality of audio playback of the overall system which includes your music, videos, Internet audio, games and other programs. This plugin comes with a free edition which has most of the configuration options disabled but it will be enough for a basic sound boost on your system.
SoundPimp
SoundPimp audio enhancer with High Definition Stereo enhances the overall listening experience of computer audio. I have not used SoundPimp but it seems good because it is available for all platforms including Windows, Mac OS and Linux.
Using VLC Player
If you only want to make your multimedia audio and video louder then you can use multimedia players which let you go beyond the 100% volume limit. One option is VLC Player which lets you increase the volume up to 125%.
Must Read Articles:
I currently use the following AutoHotKey snippet to encode a file to MP3:
How can I modify this line to not only encode to mp3, but also increase the volume of the file by 50%? I tried setting
--volume 150 but it just made the file play, while I don't want to play, I want to have it saved with that volume.
If you have suggestions for other Windows-compatible tools to modify audio that can do this, (along with instructions on how to do this) I'll be happy to hear about them.
Ram RachumRam Rachum
27.2k6363 gold badges188188 silver badges306306 bronze badges
5 Answers
I suggest you to use ffmpeg. it is very powerful, cross platform 32 or 64 bit, audio and video converter. Can be downloaded from Zeranoe FFmpeg - Builds
Below sample commands work for audio extracting from video, or audio converter with volume increasing or decreasing support.
Extract audio from video to MP3, or convert audio to MP3 (sample InputFilePath_VideoOrAudio = 'e:video.mp4' or 'e:audio.m4a')
Extract audio from video to MP3 and increase volume 150% while extracting add -af 'volume=1.5' parameter.
List of audio converter parameters (mp3,ogg,ac3,wma,flac,wav,aiff,m4a..). to change volume level while converting to audio add -af 'volume=VolumeValue' parameter.
VolumeValue=0.5 decrease volume %50
VolumeValue=1.5 increase volume %150
VolumeValue=2.0 increase volume %200 and so on.
Note 1: some codecs can be experimental in such case you should use -strict experimental or -strict -2 Princess maker 2 mods. parameters.
Note 2:-ab parameter means audio bit rate. Some devices can not play audio file that bit rate greater than -ab 192k. Use -ab 128k or -ab 192k with -ar 44100 parameters to produce audio file that can be playable most of the mobile devices. -ac 2 parameter means stereo -ac 1 means mono.
to convert specific part of the input file use -ss 00:00:00 and -t parameters. -ss means Start From -t means duration. Important: parameter -ss should placed before the -i parameter, otherwise ffmpeg seeks to -ss position slowly.
Samples: assume that input file duration is 00:20:00 (20 minutes)
using only -ss 00:05:00 means convert input file starting from 5th minute to end of the input file. Duration of the output file will be 15 minutes.
using -ss 00:05:00 with -t 120 or -t 00:02:00 means convert 120 seconds, starting from 5th minute. Duration of the output file will be 120 seconds.
Note:-y means in advance YES to ffmpeg's yes/no questions such as output file already exist, over write? with -y parameters ffmpeg over writes the output file if it is already exist without asking the user.
-sn disables subtitle, -vn disable video, -dn disable data streams for output file.
khankhan
2,52111 gold badge1010 silver badges77 bronze badges
If you just want a CLI tool then you could use ffmpeg:
If you'd like to be able to do it programmatically, looking at your profile I deduced that python should not be a problem :)
So you can use the nice
pydub module together with ffmpeg (or avconv which it also supports) for your task.
E.g:
The reason for
384 is that the ffmpeg doc states that
-vol volume change audio volume (256=normal)
So
256*1.5 = 384
Tested this on my windows 7 machine just now..
Hope this helps.
ScisScis
2,50322 gold badges1717 silver badges3232 bronze badges
The '--volume' option in VLC doesn't actually change the volume of the output video as you would think it would. What you want to do is add the compressor filter and then set the 'compressor-makup-gain'. Set it to a value from 1-24 depending on how loud you want the video to be. So your command would be something like this:
By the way, for anyone who is trying to figure out how to use VLC to increase the volume of the audio in a video file, here's how you can do that:
'C:Program Files (x86)VideoLANVLCvlc.exe' yoursourcefile.mp4 :sout=#transcode{acodec=mp3,ab=128,channels=2,samplerate=44100,afilter=compressor}:file{dst=outputfilename.mp4} :sout-all :sout-keep --compressor-makeup-gain=20
Replace 'yoursourcefile.mp4' and 'outputfilename.mp4' with your own file names. In my experience, VLC crashed about half the time I ran this command, so you may need to try it more than once if it crashes on you.
orrdorrd
5,24911 gold badge3030 silver badges2525 bronze badges
Run this on a dir to increasing all files volume on that dir, one by one (or else it would eat up all CPU)
FOR %f IN (*) DO (start /wait ' 'C:Program Files (x86)VideoLANVLCvlc.exe' %f :sout=#transcode{acodec=mp3,afilter=compressor}:file{dst=Boost%f} :sout-all :sout-keep --play-and-exit --compressor-makeup-gain=10)
MPauloMPaulo
I believe mp3gain has a command line option for this. You could run this as a separate pass over the generated file:
MonkeyPushButtonMonkeyPushButton
![]() Increase Volume In VlcNot the answer you're looking for? Browse other questions tagged audiovlc or ask your own question.Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |