I was looking for a way to transcode SNES specific sound files (SPC) into mp3.
It appears that VLC can read these files, so I used the SendTo wiki to convert them
https://wiki.videolan.org/How_to_Batch_Encode/#Windows
The script copied in C:\Users\%USER%\AppData\Roaming\Microsoft\Windows\SendTo is at the end of the post.
For some files it works pretty well, but for some others, the file get transcoded in loop so a 10s file become a 3hr file !
For example, this SPC file : ChunLi Stage has a 1'47" duration when it's played by vlc, but if I transcode it, it become a 3hr long mp3, and I don't know why.
I tried it with some other non SPC files and I have sometimes the same issue.
I run VLC 2.2.0
Thanks.
Code: Select all
@ECHO OFF
rem ***********************************************************************
rem * .* to MP3 batch converter. *
rem * *
rem * For installation just copy batch file to SendTo directory. *
rem * On Win8 execute "SHELL:sendto" to go to Sendto folder. *
rem * *
rem * I got quite good compression rations with these parameters: *
rem * acodec=mp3 audio codec *
rem * ab=128 128kbps mp3 quality *
rem * channels=2 stereo *
rem * samplerate=44100 *
rem * for parameters see *
rem * http://www.videolan.org/doc/vlc-user-guide/de/ch04.html *
rem ***********************************************************************
echo **********************************************************************
echo *.* to MP3 VLC batch converter called: %0 %1 %2 %3 %4 %5 %6 %7 %8
echo **********************************************************************
echo.
echo For installation, just copy batch file to SendTo folder..
echo.
SET _new_extention=mp3
:start
if "%~1"=="" (call goto :the_end)
CALL :SUB_CONVERT %1
SHIFT
goto :start
:SUB_CONVERT
SET _orig_path=%~1
rem SET _orig_extention=%_orig_filename:*.=%
echo %_orig_path%
SET _orig_extention=%_orig_path:*.=%
CALL SET _new_path=%%_orig_path%:.%_orig_extention%=.%_new_extention%%%
set _new_path="%_new_path%"
echo.
echo Converting %1 ======TO===== %_new_path% ...
echo.
if exist "%ProgramFiles%\VideoLAN\VLC\vlc.exe" (
SET _vlc_path="%ProgramFiles%\VideoLAN\VLC\vlc"
) else (
SET _vlc_path="%ProgramFiles(x86)%\VideoLAN\VLC\vlc"
)
CALL %_vlc_path% -I dummy -vvv %1 --sout=#transcode{acodec=mp3,ab=128,channels=2,samplerate=44100}:standard{access=file,mux=raw,dst=%_new_path%} vlc://quit
GOTO :eof
:the_end
echo **********************************************************************
echo * FINISHED *
echo **********************************************************************
pause