MyTetra Share
Делитесь знаниями!
7 VLC command lines you need to know
Время создания: 28.02.2017 11:27
Автор: https://twitter.com/Christi_smithe
Текстовые метки: video vlc cli console
Раздел: Видео
Запись: Velonski/mytetra-database/master/base/1488263274buqzr4q94t/text.html на raw.githubusercontent.com

VLC is one of the most loved media players out there. Free, open source and compatible with almost every operating system, it can do almost everything that one expects it to do and sometimes even more. However, there is something that makes VLC even more special on Linux - the command line. The command line lets you bypass the graphical interface of VLC and makes it very easy to create and use scripts to get what you want done from the media player. We are going to go through 7 of such command lines that you must know.

Command Line 1: Starting VLC via command line to play a video as desktop wallpaper

"C:Program Files (x86)VideoLANVLCvlc.exe" --qt-start-minimized --video-wallpaper --no-video-title-show --repeat "C:DownloadsTutorial.mp4"

In this command, replace the paths C:Program Files (x86)VideoLANVLCvlc.exe (default location of VLC Media Player ) and C:DownloadsTutorial.mp4 (location of the video file) with the ones that are appropriate for your computer.

Command Line 2: How to capture a Screencast using VLC command line

c:path ovlc.exe screen:// :screen-fps=24 :screen-follow-mouse :screen-mouse-image="c:tempmousepointerimage.png" :sout=#transcode{vcodec=h264,venc=x264{scenecut=100,bframes=0,keyint=10}, vb=1024,acodec=none,scale=1.0, vfilter=croppadd{cropleft=0,croptop=0,cropright=0,cropbottom=0}}: duplicate{dst=std{mux=mp4,access=file,dst="c:tempscreencast.mp4"}}

Please note that this is a long command as you can see and the whole things is one single line. So you have to copy & paste it or type it exactly the same way for it to work. The sections that you may have to change as needed are the following:

  • • c:pathtovlc.exe: You can change this to the actual path to your vlc.exe file as on your computer.
  • • :screen-fps=24: This one is simple, set this to your choice of the frames-per-second rate you want to record with.
  • • :screen-follow-mouse: This will record the the mouse pointer as well. You may exclude this section if you do not want the mouse pointer recorded in your screencast.
  • • :screen-mouse-image: If recording the mouse pointer too, this little piece of command will fetch the pointer image as you want.
  • • vb=1024: This is used to set the bitrate you want to record with. Remeber, that a higher bitrate produces better quality video but with a larger file size (also, this will work combined with the fps value). Values of 1500 / 2048 are the recommended ones for improved quality.
  • • :scale=1.0: This value helps in reducing or enlarging your video proportionally. A value of 0.5 would help in creating a screencast of your desktop in a scaled down to half-size version, for example.
  • • cropleft,croptop,cropright,cropbottom: This is the set of values that will determine the pixel size of the crop areas. If you choose to set it to 0, it will capture your complete desktop. And, let's say that you decide to set cropleft to 100, then the recorded desktop will end up being with cropped out width from the left side of your desktop by 100 pixels exactly.
  • • dst="": This indicates the complete path and the file name of the video you are creating.

Command Line 3: How to play only a part from a video with VLC command line

start "C:Program FilesVLCvlc.exe" "D:MoviesThe Italian Job.avi" --start-time 12 --stop-time 20

You simply have to use the command line as given above, with the file paths and the time changed as needed. The numbers 12 and 20 in the command line indicate 12 seconds and 20 seconds respectively.

Command Line 4: Capture video from VLC command line with a stop time

cvlc -vvv rtp://address:port --start-time=00 --run-time=300 --sout file/ts:test.ts

Adjust the run-time to the time in seconds you want the video captured.

Command Line 5: Using VLC to record MP3 streams

vlc http://mp3.live.tv-radio.com/fip/all/fiphautdebit.mp3 --sout "#duplicate{dst=std{access=file,mux=raw,dst=C:OUT.mp3}" --stop-time 10

You only have to change the file path accordingly to your choice and can even include the line --stop-time 10 to control how much of the file do you want recorded.

Command Line 6: Make VLC stop automatically after recording

vlc http://mp3.live.tv-radio.com/fip/all/fiphautdebit.mp3 --sout "#duplicate{dst=std{access=file,mux=raw,dst=C:OUT.mp3}" --stop-time 10 vlc://quit

In order to make VLC stop / quit after the recording is over, just add this small section vlc://quit to the end of the above command line.

Command Line 7: Run VLC from the command line on Mac OS X and stream internet radio (such as Radio Paradise)

#!/usr/bin/env bash

/Applications/VLC.app/Contents/MacOS/VLC -I rc "$@"

You may also make this executable after having saved it to /usr/local/bin - chmod +x /usr/local/bin/vlc

Or, try to run it with VLC inside the Terminal - vlc http://www.radioparadise.com/m3u/aac-128.m3u

In case the audio starts skipping, you may use the option of direct stream - vlc http://stream-tx4.radioparadise.com:80/aac-128

Another option is to use the Ogg stream - vlc http://stream-sd.radioparadise.com/rp_192m.ogg

Так же в этом разделе:
 
MyTetra Share v.0.65
Яндекс индекс цитирования