Compress DVR Online — Free File Size Reducer

Compress DVR recordings by re-encoding them with H.264 video (libx264) and AAC audio, reducing file size while preserving the proprietary DVR container format. Ideal for archiving surveillance or broadcast capture footage without changing the playback format expected by your DVR system.

FFmpeg Command

Copy this command to run the same conversion locally with FFmpeg on your desktop. Download FFmpeg

Free — no uploads, no signups. Your files never leave your browser.

Estimated output:

Conversion Complete!

Download

How It Works

Because both the input and output are DVR files using the same default codecs (libx264 for video, AAC for audio), this tool performs a full re-encode rather than a simple stream copy. The video is decoded and re-encoded using H.264 with a Constant Rate Factor (CRF) of 23, which balances quality and file size by allowing the bitrate to vary based on scene complexity. The audio is similarly re-encoded to AAC at 128k. The net result is a smaller DVR file — surveillance and broadcast recordings are often captured at high bitrates, so re-encoding with a controlled CRF can dramatically reduce storage requirements while keeping the footage watchable and in a format your DVR system can still recognize.

What Each Flag Does

Flag What it does
ffmpeg Invokes the FFmpeg program, the open-source multimedia processing engine that handles all decoding, re-encoding, and muxing operations for this DVR-to-DVR compression workflow.
-i input.dvr Specifies the source DVR file as the input. FFmpeg will read and decode the H.264 video and AAC audio streams stored inside the proprietary DVR container.
-c:v libx264 Re-encodes the video stream using the libx264 H.264 encoder, which is the same codec used by most DVR systems for recording and is required to achieve file size reduction through compression.
-crf 23 Sets the Constant Rate Factor for H.264 encoding to 23, which is the default quality level. This allows the encoder to use lower bitrates for simple scenes (like a static surveillance camera) and higher bitrates only where needed, achieving efficient compression of DVR footage.
-c:a aac Re-encodes the audio stream using the AAC codec, matching the default audio format used in DVR recordings and ensuring compatibility with DVR playback systems that expect AAC audio.
-b:a 128k Sets the audio bitrate to 128 kilobits per second, which is a standard quality level appropriate for voice and ambient audio typically found in DVR surveillance recordings.
output.dvr Specifies the output filename with the .dvr extension, ensuring the compressed result retains the proprietary DVR container format so it can be recognized by DVR playback software and devices.

Common Use Cases

  • Archiving weeks or months of surveillance footage from a DVR system onto a NAS or external drive where storage space is limited
  • Reducing the file size of broadcast capture recordings before transferring them to a secondary DVR or backup device that has smaller storage capacity
  • Compressing older DVR footage to a smaller size for long-term cold storage without converting to a different format that the DVR software cannot read
  • Preparing DVR recordings for review on a laptop or workstation where the original high-bitrate file causes playback stuttering or storage issues
  • Reducing upload time when sending a DVR clip to a legal or insurance professional who requires the footage in its native DVR format
  • Freeing up onboard DVR storage by compressing recently recorded clips before copying them back to the device

Frequently Asked Questions

That depends on how strictly your DVR system validates its proprietary container format. Since the output retains the .dvr extension and uses the same codecs (H.264 video and AAC audio) that DVR systems commonly use internally, many systems will accept it. However, some DVRs embed proprietary headers, timestamps, or metadata in the container that FFmpeg may not preserve perfectly — so test playback on your specific system before bulk-processing important footage.
The reduction depends heavily on the original recording's bitrate and scene complexity. Surveillance footage captured at high constant bitrates (common in DVR systems) often compresses very well with CRF 23, frequently achieving 40–70% file size reduction. Footage with lots of motion — crowded scenes or fast-moving objects — will compress less efficiently than static camera angles with little movement.
CRF 23 is H.264's default quality setting and generally produces visually acceptable results for most surveillance use cases. However, since this is a re-encode of already-lossy footage, there is always some generational quality loss. For footage where fine detail matters — such as reading license plates or identifying faces — consider using a lower CRF value like 18 for higher quality, accepting that the file size reduction will be smaller.
Yes. The -crf flag controls the compression level: higher values mean smaller files but lower quality, and lower values mean larger files but higher quality. The range is 0 (lossless) to 51 (maximum compression). For aggressive compression of surveillance footage where fine detail is less critical, try -crf 28 or -crf 36. For example: ffmpeg -i input.dvr -c:v libx264 -crf 36 -c:a aac -b:a 128k output.dvr
Yes, on the command line you can use a shell loop to process multiple files. On Linux or macOS: for f in *.dvr; do ffmpeg -i "$f" -c:v libx264 -crf 23 -c:a aac -b:a 128k "compressed_$f"; done. On Windows Command Prompt: for %f in (*.dvr) do ffmpeg -i "%f" -c:v libx264 -crf 23 -c:a aac -b:a 128k "compressed_%f". The browser-based tool processes one file at a time, so the FFmpeg command is especially useful for batch operations on large archives.
Stream copying (using -c:v copy) would only work losslessly if the source DVR file's video codec is already H.264 at the desired bitrate — and it would produce no file size reduction at all. The goal of this tool is compression, which requires actually re-encoding the video with a more aggressive quality target. Re-encoding lets H.264's CRF mode discard data the encoder deems visually redundant, which is what achieves the smaller file size.

Technical Notes

DVR is a proprietary container format with vendor-specific implementations, meaning that while FFmpeg can often read and write files with the .dvr extension, the internal structure may vary between manufacturers (e.g., Hikvision, Dahua, Lorex). FFmpeg's DVR muxer writes H.264 video and AAC audio within the container, which are both standard codecs widely used in DVR systems — but proprietary metadata fields such as camera channel IDs, GPS data, or timestamping embedded by the original recorder are unlikely to be preserved. The mjpeg video codec is also supported as an alternative to libx264 if your target DVR system requires Motion JPEG encoding, but it will produce significantly larger files at equivalent quality. The format does not support subtitles, chapters, or multiple audio tracks, so any such streams in the source will be dropped. Since DVR files are typically captured at fixed high bitrates, the variable-bitrate nature of CRF encoding may cause timestamp or sync issues in rare DVR player implementations — if you encounter playback problems, adding -vsync cfr to force constant frame rate output may help.

Related Tools