Tech Notes: Ubuntu 20.04 cannot play video
I made a movie using ffmpeg but I could not play it on Ubuntu 20.04! It turns out that there are some copyright and legal things associated with it. In order to enjoy videos on Ubuntu, you will need the package called ‘Ubuntu Restricted Extras’.
Ubuntu Restricted Extras is a software package for the computer operating system Ubuntu that allows the user to install essential software which is not already included due to legal or copyright reasons.
It is a meta-package that installs:
Support for MP3 and unencrypted DVD playback
Microsoft TrueType core fonts
Adobe Flash plugin
codecs for common audio and video files
(From Wikipedia)
The following steps are from Tiwo Satriatama on YouTube, who posted the whole process in the text content below the video (credit to Tiwo!). I am posting this note based on Tiwo’s note and my installation.
First, check the ‘Community-maintained free and open-source software (universe)’ and ‘Software restricted by copyright or legal issues (multiverse)’ in ‘Software & Updates’ window. As URE will be downloaded from the multiverse.
Second, type the following command in terminal: sudo apt install ubuntu-restricted-extras
. Then you will enter a user agreement interface. Thanks to Tiwo’s note. I spent a few minutes trying to figure out how to click <ok> button in the terminal. This is what you should do: hit the Tab key to select OK, mouse click does not work, hit Enter key, and choose Yes when asked about End User License Agreement.
The process will output the following content on the screen:
(terminal):sudo apt install ubuntu-restricted-extrasReading package lists… Done
Building dependency tree
Reading state information… Done
The following packages were automatically installed and are no longer required:
libfprint-2-tod1 libnvidia-cfg1–440 libnvidia-extra-440 linux-headers-5.4.0–52
linux-headers-5.4.0–52-generic linux-image-5.4.0–52-generic
linux-modules-5.4.0–52-generic linux-modules-extra-5.4.0–52-generic
python3-click python3-colorama
Use ‘sudo apt autoremove’ to remove them.
The following additional packages will be installed:
cabextract chromium-codecs-ffmpeg-extra gstreamer1.0-libav
gstreamer1.0-plugins-ugly gstreamer1.0-vaapi liba52–0.7.4 libaribb24–0
libavcodec-extra libavcodec-extra58 libdvdnav4 libdvdread7
libgstreamer-plugins-bad1.0–0 libmpeg2–4 libmspack0 libopencore-amrnb0
libopencore-amrwb0 libsidplay1v5 libva-wayland2 libvo-amrwbenc0
ttf-mscorefonts-installer ubuntu-restricted-addons unrar
Suggested packages:
gstreamer1.0-vaapi-doc libdvdcss2 sidplay-base
Recommended packages:
gstreamer1.0-fluendo-mp3
The following packages will be REMOVED:
libavcodec58
The following NEW packages will be installed:
cabextract chromium-codecs-ffmpeg-extra gstreamer1.0-libav
gstreamer1.0-plugins-ugly gstreamer1.0-vaapi liba52–0.7.4 libaribb24–0
libavcodec-extra libavcodec-extra58 libdvdnav4 libdvdread7
libgstreamer-plugins-bad1.0–0 libmpeg2–4 libmspack0 libopencore-amrnb0
libopencore-amrwb0 libsidplay1v5 libva-wayland2 libvo-amrwbenc0
ttf-mscorefonts-installer ubuntu-restricted-addons ubuntu-restricted-extras
unrar
0 upgraded, 23 newly installed, 1 to remove and 143 not upgraded.
Need to get 6,589 kB of archives.
After this operation, 5,714 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://us.archive.ubuntu.com/ubuntu focal/universe amd64 libaribb24–0 amd64 1.0.3–2 [26.9 kB]
Get:2 http://us.archive.ubuntu.com/ubuntu focal/universe amd64 libopencore-amrnb0 amd64 0.1.5–1 [94.8 kB]
Get:3 http://us.archive.ubuntu.com/ubuntu focal/universe amd64 libopencore-amrwb0 amd64 0.1.5–1 [49.1 kB]
Get:4 http://us.archive.ubuntu.com/ubuntu focal/universe amd64 libvo-amrwbenc0 amd64 0.1.3–2 [68.2 kB]
Get:5 http://us.archive.ubuntu.com/ubuntu focal-updates/universe amd64 libavcodec-extra58 amd64 7:4.2.4–1ubuntu0.1 [4,880 kB]
Get:6 http://us.archive.ubuntu.com/ubuntu focal/main amd64 libmspack0 amd64 0.10.1–2 [38.0 kB]
Get:7 http://us.archive.ubuntu.com/ubuntu focal/universe amd64 cabextract amd64 1.9–3 [23.4 kB]
Get:8 http://us.archive.ubuntu.com/ubuntu focal/multiverse amd64 ttf-mscorefonts-installer all 3.7ubuntu6 [25.1 kB]
Get:9 http://us.archive.ubuntu.com/ubuntu focal-updates/universe amd64 chromium-codecs-ffmpeg-extra amd64 1:85.0.4183.83–0ubuntu0.20.04.2 [2,968 B]
Get:10 http://us.archive.ubuntu.com/ubuntu focal/universe amd64 gstreamer1.0-libav amd64 1.16.2–2 [123 kB]
Get:11 http://us.archive.ubuntu.com/ubuntu focal/universe amd64 liba52–0.7.4 amd64 0.7.4–20 [30.5 kB]
Get:12 http://us.archive.ubuntu.com/ubuntu focal/universe amd64 libdvdread7 amd64 6.1.0+really6.0.2–1 [49.9 kB]
Get:13 http://us.archive.ubuntu.com/ubuntu focal/universe amd64 libmpeg2–4 amd64 0.5.1–9 [50.7 kB]
Get:14 http://us.archive.ubuntu.com/ubuntu focal/universe amd64 libsidplay1v5 amd64 1.36.59–11build1 [63.6 kB]
Get:15 http://us.archive.ubuntu.com/ubuntu focal/universe amd64 gstreamer1.0-plugins-ugly amd64 1.16.2–2build1 [238 kB]
Get:16 http://us.archive.ubuntu.com/ubuntu focal/universe amd64 libgstreamer-plugins-bad1.0–0 amd64 1.16.2–2.1ubuntu1 [320 kB]
Get:17 http://us.archive.ubuntu.com/ubuntu focal/universe amd64 libva-wayland2 amd64 2.7.0–2 [8,924 B]
Get:18 http://us.archive.ubuntu.com/ubuntu focal/universe amd64 gstreamer1.0-vaapi amd64 1.16.2–2 [323 kB]
Get:19 http://us.archive.ubuntu.com/ubuntu focal/universe amd64 libdvdnav4 amd64 6.0.1–1build1 [39.0 kB]
Get:20 http://us.archive.ubuntu.com/ubuntu focal/multiverse amd64 ubuntu-restricted-addons amd64 26 [3,008 B]
Get:21 http://us.archive.ubuntu.com/ubuntu focal/multiverse amd64 ubuntu-restricted-extras amd64 67 [3,200 B]
Get:22 http://us.archive.ubuntu.com/ubuntu focal/multiverse amd64 unrar amd64 1:5.6.6–2build1 [113 kB]
Get:23 http://us.archive.ubuntu.com/ubuntu focal-updates/universe amd64 libavcodec-extra amd64 7:4.2.4–1ubuntu0.1 [14.8 kB]
Fetched 6,589 kB in 1s (8,007 kB/s)
Preconfiguring packages …
Selecting previously unselected package libaribb24–0:amd64.
(Reading database … 308390 files and directories currently installed.)
Preparing to unpack …/libaribb24–0_1.0.3–2_amd64.deb …
Unpacking libaribb24–0:amd64 (1.0.3–2) …
Selecting previously unselected package libopencore-amrnb0:amd64.
Preparing to unpack …/libopencore-amrnb0_0.1.5–1_amd64.deb …
Unpacking libopencore-amrnb0:amd64 (0.1.5–1) …
Selecting previously unselected package libopencore-amrwb0:amd64.
Preparing to unpack …/libopencore-amrwb0_0.1.5–1_amd64.deb …
Unpacking libopencore-amrwb0:amd64 (0.1.5–1) …
Selecting previously unselected package libvo-amrwbenc0:amd64.
Preparing to unpack …/libvo-amrwbenc0_0.1.3–2_amd64.deb …
Unpacking libvo-amrwbenc0:amd64 (0.1.3–2) …
dpkg: libavcodec58:amd64: dependency problems, but removing anyway as you requested:
libchromaprint1:amd64 depends on libavcodec58 (>= 7:4.0).
libavformat58:amd64 depends on libavcodec58 (= 7:4.2.4–1ubuntu0.1).
libavfilter7:amd64 depends on libavcodec58 (= 7:4.2.4–1ubuntu0.1).
libavdevice58:amd64 depends on libavcodec58 (= 7:4.2.4–1ubuntu0.1).
ffmpeg depends on libavcodec58 (= 7:4.2.4–1ubuntu0.1).(Reading database … 308413 files and directories currently installed.)
Removing libavcodec58:amd64 (7:4.2.4–1ubuntu0.1) …
Selecting previously unselected package libavcodec-extra58:amd64.
(Reading database … 308408 files and directories currently installed.)
Preparing to unpack …/00-libavcodec-extra58_7%3a4.2.4–1ubuntu0.1_amd64.deb …
Unpacking libavcodec-extra58:amd64 (7:4.2.4–1ubuntu0.1) …
Selecting previously unselected package libmspack0:amd64.
Preparing to unpack …/01-libmspack0_0.10.1–2_amd64.deb …
Unpacking libmspack0:amd64 (0.10.1–2) …
Selecting previously unselected package cabextract.
Preparing to unpack …/02-cabextract_1.9–3_amd64.deb …
Unpacking cabextract (1.9–3) …
Selecting previously unselected package ttf-mscorefonts-installer.
Preparing to unpack …/03-ttf-mscorefonts-installer_3.7ubuntu6_all.deb …
Unpacking ttf-mscorefonts-installer (3.7ubuntu6) …
Selecting previously unselected package chromium-codecs-ffmpeg-extra.
Preparing to unpack …/04-chromium-codecs-ffmpeg-extra_1%3a85.0.4183.83–0ubuntu0.20
.04.2_amd64.deb …
Unpacking chromium-codecs-ffmpeg-extra (1:85.0.4183.83–0ubuntu0.20.04.2) …
Selecting previously unselected package gstreamer1.0-libav:amd64.
Preparing to unpack …/05-gstreamer1.0-libav_1.16.2–2_amd64.deb …
Unpacking gstreamer1.0-libav:amd64 (1.16.2–2) …
Selecting previously unselected package liba52–0.7.4:amd64.
Preparing to unpack …/06-liba52–0.7.4_0.7.4–20_amd64.deb …
Unpacking liba52–0.7.4:amd64 (0.7.4–20) …
Selecting previously unselected package libdvdread7:amd64.
Preparing to unpack …/07-libdvdread7_6.1.0+really6.0.2–1_amd64.deb …
Unpacking libdvdread7:amd64 (6.1.0+really6.0.2–1) …
Selecting previously unselected package libmpeg2–4:amd64.
Preparing to unpack …/08-libmpeg2–4_0.5.1–9_amd64.deb …
Unpacking libmpeg2–4:amd64 (0.5.1–9) …
Selecting previously unselected package libsidplay1v5:amd64.
Preparing to unpack …/09-libsidplay1v5_1.36.59–11build1_amd64.deb …
Unpacking libsidplay1v5:amd64 (1.36.59–11build1) …
Selecting previously unselected package gstreamer1.0-plugins-ugly:amd64.
Preparing to unpack …/10-gstreamer1.0-plugins-ugly_1.16.2–2build1_amd64.deb …
Unpacking gstreamer1.0-plugins-ugly:amd64 (1.16.2–2build1) …
Selecting previously unselected package libgstreamer-plugins-bad1.0–0:amd64.
Preparing to unpack …/11-libgstreamer-plugins-bad1.0–0_1.16.2–2.1ubuntu1_amd64.deb
…
Unpacking libgstreamer-plugins-bad1.0–0:amd64 (1.16.2–2.1ubuntu1) …
Selecting previously unselected package libva-wayland2:amd64.
Preparing to unpack …/12-libva-wayland2_2.7.0–2_amd64.deb …
Unpacking libva-wayland2:amd64 (2.7.0–2) …
Selecting previously unselected package gstreamer1.0-vaapi:amd64.
Preparing to unpack …/13-gstreamer1.0-vaapi_1.16.2–2_amd64.deb …
Unpacking gstreamer1.0-vaapi:amd64 (1.16.2–2) …
Selecting previously unselected package libdvdnav4:amd64.
Preparing to unpack …/14-libdvdnav4_6.0.1–1build1_amd64.deb …
Unpacking libdvdnav4:amd64 (6.0.1–1build1) …
Selecting previously unselected package ubuntu-restricted-addons.
Preparing to unpack …/15-ubuntu-restricted-addons_26_amd64.deb …
Unpacking ubuntu-restricted-addons (26) …
Selecting previously unselected package ubuntu-restricted-extras.
Preparing to unpack …/16-ubuntu-restricted-extras_67_amd64.deb …
Unpacking ubuntu-restricted-extras (67) …
Selecting previously unselected package unrar.
Preparing to unpack …/17-unrar_1%3a5.6.6–2build1_amd64.deb …
Unpacking unrar (1:5.6.6–2build1) …
Selecting previously unselected package libavcodec-extra:amd64.
Preparing to unpack …/18-libavcodec-extra_7%3a4.2.4–1ubuntu0.1_amd64.deb …
Unpacking libavcodec-extra:amd64 (7:4.2.4–1ubuntu0.1) …
Setting up libvo-amrwbenc0:amd64 (0.1.3–2) …
Setting up chromium-codecs-ffmpeg-extra (1:85.0.4183.83–0ubuntu0.20.04.2) …
Setting up libdvdread7:amd64 (6.1.0+really6.0.2–1) …
Setting up libsidplay1v5:amd64 (1.36.59–11build1) …
Setting up libmspack0:amd64 (0.10.1–2) …
Setting up unrar (1:5.6.6–2build1) …
update-alternatives: using /usr/bin/unrar-nonfree to provide /usr/bin/unrar (unrar)
in auto mode
Setting up libmpeg2–4:amd64 (0.5.1–9) …
Setting up libaribb24–0:amd64 (1.0.3–2) …
Setting up libgstreamer-plugins-bad1.0–0:amd64 (1.16.2–2.1ubuntu1) …
Setting up liba52–0.7.4:amd64 (0.7.4–20) …
Setting up libopencore-amrwb0:amd64 (0.1.5–1) …
Setting up libva-wayland2:amd64 (2.7.0–2) …
Setting up libopencore-amrnb0:amd64 (0.1.5–1) …
Setting up gstreamer1.0-plugins-ugly:amd64 (1.16.2–2build1) …
Setting up ubuntu-restricted-addons (26) …
Setting up libdvdnav4:amd64 (6.0.1–1build1) …
Setting up cabextract (1.9–3) …
Setting up libavcodec-extra58:amd64 (7:4.2.4–1ubuntu0.1) …
Setting up gstreamer1.0-vaapi:amd64 (1.16.2–2) …
Setting up ttf-mscorefonts-installer (3.7ubuntu6) …
Setting up gstreamer1.0-libav:amd64 (1.16.2–2) …
Setting up ubuntu-restricted-extras (67) …
Setting up libavcodec-extra:amd64 (7:4.2.4–1ubuntu0.1) …
Processing triggers for libc-bin (2.31–0ubuntu9.1) …
Processing triggers for man-db (2.9.1–1) …
Processing triggers for fontconfig (2.13.1–2ubuntu3) …
Processing triggers for update-notifier-common (3.192.30) …
ttf-mscorefonts-installer: processing…
ttf-mscorefonts-installer: downloading http://downloads.sourceforge.net/corefonts/an
dale32.exe
Get:1 http://downloads.sourceforge.net/corefonts/andale32.exe [198 kB]
Fetched 198 kB in 1s (195 kB/s)
ttf-mscorefonts-installer: downloading http://downloads.sourceforge.net/corefonts/ar
ial32.exe
Get:1 http://downloads.sourceforge.net/corefonts/arial32.exe [554 kB]
Fetched 554 kB in 1s (432 kB/s)
ttf-mscorefonts-installer: downloading http://downloads.sourceforge.net/corefonts/ar
ialb32.exe
Get:1 http://downloads.sourceforge.net/corefonts/arialb32.exe [168 kB]
Fetched 168 kB in 1s (267 kB/s)
ttf-mscorefonts-installer: downloading http://downloads.sourceforge.net/corefonts/co
mic32.exe
Get:1 http://downloads.sourceforge.net/corefonts/comic32.exe [246 kB]
Fetched 246 kB in 1s (264 kB/s)
ttf-mscorefonts-installer: downloading http://downloads.sourceforge.net/corefonts/co
urie32.exe
Get:1 http://downloads.sourceforge.net/corefonts/courie32.exe [646 kB]
Fetched 646 kB in 1s (708 kB/s)
ttf-mscorefonts-installer: downloading http://downloads.sourceforge.net/corefonts/ge
orgi32.exe
Get:1 http://downloads.sourceforge.net/corefonts/georgi32.exe [392 kB]
Fetched 392 kB in 1s (416 kB/s)
ttf-mscorefonts-installer: downloading http://downloads.sourceforge.net/corefonts/im
pact32.exe
Get:1 http://downloads.sourceforge.net/corefonts/impact32.exe [173 kB]
Fetched 173 kB in 1s (139 kB/s)
ttf-mscorefonts-installer: downloading http://downloads.sourceforge.net/corefonts/ti
mes32.exe
Get:1 http://downloads.sourceforge.net/corefonts/times32.exe [662 kB]
Fetched 662 kB in 1s (732 kB/s)
ttf-mscorefonts-installer: downloading http://downloads.sourceforge.net/corefonts/tr
ebuc32.exe
Get:1 http://downloads.sourceforge.net/corefonts/trebuc32.exe [357 kB]
Fetched 357 kB in 1s (457 kB/s)
ttf-mscorefonts-installer: downloading http://downloads.sourceforge.net/corefonts/ve
rdan32.exe
Get:1 http://downloads.sourceforge.net/corefonts/verdan32.exe [352 kB]
Fetched 352 kB in 1s (278 kB/s)
ttf-mscorefonts-installer: downloading http://downloads.sourceforge.net/corefonts/we
bdin32.exe
Get:1 http://downloads.sourceforge.net/corefonts/webdin32.exe [185 kB]
Fetched 185 kB in 1s (229 kB/s)These fonts were provided by Microsoft “in the interest of cross-
platform compatibility”. This is no longer the case, but they are
still available from third parties.You are free to download these fonts and use them for your own use,
but you may not redistribute them in modified form, including changes
to the file name or packaging format.Extracting cabinet: /var/lib/update-notifier/package-data-downloads/partial/andale32
.exe
extracting fontinst.inf
extracting andale.inf
extracting fontinst.exe
extracting AndaleMo.TTF
extracting ADVPACK.DLL
extracting W95INF32.DLL
extracting W95INF16.DLLAll done, no errors.
Extracting cabinet: /var/lib/update-notifier/package-data-downloads/partial/arial32.
exe
extracting FONTINST.EXE
extracting fontinst.inf
extracting Ariali.TTF
extracting Arialbd.TTF
extracting Arialbi.TTF
extracting Arial.TTFAll done, no errors.
Extracting cabinet: /var/lib/update-notifier/package-data-downloads/partial/arialb32
.exe
extracting fontinst.exe
extracting fontinst.inf
extracting AriBlk.TTFAll done, no errors.
Extracting cabinet: /var/lib/update-notifier/package-data-downloads/partial/comic32.
exe
extracting fontinst.inf
extracting Comicbd.TTF
extracting Comic.TTF
extracting fontinst.exeAll done, no errors.
Extracting cabinet: /var/lib/update-notifier/package-data-downloads/partial/courie32
.exe
extracting cour.ttf
extracting courbd.ttf
extracting courbi.ttf
extracting fontinst.inf
extracting couri.ttf
extracting fontinst.exeAll done, no errors.
Extracting cabinet: /var/lib/update-notifier/package-data-downloads/partial/georgi32
.exe
extracting fontinst.inf
extracting Georgiaz.TTF
extracting Georgiab.TTF
extracting Georgiai.TTF
extracting Georgia.TTF
extracting fontinst.exeAll done, no errors.
Extracting cabinet: /var/lib/update-notifier/package-data-downloads/partial/impact32
.exe
extracting fontinst.exe
extracting Impact.TTF
extracting fontinst.infAll done, no errors.
Extracting cabinet: /var/lib/update-notifier/package-data-downloads/partial/times32.
exe
extracting fontinst.inf
extracting Times.TTF
extracting Timesbd.TTF
extracting Timesbi.TTF
extracting Timesi.TTF
extracting FONTINST.EXEAll done, no errors.
Extracting cabinet: /var/lib/update-notifier/package-data-downloads/partial/trebuc32
.exe
extracting FONTINST.EXE
extracting trebuc.ttf
extracting Trebucbd.ttf
extracting trebucbi.ttf
extracting trebucit.ttf
extracting fontinst.infAll done, no errors.
Extracting cabinet: /var/lib/update-notifier/package-data-downloads/partial/verdan32
.exe
extracting fontinst.exe
extracting fontinst.inf
extracting Verdanab.TTF
extracting Verdanai.TTF
extracting Verdanaz.TTF
extracting Verdana.TTFAll done, no errors.
Extracting cabinet: /var/lib/update-notifier/package-data-downloads/partial/webdin32
.exe
extracting fontinst.exe
extracting Webdings.TTF
extracting fontinst.inf
extracting Licen.TXTAll done, no errors.
All fonts downloaded and installed.```
Looks like it also downloaded quite some fonts. Now we are all set to play the video!
Bingo!