How is windows media player able to play files it dosent even recognize?

Maximilian

Lifer
Feb 8, 2004
12,604
15
81
For example it can play a .cxf file or a .bag file just fine. How is it able to do this if it dosent even recognize the file extension? Try opening a document or something in office that office dosent recognize and it spits out gibberish, yeah music is different from text i know but i still dont get why WMP can play these random file extensions.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Most files have a header in them that tell what kind of file it is, A/V files have to have this since there's so many different kind of codec combinations possible.

For example, if I run this

$ file chl-communicate.blah
chl-communicate.blah: RIFF (little-endian) data, WAVE audio, MPEG Layer 3, mono 22050 Hz

The file command can tell that the file is wave file using MP3 compression even though I changed the extension. If you don't have the correct codec installed you'll have issues, but otherwise it'll play fine.
 

Crusty

Lifer
Sep 30, 2001
12,684
2
81
Because file extensions don't determine what kind of file it is, the data does :)