What Is a 264 File? How to Open and Convert It
Your DVR saved the footage as a .264 file and nothing will play it. A 264 file holds raw H.264 video straight from a security recorder, with no normal wrapper around it, which is why your media player ignores it. Here is what the format is, how to play a 264 file and how to turn it into an MP4.
A 264 file, also written .h264 or h264, is a raw H.264 video stream exported by a DVR or IP camera. H.264 is the codec also known as AVC. The file most often comes from a Swann, Hikvision, Lorex or an Indian brand like HiFocus or Prama. It is the bare video with no standard container around it, so normal players skip it. To open a 264 file, use the maker's player such as the Swann player or Hikvision VSPlayer, or play it in VLC after setting the H.264 demuxer. To use it anywhere, convert the 264 file to MP4.
Finding a .264 file where you hoped for a video is a common surprise with DVR footage. You copy a clip off the recorder, double-click it, and every player on the computer acts as if the file is not there. The file is fine. It just holds video in a form most players are not set up to read.
What a 264 file actually is
The .264 file format points to a raw H.264 stream, and the .h264 or h264 file is the same thing. H.264, also called AVC or Advanced Video Coding, is the standard way a modern camera or NVR compresses video, so the picture inside is ordinary. What is missing is the container. Normal videos wrap the stream in an MP4 or AVI shell that tells a player the resolution, the frame rate and where each frame starts. A .264 file has none of that. It is the elementary stream on its own.
That is why the file will not just play. A media player opens an MP4 by reading its container first. Handed a bare stream with no container, most players do not know what to do and quietly refuse. The fix is either a player that expects a raw stream, or a conversion that wraps the stream in a proper MP4 container.
264 is not the same as DAV. A .dav file is Dahua's own container, often encrypted. A .264 file is the opposite, a stream with no container at all. Both hold H.264 video, but they fail to open for different reasons and need different fixes.
Which DVRs make 264 files
If your footage is a .264 file, it came from one of these systems. Several of the biggest names in India sit on this format.
| Brand or system | Player |
|---|---|
| Swann | Swann .264 Player, Netviewer, 264-to-AVI converter |
| Hikvision | VSPlayer, inside the iVMS-4200 toolbox |
| Lorex (ECO series) | Lorex video player |
| HiFocus (India) | HiFocus playback, VLC |
| Prama India | VSPlayer (Hikvision-based) |
| Generic and white-label DVRs | Bundled player, or VLC |
Watch for H.264 plus. Hikvision and some others use tuned versions called H.264+ or H.265+ that squeeze the file smaller. These play in VSPlayer or VLC but can trip up a basic converter, so if a tool fails, fall back to the maker's player.
Why your player will not open it
The reasons a .264 file fails come down to that missing container.
- No container to read. Windows Media Player and QuickTime expect an MP4 or AVI shell. A raw stream gives them nothing to work with.
- VLC needs a nudge. VLC can read the stream, but not on its default setting. You have to point it at the H.264 demuxer first.
- No timeline or seek. Even when a raw stream plays, it often has no proper duration or seek bar until it is wrapped in a container.
- Phones and browsers reject it. An Android phone, an iPhone or a web upload will not accept a .264 file, so sharing one means converting it first.
How to open a 264 file
There are three reliable ways to get a .264 file playing, from a dedicated 264 file player to a quick VLC tweak.
- Use the maker's player. Download the Swann player, Hikvision VSPlayer or your brand's player from the official site. These are built for the raw stream and open it straight away. Get them from the maker, since fake surveillance players carry malware.
- Set up VLC. In VLC, open Tools then Preferences, switch the settings view to All, find Input and Codecs then Demuxers, and choose the H264 video demuxer. After that VLC will play the .264 file.
- Try the rename trick. On some files, renaming the extension from .264 to .mpg lets a basic player open it. It does not harm the file, so it is worth a quick test.
How to convert a 264 file to MP4
Getting it to play is just the start. For sharing, editing or long-term storage you need the stream wrapped in an MP4. A free 264 file converter does that, and the routes below keep the timestamp where the maker's tool records it.
- VLC convert. Open VLC, choose Media then Convert or Save, add the .264 file, pick the Video H.264 with MP4 profile and save with an .mp4 name. Keeping the original video track avoids a needless re-encode.
- HandBrake. HandBrake reads a readable .264 stream and outputs a clean MP4, with control over size and quality.
- FFmpeg. For a fast wrap with no quality loss, FFmpeg copies the stream straight into an MP4 container:
ffmpeg -i input.264 -c copy output.mp4. If a player still struggles, re-encode with-c:v libx264instead. - The maker's converter. Swann ships a 264-to-AVI converter, and Hikvision VSPlayer exports to MP4 or AVI from its toolbox. These handle H.264+ files that other tools may refuse.
Keep the quality and the original. Match the output resolution to the source so a face or a plate stays readable, and keep H.264 as the encoder since the stream is already H.264. Convert a copy and leave the original .264 file untouched, which matters if the footage is ever needed as evidence.
Wrap it, do not re-encode it. The cleanest conversion just puts the existing H.264 stream into an MP4 container without touching the video, which is called a stream copy. It is near instant and keeps the original quality. Re-encoding is only needed when a player still refuses the file, and it costs a little quality and time.
When the 264 file is evidence
Surveillance clips routinely go to investigators, insurers or solicitors. A raw .264 file is useless to all of them. An MP4 plays on any laptop or phone and drops straight into a report.
Always export or convert the genuine file instead of capturing your screen as it plays. Screen capture sheds resolution and loses the on-screen time and date, which can cast doubt on the clip later. Keep the untouched .264 beside the MP4 as your reference copy.
Online 264 to MP4 converters and other devices
Plenty of sites offer to convert h264 to mp4 online with nothing to install, and a browser-based h264 to mp4 converter works for a small clip. For surveillance video there is a catch worth knowing.
An online h264 to mp4 converter sends your footage to a server you do not control, and CCTV video often shows people, a home or an incident. When the clip is private or tied to a case, keep it on your own machine and use VLC or the maker's player, so nothing is uploaded. On other devices the rule is simple. VLC on a Mac handles a readable .264 file, a few converter apps cover Android, and for an iPhone the easiest path is to convert on a computer first and copy the MP4 across.
If the 264 file is gone or the drive is dead
Sometimes the trouble is not playing a .264 file but finding one. The clip was deleted, the recorder was wiped or the DVR stopped working before anyone exported it.
In that situation the recordings are usually still held on the DVR disk. DVRXaminer reads that disk in the recorder's own layout, brings back the missing clips and saves them as ordinary playable video, so the raw-stream headache never comes up. See our guide to the full range of CCTV formats for other extensions, and our walkthroughs for recovering footage from a Hikvision DVR or a Swann DVR, the two brands most tied to this format.
Common questions
What is a 264 file?
A 264 file, also written .h264, is a raw H.264 video stream exported by a DVR or IP camera such as a Swann, Hikvision or Lorex. It is the bare video with no standard container around it, which is why normal media players will not open it without help.
How do I play a 264 file?
Use the maker's player, such as the Swann player or Hikvision VSPlayer, which open the raw stream directly. You can also play it in VLC after setting the H264 video demuxer under Tools, Preferences, Demuxers. On some files, renaming the extension to .mpg lets a basic player open it.
How do I convert a 264 file to MP4?
Open VLC, choose Media then Convert or Save, add the .264 file, pick an H.264 MP4 profile and save it with an .mp4 name. HandBrake also converts a readable .264 file to MP4. For a Swann or Hikvision file, the maker's own converter handles it too, including H.264+ variants.
Why will VLC not play my 264 file?
VLC does not read a raw .264 stream on its default setting. Open Tools then Preferences, switch the view to All, go to Input and Codecs then Demuxers, and select the H264 video demuxer. After that VLC plays the file, and you can also use it to convert the file to MP4.
Is h264 the same as a 264 file?
Yes. A 264 file, an .h264 file and an h264 file all mean the same thing, a raw H.264 video stream. H.264 is also called AVC, or Advanced Video Coding. The different spellings come from how each recorder names its export, but the file inside is identical.
How do I convert a 264 file to MP4 without losing quality?
Use a stream copy, which wraps the existing H.264 video in an MP4 container without re-encoding it. In FFmpeg the command is ffmpeg -i input.264 -c copy output.mp4. It is near instant and keeps the original quality, since the video itself is not touched. Only re-encode if a player still refuses the file.
What is the difference between a 264 file and a DAV file?
Both hold H.264 video, but a .264 file is a raw stream with no container, while a .dav file is Dahua's own container that is often encrypted. A 264 file needs a raw-stream player or a wrap into MP4. A DAV file needs Dahua Smart Player or a conversion that can read its container.
Can I recover a deleted 264 file from my DVR?
Usually yes. A wiped clip tends to remain on the DVR disk until newer footage sits on top of it. A tool that parses the recorder's filesystem can rebuild the lost video and save it as a playable MP4, even on a unit that was reformatted or died with no .264 file left.
Lost the footage, not just the format?
If your Swann or Hikvision clip was deleted or the DVR failed, DVRXaminer reads the drive directly, recovers the footage and exports it as playable video. Run the free trial to see what is on the drive.
Sources
- Swann and Hikvision player and .264 format documentation
- VLC H.264 demuxer and conversion references, 2026
- DVRXaminer testing on Swann, Hikvision and HiFocus recordings