DC-SWAT Forum
error, raw2adpcm_ffmpeg.bat from isomake 2.4 does not work - Версия для печати

+- DC-SWAT Forum (http://www.dc-swat.ru/forum)
+-- Форум: Sega Dreamcast (/forum-2.html)
+--- Форум: English section (/forum-29.html)
+--- Тема: error, raw2adpcm_ffmpeg.bat from isomake 2.4 does not work (/thread-2575.html)



error, raw2adpcm_ffmpeg.bat from isomake 2.4 does not work - shwoaps - 03.03.2017 00:17

Код:
SET PATH=sys
For %%1 in (*.raw) do (
    echo Adding WAV header to %%1
    raw2wav.exe "%%1" "%%1.wav"
    echo Converting PCM to ADPCM (Yamaha)...
    ffmpeg -i "%%1.wav" -map_metadata -1 -c adpcm_yamaha "%%1:~0,-4%"
)

Same problem on winxp, and win7.

Код:
ffmpeg -i "%%1.wav" -map_metadata -1 -c adpcm_yamaha "%%1:~0,-4%"
what does [:~0,-4%] mean? is this correct form? i get error:

Код:
[NULL @ 0280c160] Unable to find a suitable output format for 'track04.raw:~0,-4 'track04.raw:~0,-4: Invalid argumen

-----------
my fixes:
Код:
raw2wav.exe "%%1" "%%1.wav" -> raw2wav.exe "%%1" "%%1".tmp 2 44100 16
(or it won convert anything)

Код:
echo Converting PCM to ADPCM (Yamaha)... -> echo "Converting PCM to ADPCM (Yamaha)..."
- need "" or i get errors in winxp


RE: error, raw2adpcm_ffmpeg.bat from isomake 2.4 does not work - dragoncity - 03.03.2017 00:40

Yes same for me,I changed 1 year ago for that :

Цитата:@Echo off
SET PATH=sys
For %%1 in (*.raw) do (
echo Adding WAV header to %%1
raw2wav.exe "%%1" "%%1".tmp 2 44100 16
echo "Converting PCM to Yamaha ADPCM..."
ffmpeg -i "%%1".tmp -map_metadata -1 -c adpcm_yamaha "%%1".wav
del "%%1".tmp
del "%%1"
)
echo Complete!


Script I made,maybe can help you!

convert raw in adpcm

Цитата:@Echo off
SET PATH=sys
For %%1 in (*.raw) do (
echo Adding WAV header to %%1
raw2wav.exe "%%1" "%%1.wav" 2 44100 16
)
del /s *.raw
Rename *.wav *.
Rename *.raw *.wav

SET PATH=sys
For %%1 in (*.wav) do (
wav2adpcm.exe -t "%%1" "%%1.tmp"
)
del /s *.wav
Rename *.tmp *.
pause
echo Complete!

Convert raw in wav

Цитата:@Echo off
echo "Convertir Raw en Wav by DragonCity"
SET PATH=sys
For %%1 in (*.raw) do (
echo %%1
raw2wav.exe "%%1" "%%1.wav" 2 44100 16
)
del /s *.raw
Rename *.wav *.
Rename *.raw *.wav
echo "Tout est OK!"
pause



RE: error, raw2adpcm_ffmpeg.bat from isomake 2.4 does not work - shwoaps - 03.03.2017 01:00

Thank you for answer. I'm using raw2adpcm.bat and everything is ok for me.

But i'm really interested what:
Код:
adpcm_yamaha "%%1:~0,-4%"
means.

It looks like it changes some settings. I searched for ~3 hours, but was not able to understand.
Or it just other way to do what raw2adpcm.bat from isomake 2.3 does?

I think that maybe this will improve quality or compatibility, so that's why it's bugging me.


RE: error, raw2adpcm_ffmpeg.bat from isomake 2.4 does not work - SWAT - 03.03.2017 14:02

It's not a settings for ffmpeg Smile

This is substring in the windows batch:
Код:
%var:~start,end%