"Wrong command syntax" with the "load" command from the telnet interface
VLC complains of a syntax error when trying to load a VLC configuration file which has been generated by the "save" command if the SAP name or group contains whitespaces.
Here is an example of a telnet session that reproduces the problem:
> new test broadcast enabled
> setup test input "Pouet Pouet"
> setup test output #standard{mux=ts,access=udp,dst=239.255.100.42,sap,name="Pouet Pouet"}
> show
show
media : ( 1 broadcast - 0 vod )
test
type : broadcast
enabled : yes
loop : no
inputs
1 : Pouet Pouet
output : #standard{mux=ts,access=udp,dst=239.255.100.42,sap,name=Pouet Pouet}
options
instances
schedule
> save test.cfg
> del test
> load test.cfg
load : Error while loading file
Here is the file that has been generated:
# VLC media player VLM command batch
# http://www.videolan.org/vlc/
new test broadcast enabled
setup test input "Pouet Pouet"
setup test output #standard{mux=ts,access=udp,dst=239.255.100.42,sap,name=Pouet Pouet}
The input is well escaped using quotes, but not the SAP name, as a consequence, when VLC tries to load the last command line, it counts 4 arguments to the setup command whereas it was waiting for 3 arguments, hence the syntax error.