An H.264 file is a video file encoded via the H.264 compression method and provides high-quality videos in relatively lower bitrates. It is by far the most commonly used format for the recording, compression, and distribution of CCTV content.
Almost all of the CCTV systems make use of the H.264 codec and these files are common on IP cameras, DVR, NVR, etc. Many users struggle to find a way to play their H.264 video security files on a PC. They try to use generic CCTV video players with no luck, the H.264 video doesn’t play at all, or starts and then stops.
Why doesn’t your player open the H.264 DVR files? Why does the video player say H.264 file is not supported or codecs missing?
In this article, we will show how to play H.264 files from your CCTV camera or DVR or NVR using the VLC player and how to convert H.264 video files to MP4 format. By default the VLC video player doesn’t play the H.264 files, so we need to make some adjustments to the settings.
NOTE: Consult this article if you want to stream an IP camera via VLC player: How to play RTSP Video Stream of Security Cameras in VLC media player.
How to play H.264 files on VLC player
If you have the CCTV camera videos in H.264 video format, how can you play these H.264 videos in VLC player on Windows or Mac computer? Here’s the step-by-step guide on how to play H.264 videos on VLC player.
Step 1. Download the latest VLC version here and have it installed on your computer.
Step 2. Launch VLC media player. Go to Tools and then click Preferences.
Step 3. Tick All to show all the Settings.
Step 4. Select “H264 video demuxer” from the Demux module. Next click Save to apply the new settings.
Step 5. That’s all. Now you can open up and play/view the H.264 files in the VLC media player. The problem is that the VLC player doesn’t play the NVR or DVR H.264 videos right away, you need to enable the option and all will play accordingly.
Troubleshooting tips if VLC is not playing H.264 files
Is the H.264 video still not playing on VLC? Does it say it cannot decode this video format? If you’re still having problems and you can’t play H.264 videos on VLC player, try the following troubleshooting tips that may help to fix the issues:
- Update your VLC media player to the latest version and make sure to update VLC codecs. Always download the latest version from the VLXC website.
- Force H.264 demuxer in VLC preferences. Go to Tools > Preferences > Show settings, click All > Input/Codecs \ Demuxers: Demux module [H264 video demuxer].
- Convert H.264 files to the MP4 format (read the instructions in the next section). In other words, if the H.264 video is not playable, you can convert it to another format that can be played with any regular video player (VLC, Windows Media Player, etc).
- Sometimes renaming the file extension to .mpg does the trick. Try it and see if it plays on VLC.
Another way to play H.264 videos is by using your camera or DVR’s video player. Almost all CCTV manufacturers support their own native video players that can be installed on your computer and you can use them to play the videos backed up from the camera or the recorder.
Sometimes the videos are encrypted and can be played using only specific files. Check your user guide or with the manufacturer to find out which player they use for their equipment. Or just google the device’s model or brand and see the results.
How to convert H.264 files to MP4
Another way to play H.264 videos on VLC is to convert H.264 files to MP4 format first, and then play your CCTV videos on the VLC media player. However, nowadays most CCTV manufacturers provide built-in converters, so when you export the videos you can choose to backup straight yo MP4 format.
Here are the steps to convert H.264 files to MP4:
Step 1. Use a free video converter such as VSDC Free Video Converter or Subler. Download it and install it on your computer. (Check the section below if you want to use another video converter called HandBrake).
Step 2. Click “Add files” and add the H.264 files that you need to convert. Choose “MP4” as the video format you want to convert to.
Step 4. Click Convert, wait until it’s done, and then Save.
After you’re done converting the H.264 files to MP4 format, you will be able to play and view the videos in the VLC player.
How to convert DVR or camera H.264 videos using HandBrake
HandBrake is a popular and reliable video converter that can convert almost all the video formats in the market including raw video from various DVRs, NVRs, or IP cameras. The software is free to download and open-source as well.
Start backing up the security recordings via the DVR or NVR. These files can be copied to your computer via a USB thumb drive or downloaded via the application used to remote view your DVR. So, have the video files ready on PC.
Get and install the latest version of HandBrake. After the installation is done, the shortcut should appear on the desktop, run it. Then select the File on the Source Selection tab to pick the H.264 file to be converted.
Select a Destination file and folder. Additionally, you can do other adjustments if necessary such as frame rate, size, the converted resolution, etc. It’s up to you, you’ll be fine if you live the default ones.
On the Preset field, select Fast 1080p30 which is an MP4 video format and can be converted fast without decreasing the image quality (you can explore the other options as well). Hit Start Encode to convert the video.
Wait until the conversion is done (it depends on the size and length of the footage). Once done, the file will be saved on the destination folder and be played with any generic and regular video players such as VLC, Mac Players, Windows Media Player, etc.