[ Presentation | Installation of basic libraries ( mad , libdvdcss , libdvdread , libdvdnav , libdvbpsi , live555 ) | Multi-format players ( presentation , vlc , xine , MPlayer ) | Video streaming ( presentation , broadcast to a computer , streaming on the network , video on demand ) ]
Last modified February 20, 2025
This page presents the most
common video players under Linux, they will allow you to play
almost all types of video formats (container and codec)
including DVDs.
We assume that you have gone
through the pages basic tools for video and video container.
MAD is a high
quality MPEG audio decoder. The official URL is www.underbit.com/products/mad/ you will find the latest archive there that you
unzip by typing:
tar xvfz
libmad-0.15.1b.tar.gz
This gives the directory mad-0.15.1b in which you type successively
./configure
make
if you encounter the
following error
cc1: error: command line
option "-fforce-mem" not recognized Edit the
configure file and
remove fforce-mem
optimize="$optimize
-fforce-mem"
rerun configure and make then as root
make install
ldconfig
This library offers tools to read DVDs. The URL is http://download.videolan.org/pub/videolan where we will retrieve the archive that we uncompress by typing
tar xvfj
libdvdread-6.1.3.tar.bz2
This gives the libdvdread-6.1.3 directory in which we type
./configure
make
Then as root
make install
This library of
functions provides tools to be able to "navigate" in a DVD,
that is to say to be able to use the interactive menus
proposed in most DVDs. The URL is http://download.videolan.org/pub/videolan / we retrieve the archive there which we uncompress
by typing
tar xvfj
libdvdnav-6.1.1.tar.bz2
This gives the directory libdvdnav-6.1.1 in which we type
./configure
make
Then as root
make install
Libdvdcss is a library offering tools to read MPEG2 stream
from a hard disk or DVD. It also allows to read encrypted
DVDs. The URL is http://www.videolan.org/developers/libdvdcss.html we retrieve the archive that we uncompress as
tar xvfj
libdvdcss-1.4.3.tar.bz2
This gives the directory libdvdcss-1.4.3 in which we type
./configure
make
Then as root
make install
libdvbpsi whose site is http://www.videolan.org/developers/libdvbpsi.html allows the broadcasting of MPEG2 streams, we
retrieve the archive there which we decompress by typing
tar xvfj
libdvbpsi-1.3.3.tar.bz2
This gives the directory libdvbpsi-1.3.3 in which we type
./configure
make
then as root
make install
this library is necessary
for vlc to do video streaming.
live555 whose site http://www.live555.com/liveMedia/public/ allows streaming and video reception, it is
necessary for vlc. We unzip the archive by typing
tar xvfz
live555-latest.tar.gz
This gives the live directory in
which we edit the config.linux file to add the -fPIC option
COMPILE_OPTS = $(INCLUDES) -I/usr/local/include -I. -O2 -fPIC -DSOCKLEN_T=socklen_t -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64
we then type
./genMakefiles linux
we then type
make
If you encounter the following error
BasicTaskScheduler.cpp: In member function
'virtual void BasicTaskScheduler::SingleStep(unsigned int)':
BasicTaskScheduler.cpp:191:40: error: 'struct
std::atomic_flag' has no member named 'test'
You need to go back to the config.linux file and add the last option
COMPILE_OPTS = $(INCLUDES) -I/usr/local/include
-I. -O2 -fPIC -DSOCKLEN_T=socklen_t -D_LARGEFILE_SOURCE=1
-D_FILE_OFFSET_BITS=64 -DNO_STD_LIB
we retype
./genMakefiles linux
make clean
make
we then type as root
make install
ln -s
/usr/local/linux/multimedia/live/liveMedia/include/
/usr/include/liveMedia
ln -s
/usr/local/linux/multimedia/live/groupsock/include
/usr/include/groupsock
ln -s
/usr/local/linux/multimedia/live/UsageEnvironment/include/
/usr/include/UsageEnvironment
ln -s
/usr/local/linux/multimedia/live/BasicUsageEnvironment/include/
/usr/include/BasicUsageEnvironment
Here I present the most common players, namely VLC, MPlayer and to a lesser extent xine. These different players are capable of playing almost all audio and video codecs and containers imaginable including ogm and matroska .
VLC is a particularly powerful video player, the official site is http://www.videolan.org I was unable to install the latest stable version 3.0.20 which generates a bunch of errors, so I retrieved the development version with git
git clone
https://code.videolan.org/videolan/vlc.git this gives the vlc
directory . It only works with qt6, we
will eventually install the packages qt6qml-devel , lua-devel, lib64cddb-devel , qt6-devel , qt6quick-devel,
qt6quickcontrols2-devel, fribidi , fribidi-devel , lib64sndfile-devel , lib64gcrypt-devel , wayland-protocols-devel , lib64SDL_image-devel . We return to vlc and type
./bootstrap
./configure --enable-gles2
--enable-fdkaac --enable-qt
then we type
make
I encounter this error
access/live555.cpp: In
function 'bool wait_Live555_response(demux_t*, int)':
access/live555.cpp:573:36:
error: cannot convert 'char*' to 'EventLoopWatchVariable*'
{aka 'std::atomic<char>*'}
573 |
p_sys->scheduler->doEventLoop(
&p_sys->event_rtsp );
I have not found any other solution than to deactivate live555 by typing the command
./configure --enable-gles2 --enable-fdkaac --enable-qt --disable-live555
I type make again and then
I encounter the error
audio_filter/channel_mixer/spatialaudio.cpp:
In function "int Open(vlc_object_t*)":
audio_filter/channel_mixer/spatialaudio.cpp:542:33: error:
no matching function for call to
"CAmbisonicZoomer::Configure(unsigned int&, bool, int)"
542 | if
(!p_sys->zoomer.Configure(p_sys->i_order, true, 0))
I couldn't find any other
solution than to disable spatialaudio by typing the command
./configure
--enable-gles2 --enable-fdkaac --enable-qt --disable-live555 --disable-spatialaudio
now for the next error
/bin/ld:
/usr/local/lib64/libmatroska.a(KaxBlock.cpp.o): in function
`libmatroska::KaxInternalBlock::ReadData(libebml::IOCallback&,
libebml::ScopeMode)':
KaxBlock.cpp:(.text+0x1b8c): undefined reference to
`libebml::SafeReadIOCallback::EndOfStreamX::EndOfStreamX(unsigned
long)'
/bin/ld:
KaxBlock.cpp:(.text+0x1bcf): undefined reference to
`libebml::SafeReadIOCallback::SafeReadIOCallback(libebml::EbmlBinary
const&)'
/bin/ld:
KaxBlock.cpp:(.text+0x1be2): undefined reference to
`libebml::SafeReadIOCallback::GetUInt8()'
I have not found any other solution than to disable Matroska support
./configure
--enable-gles2 --enable-fdkaac --enable-qt --disable-live555 --disable-spatialaudio --disable-matroska
I type make again then as
root
make install
we add in the file /etc/ld.so.conf the following line
/usr/local/lib/vlc
then we type
ldconfig
Just type vlc , the interface is particularly rich (much more than xine or mplayer which are basic in comparison).
In this paragraph I detail the installation of the tarball version available on the official website. Before going further we can install the following packages
lib64cdio-devel
lib64vcd-devel
lib64xt-devel
lib64xvmc-devel
lib64graphicsmagick-devel
I had to create these two links beforehand
ln -s
/usr/include/GraphicsMagick/wand/ /usr/include
ln -s
/usr/include/GraphicsMagick/magick/ /usr/include
We will retrieve xine at the URL xine.sourceforge.net. We unzip the first archive by typing
tar xvf xine-lib-1.2.11.tar.xz
This gives the xine-lib-1.2.11 directory in which we type
./configure
Here is the result
xine-lib summary:
----------------
* input plugins:
- file -
stdin_fifo
* Network:
- rtsp -
rtp
- net - pnm
- http -
ftp
- https -
ftpes
- gopher
- tls
- mms
- IPv6
(disabled
plugins: sftp scp nfs smb)
* Optical discs:
- cdda
- vcdo
- vcd
- dvd
(external libs)
* Devices:
- dvb
- v4l2
(disabled
plugins: v4l)
* Misc:
- vdr
- avio
(libavformat)
- test
(disabled
plugins: gnome-vfs)
* demultiplexer
plugins:
- 4xm - aac
- ac3 -
aiff
- asf
- avformat
(with libavformat)
- avi -
cdda
- ea wve -
film
- FLAC
- FLAC
(with libFLAC)
- fli - flv
- idcin -
iff
- image
- interplay
mve - ivf
- matroska
- mng
- mod
- mpeg -
mpeg_audio
-
mpeg_block - mpeg_elem
- mpeg_pes
- mpeg_ts
- Nosefart
(NSF)
- nsf - nsv
- ogg
- psx str -
pva
- qt/mpeg-4
- raw dv
-
real/realaudio - roq
- smjpeg -
snd/au
- vmd - voc
- vox - vqa
- wav
- wc3 mve -
ws aud
- yuv4mpeg2
(disabled
plugins: WavPack)
* video decoder
plugins:
- MPEG 1.2
(libmpeg2)
- Amiga
Bitplane
- Raw RGB
- Raw YUV
-
dxr3_video
-
gdk-pixbuf
- image
- libjpeg
- libpng
- theora
- vdpau
- libvpx
(VP8/VP9)
- libaom
(AV1)
- ffmpeg
(disabled
plugins: w32dll mmal OpenHEVC dav1d)
* audio decoder
plugins:
- linear
PCM
- dvaudio
- GSM 06.10
- faad
- Nosefart
(NSF)
- FLAC
(with libFLAC)
- speex
- vorbis
- MAD (MPG
1/2/3) (*INTERNAL* library)
- DTS
(*INTERNAL* library)
-
A52/ra-dnet (external library, float math)
- Musepack
(*INTERNAL* library)
- ffmpeg
(disabled
plugins: w32dll WavPack)
* subtitle decoder
plugins:
- spu -
spucc
- spucmml -
sputext
- spudvb
- PGS
(BluRay) - TextST (BluRay)
- dxr3_spu
* post effect
plugins:
* planar video
effects:
- invert -
expand
- eq - eq2
- boxblur -
denoise3d
- unsharp -
tvtime
- postproc
- vdr
* SFX:
- goom -
oscope
- fftscope
- mosaico
-
tdaudioanalyzer
* Audio:
- upmix -
upmix_mono
- volnorm -
scretch
* video driver
plugins:
- OpenGL 2.0 (with bicubic scaling)
- X11 (GLX) backend
- X11 (EGL) backend
- Wayland (EGL) backend
- XShm (X11 shared memory)
- Xv (XVideo *shared*)
- XxMC (XVideo extended motion compensation)
- OpenGL (with GLU support)
- vaapi (Video Acceleration (VA) API for Linux)
- vdpau (X11 Video Decode and Presentation API
for Unix)
- XvMC (XVideo motion compensation)
- xcb-shm (X shared memory using XCB)
- xcb-xv (XVideo using XCB)
- aa (Ascii ART)
- fb (Linux framebuffer device)
- sdl (Simple DirectMedia Layer)
- dxr3 (Hollywood+ and Creative dxr3, mpeg
video only)
(disabled plugins: sunfb caca directfb directx
stk macos mmal vidix)
* audio driver plugins:
- alsa (ALSA - Advanced Linux Sound
Architecture)
- Jack
- oss (Open Sound System)
- pulseaudio (PulseAudio sound server)
(disabled plugins: CoreAudio directx esd
fusionsound irixal sun sndio)
---
Then we type
make
I also had to delete the occurrences of -Werror-implicit-function-declaration
in the CFLAGS variable in the src/video_dec/Makefile file
then as root
make install
In the file /etc/ld.so.conf we add the lines
/usr/local/lib/xine/plugins/2.8
/usr/local/lib/xine/plugins/2.8/post
Then we type, still as root
ldconfig
Now we unzip the second archive by typing
tar xvf xine-ui-0.99.12.tar.xz
This gives the xine-ui-0.99.12 directory in which we type successively
./configure
make
Then as root
make install
You can launch xine by simply typing
xine
This is the result with the CelomaChrome skin
Xine looks like a living room DVD player
You can find other skins here http://rpm.pbone.net/index.php3/stat/4/idpl/12097414/dir/fedora_1/com/xine-skins-1.8-1.fr.noarch.rpm.html it may be necessary to install it without
dependencies ( urpmi
--allow-nodeps ).
The skins will be found
under /usr/share/xine/skins you will have to copy them under /usr/local/share/xine/skins you just have to unzip them under /usr/local/share/xine/skins .
xine is able to read video files using MPEG1 (VCD) or MPEG2 (SVCD) and even MPEG4 (xvid or DivX) compatible codes. It reads DVDs as soon as you have installed libdvdcss it is no longer necessary to install any plugin ( xine-dvdnav, d4d, d5d, ...) everything is included in xine-lib .
The official site is http://www.mplayerhq.hu/design7/news.html the latest stable version MPlayer 1.5 no longer compiles easily, I went with the subversion snapshot version which you uncompress by typing
tar xvfj mplayer-checkout-snapshot.tar.bz2
This gives the directory mplayer-checkout-2025-02-205. First we will unzip the Windows codecs that we will retrieve in the download section of the site. First we create the home directory:
mkdir /usr/local/lib/win32
In which we copy the codecs
cp essential-20071007.tar.bz2 /usr/local/lib/win32/
Which we uncompress after
having placed ourselves under /usr/local/lib/win32/
tar xvfj
essential-20071007.tar.bz2
In the essential-20071007 directory thus obtained, type
mv * ..
You can now delete the /usr/local/lib/win32/essential-20071007 directory.
Let's go back to the mplayer directory , then type
./configure --language=en --enable-gui
At the end of ./configure we have the main options that will be used for the compilation of MPlayer
Config files successfully
generated by ./configure --language=fr --enable-gui !
Install prefix:
/usr/local
Data directory:
/usr/local/share/mplayer
Config direct.:
/usr/local/etc/mplayer
Byte order:
little-endian
Optimizing for:
native
Languages:
Messages/GUI: fr
Manual
pages: fr
Documentation: fr
Enabled optional
drivers:
Input:
dvdnav ftp pvr tv-v4l2 tv librtmp cddb cdda dvdread vcd dvb
networking
Codecs:
libaom libdav1d libvpx x264 xvid ffmpeg(internal) real xanim
libopus faad2 faac liba52 mpg123 libtheora libgsm speex
libvorbis twolame libmad liblzo OpenJPEG
Audio
output: sndio alsa jack pulse oss v4l2 mpegpes(dvb)
Video
output: v4l2 matrixview opengl pnm jpeg mng mpegpes(dvb)
fbdev aa ggi xvidix cvidix vdpau xv x11 xover yuv4mpeg
md5sum tga
Disabled optional
drivers:
Input:
vstream radio tv-v4l1 tv-dshow live555 nemesi bluray smb
Codecs:
crystalhd libdv libopencore_amrwb libopencore_amrnb qtx
win32 ilbc musepack libdca libmpeg2 toolame gif
Audio
output: sun openal nas esd arts dxr2 sdl
Video
output: zr zr2 dxr3 dxr2 sdl vesa gif89a svga poo winvidix
3dfx xmga dga directfb dfbmga bl xvr100 tdfx_vid wii s3fb
tdfxfb mga
You can type make if you
encounter the error
libao2/ao_jack.c:74:8:
error: unknown type name 'AVFifoBuffer'
74 | static
AVFifoBuffer *buffer;
You will need to retrieve the following patch https://gitlab.archlinux.org/archlinux/packaging/packages/mplayer/-/blob/main/ffmpeg-7.patch which you apply by typing
patch -p0 <
ffmpeg-7.patch
we type make again then as root make install
Now we can retrieve the themes whose default theme is called Blue. We will copy it under /usr/local/share/mplayer/skins
cp Blue-1.13.tar.bz2 /usr/local/share/mplayer/skins
In this directory we then type successively
cd
/usr/local/share/mplayer/skins
tar xvfj Blue-1.13.tar.bz2
ln -s Blue default
It's done we can type MPlayer by typing
gmplayer
And here is the result
The video appears in a separate window and not in the small window. Another view of MPlayer using a skin copying well known player...
MPlayer can play almost all formats (MPEG1, MPEG2, MPEG4,
...), including raw DV format! To play DVDs in the menu (right
click on the display window) DVD->Open a disc, then
DVD->Audio languages->French. It also recognizes ogm
containers and matroska.
It has nothing to do with
video, but MPlayer allows you to listen to the radio! A list of
French-speaking radio stations can be found here https://doc.ubuntu-fr.org/liste_radio_france just choose one and type the link
mplayer http://direct.francebleu.fr/live/fbarmorique-midfi.mp3
We will use vlc
Just type the command
vlc video.avi --sout
'#std{access=udp,mux=ts,dst=192.168.26.50:1234}'
192.168.26.50 is the IP
address of the client station and 1234 is the broadcast port,
on the client station to receive the stream, just type
vlc udp://@:1234
Streaming allows reception on multiple client
stations of a network
vlc video.avi --sout
'#std{access=mmsh,dst=:1234}'
for reception from any
client station, simply type
vlc
mmsh://serveurdiffusion:1234
serveurdiffusion being the name of the broadcast server and 1234 the
broadcast port.
to transcode and then
broadcast in UDP multicast at the address 224.1.0.200 we will
type
vlc video.avi --sout
'#transcode{vcode=mp4v,acodec=mpga,vb=800,ab=128,deinterlace}
:standard{access=udp,mux=ts,dst=224.1.0.200,sap,name="mystream"} '
to simply broadcast in UDP
multicast at the address 224.1.0.200 we will type
vlc video.avi --sout
'#duplicate{dst=standard{access=udp,mux=ts,dst=224.1.0.200,sap,name="mystream"}}'
to read the file just type
vlc udp:@224.1.0.200
the multicast stream can be
stopped by the routers on can add to the broadcast command the
option --ttl X with X corresponding to the number of routers.
You need to launch the video
on demand manager server accessible on the streaming server by
telnet
vlc --extraintf telnet
--telnet-password videolan --rtsp-host
192.168.1.11:1234
the password to the
streaming server will be videolan , its address 192.168.1.11 and the streaming port
1234, we will now add videos. We connect to the server by telnet , the default port being 4212
telnet 192.168.1.11 4212
Trying 192.168.1.11...
Connected to 192.168.1.11.
Escape character is '^]'.
Password:
Welcome, Master
>
to add a video after the
prompt type
> new canal1 vod enabled
setup canal1 input
"/maurice/video/perso/tahiti/danses/danses-marquisiennes-xvid.avi"
to add a second one
> new canal2 vod enabled
setup canal2 input
"/maurice/video/perso/tahiti/dansesmangareva.avi"
Now from a client station to
read canal1 type
vlc
rstp://192.168.1.11:1234/canal1