I am making an answer out of my comment, I think it is the cause of your problem.
In your script you use
CALL "C:\Program Files (x86)\VideoLAN\VLC\vlc" -I dummy -vvv %1 --sout=#transcode{vcodec="h264", vb="512", fps="23.97", scale="1", acodec="mpga",ab="128","channels=2",samplerate="44100"}:standard{access="file",mux="dummy",dst="%_commanm%.mp4"} vlc://quit
and the error shows
main stream output error: stream chain failed for `transcode{vcodec=h264,'
this leads me to the conclusion that the parser cuts at every whitespace (space, tab etc) and thus cannot understand the command. In the link to the VLC wiki there are no whitespaces as well.
try this line:
CALL "C:\Program Files (x86)\VideoLAN\VLC\vlc" -I dummy -vvv %1 --sout=#transcode{vcodec="h264",vb="512",fps="23.97",scale="1",acodec="mpga",ab="128","channels=2",samplerate="44100"}:standard{access="file",mux="dummy",dst="%_commanm%.mp4"} vlc://quit
Why can't vlc cope with those stupid whitespace you might ask? (actually you do ;) )
When a programm is called to be executed by the OS - I only know this for linux for sure, but I am pretty sure windows handles it very similar - the parameters to the command are split by the operating system (at the spaces) and then handed to the program as a list, each containing only the content between the spaces.
So it would be the programs task to recognize and read all the individual entries in that list and glue them together again, this is indeed possible but costs time, both when developing the software and when evaluating the parameters.
Looking at https://forum.videolan.org/viewtopic.php?t=115385, the options seem to be to use:
Use option --audio-track
or --audio-track-id
in Open Media dialog:
[v] Show more options
Edit Options [ :file-caching=300 :audio-track=0]
The audio track number (0 in above example) seems to be the audio track number as displayed in the VLC Gui when displaying the movie minus one.
Best Answer
Go to Tools > Preferences > Input/Codecs > Video codecs > FFmpeg Changing the 'Strict standard compliance to -2 worked for me.
Found this method here: Streaming / Transcoding failed