I have this working as a batch file but when I tried converting to Powershell, my file doesn't transcode like it does in the batch file. It's supposed to ask 2 input questions, the link to a video and the local ip address. Once it has the answers to the 2 input questions, Vlc player is supposed to open the video link and then transcode the file in real time from .flv format to another format and start playing on vlc as it's transcoding. Then at the same time, I start playing the the converted file on vidcast through the chrome browser on my local network and then the converted video can also be cast to a television using chromecast.
I think the problem is on the bolded area of the powershell script but have no experience with this and don't know how to fix it. Can someone help, Please.
Batch File
@echo off
set /p input="Insert your Http link: "
set /p input1="Insert your Local IP address: "
rem VLC
cd "C:\Program Files\VideoLAN\VLC"
start vlc.exe %input% :sout=#transcode{vcodec=VP80,vb=2000,acodec=vorb,ab=128,channels=2,samplerate=44100}:http{mux=webm,dst=:8080/stream} :sout-all :sout-keep
cd "C:\Program Files (x86)\Google\Chrome\Application"
start chrome.exe "https://dabble.me/cast/?video_link=http://%input1%/stream"
exit
Power Shell
$link = read-host "Enter an Http Link "
$ip = read-host "Enter your Local Ip Address "
& "C:\Program Files\VideoLAN\VLC\vlc.exe" "$link" ":sout=#transcode{vcodec=VP80,vb=2000,acodec=vorb,ab=128,channels=2,samplerate=44100}:http{mux=webm,dst=:8080/stream}:sout-all :sout-keep"
& "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" "https://dabble.me/cast/?video_link=http://$ip/stream"