Difference between revisions of "VLC media player"

From ArchWiki
Jump to: navigation, search
m
(Web interface)
(13 intermediate revisions by 8 users not shown)
Line 5: Line 5:
 
{{Article summary end}}
 
{{Article summary end}}
  
[http://www.videolan.org/vlc/ VLC] is a media player by the [http://www.videolan.org/ VideoLAN team] designed to emphasize portability and compatibility. Historically, it was groundbreaking for Linux media software by being the first player to ship with libdvdcss, letting it play encrypted DVDs. This is now a feature that almost all players include, and is no longer an advantage.
+
From the project [http://www.videolan.org/vlc/ home page]:
 +
: ''VLC is a free and open source cross-platform multimedia player and framework that plays most multimedia files as well as DVD, Audio CD, VCD, and various streaming protocols.''
  
==Installation==
+
== Installation ==
  
To install, simply run
+
[[pacman|Install]] {{Pkg|vlc}} from the [[official repositories]].
{{bc|# pacman -S vlc}}
+
  
If you want to play audio CDs, you should also install {{ic|libcddb}}.
+
Notable variants are:
 +
* {{AUR|vlc-git}} - Development branch.
  
==Language==
+
If you want to play audio CDs, you should also install {{Pkg|libcddb}}.
  
It seems VLC does not offer an option to change language in its ''Preferences'' menu. But you can use the ''LANGUAGE='' prefix. For instance:
+
== Language ==
{{bc|<nowiki>$ LANGUAGE=fr vlc %U</nowiki>}}
+
will switch VLC interface to french.
+
  
==Skins==
+
It seems VLC does not offer an option to change language in its ''Preferences'' menu. But you can use the ''LANGUAGE='' prefix. For instance, modify the {{ic|/usr/share/applications/vlc.desktop}} line:
 +
Exec=/usr/bin/vlc %U
 +
to:
 +
Exec=LANGUAGE=fr /usr/bin/vlc %U
 +
to switch VLC interface to French.
 +
 
 +
== Skins ==
  
 
VLC can be "skinned" for a different look and feel. You can obtain new skins for VLC from http://www.videolan.org/vlc/skins.php.
 
VLC can be "skinned" for a different look and feel. You can obtain new skins for VLC from http://www.videolan.org/vlc/skins.php.
  
 
Installation of skins is simple just download the skin you wish to use and copy it to:
 
Installation of skins is simple just download the skin you wish to use and copy it to:
{{bc|~/.local/share/vlc/skins2}}
+
~/.local/share/vlc/skins2
Open up VLC, click tools->preferences. When the preferences window opens up you should be in the "Interface" tab
+
Open up VLC, click ''Tools > Preferences''. When the preferences window opens up you should be in the "Interface" tab
  
 
Choose the "Use custom skin" radio button, and browse to the location of the downloaded skin.
 
Choose the "Use custom skin" radio button, and browse to the location of the downloaded skin.
Line 32: Line 37:
 
Restart VLC for the change to take effect.
 
Restart VLC for the change to take effect.
  
==Web Interface==
+
Note: You need to install {{Pkg|libtar}} from the [[official repositories]] to use the skinnable interface module.
  
Run VLC with the parameter "--extraintf=http" to use both the desktop and web interface.
+
== Web interface ==
# vlc --extraintf=http
+
  
Or you can enable this feature in the UI by navigating to "View" > "Add Interface" > "Web Interface".
+
Run VLC with the parameter {{ic|--extraintf&#61;http}} to use both the desktop and web interface. The {{ic|--http-host}} parameter specifies the address to, which is {{ic|localhost}} by default. To set a password, use {{ic|--http-password}}, otherwise VLC will not allow you to log in.
 +
# vlc --extraintf=http --http-host 0.0.0.0:8080 --http-password 'yourpasswordhere'
 +
 
 +
Or you can enable this feature in the UI by navigating to ''View > Add Interface > Web Interface''.
  
 
VLC defaults to port 8080: http://127.0.0.1:8080
 
VLC defaults to port 8080: http://127.0.0.1:8080
  
Edit /usr/share/vlc/lua/http/.hosts to allow remote connections. You will need to restart VLC in order for changes to take effect.
+
Edit {{ic|/usr/share/vlc/lua/http/.hosts}} to allow remote connections. You will need to restart VLC in order for changes to take effect.
  
==Preventing multiple instances==
+
== Tips and tricks ==
 +
 
 +
=== File association in GNOME ===
 +
 
 +
Copy the system desktop file to the local one (local {{ic|.desktop}} files supersede the global ones):
 +
 
 +
$ cp /usr/share/applications/vlc.desktop ~/.local/share/applications/
 +
 
 +
Define its mime types (known playback file type abilities) by doing:
 +
 
 +
{{bc|<nowiki>
 +
sed -i 's|^Mimetype.*$|MimeType=video/dv;video/mpeg;video/x-mpeg;video/msvideo;video/quicktime;video/x-anim;video/x-avi;video/x-ms-asf;video/x-ms-wmv;video/x-msvideo;video/x-nsv;video/x-flc;video/x-fli;application/ogg;application/x-ogg;application/x-matroska;audio/x-mp3;audio/x-mpeg;audio/mpeg;audio/x-wav;audio/x-mpegurl;audio/x-scpls;audio/x-m4a;audio/x-ms-asf;audio/x-ms-asx;audio/x-ms-wax;application/vnd.rn-realmedia;audio/x-real-audio;audio/x-pn-realaudio;application/x-flac;audio/x-flac;application/x-shockwave-flash;misc/ultravox;audio/vnd.rn-realaudio;audio/x-pn-aiff;audio/x-pn-au;audio/x-pn-wav;audio/x-pn-windows-acm;image/vnd.rn-realpix;video/vnd.rn-realvideo;audio/x-pn-realaudio-plugin;application/x-extension-mp4;audio/mp4;video/mp4;video/mp4v-es;x-content/video-vcd;x-content/video-svcd;x-content/video-dvd;x-content/audio-cdda;x-content/audio-player;|' ~/.local/share/applications/vlc.desktop
 +
</nowiki>}}
 +
 
 +
Then in ''System Settings > Details > Default Applications '' and on the ''Video'' drop-down menu, select ''Open VLC media player''.}}
 +
 
 +
=== Control using hotkeys or cli ===
 +
 
 +
Install {{Pkg|netcat-openbsd}}.
 +
 
 +
Get script at: http://crunchbang.org/forums/viewtopic.php?pid=112035%23p112035#p112035
 +
 
 +
Follow instructions in script to setup a socket for VLC.
 +
 
 +
Either run the script from the command line or register the script with keyboard shortcuts through your desktop.
 +
 
 +
=== Preventing multiple instances ===
  
 
The default settings for VLC is to open a new instance of the program for each file that is opened. This can be annoying if you are using VLC for something like playing your music collection. To remedy the problem you can do the following:
 
The default settings for VLC is to open a new instance of the program for each file that is opened. This can be annoying if you are using VLC for something like playing your music collection. To remedy the problem you can do the following:
  
#Open VLC
+
# Open VLC.
#Go to Tools -> Preferences (Ctrl+P)
+
# Go to ''Tools > Preferences'' ({{ic|Ctrl+P}}).
#Go to the Interface tab and find the "Instances" section.
+
# Go to the Interface tab and find the "Instances" section.
#Tick "Allow only one instance"
+
# Tick "Allow only one instance".
#Optionally tick "Enqueue files when in one instance mode" - This will keep the current file playing and add any newly opened files to the current playlist.
+
# Optionally tick "Enqueue files when in one instance mode". This will keep the current file playing and add any newly opened files to the current playlist.
  
==Troubleshooting==
+
== Troubleshooting ==
  
===PulseAudio Lag===
+
=== PulseAudio lag ===
When using PulseAudio as the audio output module, you might encounter audio/video sync problems. These problems can usually be [https://bbs.archlinux.org/viewtopic.php?pid=1101711#p1101711 fixed] by editing {{ic|/etc/pulse/default.pa}} or {{ic| ~/.pulse/default.pa}} to reflect the following changes.
+
 
{{bc|1=.ifexists module-udev-detect.so
+
When using PulseAudio as the audio output module, you might encounter audio/video sync problems. These problems can usually be [https://bbs.archlinux.org/viewtopic.php?pid=1101711#p1101711 fixed] by editing {{ic|/etc/pulse/default.pa}} or {{ic| ~/.pulse/default.pa}} to reflect the following changes. However, this can cause a new audio stuttering problem in some applications such as flash.
 +
{{bc|1=
 +
.ifexists module-udev-detect.so
 
load-module module-udev-detect '''tsched=0'''
 
load-module module-udev-detect '''tsched=0'''
.else}}
+
.else
'''Update on this bug as of November 17th, 2012:''' It appears that the bug causing the audio lag between PulseAudio and VLC has been fixed upstream, so the above fix is not required. In fact, this fix might even cause a lag to occur, so remove {{ic|1='''tsched=0'''}}, if you had applied this fix.
+
}}
 +
 
 +
=== Video broken or other issue after upgrade ===
  
===Video broken or other issue after upgrade===
 
 
Now and then VLC will have some issues with configuration even in minor releases. Before making bug reports, remove or rename your configuration located at {{ic|~/.config/vlc}} and confirm whether the issue is still there.
 
Now and then VLC will have some issues with configuration even in minor releases. Before making bug reports, remove or rename your configuration located at {{ic|~/.config/vlc}} and confirm whether the issue is still there.
  
==See also==
+
=== Segmentation fault ===
*[[Common Applications#Multimedia]]
+
 
*[http://www.videolan.org/vlc/ VLC homepage]
+
When starting VLC you can get a segfault, a possible workaround to this is running the following:
*[http://wiki.videolan.org/Control_VLC_via_a_browser Control VLC via a browser]
+
  # /usr/lib/vlc/vlc-cache-gen -f usr/lib/vlc/plugins
 +
Then reinstall VLC.
 +
 
 +
=== Missing icons in dropdown menus ===
 +
 
 +
This can happen under XFCE, there will be no more icons in dropdown menus, like the or the PCI card icon.
 +
 
 +
Execute these commands to reactivate these icons:
 +
{{bc|1=
 +
$ gconftool-2 --type boolean --set /desktop/gnome/interface/buttons_have_icons true
 +
$ gconftool-2 --type boolean --set /desktop/gnome/interface/menus_have_icons true
 +
}}
 +
 
 +
== See also ==
 +
 
 +
* [[List of Applications#Multimedia]]
 +
* [http://www.videolan.org/vlc/ VLC homepage]
 +
* [http://wiki.videolan.org/Control_VLC_via_a_browser Control VLC via a browser]

Revision as of 14:55, 10 January 2014

Summary help replacing me
Installing and configuring the VLC multimedia player.

From the project home page:

VLC is a free and open source cross-platform multimedia player and framework that plays most multimedia files as well as DVD, Audio CD, VCD, and various streaming protocols.

Installation

Install vlc from the official repositories.

Notable variants are:

If you want to play audio CDs, you should also install libcddb.

Language

It seems VLC does not offer an option to change language in its Preferences menu. But you can use the LANGUAGE= prefix. For instance, modify the /usr/share/applications/vlc.desktop line:

Exec=/usr/bin/vlc %U

to:

Exec=LANGUAGE=fr /usr/bin/vlc %U

to switch VLC interface to French.

Skins

VLC can be "skinned" for a different look and feel. You can obtain new skins for VLC from http://www.videolan.org/vlc/skins.php.

Installation of skins is simple just download the skin you wish to use and copy it to:

~/.local/share/vlc/skins2

Open up VLC, click Tools > Preferences. When the preferences window opens up you should be in the "Interface" tab

Choose the "Use custom skin" radio button, and browse to the location of the downloaded skin.

Restart VLC for the change to take effect.

Note: You need to install libtar from the official repositories to use the skinnable interface module.

Web interface

Run VLC with the parameter --extraintf=http to use both the desktop and web interface. The --http-host parameter specifies the address to, which is localhost by default. To set a password, use --http-password, otherwise VLC will not allow you to log in.

# vlc --extraintf=http --http-host 0.0.0.0:8080 --http-password 'yourpasswordhere'

Or you can enable this feature in the UI by navigating to View > Add Interface > Web Interface.

VLC defaults to port 8080: http://127.0.0.1:8080

Edit /usr/share/vlc/lua/http/.hosts to allow remote connections. You will need to restart VLC in order for changes to take effect.

Tips and tricks

File association in GNOME

Copy the system desktop file to the local one (local .desktop files supersede the global ones):

$ cp /usr/share/applications/vlc.desktop ~/.local/share/applications/

Define its mime types (known playback file type abilities) by doing:

sed -i 's|^Mimetype.*$|MimeType=video/dv;video/mpeg;video/x-mpeg;video/msvideo;video/quicktime;video/x-anim;video/x-avi;video/x-ms-asf;video/x-ms-wmv;video/x-msvideo;video/x-nsv;video/x-flc;video/x-fli;application/ogg;application/x-ogg;application/x-matroska;audio/x-mp3;audio/x-mpeg;audio/mpeg;audio/x-wav;audio/x-mpegurl;audio/x-scpls;audio/x-m4a;audio/x-ms-asf;audio/x-ms-asx;audio/x-ms-wax;application/vnd.rn-realmedia;audio/x-real-audio;audio/x-pn-realaudio;application/x-flac;audio/x-flac;application/x-shockwave-flash;misc/ultravox;audio/vnd.rn-realaudio;audio/x-pn-aiff;audio/x-pn-au;audio/x-pn-wav;audio/x-pn-windows-acm;image/vnd.rn-realpix;video/vnd.rn-realvideo;audio/x-pn-realaudio-plugin;application/x-extension-mp4;audio/mp4;video/mp4;video/mp4v-es;x-content/video-vcd;x-content/video-svcd;x-content/video-dvd;x-content/audio-cdda;x-content/audio-player;|' ~/.local/share/applications/vlc.desktop

Then in System Settings > Details > Default Applications and on the Video drop-down menu, select Open VLC media player.}}

Control using hotkeys or cli

Install netcat-openbsd.

Get script at: http://crunchbang.org/forums/viewtopic.php?pid=112035%23p112035#p112035

Follow instructions in script to setup a socket for VLC.

Either run the script from the command line or register the script with keyboard shortcuts through your desktop.

Preventing multiple instances

The default settings for VLC is to open a new instance of the program for each file that is opened. This can be annoying if you are using VLC for something like playing your music collection. To remedy the problem you can do the following:

  1. Open VLC.
  2. Go to Tools > Preferences (Ctrl+P).
  3. Go to the Interface tab and find the "Instances" section.
  4. Tick "Allow only one instance".
  5. Optionally tick "Enqueue files when in one instance mode". This will keep the current file playing and add any newly opened files to the current playlist.

Troubleshooting

PulseAudio lag

When using PulseAudio as the audio output module, you might encounter audio/video sync problems. These problems can usually be fixed by editing /etc/pulse/default.pa or ~/.pulse/default.pa to reflect the following changes. However, this can cause a new audio stuttering problem in some applications such as flash.

.ifexists module-udev-detect.so
load-module module-udev-detect tsched=0
.else

Video broken or other issue after upgrade

Now and then VLC will have some issues with configuration even in minor releases. Before making bug reports, remove or rename your configuration located at ~/.config/vlc and confirm whether the issue is still there.

Segmentation fault

When starting VLC you can get a segfault, a possible workaround to this is running the following:

 # /usr/lib/vlc/vlc-cache-gen -f usr/lib/vlc/plugins

Then reinstall VLC.

Missing icons in dropdown menus

This can happen under XFCE, there will be no more icons in dropdown menus, like the or the PCI card icon.

Execute these commands to reactivate these icons:

$ gconftool-2 --type boolean --set /desktop/gnome/interface/buttons_have_icons true
$ gconftool-2 --type boolean --set /desktop/gnome/interface/menus_have_icons true

See also