I was not able to view built-in videos on twitter and other websites so I wanted to install ffmpeg. I ran the command snap install ffmpeg and it didn't work but after running the command sudo apt-get install ffmpeg it installed too many files and it worked. What is the difference here?
Below distinction will not explain the issues you experienced installing ffmpeg.
Snaps are self-contained applications running in a sandbox with mediated access to the host system.
The snaps are furthermore mounted as loopback filesystems.
Packages installed from Ubuntu repositories
Packages installed via aptitude (e.g.
apt-get install command) can require and result in further dependencies being separately installed.
See this technical comparison for a detailed explanation.
For the end user, the most important issue is the available version.
Here is the latest version of
ffmpeg as a deb package.
$ apt policy ffmpeg ffmpeg: Installed: 7:3.4.8-0ubuntu0.2 Candidate: 7:3.4.8-0ubuntu0.2 Version table: *** 7:3.4.8-0ubuntu0.2 500 500 http://es.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages 500 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 Packages 100 /var/lib/dpkg/status 7:3.4.2-2 500 500 http://es.archive.ubuntu.com/ubuntu bionic/universe amd64 Packages
Here is the snap package,
$ snap info ffmpeg name: ffmpeg summary: A complete solution to record, convert and stream audio and video. publisher: Snapcrafters store-url: https://snapcraft.io/ffmpeg contact: https://github.com/snapcrafters/ffmpeg/issues license: GPL-3.0+ description: | FFmpeg is the leading multimedia framework, able to decode, encode, transcode, mux, demux, stream, filter and play pretty much anything that humans and machines have created. It supports the most obscure ancient formats up to the cutting edge. No matter if they were designed by some standards committee, the community or a corporation. This snap is maintained by the Snapcrafters community, and is not necessarily endorsed or officially maintained by the upstream developers. snap-id: Ee7LGphwQR669pcfCCdl0oJQouta69to channels: latest/stable: 4.3.1 2020-11-08 (1286) 83MB - latest/candidate: ↑ latest/beta: ↑ latest/edge: 4.3.1 2021-03-04 (1297) 123MB -
Therefore, the snap package of
ffmpeg is at version 4.3 (2021-02-20). The deb package of
ffmpeg is at version 3.4 (2020-07-04).
A side-effect of security for the snap package, is that you cannot play video files from
/tmp/. Just that issue.