VLC CLI transcode same file in loop

Microsoft Windows specific usage questions
Forum rules
Please post only Windows specific questions in this forum category. If you don't know where to post, please read the different forums' rules. Thanks.
bebertii
New Cone
New Cone
Posts: 3
Joined: 09 Jul 2015 08:54

VLC CLI transcode same file in loop

Postby bebertii » 09 Jul 2015 09:50

Hi,
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

Return to “VLC media player for Windows Troubleshooting”

Who is online

Users browsing this forum: Google [Bot] and 22 guests