How do I use VLC Command Line In Windows Batch Line Without Showing GUI?

Solution 1:

You can use this:

vlc -I dummy --dummy-quiet {path_to_file}

As per @MC10's answer, the -intf dummy or -I dummy (they do the same thing) hides the GUI but still opens a second command line window. Use the additional --dummy-quiet option to hide this window too.

So, for your scenario:

@echo off
for /f "delims=|" %%f in ('dir /b *.m4a') do (
    CALL "C:\Program Files (x86)\VideoLAN\VLC\vlc.exe" "%%f" --I dummy --dummy-quiet --sout=#transcode{acodec=mp3,ab=128,vcodec=dummy}:std{access="file",mux=raw,dst=converted/"%%f"} vlc://quit
    move "%%f" trash/"%%f"
)

Solution 2:

What you are looking for is the dummy interface. This will give you no GUI.

Example:

% vlc --intf dummy vcd://

Edit: While the dummy interface will give you no GUI, it will open a console. This is not what the question asked for so I am updating the answer.

This may be Linux only, I'm not sure yet. You can replace vlc with cvlc to get no interface at all.