0
点赞
收藏
分享

微信扫一扫

#yyds干货盘点#vlc命令行的转码,流化,推流

phpworkerman 2022-02-16 阅读 57

vlc命令行使用方法:

1. 安装最新版本

2. 打开cmd,进入vlc的安装文件目录,即C:\Program Files\VideoLAN\VLC\vlc.exe,或者添加系统环境变量后可以使用vlc.exe

3. 输入vlc.exe -H,就得到了所有的命令

4. 在命令行里面输入命令,就可以调用VLC进行工作了,效果和软件界面是一样的,可以进行播放,转码和流化。

vlc命令:

1,vlc -vv --extraintf=logger d:/01.avi              

   作用:打开指定路径的视频文件

2,vlc -vvv --extraintf=logger d:/01.avi :sout=#duplicate{dst=rtp{dst=236.0.0.1,mux=ts,port=1234}}

作用:作为服务器把指定路径的本地文件d:/01.avi,通过rtp往客户端发送ts流

   vlc -vvv --extraintf=logger d:/test.mp4 :sout=#duplicate{dst=std{access=udp,mux=ts,dst=236.0.0.1:1234},dst=display}

   作用:作为服务器把指定路径的本地文件d:/01.avi,通过udp往客户端发送ts流,最后的dst=display,作用为推ts的同时本地也播放。

   vlc -vvv --extraintf=logger d:/test.mp4 :sout=#transcode ^   {vcodec=h264,vb=800,scale=1,acodec=mp4a,ab=128,channels=2,samplerate=44100}:std{access=udp,mux=ts,dst=236.0.0.1:1234}

   作用:先做转码,再将转码后的内容ts流化后用udp进行传输。(如果转码的帧率达不到25帧,效果就不行)

3,vlc -vvv --extraintf=logger d:/test.mp4 :sout=#std{access=file,mux=ts,dst=jack.ts}

   作用:把一个文件流化成ts,保存到vlc的安装路径中,也可以指定路径。

D:\音视频文件\ciling\VTS_01_1.VOB

vlc -vvv --extraintf=logger E:\test_zimu\VTS_01_1.VOB :sout=#std{access=file,mux=ts,dst=E:\VTS_01_1.ts}

Usage: vlc [options] [stream] ...

You can specify multiple streams on the commandline. They will be enqueued in the playlist.

The first item specified will be played first.

Options-styles:

  --option  A global option that is set for the duration of the program.

   -option  A single letter version of a global --option.

   :option  An option that only applies to the stream directly before it

            and that overrides previous settings.

Stream MRL syntax:

  [[access][/demux]://]URL[@[title][:chapter][-[title][:chapter]]] [:option=value ...]

  Many of the global --options can also be used as MRL specific :options.

  Multiple :option=value pairs can be specified.

URL syntax:

  [file://]filename              Plain media file

  ​​http://ip:port/file​​            HTTP URL

  ftp://ip:port/file             FTP URL

  mms://ip:port/file             MMS URL

  screen://                      Screen capture

  [dvd://][device][@raw_device]  DVD device

  [vcd://][device]               VCD device

  [cdda://][device]              Audio CD device

  udp://[[<source address>]@[<bind address>][:<bind port>]]

                                 UDP stream sent by a streaming server

  vlc://pause:<seconds>          Special item to pause the playlist for a certain time

  vlc://quit                     Special item to quit VLC

举报

相关推荐

0 条评论