本文提供将音频提升音量的java工具类代码,一如既往的实用主义分享。
<dependency> <groupid>cn.hutool</groupid> <artifactid>hutool-all</artifactid> <version>5.7.15</version> </dependency> <dependency> <groupid>com.google.guava</groupid> <artifactid>guava</artifactid> <version>31.0.1-jre</version> </dependency> <dependency> <groupid>org.bytedeco</groupid> <artifactid>javacv-platform</artifactid> <version>1.5.5</version> </dependency>
不废话,上代码。
package com.huyi.csdn.tools; import cn.hutool.core.util.idutil;import com.google.common.ba.joiner;import com.google.common.ba.splitter;import org.bytedeco.javacpp.loader; import java.io.file;import java.text.messageformat;import java.util.arrays;import java.util.list; /** * @program: csdn @classname: raivolumeutil @author: 剑客阿良_aliang @date: 2021-11-25 00:42 @description: * 提升音量工具 @version: v1.0 */public class raivolumeutil { /** * 通过倍率提升音量 * * @param audiopath 音频地址 * @param outputdir 输出目录 * @return 图片地址 * @throws exception 异常 */ public static string raibyratio(string audiopath, string outputdir, float ratio) throws exception { list<string> paths = splitter.on(".").splittolist(audiopath); string ext = paths.get(paths.size() - 1); if (!arrays.aslist("wav", "mp3").contains(ext)) { throw new exception("format error"); } string resultpath = joiner.on(file.parator).join(arrays.aslist(outputdir, idutil.simpleuuid() + "." + ext)); string ffmpeg = loader.load(org.bytedeco.ffmpeg.ffmpeg.class); processbuilder builder = new processbuilder( ffmpeg, "-i", audiopath, "-filter:a", messageformat.format("volume={0}", string.valueof(ratio)), resultpath); builder.inheritio().start().waitfor(); return resultpath; } /** * 通过分贝提升音量 * * @param audiopath 音频地址 * @param outputdir 输出目录 * @return 图片地址 * @throws exception 异常 */ public static string raibydecibel(string audiopath, string outputdir, int decibel) throws exception { list<string> paths = splitter.on(".").splittolist(audiopath); string ext = paths.get(paths.size() - 1); if (!arrays.aslist("wav", "mp3").contains(ext)) { throw new exception("format error"); } string resultpath = joiner.on(file.parator).join(arrays.aslist(outputdir, idutil.simpleuuid() + "." + ext)); string ffmpeg = loader.load(org.bytedeco.ffmpeg.ffmpeg.class); processbuilder builder = new processbuilder( ffmpeg, "-i", audiopath, "-filter:a", messageformat.format("volume={0}db", string.valueof(decibel)), resultpath); builder.inheritio().start().waitfor(); return resultpath; } }
代码说明
1、raibyratio和raibydecibel两个方法分别是按照音量倍率提升和按照分贝数提升音频,参数均为音频地址、输出目录、倍率(分贝数)。
2、倍率参数为浮点型,分贝参数为int类型。
3、音频后缀校验只有两种,如需添加,可以自行添加。
4、文件名避免重复使用uuid。
提供一个查看音频分辨率的命令,命令如下:
ffmpeg -i c:\urs\yi\desktop0952057553105332.wav -filter_complex volumedetect -c:v copy -f null c:\urs\yi\desktop.txt
原始音频音量
验证代码
public static void main(string[] args) throws exception { system.out.println( raibyratio("c:/urs/yi/desktop/660952057553105332.wav", "c:/urs/yi/desktop/", 2.5f)); system.out.println( raibydecibel("c:/urs/yi/desktop/660952057553105332.wav", "c:/urs/yi/desktop/", 30)); }
执行结果
e:\java\jdk1.8.0_40\bin\java.exe "-javaagent:e:\program files\jetbrains\intellij idea 2020.1.1\lib\idea_rt.jar=11349:e:\program files\jetbrains\intellij idea 2020.1.1\bin" -dfile.encoding=utf-8 -classpath e:\java\jdk1.8.0_40\jre\lib\charts.jar;e:\java\jdk1.8.0_40\jre\lib\deploy.jar;e:\java\jdk1.8.0_40\jre\lib\ext\access-bridge-64.jar;e:\java\jdk1.8.0_40\jre\lib\ext\cldrdata.jar;e:\java\jdk1.8.0_40\jre\lib\ext\dnsns.jar;e:\java\jdk1.8.0_40\jre\lib\ext\jaccess.jar;e:\java\jdk1.8.0_40\jre\lib\ext\jfxrt.jar;e:\java\jdk1.8.0_40\jre\lib\ext\localedata.jar;e:\java\jdk1.8.0_40\jre\lib\ext\nashorn.jar;e:\java\jdk1.8.0_40\jre\lib\ext\sunec.jar;e:\java\jdk1.8.0_40\jre\lib\ext\sunjce_provider.jar;e:\java\jdk1.8.0_40\jre\lib\ext\sunmscapi.jar;e:\java\jdk1.8.0_40\jre\lib\ext\sunpkcs11.jar;e:\java\jdk1.8.0_40\jre\lib\ext\zipfs.jar;e:\java\jdk1.8.0_40\jre\lib\javaws.jar;e:\java\jdk1.8.0_40\jre\lib\jce.jar;e:\java\jdk1.8.0_40\jre\lib\jfr.jar;e:\java\jdk1.8.0_40\jre\lib\jfxswt.jar;e:\java\jdk1.8.0_40\jre\lib\js.jar;e:\java\jdk1.8.0_40\jre\lib\management-agent.jar;e:\java\jdk1.8.0_40\jre\lib\plugin.jar;e:\java\jdk1.8.0_40\jre\lib\resources.jar;e:\java\jdk1.8.0_40\jre\lib\rt.jar;c:\urs\yi\ideaprojects\csdn\target\class;c:\urs\yi\.m2\repository\org\springframework\boot\spring-boot-starter-web\2.5.6\spring-boot-starter-web-2.5.6.jar;c:\urs\yi\.m2\repository\org\springframework\boot\spring-boot-starter\2.5.6\spring-boot-starter-2.5.6.jar;c:\urs\yi\.m2\repository\org\springframework\boot\spring-boot-starter-logging\2.5.6\spring-boot-starter-logging-2.5.6.jar;c:\urs\yi\.m2\repository\ch\qos\logback\logback-classic\1.2.6\logback-classic-1.2.6.jar;c:\urs\yi\.m2\repository\ch\qos\logback\logback-core\1.2.6\logback-core-1.2.6.jar;c:\urs\yi\.m2\repository\org\apache\logging\log4j\log4j-to-slf4j\2.14.1\log4j-to-slf4j-2.14.1.jar;适合c:\urs\yi\.m2\repository\org\apache\logging\log4j\log4j-api\2.14.1\log4j-api-2.14.1.jar;c:\urs\yi\.m2\repository\org\slf4j\jul-to-slf4j\1.7.32\jul-to-slf4j-1.7.32.jar;c:\urs\yi\.m2\repository\jakarta\annotation\jakarta.annotation-api\1.3.5\jakarta.annotation-api-1.3.5.jar;c:\urs\yi\.m2\repository\org\yaml\snakeyaml\1.28\snakeyaml-1.28.jar;c:\urs\yi\.m2\repository\org\springframework\boot\spring-boot-starter-json\2.5.6\spring-boot-starter-json-2.5.6.jar;c:\urs\yi\.m2\repository\com\fasterxml\jackson\core\jackson-databind\2.12.5\jackson-databind-2.12.5.jar;c:\urs\yi\.m2\repository\com\fasterxml\jackson\core\jackson-annotations\2.12.5\jackson-annotations-2.12.5.jar;c:\urs\yi\.m2\repository\com\fasterxml\jackson\core\jackson-core\2.12.5\jackson-core-2.12.5.jar;c:\urs\yi\.m2\repository\com\fasterxml\jackson\datatype\jackson-datatype-jdk8\2.12.5\jackson-datatype-jdk8-2.12.5.jar;c:\urs\yi\.m2\repository\com\fasterxml\jackson\datatype\jackson-datatype-jsr310\2.12.5\jackson-datatype-jsr310-2.12.5.jar;c:\urs\yi\.m2\repository\com\fasterxml\jackson\module\jackson-module-parameter-names\2.12.5\jackson-module-parameter-names-2.12.5.jar;c:\urs\yi\.m2\repository\org\springframework\boot\spring-boot-starter-tomcat\2.5.6\spring-boot-starter-tomcat-2.5.6.jar;c:\urs\yi\.m2\repository\org\apache\tomcat\embed\tomcat-embed-core\9.0.54\tomcat-embed-core-9.0.54.jar;c:\urs\yi\.m2\repository\org\apache\tomcat\embed\tomcat-embed-el\9.0.54\tomcat-embed-el-9.0.54.jar;c:\urs\yi\.m2\repository\org\apache\tomcat\embed\tomcat-embed-websocket\9.0.54\tomcat-embed-websocket-9.0.54.jar;c:\urs\yi\.m2\repository\org\springframework\spring-web\5.3.12\spring-web-5.3.12.jar;c:\urs\yi\.m2\repository\org\springframework\spring-beans\5.3.12\spring-beans-5.3.12.jar;c:\urs\yi\.m2\repository\org\springframework\spring-webmvc\5.3.12\spring-webmvc-5.3.12.jar;c:\urs\yi\.m2\repository\org\springframework\spring-aop\5.3.12\spring-aop-5.3.12.jar;c:\urs\yi\.m2\repository\org\springframework\spring-context\5.3.12\spring-context-5.3.12.jar;c:\urs\yi\.m2\repository\org\springframework\spring-expression\5.3.12\spring-expression-5.3.12.jar;c:\urs\yi\.m2\repository\org\springframework\boot\spring-boot-devtools\2.5.6\spring-boot-devtools-2.5.6.jar;c:\urs\yi\.m2\repository\org\springframework\boot\spring-boot\2.5.6\spring-boot-2.5.6.jar;c:\urs\yi\.m2\repository\org\springframework\boot\spring-boot-autoconfigure\2.5.6\spring-boot-autoconfigure-2.5.6.jar;c:\urs\yi\.m2\repository\org\springframework\boot\spring-boot-configuration-processor\2.5.6\spring-boot-configuration-processor-2.5.6.jar;c:\urs\yi\.m2\repository\org\projectlombok\lombok\1.18.22\lombok-1.18.22.jar;c:\urs\yi\.m2\repository\org\slf4j\slf4j-api\1.7.32\slf4j-api-1.7.32.jar;c:\urs\yi\.m2\repository\org\springframework\spring-core\5.3.12\spring-core-5.3.12.jar;c:\urs\yi\.m2\repository\org\springframework\spring-jcl\5.3.12\spring-jcl-5.3.12.jar;c:\urs\yi\.m2\repository\cn\hutool\hutool-all\5.7.15\hutool-all-5.7.15.jar;c:\urs\yi\.m2\repository\com\google\guava\guava\31.0.1-jre\guava-31.0.1-jre.jar;c:\urs\yi\.m2\repository\com\google\guava\failureaccess\1.0.1\failureaccess-1.0.1.jar;c:\urs\yi\.m2\repository\com\google\guava\listenablefuture\9999.0-empty-to-avoid-conflict-with-guava\listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar;c:\urs\yi\.m2\repository\com\google\code\findbugs\jsr305\3.0.2\jsr305-3.0.2.jar;c:\urs\yi\.m2\repository\org\checkerframework\checker-qual\3.12.0\checker-qual-3.12.0.jar;c:\urs\yi\.m2\repository\com\google\errorprone\error_prone_annotations\2.7.1\error_prone_annotations-2.7.1.jar;c:\urs\yi\.m2\repository\com\google\j2objc\j2objc-annotations\1.3\j2objc-annotations-1.3.jar;c:\urs\yi\.m2\repository\org\bytedeco\javacv-platform\1.5.5\javacv-platform-1.5.5.jar;c:\urs\yi\.m2\repository\org\bytedeco\javacv\1.5.5\javacv-1.5.5.jar;c:\urs\yi\.m2\repository\org\bytedeco\javacpp\1.5.5\javacpp-1.5.5.jar;c:\urs\yi\.m2\repository\org\bytedeco\openblas\0.3.13-1.5.5\openblas-0.3.13-1.5.5.jar;c:\urs\yi\.m2\repository\org\bytedeco\opencv\4.5.1-1.5.5\opencv-4.5.1-1.5.5.jar;c:\urs\yi\.m2\repository\org\bytedeco\ffmpeg\4.3.2-1.5.5\ffmpeg-4.3.2-1.5.5.jar;c:\urs\yi\.m2\repository\org\bytedeco\flycapture\2.13.3.31-1.5.5\flycapture-2.13.3.31-1.5.5.jar耽美 推荐;c:\urs\yi\.m2\repository\org\bytedeco\libdc1394\2.2.6-1.5.5\libdc1394-2.2.6-1.5.5.jar;c:\urs\yi\.m2\repository\org\bytedeco\libfreenect\0.5.7-1.5.5\libfreenect-0.5.7-1.5.5.jar;c:\urs\yi\.m2\repository\org\bytedeco\libfreenect2\0.2.0-1.5.5\libfreenect2-0.2.0-1.5.5.jar;c:\urs\yi\.m2\repository\org\bytedeco\librealn\1.12.4-1.5.5\librealn-1.12.4-1.5.5.jar;c:\urs\yi\.m2\repository\org\bytedeco\librealn2\2.40.0-1.5.5\librealn2-2.40.0-1.5.5.jar;c:\urs\yi\.m2\repository\org\bytedeco\videoinput\0.200-1.5.5\videoinput-0.200-1.5.5.jar;c:\urs\yi\.m2\repository\org\bytedeco\artoolkitplus\2.3.1-1.5.5\artoolkitplus-2.3.1-1.5.5.jar;c:\urs\yi\.m2\repository\org\bytedeco\flandmark\1.07-1.5.5\flandmark-1.07-1.5.5.jar;c:\urs\yi\.m2\repository\org\bytedeco\leptonica\1.80.0-1.5.5\leptonica-1.80.0-1.5.5.jar;c:\urs\yi\.m2\repository\org\bytedeco\tesract\4.1.1-1.5.5\tesract-4.1.1-1.5.5.jar;c:\urs\yi\.m2\repository\org\openjfx\javafx-graphics\11\javafx-graphics-11.jar;c:\urs\yi\.m2\repository\org\openjfx\javafx-graphics\11\javafx-graphics-11-win.jar;c:\urs\yi\.m2\repository\org\openjfx\javafx-ba\11\javafx-ba-11.jar;c:\urs\yi\.m2\repository\org\openjfx\javafx-ba\11\javafx-ba-11-win.jar;c:\urs\yi\.m2\repository\org\bytedeco\openblas-platform\0.3.13-1.5.5\openblas-platform-0.3.13-1.5.5.jar;c:\urs\yi\.m2\repository\org\bytedeco\javacpp-platform\1.5.5\javacpp-platform-1.5.5.jar;c:\urs\yi\.m2\repository\org\bytedeco\javacpp\1.5.5\javacpp-1.5.5-android-arm.jar;c:\urs\yi\.m2\repository\org\bytedeco\javacpp\1.5.5\javacpp-1.5.5-android-arm64.jar;c:\urs\yi\.m2\repository\org\bytedeco\javacpp\1.5.5\javacpp-1.5.5-android-x86.jar;c:\urs\yi\.m2\repository\org\bytedeco\javacpp\1.5.5\javacpp-1.5.5-android-x86_64.jar;c:\urs\yi\.m2\repository\org\bytedeco\javacpp\1.5.5\javacpp-1.5.5-ios-arm64.jar;c:\urs\yi\.m2\repository\org\bytedeco\javacpp\1.5.5\javacpp-1.5.5-ios-x86_64.jar;c:\urs\yi\.m2\repository\org\bytedeco\javacpp\1.5.5\javacpp-1.5.5-linux-armhf.jar;c:\urs\yi\.m2\repository\org\bytedeco\javacpp\1.5.5\javacpp-1.5.5-linux-arm64.jar;c:\urs\yi\.m2\repository\org\bytedeco\javacpp\1.5.5\javacpp-1.5.5-linux-ppc64le.jar;c:\urs\yi\.m2\repository\org\bytedeco\javacpp\1.5.5\javacpp-1.5.5-linux-x86.jar;c:\urs\yi\.m2\repository\org\bytedeco\javacpp\1.5.5\javacpp-1.5.5-linux-x86_64.jar;c:\urs\yi\.m2\repository\org\bytedeco\javacpp\1.5.5\javacpp-1.5.5-macosx-arm64.jar;c:\urs\yi\.m2\repository\org\bytedeco\javacpp\1.5.5\javacpp-1.5.5-macosx-x86_64.jar;c:\urs\yi\.m2\repository\org\bytedeco\javacpp\1.5.5\javacpp-1.5.5-windows-x86.jar;c:\urs\yi\.m2\repository\org\bytedeco\javacpp\1.5.5\javacpp-1.5.5-windows-x86_64.jar;c:\urs\yi\.m2\repository\org\bytedeco\openblas\0.3.13-1.5.5\openblas-0.3.13-1.5.5-android-arm.jar;c:\urs\yi\.m2\repository\org\bytedeco\openblas\0.3.13-1.5.5\openblas-0.3.13-1.5.5-android-arm64.jar;c:\urs\yi\.m2\repository\org\bytedeco\openblas\0.3.13-1.5.5\openblas-0.3.13-1.5.5-android-x86.jar;c:\urs\yi\.m2\repository\org\bytedeco\openblas\0.3.13-1.5.5\openblas-0.3.13-1.5.5-android-x86_64.jar;c:\urs\yi\.m2\repository\org\bytedeco\openblas\0.3.13-1.5.5\openblas-0.3.13-1.5.5-ios-arm64.jar;c:\urs\yi\.m2\repository\org\bytedeco\openblas\0.3.13-1.5.5\openblas-0.3.13-1.5.5-ios-x86_64.jar;c:\urs\yi\.m2\repository\org\bytedeco\openblas\0.3.13-1.5.5\openblas-0.3.13-1.5.5-linux-x86.jar;c:\urs\yi\.m2\repository\org\bytedeco\openblas\0.3.13-1.5.5\openblas-0.3.13-1.5.5-linux-x86_64.jar;c:\urs\yi\.m2\repository\org\bytedeco\openblas\0.3.13-1.5.5\openblas-0.3.13-1.5.5-linux-armhf.jar;c:\urs\yi\.m2\repository\org\bytedeco\openblas\0.3.13-1.5.5\openblas-0.3.13-1.5.5-linux-arm64.jar;c:\urs\yi\.m2\repository\org\bytedeco\openblas\0.3.13-1.5.5\openblas-0.3.13-1.5.5-linux-ppc64le.jar;c:\urs\yi\.m2\repository\org\bytedeco\openblas\0.3.13-1.5.5\openblas-0.3.13-1.5.5-macosx-x86_64.jar;c:\urs\yi\.m2\repository\org\bytedeco\openblas\0.3.13-1.5.5\openblas-0.3.13-1.5.5-windows-x86.jar;c:\urs\yi\.m2\repository\org\bytedeco\openblas\0.3.13-1.5.5\openblas-0.3.13-1.5.5-windows-x86_64.jar;c:\urs\yi\.m2\repository\org\bytedeco\opencv-platform\4.5.1-1.5.5\opencv-platform-4.5.1-1.5.5.jar;c:\urs\yi\.m2\repository\org\bytedeco\opencv\4.5.1-1.5.5\opencv-4.5.1-1.5.5-android-arm.jar;c:\urs\yi\.m2\repository\org\bytedeco\opencv\4.5.1-1.5.5\opencv-4.5.1-1.5.5-android-arm64.jar;c:\urs\yi\.m2\repository\org\bytedeco\opencv\4.5.1-1.5.5\opencv-4.5.1-1.5.5-android-x86.jar;c:\urs\yi\.m2\repository\org\bytedeco\opencv\4.5.1-1.5.5\opencv-4.5.1-1.5.5-android-x86_64.jar;c:\urs\yi\.m2\repository\org\bytedeco\opencv\4.5.1-1.5.5\opencv-4.5.1-1.5.5-ios-arm64.jar;c:\urs\yi\.m2\repository\org\bytedeco\opencv\4.5.1-1.5.5\opencv-4.5.1-1.5.5-ios-x86_64.jar;c:\urs\yi\.m2\repository\org\bytedeco\opencv\4.5.1-1.5.5\opencv-4.5.1-1.5.5-linux-x86.jar;c:\urs\yi\.m2\repository\org\bytedeco\opencv\4.5.1-1.5.5\opencv-4.5.1-1.5.5-linux-x86_64.jar;c:\urs\yi\.m2\repository\org\bytedeco\opencv\4.5.1-1.5.5\opencv-4.5.1-1.5.5-linux-armhf.jar;c:\urs\yi\.m2\repository\org\bytedeco\opencv\4.5.1-1.5.5\opencv-4.5.1-1.5.5-linux-arm64.jar;c:\urs\yi\.m2\repository\org\bytedeco\opencv\4.5.1-1.5.5\opencv-4.5.1-1.5.5-linux-ppc64le.jar;c:\urs\yi\.m2\repository\org\bytedeco\opencv\4.5.1-1.5.5\opencv-4.5.1-1.5.5-macosx-x86_64.jar;c:\urs\yi\.m2\repository\org\bytedeco\opencv\4.5.1-1.5.5\opencv-4.5.1-1.5.5-windows-x86.jar;c:\urs\yi\.m2\repository\org\bytedeco\opencv\4.5.1-1.5.5\opencv-4.5.1-1.5.5-windows-x86_64.jar;c:\urs\yi\.m2\repository\org\bytedeco\ffmpeg-platform\4.3.2-1.5.5\ffmpeg-platform-4.3.2-1.5.5.jar;c:\urs\yi\.m2\repository\org\bytedeco\ffmpeg\4.3.2-1.5.5\ffmpeg-4.3.2-1.5.5-android-arm.jar;c:\urs\yi\.m2\repository\org\bytedeco\ffmpeg\4.3.2-1.5.5\ffmpeg-4.3.2-1.5.5-android-arm64.jar;c:\urs\yi\.m2\repository\org\bytedeco\ffmpeg\4.3.2-1.5.5\ffmpeg-4.3.2-1.5.5-android-x86.jar;c:\u干部身份有什么用rs\yi\.m2\repository\org\bytedeco\ffmpeg\4.3.2-1.5.5\ffmpeg-4.3.2-1.5.5-android-x86_64.jar;c:\urs\yi\.m2\repository\org\bytedeco\ffmpeg\4.3.2-1.5.5\ffmpeg-4.3.2-1.5.5-linux-x86.jar;c:\urs\yi\.m2\repository\org\bytedeco\ffmpeg\4.3.2-1.5.5\ffmpeg-4.3.2-1.5.5-linux-x86_64.jar;c:\urs\yi\.m2\repository\org\bytedeco\ffmpeg\4.3.2-1.5.5\ffmpeg-4.3.2-1.5.5-linux-armhf.jar;c:\urs\yi\.m2\repository\org\bytedeco\ffmpeg\4.3.2-1.5.5\ffmpeg-4.3.2-1.5.5-linux-arm64.jar;c:\urs\yi\.m2\repository\org\bytedeco\ffmpeg\4.3.2-1.5.5\ffmpeg-4.3.2-1.5.5-linux-ppc64le.jar;c:\urs\yi\.m2\repository\org\bytedeco\ffmpeg\4.3.2-1.5.5\ffmpeg-4.3.2-1.5.5-macosx-x86_64.jar;c:\urs\yi\.m2\repository\org\bytedeco\ffmpeg\4.3.2-1.5.5\ffmpeg-4.3.2-1.5.5-windows-x86.jar;c:\urs\yi\.m2\repository\org\bytedeco\ffmpeg\4.3.2-1.5.5\ffmpeg-4.3.2-1.5.5-windows-x86_64.jar;c:\urs\yi\.m2\repository\org\bytedeco\flycapture-platform\2.13.3.31-1.5.5\flycapture-platform-2.13.3.31-1.5.5.jar;c:\urs\yi\.m2\repository\org\bytedeco\flycapture\2.13.3.31-1.5.5\flycapture-2.13.3.31-1.5.5-linux-x86.jar;c:\urs\yi\.m2\repository\org\bytedeco\flycapture\2.13.3.31-1.5.5\flycapture-2.13.3.31-1.5.5-linux-x86_64.jar;c:\urs\yi\.m2\repository\org\bytedeco\flycapture\2.13.3.31-1.5.5\flycapture-2.13.3.31-1.5.5-linux-armhf.jar;c:\urs\yi\.m2\repository\org\bytedeco\flycapture\2.13.3.31-1.5.5\flycapture-2.13.3.31-1.5.5-linux-arm64.jar;c:\urs\yi\.m2\repository\org\bytedeco\flycapture\2.13.3.31-1.5.5\flycapture-2.13.3.31-1.5.5-windows-x86.jar;c:\urs\yi\.m2\repository\org\bytedeco\flycapture\2.13.3.31-1.5.5\flycapture-2.13.3.31-1.5.5-windows-x86_64.jar;c:\urs\yi\.m2\repository\org\bytedeco\libdc1394-platform\2.2.6-1.5.5\libdc1394-platform-2.2.6-1.5.5.jar;c:\urs\yi\.m2\repository\org\bytedeco\libdc1394\2.2.6-1.5.5\libdc1394-2.2.6-1.5.5-linux-x86.jar;c:\urs\yi\.m2\repository\org\bytedeco\libdc1394\2.2.6-1.5.5\libdc1394-2.2.6-1.5.5-linux-x86_64.jar;c:\urs\yi\.m2\repository\org\bytedeco\libdc1394\2.2.6-1.5.5\libdc1394-2.2.6-1.5.5-linux-armhf.jar;c:\urs\yi\.m2\repository\org\bytedeco\libdc1394\2.2.6-1.5.5\libdc1394-2.2.6-1.5.5-linux-arm64.jar;c:\urs\yi\.m2\repository\org\bytedeco\libdc1394\2.2.6-1.5.5\libdc1394-2.2.6-1.5.5-linux-ppc64le.jar;c:\urs\yi\.m2\repository\org\bytedeco\libdc1394\2.2.6-1.5.5\libdc1394-2.2.6-1.5.5-macosx-x86_64.jar;c:\urs\yi\.m2\repository\org\bytedeco\libdc1394\2.2.6-1.5.5\libdc1394-2.2.6-1.5.5-windows-x86.jar;c:\urs\yi\.m2\repository\org\bytedeco\libdc1394\2.2.6-1.5.5\libdc1394-2.2.6-1.5.5-windows-x86_64.jar;c:\urs\yi\.m2\repository\org\bytedeco\libfreenect-platform\0.5.7-1.5.5\libfreenect-platform-0.5.7-1.5.5.jar;c:\urs\yi\.m2\repository\org\bytedeco\libfreenect\0.5.7-1.5.5\libfreenect-0.5.7-1.5.5-linux-x86.jar;c:\urs\yi\.m2\repository\org\bytedeco\libfreenect\0.5.7-1.5.5\libfreenect-0.5.7-1.5.5-linux-x86_64.jar;c:\urs\yi\.m2\repository\org\bytedeco\libfreenect\0.5.7-1.5.5\libfreenect-0.5.7-1.5.5-linux-armhf.jar;c:\urs\yi\.m2\repository\org\bytedeco\libfreenect\0.5.7-1.5.5\libfreenect-0.5.7-1.5.5-linux-arm64.jar;c:\urs\yi\.m2\repository\org\bytedeco\libfreenect\0.5.7-1.5.5\libfreenect-0.5.7-1.5.5-linux-ppc64le.jar;c:\urs\yi\.m2\repository\org\bytedeco\libfreenect\0.5.7-1.5.5\libfreenect-0.5.7-1.5.5-macosx-x86_64.jar;c:\urs\yi\.m2\repository\org\bytedeco\libfreenect\0.5.7-1.5.5\libfreenect-0.5.7-1.5.5-windows-x86.jar;c:\urs\yi\.m2\repository\org\bytedeco\libfreenect\0.5.7-1.5.5\libfreenect-0.5.7-1.5.5-windows-x86_64.jar;c:\urs\yi\.m2\repository\org\bytedeco\libfreenect2-platform\0.2.0-1.5.5\libfreenect2-platform-0.2.0-1.5.5.jar;c:\was和were的用法区别urs\yi\.m2\repository\org\bytedeco\libfreenect2\0.2.0-1.5.5\libfreenect2-0.2.0-1.5.5-linux-x86.jar;c:\urs\yi\.m2\repository\org\bytedeco\libfreenect2\0.2.0-1.5.5\libfreenect2-0.2.0-1.5.5-linux-x86_64.jar;c:\urs\yi\.m2\repository\org\bytedeco\libfreenect2\0.2.0-1.5.5\libfreenect2-0.2.0-1.5.5-macosx-x86_64.jar;c:\urs\yi\.m2\repository\org\bytedeco\libfreenect2\0.2.0-1.5.5\libfreenect2-0.2.0-1.5.5-windows-x86_64.jar;c:\urs\yi\.m2\repository\org\bytedeco\librealn-platform\1.12.4-1.5.5\librealn-platform-1.12.4-1.5.5.jar;c:\urs\yi\.m2\repository\org\bytedeco\librealn\1.12.4-1.5.5\librealn-1.12.4-1.5.5-linux-armhf.jar;c:\urs\yi\.m2\repository\org\bytedeco\librealn\1.12.4-1.5.5\librealn-1.12.4-1.5.5-linux-arm64.jar;c:\urs\yi\.m2\repository\org\bytedeco\librealn\1.12.4-1.5.5\librealn-1.12.4-1.5.5-linux-x86.jar;c:\urs\yi\.m2\repository\org\bytedeco\librealn\1.12.4-1.5.5\librealn-1.12.4-1.5.5-linux-x86_64.jar;c:\urs\yi\.m2\repository\org\bytedeco\librealn\1.12.4-1.5.5\librealn-1.12.4-1.5.5-macosx-x86_64.jar;c:\urs\yi\.m2\repository\org\bytedeco\librealn\1.12.4-1.5.5\librealn-1.12.4-1.5.5-windows-x86.jar;c:\urs\yi\.m2\repository\org\bytedeco\librealn\1.12.4-1.5.5\librealn-1.12.4-1.5.5-windows-x86_64.jar;c:\urs\yi\.m2\repository\org\bytedeco\librealn2-platform\2.40.0-1.5.5\librealn2-platform-2.40.0-1.5.5.jar;c:\urs\万圣节亲子活动yi\.m2\repository\org\bytedeco\librealn2\2.40.0-1.5.5\librealn2-2.40.0-1.5.5-linux-armhf.jar;c:\urs\yi\.m2\repository\org\bytedeco\librealn2\2.40.0-1.5.5\librealn2-2.40.0-1.5.5-linux-arm64.jar;c:\urs\yi\.m2\repository\org\bytedeco\librealn2\2.40.0-1.5.5\librealn2-2.40.0-1.5.5-linux-x86.jar;c:\urs\yi\.m2\repository\org\bytedeco\librealn2\2.40.0-1.5.5\librealn2-2.40.0-1.5.5-linux-x86_64.jar;c:\urs\yi\.m2\repository\org\bytedeco\librealn2\2.40.0-1.5.5\librealn2-2.40.0-1.5.5-macosx-x86_64.jar;c:\urs\yi\.m2\repository\org\bytedeco\librealn2\2.40.0-1.5.5\librealn2-2.40.0-1.5.5-windows-x86.jar;c:\urs\yi\.m2\repository\org\bytedeco\librealn2\2.40.0-1.5.5\librealn2-2.40.0-1.5.5-windows-x86_64.jar;c:\urs\yi\.m2\repository\org\bytedeco\videoinput-platform\0.200-1.5.5\videoinput-platform-0.200-1.5.5.jar;c:\urs\yi\.m2\repository\org\bytedeco\videoinput\0.200-1.5.5\videoinput-0.200-1.5.5-windows-x86.jar;c:\urs\yi\.m2\repository\org\bytedeco\videoinput\0.200-1.5.5\videoinput-0.200-1.5.5-windows-x86_64.jar;c:\urs\yi\.m2\repository\org\bytedeco\artoolkitplus-platform\2.3.1-1.5.5\artoolkitplus-platform-2.3.1-1.5.5.jar;c:\urs\yi\.m2\repository\org\bytedeco\artoolkitplus\2.3.1-1.5.5\artoolkitplus-2.3.1-1.5.5-android-arm.jar;c:\urs\yi\.m2\repository\org\bytedeco\artoolkitplus\2.3.1-1.5.5\artoolkitplus-2.3.1-1.5.5-android-arm64.jar;c:\urs\yi\.m2\repository\org\bytedeco\artoolkitplus\2.3.1-1.5.5\artoolkitplus-2.3.1-1.5.5-android-x86.jar;c:\urs\yi\.m2\repository\org\bytedeco\artoolkitplus\2.3.1-1.5.5\artoolkitplus-2.3.1-1.5.5-android-x86_64.jar;c:\urs\yi\.m2\repository\org\bytedeco\artoolkitplus\2.3.1-1.5.5\artoolkitplus-2.3.1-1.5.5-linux-x86.jar;c:\urs\yi\.m2\repository\org\bytedeco\artoolkitplus\2.3.1-1.5.5\artoolkitplus-2.3.1-1.5.5-linux-x86_64.jar;c:\urs\yi\.m2\repository\org\bytedeco\artoolkitplus\2.3.1-1.5.5\artoolkitplus-2.3.1-1.5.5-linux-armhf.jar;c:\urs\yi\.m2\repository\org\bytedeco\artoolkitplus\2.3.1-1.5.5\artoolkitplus-2.3.1-1.5.5-linux-arm64.jar;c:\urs\yi\.m2\repository\org\bytedeco\artoolkitplus\2.3.1-1.5.5\artoolkitplus-2.3.1-1.5.5-linux-ppc64le.jar;c:\urs\yi\.m2\repository\org\bytedeco\artoolkitplus\2.3.1-1.5.5\artoolkitplus-2.3.1-1.5.5-macosx-x86_64.jar;c:\urs\yi\.m2\repository\org\bytedeco\artoolkitplus\2.3.1-1.5.5\artoolkitplus-2.3.1-1.5.5-windows-x86.jar;c:\urs\yi\.m2\repository\org\bytedeco\artoolkitplus\2.3.1-1.5.5\artoolkitplus-2.3.1-1.5.5-windows-x86_64.jar;c:\urs\yi\.m2\repository\org\bytedeco\flandmark-platform\1.07-1.5.5\flandmark-platform-1.07-1.5.5.jar;c:\urs\yi\.m2\repository\org\bytedeco\flandmark\1.07-1.5.5\flandmark-1.07-1.5.5-android-arm.jar;c:\urs\yi\.m2\repository\org\bytedeco\flandmark\1.07-1.5.5\flandmark-1.07-1.5.5-android-arm64.jar;c:\urs\yi\.m2\repository\org\bytedeco\flandmark\1.07-1.5.5\flandmark-1.07-1.5.5-android-x86.jar;c:\urs\yi\.m2\repository\org\bytedeco\flandmark\1.07-1.5.5\flandmark-1.07-1.5.5-android-x86_64.jar;c:\urs\yi\.m2\repository\org\bytedeco\flandmark\1.07-1.5.5\flandmark-1.07-1.5.5-linux-x86.jar;c:\urs\yi\.m2\repository\org\bytedeco\flandmark\1.07-1.5.5\flandmark-1.07-1.5.5-linux-x86_64.jar;c:\urs\yi\.m2\repository\org\bytedeco\flandmark\1.07-1.5.5\flandmark-1.07-1.5.5-linux-armhf.jar;c:\urs\yi\.m2\repository\org\bytedeco\flandmark\1.07-1.5.5\flandmark-1.07-1.5.5-linux-arm64.jar;c:\urs\yi\.m2\repository\org\bytedeco\flandmark\1.07-1.5.5\flandmark-1.07-1.5.5-linux-ppc64le.jar;c:\urs\yi\.m2\repository\org\bytedeco\flandmark\1.07-1.5.5\flandmark-1.07-1.5.5-macosx-x86_64.jar;c:\urs\yi\.m2\repository\org\bytedeco\flandmark\1.07-1.5.5\flandmark-1.07-1.5.5-windows-x86.jar;c:\urs\yi\.m2\repository\org\bytedeco\flandmark\1.07-1.5.5\flandmark-1.07-1.5.5-windows-x86_64.jar;c:\urs\yi\.m2\repository\org\bytedeco\leptonica-platform\1.80.0-1.5.5\leptonica-platform-1.80.0-1.5.5.jar;c:\urs\yi\.m2\repository\org\bytedeco\leptonica\1.80.0-1.5.5\leptonica-1.80.0-1.5.5-android-arm.jar;c:\urs\yi\.m2\repository\org\bytedeco\leptonica\1.80.0-1.5.5\leptonica-1.80.0-1.5.5-android-arm64.jar;c:\urs\yi\.m2\repository\org\bytedeco\leptonica\1.80.0-1.5.5\leptonica-1.80.0-1.5.5-android-x86.jar;c:\urs\yi\.m2\repository\org\bytedeco\leptonica\1.80.0-1.5.5\leptonica-1.80.0-1.5.5-android-x86_64.jar;c:\urs\yi\.m2\repository\org\bytedeco\leptonica\1.80.0-1.5.5\leptonica-1.80.0-1.5.5-linux-x86.jar;c:\urs\yi\.m2\repository\org\bytedeco\leptonica\1.80.0-1.5.5\leptonica-1.80.0-1.5.5-linux-x86_64.jar;c:\urs\yi\.m2\repository\org\bytedeco\leptonica\1.80.0-1.5.5\leptonica-1.80.0-1.5.5-linux-armhf.jar;c:\urs\yi\.m2\repository\org\bytedeco\leptonica\1.80.0-1.5.5\leptonica-1.80.0-1.5.5-linux-arm64.jar;c:\urs\yi\.m2\repository\org\bytedeco\leptonica\1.80.0-1.5.5\leptonica-1.80.0-1.5.5-linux-ppc64le.jar;c:\urs\yi\.m2\repository\org\bytedeco\leptonica\1.80.0-1.5.5\leptonica-1.80.0-1.5.5-macosx-x86_64.jar;c:\urs\yi\.m2\repository\org\bytedeco\leptonica\1.80.0-1.5.5\leptonica-1.80.0-1.5.5-windows-x86.jar;c:\urs\yi\.m2\repository\org\bytedeco\leptonica\1.80.0-1.5.5\leptonica-1.80.0-1.5.5-windows-x86_64.jar;c:\urs\yi\.m2\repository\org\bytedeco\tesract-platform\4.1.1-1.5.5\tesract-platform-4.1.1-1.5.5.jar;c:\urs\yi\.m2\repository\org\bytedeco\tesract\4.1.1-1.5.5\tesract-4.1.1-1.5.5-android-arm.jar;c:\urs\yi\.m2\repository\org\bytedeco\tesract\4.1.1-1.5.5\tesract-4.1.1-1.5.5-android-arm64.jar;c:\urs\yi\.m2\repository\org\bytedeco\tesract\4.1.1-1.5.5\tesract-4.1.1-1.5.5-android-x86.jar;c:\urs\yi\.m2\repository\org\bytedeco\tesract\4.1.1-1.5.5\tesract-4.1.1-1.5.5-android-x86_64.jar;c:\urs\yi\.m2\repository\org\bytedeco\tesract\4.1.1-1.5.5\tesract-4.1.1-1.5.5-linux-x86.jar;c:\urs\yi\.m2\repository\org\bytedeco\tesract\4.1.1-1.5.5\tesract-4.1.1-1.5.5-linux-x86_64.jar;c:\urs\yi\.m2\repository\org\bytedeco\tesract\4.1.1-1.5.5\tesract-4.1.1-1.5.5-linux-armhf.jar;c:\urs\yi\.m2\repository\org\bytedeco\tesract\4.1.1-1.5.5\tesract-4.1.1-1.5.5-linux-arm64.jar;c:\urs\yi\.m2\repository\org\bytedeco\tesract\4.1.1-1.5.5\tesract-4.1.1-1.5.5-linux-ppc64le.jar;c:\urs\yi\.m2\repository\org\bytedeco\tesract\4.1.1-1.5.5\tesract-4.1.1-1.5.5-macosx-x86_64.jar;c:\urs\yi\.m2\repository\org\bytedeco\tesract\4.1.1-1.5.5\tesract-4.1.1-1.5.5-windows-x86.jar;c:\urs\yi\.m2\repository\org\bytedeco\tesract\4.1.1-1.5.5\tesract-4.1.1-1.5.5-windows-x86_64.jar com.huyi.csdn.tools.raivolumeutilffmpeg version 4.3.2 copyright (c) 2000-2021 the ffmpeg developersbuilt with gcc 10.2.0 (rev5, built by msys2 project)configuration: --prefix=.. --disable-iconv --disable-opencl --disable-sdl2 --disable-bzlib --disable-lzma --disable-linux-perf --enable-shared --enable-version3 --enable-runtime-cpudetect --enable-zlib --enable-libmp3lame --enable-libspeex --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-openssl --enable-libopenh264 --enable-libvpx --enable-libfreetype --enable-libopus --enable-cuda --enable-cuvid --enable-nvenc --enable-libmfx --enable-w32threads --enable-indev=dshow --target-os=mingw32 --cc='gcc -m64' --extra-cflags=-i../include/ --extra-ldflags=-l../lib/ --extra-libs='-static-libgcc -static-libstdc++ -wl,-bstatic -lstdc++ -lgcc_eh -lws2_32 -lcrypt32 -lpthread -lz -lm -wl,-bdynamic -lole32 -luuid'libavutil 56. 51.100 / 56. 51.100libavcodec 58. 91.100 / 58. 91.100libavformat 58. 45.100 / 58. 45.100libavdevice 58. 10.100 / 58. 10.100libavfilter 7. 85.100 / 7. 85.100libswscale 5. 7.100 / 5. 7.100libswresample 3. 7.100 / 3. 7.100guesd channel layout for input stream #0.0 : monoinput #0, wav, from 'c:/urs/yi/desktop/660952057553105332.wav':duration: 00:00:12.58, bitrate: 256 kb/sstream #0:0: audio: pcm_s16le ([1][0][0][0] / 0x0001), 16000 hz, mono, s16, 256 kb/sstream mapping:stream #0:0 -> #0:0 (pcm_s16le (native) -> pcm_s16le (native))press [q] to stop, [?] for helpoutput #0, wav, to 'c:/urs/yi/desktop/\398afa61f6614e0086400fbc2197f0d2.wav':metadata:isft : lavf58.45.100stream #0:0: audio: pcm_s16le ([1][0][0][0] / 0x0001), 16000 hz, mono, s16, 256 kb/smetadata:encoder : lavc58.91.100 pcm_s16lesize= 393kb time=00:00:12.58 bitrate= 256.0kbits/s speed=4.27e+03x video:0kb audio:393kb subtitle:0kb other streams:0kb global headers:0kb muxing overhead: 0.019373%c:/urs/yi/desktop/\398afa61f6614e0086400fbc2197f0d2.wavffmpeg version 4.3.2 copyright (c) 2000-2021 the ffmpeg developersbuilt with gcc 10.2.0 (rev5, built by msys2 project)configuration: --prefix=.. --disable-iconv --disable-opencl --disable-sdl2 --disable-bzlib --disable-lzma --disable-linux-perf --enable-shared --enable-version3 --enable-runtime-cpudetect --enable-zlib --enable-libmp3lame --enable-libspeex --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-openssl --enable-libopenh264 --enable-libvpx --enable-libfreetype --enable-libopus --enable-cuda --enable-cuvid --enable-nvenc --enable-libmfx --enable-w32threads --enable-indev=dshow --target-os=mingw32 --cc='gcc -m64' --extra-cflags=-i../include/ --extra-ldflags=-l../lib/ --extra-libs='-static-libgcc -static-libstdc++ -wl,-bstatic -lstdc++ -lgcc_eh -lws2_32 -lcrypt32 -lpthread -lz -lm -wl,-bdynamic -lole32 -luuid'libavutil 56. 51.100 / 56. 51.100libavcodec 58. 91.100 / 58. 91.100libavformat 58. 45.100 / 58. 45.100libavdevice 58. 10.100 / 58. 10.100libavfilter 7. 85.100 / 7. 85.100libswscale 5. 7.100 / 5. 7.100libswresample 3. 7.100 / 3. 7.100guesd channel layout for input stream #0.0 : monoinput #0, wav, from 'c:/urs/yi/desktop/660952057553105332.wav':duration: 00:00:12.58, bitrate: 256 kb/sstream #0:0: audio: pcm_s16le ([1][0][0][0] / 0x0001), 16000 hz, mono, s16, 256 kb/sstream mapping:stream #0:0 -> #0:0 (pcm_s16le (native) -> pcm_s16le (native))press [q] to stop, [?] for helpoutput #0, wav, to 'c:/urs/yi/desktop/\97d5a2518af44b528f59c45e90f39a2a.wav':metadata:isft : lavf58.45.100stream #0:0: audio: pcm_s16le ([1][0][0][0] / 0x0001), 16000 hz, mono, s16, 256 kb/smetadata:encoder : lavc58.91.100 pcm_s16lesize= 393kb time=00:00:12.58 bitrate= 256.0kbits/s speed=3.06e+03x video:0kb audio:393kb subtitle:0kb other streams:0kb global headers:0kb muxing overhead: 0.019373%c:/urs/yi/desktop/\97d5a2518af44b528f59c45e90f39a2a.wavprocess finished with exit code 0
按照倍率的效果如下
差不多精准
按照分贝数效果
稍微更准一点。
到此这篇关于java 工具类实现音频音量提升的文章就介绍到这了,更多相关java 音频音量提升内容请搜索www.887551.com以前的文章或继续浏览下面的相关文章希望大家以后多多支持www.887551.com!
本文发布于:2023-04-03 23:07:19,感谢您对本站的认可!
本文链接:https://www.wtabcd.cn/fanwen/zuowen/fc319cd07cf89dfbfc7a06928b1dc879.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文word下载地址:Java 工具类实现音频音量提升.doc
本文 PDF 下载地址:Java 工具类实现音频音量提升.pdf
留言与评论(共有 0 条评论) |