2

Currently I am attempting to write a batch file that recursively converts all .wav files in my folder into .ogg files and places them into a folder on a different disk using vlc's command line commands. So far, the script works as intended, except for one small issue, vlc://quit is not working, period.

@Echo Off
SETLOCAL ENABLEDELAYEDEXPANSION
for /f "tokens=*" %%f in ('dir /b /s "C:\Users\*\Music\Ultimate Game Music Collection\*.wav"') DO (

set file1=%%~nf.ogg
echo "file :" !file1!
set fic1=%%f
echo "file :" !fic1!
set destination=F:\myMusic\ogg\!file1!
echo "Destination :" "!destination!"


CALL "C:\Program Files\VideoLAN\VLC\vlc.exe" --ignore-config -I dummy --dummy-quiet -vv "!fic1!" --sout=#transcode{vcodec=none,acodec=vorb,ab=128,channels=2,samplerate=44100,scodec=none}:std{access=file{no-overwrite},mux=ogg,dst="!destination!"}" vlc://quit

)

echo .
echo conversion finished
pause

What is occurring is this;

I run the batch file, it posts only what is set as 'echo' (i.e. -vv is showing nothing), .wav is converted into a .ogg and placed into the new destination, vlc stops, no more files are converted.

At this point, if I go into Task Manager and end vlc.exe's process, it will then move on to the next file, but with over 5000 files to convert...I made this to be a start & forget.

I have searched all over trying to find an answer to this to no avail. I have tried the --ignore-config, which did not work. I even tried adding a separate taskkill command after the call, which also did not work ( even with /t and /f). Any help or insight you all can provide as to why vlc://quit is not working, or how to fix it, will be very much appreciated.

  • Is your double quotes (the last one) off @ ,dst="!destination!"}"? Is it an extra one or should you have added one earlier? – Aulis Ronkainen Oct 1 '18 at 9:55
  • vlc://quit may cause funny behavior in batch files. Try using instead the option of vlc --play-and-exit . – harrymc Oct 1 '18 at 11:42
  • @harrymc , your suggestion worked. If you add it as an answer, I will select it – Miki Fox Oct 1 '18 at 18:30
  • Done as requested. – harrymc Oct 1 '18 at 19:52
1

vlc://quit is unreliable in the batch environment and may cause funny behavior in that environment.

Use instead the option of :

vlc --play-and-exit
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.