Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't Batch Encode Wav Files #43

Closed
MarioTainaka opened this issue May 11, 2020 · 4 comments
Closed

Can't Batch Encode Wav Files #43

MarioTainaka opened this issue May 11, 2020 · 4 comments
Labels

Comments

@MarioTainaka
Copy link

Hi there, it's little GUI is quite amazing. I do have one issue I can't encode wav files in batch. If I do ffmpeg errors saying it can't find the encoder and setting are wrong. But if you do the files on there own with the exact same settings they do encode.

@MattMcManis
Copy link
Owner

Hi, thanks.
Can you post the script that it generates?

@MarioTainaka
Copy link
Author

Hi, thanks.
Can you post the script that it generates?

This happens on every file during converting

C:\Users\sjomm\Desktop\StreamTool-master\mcoutput>(echo) && "C:\Users\sjomm\Desktop\FFMpeg Gui\ffmpeg\bin\ffmpeg.exe" -y -i "C:\Users\sjomm\Desktop\StreamTool-master\mcoutput\voice_00.xma.wav" -vn -sn -c:a pcm_s16le -b:a %A -rematrix_maxval 1.0 -ac 2 -map 0:a:0? -map_metadata 0 -f wav -threads 0 "C:\Users\sjomm\Desktop\SH 2 NEW MIX\CONV\voice_00.xma.wav"
ECHO is on.
ffmpeg version 4.2.2 Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 9.2.1 (GCC) 20200122
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --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 --enable-libopenmpt
libavutil 56. 31.100 / 56. 31.100
libavcodec 58. 54.100 / 58. 54.100
libavformat 58. 29.100 / 58. 29.100
libavdevice 58. 8.100 / 58. 8.100
libavfilter 7. 57.100 / 7. 57.100
libswscale 5. 5.100 / 5. 5.100
libswresample 3. 5.100 / 3. 5.100
libpostproc 55. 5.100 / 55. 5.100
Guessed Channel Layout for Input Stream #0.0 : 5.1
Input #0, wav, from 'C:\Users\sjomm\Desktop\StreamTool-master\mcoutput\voice_00.xma.wav':
Duration: 00:05:56.27, bitrate: 4608 kb/s
Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 48000 Hz, 5.1, s16, 4608 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (pcm_s16le (native) -> pcm_s16le (native))
Press [q] to stop, [?] for help
[pcm_s16le @ 0000021b572e30c0] [Eval @ 000000a6da5fdf70] Undefined constant or missing '(' in '%A'
[pcm_s16le @ 0000021b572e30c0] Unable to parse option value "%A"
[pcm_s16le @ 0000021b572e30c0] Error setting option b to value %A.
Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
Conversion failed!

And this is the script keep in mind i'm just letting the GUI handle everything. if you do the files one by one it does work.

cd /d "C:\Users\sjomm\Desktop\StreamTool-master\mcoutput"

&& for %f in (*) do (echo)

&&

"C:\Users\sjomm\Desktop\FFMpeg Gui\ffmpeg\bin\ffmpeg.exe" -y

-i "C:\Users\sjomm\Desktop\StreamTool-master\mcoutput%~f"

-vn
-sn

-c:a pcm_s16le
-b:a %A -rematrix_maxval 1.0 -ac 2
-map 0:a:0?

-map_metadata 0

-f wav

-threads 0

"C:\Users\sjomm\Desktop\SH 2 NEW MIX\CONV%~nf.wav"

@MattMcManis
Copy link
Owner

I've released an update v1.7.9.4, let me know if it fixes it.

Press the arrow button in Axiom to update through PowerShell, or download from here
https://github.com/MattMcManis/Axiom/releases

Update


It looks like I needed to remove -b:a %A for wav. Leaving it blank lets PCM use the FFmpeg default, which I think is the max bit rate. You can still select the bit rate, bit depth, and sample rate manually if needed.

For reference, here's the script it generated that worked. I batch converted mp3 to wav.
(I'm using environment variable for FFmpeg so it just shows ffmpeg instead of the full path to the exe).

cd /d "C:\Users\Matt\Desktop\mp3\" 

&& for %f in (*) do (echo) 

&& 

ffmpeg -y 

-i "C:\Users\Matt\Desktop\mp3\%~f" 

-vn 
-sn 

-c:a pcm_s24le 
-map 0:a:0? 

-map_metadata 0 

-f wav 

-threads 7 

"C:\Users\Matt\Desktop\wav\%~nf.wav"

@MarioTainaka
Copy link
Author

I've released an update v1.7.9.4, let me know if it fixes it.

Press the arrow button in Axiom to update through PowerShell, or download from here
https://github.com/MattMcManis/Axiom/releases

Update

It looks like I needed to remove -b:a %A for wav. Leaving it blank lets PCM use the FFmpeg default, which I think is the max bit rate. You can still select the bit rate, bit depth, and sample rate manually if needed.

For reference, here's the script it generated that worked. I batch converted mp3 to wav.
(I'm using environment variable for FFmpeg so it just shows ffmpeg instead of the full path to the exe).

cd /d "C:\Users\Matt\Desktop\mp3\" 

&& for %f in (*) do (echo) 

&& 

ffmpeg -y 

-i "C:\Users\Matt\Desktop\mp3\%~f" 

-vn 
-sn 

-c:a pcm_s24le 
-map 0:a:0? 

-map_metadata 0 

-f wav 

-threads 7 

"C:\Users\Matt\Desktop\wav\%~nf.wav"

It works flawlessly converted all 159 files without an issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants