如何使用VLC在命令行中保存视频流? [英] How to save video stream using VLC in commandline?

查看:2907
本文介绍了如何使用VLC在命令行中保存视频流?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试使用VLC在Window 7 Basic上的命令行中保存在线视频。

I'm trying to save online video using VLC in command line on Window 7 Basic.

这里有一些我尝试和部分工作:

Here are few things I tried and worked partially:

I:\movies> vlc http://media.ch9.ms/ch9/7492/a92ae0a6-7b81-4114-b102aa055d147492/E2EMeijerBrachaDartMonadsContinuations.wmv --sout="#duplicate{dst=std{access=file,mux=wmv,dst='file.wmv'}, dst=display}"

它在流式播放时播放视频,流到 file.wmv 。但保存的视频没有音频!

It plays the video while streaming, and it also saves the stream to file.wmv. But the saved video doesn't have audio! The command worked partially.

youtube的另一个尝试:

Another try for youtube:

I:\movies> vlc http://www.youtube.com/watch?v=TFr6G5zveS8 --sout="#duplicate{dst=std{access=file,mux=wmv,dst='file.wmv'}, dst=display}"

相同的结果:保存的视频无音频。我将 mux = wmv,dst ='file.wmv'更改为 mux = webm,dst ='file.webm'在命令行中,并再次运行:

Same result: saved video without audio. I changed mux=wmv,dst='file.wmv' to mux=webm,dst='file.webm' in the command line, and ran again:

I:\movies> vlc http://www.youtube.com/watch?v=TFr6G5zveS8 --sout="#duplicate{dst=std{access=file,mux=webm,dst='file.webm'}, dst=display}"

它只创建了文件,但不是视频或音频。我再次尝试 mux = mp4,dst ='file.mp4'。相同的结果:视频或音频,但它创建了该文件。

It only created the file, but neither video nor audio. Again I tried mux=mp4,dst='file.mp4'. Same result : neither video nor audio, but it created the file.

任何想法如何解决这个问题?

Any idea how to fix this problem? What am I missing?

至于使用 vlc 版本,命令 vlc --version 给出:

As for which version of vlc I'm using, the command vlc --version gives this:

VLC version 2.0.6 Twoflower (2.0.6-7-g729aa7a)
Compiled by fun on fat (Apr  8 2013 23:22:26)
Compiler: gcc version 4.6.3 (GCC) 


推荐答案

-acodec vcodec

示例:

"C:\Program Files\VideoLAN\VLC\vlc.exe" -vvv dshow:// :dshow-vdev="USB Video Device" --sout=#transcode{vcodec=mp2v,fps=60,width=1080,acodec=mp2a,scale=1,channels=2,deinterlace,audio-sync}:standard{access-file,mux=ps,dst="C:\SPI3-Lite\VideoOutput\test1.mpg}

这篇关于如何使用VLC在命令行中保存视频流?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆