1

I do have few file formats like .tgpp or .flv or .webm.

If I change the file format of a file manually, let say for example from exampleFile.tgpp to exampleFile.mp4V or exampleFile.mp4 it still work. I mean, I can still play it on VLC.

Same with:

  • exampleFile.flv to exampleFile.mp4

or

  • exampleFile.webm to exampleFile.mp4

But my questions are:

  • How do I know, if they are compatible to do this, without trying my self. Is there something, that I can base on it or a website, which can tell me that?

  • Is there a quality problem, if I do like this?

  • I know that File extensions such as .flv, .webm or tgpp don't really have anything to do with the file format. They are just a hint at the file's content. The file itself must conform to the correct format for what you want to achieve. But why does it not work, if I remove the extensions from a file. I mean, a file named like this exampleFile is not working on VLC. Same file with exampleFile.mp4 it is.

  • 3
    The only thing I can think to ask is, "Why on earth would you want to?" Most of those are containers, so may contain several file types, but why would you want to make the player's job more difficult by having to figure out what's going on inside a mis-labelled container? – Tetsujin Jan 3 '19 at 19:04
  • @Tetsujin That is a legitimized question, but don't really answer my question. But even that, here the answer: I do have an app, where I do make a call to a source. This source response different files, like .flv, .webm or tgpp. In my front end (for the end-user) I would like to tell them not about this exstensions. Better I would like to tell them, hey there is a MP4 format file. This, because this format is more known. But thats why, my question is, is there a difference? – Baku Bakar Jan 3 '19 at 19:09
  • Please do not substantially expand or change the question after it was answered. Ask a separate question. – Kamil Maciorowski Jan 3 '19 at 19:42
  • The question seems somewhat Windows-centric. VLC is also available in Linux, where extensions hardly matter. Compare: How does Linux know what app to use to open a file? – Kamil Maciorowski Jan 3 '19 at 20:06
4

Two main reasons this works are:

  1. The files are all the same basic type (multi-media) and handled by the same application (multi-media player) and there is often identifying information inside the file that more accurately identifies it to the reading application. You aren't changing that internal data by renaming the file.

  2. Multi-media file types are actually containers, and are, in fact, called that. They typically contain audio and video information in discrete packages, along with supporting data such as text. Different containers can hold the same audio and video types, so changing the container, especially considering the first point above, is a minor change.

BUT, the fact that multi-media file types are containers is also why there can be times where a specific container type (say, mp4) may work in one place but not in another. If the player application does not support the things INSIDE the container, it will experience issues or fail to play the media.

So, to answer your questions:

  • There isn't a way to know, except to try. And referring to point 1 above, you aren't actually doing anything of any substance renaming a file. You're just renaming it. You could rename the file to .xxx and then right-click on it and tell VLC to open it and it would play the file just fine.

  • You aren't changing anything about the file, you're just renaming it. This in NO way corresponds at all to re-encoding the file in any way. You aren't changing the inside of the file and so you're not messing with the quality.

  • To run examplefile you'll have to right-click on it and tell VLC to open it, and VLC will probably do so just fine. The parts of the name after the ".", called the file extension, just serve to tell the OS which program you'd like to handle that file by default, and which other programs are allowed to try.

  • @music2myaer Ahh okay, I didn't know that. Thank you for your answer. OK, so this gives me a new quesiton, which you can maybe answer me too. So lets say, if I would have do have a mp4 file and tgpp file. How can I determine, on which quality they are the best? Is there a header information that I can base on it? I mean, which tag does tell me, hey, this file / URL has a video with the best quality or hey, this file / URL has a video with the lowest quality – Baku Bakar Jan 3 '19 at 19:17
  • 4
    This is not a forum. If you have a new question, please create a new question so that your question can be answered and the answers can be noted as such. If this answers your question, please use the appropriate button to indicate that is the case. – music2myear Jan 3 '19 at 19:19
  • 1
    @EmbaBakar Use comments to ask for more information... is rather for users (potential answerers) to ask you questions, so you know what information is needed from you to answer your question, so you can edit the question, make it less broad and answerable. Not the other way around. Please take our short tour to learn how the site works. – Kamil Maciorowski Jan 3 '19 at 19:47
  • 1
    @EmbaBakar Stack Exchange is meant for finding answers to questions—that is what sets it apart from a traditional forum. Yes, the answered may want that extra rep, but it helps visitors find the answer to their questions they might have, especially ones for fixing problems. – juniorRubyist Jan 3 '19 at 21:03
1

A file format is can be is usually determined by looking at the first bytes of a file (aka header). An example of this is the PDF header—the %PDF-1.7 line.

%PDF-1.7
1 0 obj
  << /Type /Catalog
     /Pages 2 0 R
  >>
endobj

2 0 obj
  << /Type /Pages
     /Kids [3 0 R]
     /Count 1
  >>
endobj
…

Another method of determining format is storing the format in the file system directory table—the place where the file names are saved. Classic Mac OS used 4-character “creator codes”, while other file systems save similar codes.

Files like Word documents are actually .zip archives with certain files inside. Other files, like XML, JSON, source code, CSV, etc. are determined simply by looking at their contents; those are simply structured text files.

You can read all about file formats on Wikipedia.

Essentially, file extensions mean absolutely nothing about the file. It just helps the user & OS quickly identify the file. Renaming a file extension may also make the file open in another app, but it is ultimately up to the app to identify the format.

As music2myear said, media files have other data inside (namely video & audio), so if the player can’t open that other data, it just can’t.

  • Thank you for your answer. But how can I know which file do have more quality? Is there a special header information, which is telling me that? Let say its a video from web. One of them is MP4 and the other one is TGPP. – Baku Bakar Jan 3 '19 at 19:38
  • You can open them in VLC and look at the video information. – juniorRubyist Jan 3 '19 at 19:57
  • 'can' in this should probably be replaced with 'is usually' A vast majority of applications that handle multiple file types look at the file contents, and only fall back to extensions or MIME types if they absolutely need to, simply because it works a lot more reliably. – Austin Hemmelgarn Jan 3 '19 at 20:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.