Linux Commands Examples

A great documentation place for Linux commands

vlc

the VLC media player


see also : qvlc - svlc - nvlc - rvlc - cvlc

Synopsis

vlc [OPTIONS] [ITEMS]...


add an example, a script, a trick and tips

: email address (won't be displayed)
: name

Step 2

Thanks for this example ! - It will be moderated and published shortly.

Feel free to post other examples
Oops ! There is a tiny cockup. A damn 404 cockup. Please contact the loosy team who maintains and develops this wonderful site by clicking in the mighty feedback button on the side of the page. Say what happened. Thanks!

examples

0
source

How to get length of video file from console?

Something similar to:

ffmpeg -i input 2>&1 | grep "Duration"| cut -d ' ' -f 4 | sed s/,//

This will deliver: HH:MM:SS.ms. You can also use ffprobe, which is supplied with most FFmpeg installations:

ffprobe -show_format input | sed -n '/duration/s/.*=//p'

… or:

ffprobe -show_format input | grep duration | sed 's/.*=//')

To convert into seconds (and retain the milliseconds), pipe into:

awk '{ split($1, A, ":"); print 3600*A[1] + 60*A[2] + A[3] }'

To convert it into milliseconds, pipe into:

awk '{ split($1, A, ":"); print 3600000*A[1] + 60000*A[2] + 1000*A[3] }'

If you want just the seconds without the milliseconds, pipe into:

awk '{ split($1, A, ":"); split(A[3], B, "."); print 3600*A[1] + 60*A[2] + B[1] }'

Example:

enter image description here

0
source

Is there a way to set the default buffer for VLC?

--file-caching seems to be what you're after. Do you start vlc from command line? Then you can add

alias vlc="vlc --file-caching=10000"

to your .bashrc.

Within the GUI you'll find the option at Tools->Preferences->Show settings: "All" -> Input/Codecs, and then scrolling down.

0
source

Some songs in my music collection are quieter than others, what can I do?

If some songs in your music collection seem quieter than others, this is either because:

  • Their average volume is in fact lower (in dB)
  • They are not as heavily compressed as others, so they sound quieter, while in fact their peaks are the same. In my experience, this only happens when you compare e.g. classical records to modern pop, or jazz music to metalcore. So probably not your average listening scenario.

You really don't want to apply dynamic range compression again, since what you'll get is what you mostly experience when listening to radio stations that employ technicians who have no idea what they're doing. The chorus of a song will not seem as loud as the rest, when it's overcompressed.

Plus, guitar equipment is mostly tailored to electric guitars, which have a much smaller frequency band than a typical pop/rock song.

Let mastering engineers do their job, and try to regulate the playback volume only – not the playback dynamics. This is really something that only works well with movie audio.

I'd suggest running a ReplayGain analysis over your music collection, which will add a metadata record to your files that identifies their perceived loudness. Playback devices (and I assume most players) should respect this ReplayGain value and match the volume accordingly so you'll never have to worry about mismatches again.

For Linux, mp3gain is the de-facto standard for calculating ReplayGain. See here for more: Replay Gain in Linux

0
source

How can I solve VLC's dependency "vlc-nox"?

Some of the packages, like gstreamer, are not in the standard repository. You need to enable download from multiverse and universe repos.

Software soruces window

More info on: https://help.ubuntu.com/community/Repositories/Ubuntu

0
source

Live Screencast under Linux

Another product that you can try :

WebcamStudio For GNU/Linux

0
source

Default path for installed binary?

I suppose

which vlc

will do the trick if the path the file was installed is on the System Path.

0
source

Playing random short clips from a collection of movies

Make a script that adds your movies in a playlist and play it in VLC. You can add start- and stop-time like this:

#EXTM3U
#EXTINF:1000,movie-clip-1.avi
#EXTVLCOPT:start-time=100
#EXTVLCOPT:stop-time=110
movie-clip-1.avi
#EXTINF:500,movie-clip-1.avi
#EXTVLCOPT:start-time=440
#EXTVLCOPT:stop-time=450
movie-clip-2.avi

The EXTINF-value is the movie length in seconds. VLC will add that for you if you save a playlist of all your movies.

Something like

stop-time=$[RANDOM%$length+$x]
start-time=$stop-time-$x

in a bash-script should do it.

0
source

VLC Stream Size

I was able to do it with the --v4l2-width=1280 --v4l2-height=720 options proir to opening the stream.

0
source

VLC, realtime priority and rtkit

Have you tried changing nice level with the nice command?

nice -0 vlc

if it works you can put it in a bash-script and create an alias to vlc, so it will always start with nice 0

0
source

Is it possible to play a song in vlc player out of the command line?

Short Answer is yes.

The official VLC command-line help wiki page can give you all the commands you need, and you should be able to just type:

vlc name.mp3

That should open the file, if you have custom devices for output you would specify that in the command line.

description

This manual page documents briefly the VLC multimedia player and server.

options

VLC follows the usual GNU command line syntax, with long options starting with two dashes (’-’). For a precise description of options, please use "vlc --help".

The complete list of VLC options depends on what plugins are installed because they automatically add their own options. Please use "vlc --longhelp --advanced" for a complete list of available options.

items

VLC recognizes several URL-style items:
*.mpg, *.vob, *.avi, *.mp3, *.ogg, *.opus

Various multimedia file formats

dvd://[<device>][@<raw device>][#[<title>][:[<chapter>][:<angle>]]]

DVD device (for instance dvd:///dev/dvd). The raw device is optional and must have been prepared beforehand.

vcd://[<device>][@{E|P|E|T|S}[<number>]]

VCD device (for instance vcd:///dev/cdrom).

udp://[@[<multicast address>][:<local port>]]

UDP stream, such as one sent by VLS or another VLC. Usually "udp://" is enough.

http://<server address>[:<server port>]/[<file>]

HTTP stream

rtsp://<server address>[:<server port>]/<stream name>

RTSP Video On Demand stream

vlc://<command>

Execute a playlist command. Commands are: pause (pause execution of other items), and quit (close VLC).


see also

Online documentation: http://www.videolan.org/doc/


author

This manual page was written by Sam Hocevar <sam[:at:]zoy[:dot:]org>, for the Debian GNU/Linux system (but may be used by others).

How can this site be more helpful to YOU ?


give  feedback