How does VLC play archived media files?

How does VLC play archived media files?

How does VLC play archived media files?

Did you know that VLC plays media files that it has first copied on the computer’s file system? This however, applies to files that are contained in archived/compresssed files.

NOTE:// This article is focused on Linux-based operating systems. (Keep in touch with thetqweb, and we’ll focus on VLC-supported, archived media files on Windows OS soon).

This is exactly how it works:
When a media file, supported by VLC is opened directly from an archive manager, by double-clicking it, VLC automatically copies the file to a folder that it creates automatically. The file inside the created folder is named exactly as the file in the archive.

The VLC created folder, follows the following naming format; “.fr-xxxxxx“. The folder itself is stored in the following location:


e.g., /root/.cache/.fr-QUq16/How.To.Locate.VLC.Temporary.Files.mkv

For better understanding, let’s follow the following example;
Let’s assume that we are downloading a video media file from a server somewhere on the internet. The video file is contained in an archive. The name of the archve is, “How.To Locate.VLC.Temporary.Files.rar“, and inside the archive is the video file, “How.To Locate.VLC.Temporary.Files.mkv“.

Now, after downloading “How.To Locate.VLC.Temporary.Files.rar“, you may choose to unarchive it to extract the “How.To Locate.VLC.Temporary.Files.mkv” video file to your location of choice, and play it directly from the extraction location. In that case, the file will be played directly by VLC. The case we want to deal with here, is one where you open the archive with an archive manager, and open the file directly using VLC by double-clicking on the file.

NOTE:// For the 2nd case to be possible, you have to have set VLC as the default media player, or rather set VLC as the media player to open MKV video files.


Now, to VERIFY that VLC first copies the file you opened before playing it;

Step 1

Open the archive containing the MKV file and double-click the video file, and then minimize VLC.
You might note that on double-clicking the file, the archive manager extracts the file automatically. This is an actual extraction that extracts the file at hand to a location, predefined by VLC.

Step 2

Next, navigate to the location; “/username/.cache/“.
While in the location, which you can also view using terminal, look for a folder that is named following the format “.fr-xxxxxx“. Inside this folder, there should be the file with the name; “How.To Locate.VLC.Temporary.Files.mkv“, following the example in this article!

NOTE:// The folder names are randomly generated, and are different each time you open a media file directly from an archive, regardless of if you open the same file on the same VLC session.

NOTE:// Once you close the Archive Manager and not VLC itself, the folder along with the file in it are automatically deleted. However, despite this, VLC can play the file until the end, but produces an error once you try to replay the file!



How does VLC play archived media files?
Hacking | thetqweb