Check syntax of .bat file option by option?

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.
bobgardner
New Cone
New Cone
Posts: 9
Joined: 21 Jun 2018 22:52

Check syntax of .bat file option by option?

Postby bobgardner » 20 Aug 2018 04:25

I have a .bat file called VLCPlayCD that works and generates a log file, and I have a bunch of .bat files like VLCPlayCDtoRTP and VLCPlayWAVfiletoBroadcast and VLCplayDshowLineIntoUDP. All these look similar and they all spit out error messages because the bat file isnt getting read in, so theres no log file to look at. There should be a way to put each option on a line in the bat file ending in a ^ and have vlc check each line somehow so we see what line the error is on. My goal is to read the linein using dshow and stream this out to the laptop wifi IP address as rtp,udp,multicast,broadcast whatever I can get to work. I have a .bat file that sends an mp3 file out, and I can see 200K bits per sec on the wifi on task manager (vlc 303, win10-64), but My line in is analog, not mp3. So my req for help is how to debug the bat files, and how to tell vlc to read the line in and stream it out on rtp multicast, no encoding and decoding overhead. One mono 44100 samp per sec stream. Theoretically lots of folks near the wifi can hear the audio on their phones. Thanks for ideas.

garf
Developer
Developer
Posts: 132
Joined: 19 Jul 2017 09:38

Re: Check syntax of .bat file option by option?

Postby garf » 21 Aug 2018 09:40

Hello,

I suggest you launch the .bat file inside a command line prompt.
In Windows search menu, search cmd.exe -> launch Command prompt -> go to the bat files directory -> launch <name of the .bat file>

bobgardner
New Cone
New Cone
Posts: 9
Joined: 21 Jun 2018 22:52

Re: Check syntax of .bat file option by option?

Postby bobgardner » 22 Aug 2018 21:17

Thanks Mr Garf. Can you try this? How do we tell which option is snafu? (This is the contents of VlcPlayCdToAndroid.bat)
"C:\Program Files\VideoLAN\VLC\vlc.exe" -vvv cdda:///E: ^
--sout-transcode{aenc="lpcm",acodec="lpcm",channels=1,samplerate=44100} ^
:sout-standard{dst="192.168.1.68",port=5004,proto="udp",ttl=1,caching=40,dsp="sap",name="tinhouserance"} ^
--file-logging --logfile="LogPlayCdtoAndroid.txt"
pause

garf
Developer
Developer
Posts: 132
Joined: 19 Jul 2017 09:38

Re: Check syntax of .bat file option by option?

Postby garf » 29 Aug 2018 09:33

I would probably use this type of syntax:

"C:\Program Files\VideoLAN\VLC\vlc.exe" -vvv cdda:///E: --sout=#transcode{aenc=lpcm,acodec=lpcm,channels=1,samplerate=44100}:udp{dst=192.168.1.68,port=5004,ttl=1,caching=40,dsp=sap,name=tinhouserance} --file-logging --logfile="LogPlayCdtoAndroid.txt"

bobgardner
New Cone
New Cone
Posts: 9
Joined: 21 Jun 2018 22:52

Re: Check syntax of .bat file option by option?

Postby bobgardner » 30 Aug 2018 02:20

It gets as far as generating megabytes of repeating stuff in the log file, but I dont see any wifi in task manager. If the bat file reader didnt understand something, where would it write an error to? The log file?
main debug: using multimedia timers as clock source
main debug: min period: 1 ms, max period: 1000000 ms
main debug: searching plug-in modules
main debug: loading plugins cache file C:\Program Files\VideoLAN\VLC\plugins\plugins.dat
main debug: recursively browsing `C:\Program Files\VideoLAN\VLC\plugins'
main debug: plug-ins loaded: 490 modules
main debug: opening config file (C:\Users\bobga\AppData\Roaming\vlc\vlcrc)
main debug: looking for logger module matching "any": 2 candidates
file debug: opening logfile `LogPlayCdtoAndroidGarf.txt'
main debug: using logger module "file"
main debug: translation test: code is "C"
main debug: looking for keystore module matching "memory": 3 candidates
main debug: using keystore module "memory"
main debug: CPU has capabilities MMX MMXEXT SSE SSE2 SSE3 SSSE3 SSE4.1 FPU
main: one instance mode ENABLED
main debug: Creating an input for 'Media Library'
main debug: Input is a meta file: disabling unneeded options
main debug: using timeshift granularity of 50 MiB
main debug: using timeshift path: C:\Users\bobga\AppData\Local\Temp
main debug: `file/directory:///C:/Users/bobga/AppData/Roaming/vlc/ml.xspf' gives access `file' demux `directory' path `/C:/Users/bobga/AppData/Roaming/vlc/ml.xspf'
main debug: creating demux: access='file' demux='directory' location='/C:/Users/bobga/AppData/Roaming/vlc/ml.xspf' file='C:\Users\bobga\AppData\Roaming\vlc\ml.xspf'
main debug: looking for access_demux module matching "file": 15 candidates
main debug: no access_demux modules matched
main debug: creating access: file:///C:/Users/bobga/AppData/Roaming/vlc/ml.xspf
main debug: (path: C:\Users\bobga\AppData\Roaming\vlc\ml.xspf)
main debug: looking for access module matching "file": 26 candidates
main debug: using access module "filesystem"
main debug: looking for stream_filter module matching "prefetch,cache_read": 24 candidates
cache_read debug: Using stream method for AStream*
cache_read debug: starting pre-buffering
cache_read debug: received first data after 0 ms
cache_read debug: pre-buffering done 304 bytes in 0s - 296875 KiB/s
main debug: using stream_filter module "cache_read"
main debug: looking for stream_filter module matching "any": 24 candidates
playlist debug: using XSPF playlist reader
main debug: using stream_filter module "playlist"
main debug: stream filter added to 00000000029bfda0
main debug: looking for stream_filter module matching "any": 24 candidates
main debug: no stream_filter modules matched
main debug: looking for stream_directory module matching "any": 1 candidates
main debug: no stream_directory modules matched
main debug: attachment of directory-extractor failed for file:///C:/Users/bobga/AppData/Roaming/vlc/ml.xspf
main debug: looking for stream_filter module matching "record": 24 candidates
main debug: using stream_filter module "record"
main debug: creating demux: access='file' demux='directory' location='/C:/Users/bobga/AppData/Roaming/vlc/ml.xspf' file='C:\Users\bobga\AppData\Roaming\vlc\ml.xspf'
main debug: looking for demux module matching "directory": 55 candidates
main debug: using demux module "directory"
main debug: looking for meta reader module matching "any": 2 candidates
lua debug: Trying Lua scripts in C:\Users\bobga\AppData\Roaming\vlc\lua\meta\reader
lua debug: Trying Lua scripts in C:\Program Files\VideoLAN\VLC\lua\meta\reader
lua debug: Trying Lua playlist script C:\Program Files\VideoLAN\VLC\lua\meta\reader\filename.luac
main debug: no meta reader modules matched
main debug: `file/directory:///C:/Users/bobga/AppData/Roaming/vlc/ml.xspf' successfully opened
main debug: looking for xml reader module matching "any": 1 candidates
main debug: using xml reader module "xml"
main debug: EOF reached
main debug: removing module "directory"
main debug: removing module "record"
main debug: removing module "playlist"
main debug: removing module "cache_read"
main debug: removing module "filesystem"
main debug: creating audio output
main debug: looking for audio output module matching "any": 6 candidates
mmdevice debug: using default device
mmdevice debug: display name changed: VLC media player (LibVLC 3.0.3)
mmdevice debug: version 2 session control unavailable
mmdevice debug: volume from -95.250000 dB to +0.000000 dB with 0.031250 dB increments
main debug: using audio output module "mmdevice"
main debug: keeping audio output
main debug: looking for interface module matching "win_msg,none": 16 candidates
main debug: using interface module "win_msg"
main debug: looking for interface module matching "hotkeys,none": 16 candidates
main debug: using interface module "hotkeys"
main debug: looking for interface module matching "globalhotkeys,none": 16 candidates
main debug: using interface module "win32"
main: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
main debug: looking for interface module matching "any": 16 candidates
main debug: looking for extension module matching "any": 1 candidates
lua debug: Opening Lua Extension module
lua debug: Trying Lua scripts in C:\Users\bobga\AppData\Roaming\vlc\lua\extensions
lua debug: Trying Lua scripts in C:\Program Files\VideoLAN\VLC\lua\extensions
lua debug: Trying Lua playlist script C:\Program Files\VideoLAN\VLC\lua\extensions\VLSub.luac
lua debug: Scanning Lua script C:\Program Files\VideoLAN\VLC\lua\extensions\VLSub.luac
lua debug: Script C:\Program Files\VideoLAN\VLC\lua\extensions\VLSub.luac has the following capability flags: 0x5
main debug: using extension module "lua"
main debug: using interface module "qt"
main debug: processing request item: null, node: Playlist, skip: 0
main debug: rebuilding array of current - root Playlist
main debug: rebuild done - 1 items, index -1
main debug: starting playback of new item
main debug: resyncing on cdda:///E:
main debug: cdda:///E: is at 0
main debug: creating new input thread
main debug: Creating an input for 'cdda:///E:'
main debug: requesting art for new input thread
main debug: looking for meta fetcher module matching "any": 1 candidates
lua debug: Trying Lua scripts in C:\Users\bobga\AppData\Roaming\vlc\lua\meta\fetcher
lua debug: Trying Lua scripts in C:\Program Files\VideoLAN\VLC\lua\meta\fetcher
main debug: no meta fetcher modules matched
main debug: looking for art finder module matching "any": 2 candidates
lua debug: Trying Lua scripts in C:\Users\bobga\AppData\Roaming\vlc\lua\meta\art
lua debug: Trying Lua scripts in C:\Program Files\VideoLAN\VLC\lua\meta\art
lua debug: Trying Lua playlist script C:\Program Files\VideoLAN\VLC\lua\meta\art\00_musicbrainz.luac
lua debug: skipping script (unmatched scope) C:\Program Files\VideoLAN\VLC\lua\meta\art\00_musicbrainz.luac
lua debug: Trying Lua playlist script C:\Program Files\VideoLAN\VLC\lua\meta\art\01_googleimage.luac
lua debug: skipping script (unmatched scope) C:\Program Files\VideoLAN\VLC\lua\meta\art\01_googleimage.luac
lua debug: Trying Lua playlist script C:\Program Files\VideoLAN\VLC\lua\meta\art\02_frenchtv.luac
lua debug: skipping script (unmatched scope) C:\Program Files\VideoLAN\VLC\lua\meta\art\02_frenchtv.luac
lua debug: Trying Lua playlist script C:\Program Files\VideoLAN\VLC\lua\meta\art\03_lastfm.luac
lua debug: skipping script (unmatched scope) C:\Program Files\VideoLAN\VLC\lua\meta\art\03_lastfm.luac
main debug: no art finder modules matched
main debug: looking for meta fetcher module matching "any": 1 candidates
lua debug: Trying Lua scripts in C:\Users\bobga\AppData\Roaming\vlc\lua\meta\fetcher
lua debug: Trying Lua scripts in C:\Program Files\VideoLAN\VLC\lua\meta\fetcher
main debug: no meta fetcher modules matched
main debug: looking for art finder module matching "any": 2 candidates
lua debug: Trying Lua scripts in C:\Users\bobga\AppData\Roaming\vlc\lua\meta\art
lua debug: Trying Lua scripts in C:\Program Files\VideoLAN\VLC\lua\meta\art
lua debug: Trying Lua playlist script C:\Program Files\VideoLAN\VLC\lua\meta\art\00_musicbrainz.luac
lua debug: Trying Lua playlist script C:\Program Files\VideoLAN\VLC\lua\meta\art\01_googleimage.luac
lua debug: Trying Lua playlist script C:\Program Files\VideoLAN\VLC\lua\meta\art\02_frenchtv.luac
lua debug: Trying Lua playlist script C:\Program Files\VideoLAN\VLC\lua\meta\art\03_lastfm.luac
main debug: no art finder modules matched
main debug: using sout chain=`transcode{aenc=lpcm,acodec=lpcm,channels=1,samplerate=44100}'
main debug: stream=`transcode'
main debug: looking for sout stream module matching "transcode": 23 candidates
stream_out_transcode error: cannot create chain
main debug: no sout stream modules matched
main debug: destroying chain... (name=(null))
main debug: destroying chain done
main error: stream chain failed for `transcode{aenc=lpcm,acodec=lpcm,channels=1,samplerate=44100}'
main error: cannot start stream output instance, aborting
main debug: dead input
main debug: repeating item
main debug: starting playback of new item
main debug: resyncing on cdda:///E:
main debug: cdda:///E: is at 0
main debug: creating new input thread
main debug: Creating an input for 'cdda:///E:'
main debug: requesting art for new input thread
main debug: using sout chain=`transcode{aenc=lpcm,acodec=lpcm,channels=1,samplerate=44100}'
main debug: looking for meta fetcher module matching "any": 1 candidates
main debug: stream=`transcode'
main debug: looking for sout stream module matching "transcode": 23 candidates
stream_out_transcode error: cannot create chain
main debug: no sout stream modules matched
main debug: destroying chain... (name=(null))
main debug: destroying chain done
main error: stream chain failed for `transcode{aenc=lpcm,acodec=lpcm,channels=1,samplerate=44100}'
main error: cannot start stream output instance, aborting
lua debug: Trying Lua scripts in C:\Users\bobga\AppData\Roaming\vlc\lua\meta\fetcher
lua debug: Trying Lua scripts in C:\Program Files\VideoLAN\VLC\lua\meta\fetcher
main debug: no meta fetcher modules matched
main debug: looking for art finder module matching "any": 2 candidates
lua debug: Trying Lua scripts in C:\Users\bobga\AppData\Roaming\vlc\lua\meta\art
lua debug: Trying Lua scripts in C:\Program Files\VideoLAN\VLC\lua\meta\art
main debug: dead input
lua debug: Trying Lua playlist script C:\Program Files\VideoLAN\VLC\lua\meta\art\00_musicbrainz.luac
lua debug: skipping script (unmatched scope) C:\Program Files\VideoLAN\VLC\lua\meta\art\00_musicbrainz.luac
lua debug: Trying Lua playlist script C:\Program Files\VideoLAN\VLC\lua\meta\art\01_googleimage.luac
lua debug: skipping script (unmatched scope) C:\Program Files\VideoLAN\VLC\lua\meta\art\01_googleimage.luac
lua debug: Trying Lua playlist script C:\Program Files\VideoLAN\VLC\lua\meta\art\02_frenchtv.luac
lua debug: skipping script (unmatched scope) C:\Program Files\VideoLAN\VLC\lua\meta\art\02_frenchtv.luac
lua debug: Trying Lua playlist script C:\Program Files\VideoLAN\VLC\lua\meta\art\03_lastfm.luac
lua debug: skipping script (unmatched scope) C:\Program Files\VideoLAN\VLC\lua\meta\art\03_lastfm.luac
main debug: no art finder modules matched
main debug: looking for meta fetcher module matching "any": 1 candidates
main debug: repeating item
main debug: starting playback of new item
main debug: resyncing on cdda:///E:
main debug: cdda:///E: is at 0
main debug: creating new input thread
main debug: Creating an input for 'cdda:///E:'
lua debug: Trying Lua scripts in C:\Users\bobga\AppData\Roaming\vlc\lua\meta\fetcher
lua debug: Trying Lua scripts in C:\Program Files\VideoLAN\VLC\lua\meta\fetcher
main debug: requesting art for new input thread
main debug: no meta fetcher modules matched
main debug: looking for art finder module matching "any": 2 candidates
main debug: looking for meta fetcher module matching "any": 1 candidates
lua debug: Trying Lua scripts in C:\Users\bobga\AppData\Roaming\vlc\lua\meta\fetcher
lua debug: Trying Lua scripts in C:\Program Files\VideoLAN\VLC\lua\meta\fetcher
main debug: no meta fetcher modules matched
main debug: looking for art finder module matching "any": 2 candidates
lua debug: Trying Lua scripts in C:\Users\bobga\AppData\Roaming\vlc\lua\meta\art
lua debug: Trying Lua scripts in C:\Program Files\VideoLAN\VLC\lua\meta\art
lua debug: Trying Lua scripts in C:\Users\bobga\AppData\Roaming\vlc\lua\meta\art
lua debug: Trying Lua scripts in C:\Program Files\VideoLAN\VLC\lua\meta\art
lua debug: Trying Lua playlist script C:\Program Files\VideoLAN\VLC\lua\meta\art\00_musicbrainz.luac
lua debug: Trying Lua playlist script C:\Program Files\VideoLAN\VLC\lua\meta\art\00_musicbrainz.luac
lua debug: Trying Lua playlist script C:\Program Files\VideoLAN\VLC\lua\meta\art\01_googleimage.luac
lua debug: skipping script (unmatched scope) C:\Program Files\VideoLAN\VLC\lua\meta\art\00_musicbrainz.luac
lua debug: Trying Lua playlist script C:\Program Files\VideoLAN\VLC\lua\meta\art\01_googleimage.luac
lua debug: skipping script (unmatched scope) C:\Program Files\VideoLAN\VLC\lua\meta\art\01_googleimage.luac
lua debug: Trying Lua playlist script C:\Program Files\VideoLAN\VLC\lua\meta\art\02_frenchtv.luac
lua debug: Trying Lua playlist script C:\Program Files\VideoLAN\VLC\lua\meta\art\02_frenchtv.luac
lua debug: skipping script (unmatched scope) C:\Program Files\VideoLAN\VLC\lua\meta\art\02_frenchtv.luac
lua debug: Trying Lua playlist script C:\Program Files\VideoLAN\VLC\lua\meta\art\03_lastfm.luac
lua debug: Trying Lua playlist script C:\Program Files\VideoLAN\VLC\lua\meta\art\03_lastfm.luac
lua debug: skipping script (unmatched scope) C:\Program Files\VideoLAN\VLC\lua\meta\art\03_lastfm.luac
main debug: no art finder modules matched
main debug: using sout chain=`transcode{aenc=lpcm,acodec=lpcm,channels=1,samplerate=44100}'
main debug: no art finder modules matched
main debug: stream=`transcode'
main debug: looking for sout stream module matching "transcode": 23 candidates
stream_out_transcode error: cannot create chain
main debug: no sout stream modules matched
main debug: destroying chain... (name=(null))
main debug: destroying chain done
main error: stream chain failed for `transcode{aenc=lpcm,acodec=lpcm,channels=1,samplerate=44100}'
main error: cannot start stream output instance, aborting
main debug: looking for meta fetcher module matching "any": 1 candidates
main debug: dead input
main debug: repeating item

garf
Developer
Developer
Posts: 132
Joined: 19 Jul 2017 09:38

Re: Check syntax of .bat file option by option?

Postby garf » 30 Aug 2018 10:31

Be sure to not cut the sout parameter (no space between #transcode{} and :udp{...}).

Here is part of the log when I try the previous command line:

Code: Select all

main debug: using sout chain=`transcode{aenc=lpcm,acodec=lpcm,channels=1,samplerate=44100}:udp{dst=192.168.1.XXX,port=5004,ttl=1,caching=40,dsp=sap,name=tinhouserance}' main debug: stream=`udp' main debug: looking for sout stream module matching "udp": 23 candidates main debug: set config option: sout-standard-dst to 192.168.1.XXX
Your log seem to have the udp part not present.

bobgardner
New Cone
New Cone
Posts: 9
Joined: 21 Jun 2018 22:52

Re: Check syntax of .bat file option by option?

Postby bobgardner » 30 Aug 2018 23:58

I thought I was being all clever by splitting the long lines in the bat file by adding a space^ as a bat file line splitter. I'm at work right now, but I'll be trying some more perturbations at home tonite. This is a Pearl Of Wisdom you have laid out: Garf sez: "Dont add a space between the closing } on the transcode and the :udp{" havent seen that in any help file yet. Good catch.

bobgardner
New Cone
New Cone
Posts: 9
Joined: 21 Jun 2018 22:52

Re: Check syntax of .bat file option by option?

Postby bobgardner » 05 Sep 2018 02:52

I want to capture stereo line in using dshow and stream it out on udp to a multicast address. I have a bat file that reads cd audio on e: and I guess I need to --sout it using proto="udp" and dst=239.1.1.1:5004, but I dont see any wifi on task manager. Ethernet isnt enabled. Any ideas how to tell vlc that the stream is on the wifi interface? Thanks!


Return to “VLC media player for Windows Troubleshooting”

Who is online

Users browsing this forum: No registered users and 26 guests