Hello,
I'm trying to use an external DSP to resample audio files. I want to use SOX. I'm using it from within ffmpeg, and here's what I've gotten working so far:
1. I created the following batch file:
2. I used "Advanced BAT to EXE converter v4.61" to generate an exe file from the bat.
3. I put both the generated "resample.exe" and a static ffmpeg build in a single folder.
4. The following commands work from within windows shell:
- If the current path is the path of the file to be converted:
- If the current path is a random path:
In both cases, I get a file with the same name as the original, but resampled and with bitdepth 16.
5. Here's what doesn't work in dbpoweramp:
- external DSP --> before conversion --> select "resample.exe" in the same path as previous examples --> command line: "[infilelong]"
It generates a file, but without resampling.
Any help would be greatly appreciated! I've always had trouble with managing filenames, paths, current path, etc. in by batch files. I feel that's the issue.
I'm trying to use an external DSP to resample audio files. I want to use SOX. I'm using it from within ffmpeg, and here's what I've gotten working so far:
1. I created the following batch file:
Code:
@echo off set "input=%~1" set "filename=%~nx1" set "filepath=%~dp1" if not defined filepath set "filepath=%cd%" ffmpeg.exe -i "%filepath%%filename%" -af "aresample=resampler=soxr:out_sample_rate=44100:precision=33:cheby=1:osf=s16:dither_method=triangular" "%filepath%%~n1_2%~x1" del "%filepath%%filename%" ren "%filepath%%~n1_2%~x1" "%filename%" exit /b %ERRORLEVEL%
2. I used "Advanced BAT to EXE converter v4.61" to generate an exe file from the bat.
3. I put both the generated "resample.exe" and a static ffmpeg build in a single folder.
4. The following commands work from within windows shell:
- If the current path is the path of the file to be converted:
Code:
(path to resample.exe)\resample.exe "filename"
Code:
(path to resample.exe)\resample.exe "(path to filename)\filename"
5. Here's what doesn't work in dbpoweramp:
- external DSP --> before conversion --> select "resample.exe" in the same path as previous examples --> command line: "[infilelong]"
It generates a file, but without resampling.
Any help would be greatly appreciated! I've always had trouble with managing filenames, paths, current path, etc. in by batch files. I feel that's the issue.
Comment