rem 设置VLC播放程序路径
set VLC="%~dp0\VLC\vlc.exe"
rem 开始将mp3文件推流成实时ts流
start "" %VLC% "%~dp0\yqxs.mp3" --repeat :sout=#transcode{vcodec=mp2v,vb=800,acodec=mpga,ab=128,channels=2,samplerate=44100,scodec=none}:udp{mux=ts{pid-video=123,pid-audio=1234},dst=127.0.0.1:5052} :no-sout-all :sout-keep
exit
rem 设置VLC播放程序路径
set VLC="%~dp0\VLC\vlc.exe"
rem 开始将mp3文件推流成实时ts流
start "" %VLC% "%~dp0\yqxs.mp3" --repeat :sout=#transcode{vcodec=mp2v,vb=800,acodec=mpga,ab=128,channels=2,samplerate=44100,scodec=none}:udp{mux=ts{
pid-video=123,pid-audio=1234},dst=127.0.0.1:5052} :no-sout-all :sout-keep
exit
%~dp0\yqxs.mp3 是本地的音频文件
--repeat 代表的是循环播放
pid-video 是视频pid
pid-audio 是音频pid
127.0.0.1:5052 为输出的实时ts流地址