【问题标题】:VLC command line converting is not always workingVLC 命令行转换并不总是有效
【发布时间】:2020-08-09 17:41:07
【问题描述】:
我安排了一个.cmd 文件,它将网络流转换为.mp4 文件,使用:
vlc -vvv "http://86.127.212.113/control/faststream.jpg?stream=mxpeg" --sout=#transcode{vcodec=h264,scale=Automat,scodec=none}:file{dst=C:\\Users\\ACV\\Videos\\rec3.mp4,no-overwrite} :no-sout-all :sout-keep
它通常有效,但有时它只会创建我无法播放的大文件。
甚至VLC本身也无法播放这些文件,只输出this
【问题讨论】:
标签:
batch-file
scheduled-tasks
vlc
【解决方案1】:
我建议您使用以下语法:
- 将
--sout 后面的= 替换为空格字符
- 双引号
--sout 链
- 将
no-sout-all 和sout-keep 的全局选项的前缀: 字符替换为--
@"%ProgramFiles%\VideoLAN\VLC\vlc.exe" -vvv "http://86.127.212.113/control/faststream.jpg?stream=mxpeg" --sout "#transcode{vcodec=h264,scale=Automat,scodec=none}:file{dst=C:\\Users\\ACV\\Videos\\rec3.mp4,no-overwrite}" --no-sout-all --sout-keep
为了安全起见,我已经包含了vlc.exe 的完整路径,请根据需要进行调整。