Tool
If a .h264 or .264 file exported from a DVR or NVR won’t open in your player, or opens but plays like fast-forward or like slow motion, the file is often a ‘raw stream’: picture data strung together with no container. Pick the file and the tool reads the resolution, profile and level written inside it, the frame count and the clues for fps, and builds the ffmpeg command that moves it into an MP4. The file is read only inside this browser.
Choose a .h264 / .264 file
The file is never uploaded. It is only read from start to end inside this browser (the video is not played or decoded). The synthetic sample is a fake byte sequence that matches the structure only; it is not a video.
A container such as MP4 or MKV holds a timetable that says when each frame should be shown. A raw H.264 stream (Annex B format) has no such table, only chunks of data (NAL units) separated by 00 00 01 start codes. So the player or converter has to decide on its own how many frames per second there are. ffmpeg assumes 25 fps for raw H.264 input unless you say otherwise (the default of the framerate option in the ffmpeg documentation). If a file was actually recorded at 15 fps and is assumed to be 25 fps, the same number of frames goes by in less time, so it looks like fast-forward.
num_units_in_tick and time_scale at the end of the SPS. The fps is time_scale ÷ (2 × num_units_in_tick). Some encoders are known not to include this information, so when it is missing the tool shows ‘none’.first_mb_in_slice equal to 0 are counted as the start of a frame. A file whose frames are split into several slices is still counted once per frame.Note: a DVR that stores frames only when there is motion doesn’t have a constant number of frames per hour (variable fps). A file like that has the wrong speed in some sections no matter which single fps you convert with. This tool can’t know the time of each frame, so it can’t tell that case apart; the most you can do is guess from whether the fps worked out from the length is far from a common value.
ffmpeg -framerate 15 -i "input.264" -c copy "input.mp4"
-framerate 15: sets the fps of the raw H.264 input. Put it before the input file.-c copy: moves the picture data into an MP4 box without re-encoding it. There is no quality loss and the size stays almost the same.ffprobe. If the length is right, the fps is right too.If the converted MP4 won’t play on a device, the profile or bit depth may be the cause, so paste the ffprobe output into the playability checker to find out. You can compare the level needed for the resolution and fps with the H.264/HEVC level calculator, and you can see the details of the finished file in the video file info inspector. How long a CCTV system can keep its footage is calculated from this site’s measurements by the CCTV/NVR storage calculator. This analyzer doesn’t deal with bitrate or quality numbers.