Computer Tips From A Computer Guy

Computer Tips From A Computer Guy


How to use a HEX editor to determine file type

Posted: 20 Jul 2009 03:16 AM PDT

Most of us don’t know that the filename extension of a video doesn't dictate the codec, but it does determine how the video data is organized in the folders. Of course, there's a chance someone gave your file the wrong filename extension, so before you attempt to repair that video, make sure it has the correct extension.

In this tutorial you will need a hex editor like XVI32 that you can download freely:

XVI32 is a freeware hex editor running under Windows 95, Windows 98, Windows NT, Windows 2000, and Windows XP.

To check whether that .mpg file is really an .mpg file, open the file in a text or hex editor. The header (before the aforementioned 4CC code) will read RIFF if it's an .avi file, RMF if it's an .rm (Real Media) file, MOOV if it's a .mov (Apple Quicktime) file, FLV if it's an .flv (Flash Video) file, or W.M.F.S.D.K if it's a Microsoft .asf or .wmv file. If you see no header (only junk), it's likely an .mpg file.

In the example below I dropped an FLV file into the XVI32 window:

image

The codec information is located at the first line of the display:

image

You should see the codec information no matter what the extension of the file is used.  Pretty cool isn't it?  If you drop an AVI file, you should see the word RIFF AVI on the screen:

image

You can do various things with a HEX editor, but this is one of the more useful applications for typical home and media playing use.

Ben Carigtan shows you how it's done!


Copyright © 2007
Online Tech Tips.
Aseem Kishore (digitalfingerprint: a59a56dce36427d83e23b501579944fcakmk1980 (74.125.44.136) )

Post from:

How to use a HEX editor to determine file type