Convert DVR to MTS — Free Online Tool

Convert DVR security and broadcast recordings to MTS (AVCHD), re-encoding the H.264 video stream into an MPEG-2 Transport Stream container compatible with Sony and Panasonic camcorder workflows. Ideal for importing DVR footage into professional video editors that natively support AVCHD.

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

DVR files typically store H.264 video and AAC audio in a proprietary container format used by digital video recorders. Because the MTS (AVCHD) format uses a strict MPEG-2 Transport Stream container that requires a specific bitstream structure, the video cannot simply be remuxed — it must be re-encoded using libx264 to produce a fully compliant H.264 stream wrapped in the .mts container. The audio is similarly re-encoded from AAC to AAC to ensure proper alignment and framing within the transport stream. The result is a file that AVCHD-compatible software and camcorder editing tools can read natively, with the video quality controlled by the CRF value.

What Each Flag Does

Flag What it does
ffmpeg Invokes the FFmpeg application, the open-source multimedia processing engine that handles all decoding, re-encoding, and container muxing in this conversion. In the browser-based tool, this runs via FFmpeg.wasm compiled to WebAssembly.
-i input.dvr Specifies the input DVR file. FFmpeg will probe the file to detect the proprietary DVR container and extract the internal H.264 video and AAC audio streams for decoding and re-encoding.
-c:v libx264 Re-encodes the video stream using the libx264 encoder, producing an H.264 bitstream that conforms to the AVCHD/MPEG-2 Transport Stream requirements of the MTS output container.
-c:a aac Re-encodes the audio stream as AAC, which is one of the two audio codecs supported in the AVCHD specification for MTS files. This ensures the output audio is correctly framed within the MPEG-2 Transport Stream.
-crf 23 Sets the Constant Rate Factor for the libx264 video encode to 23, the default quality level. For DVR footage — which often contains security camera or broadcast content at moderate bitrates — CRF 23 balances output file size against visual fidelity without significant perceptible degradation from the source.
-b:a 128k Sets the AAC audio output bitrate to 128 kilobits per second. This is well-suited for DVR audio content such as recorded speech or ambient sound from surveillance systems, and matches the typical audio quality of the source material.
output.mts Defines the output filename with the .mts extension, which signals FFmpeg to mux the re-encoded H.264 video and AAC audio into an MPEG-2 Transport Stream container — the format used by AVCHD-compatible camcorders and editing software.

Common Use Cases

  • Import surveillance or DVR security footage into Sony Vegas Pro or Premiere Pro using their native AVCHD import pipelines without additional plugins
  • Archive broadcast-captured DVR recordings in AVCHD format for long-term storage on systems organized around camcorder footage libraries
  • Transfer DVR recordings to a Sony or Panasonic camcorder-based editing workflow where the project format is locked to MTS/AVCHD
  • Prepare DVR footage for playback on Blu-ray authoring software that requires AVCHD-compliant MTS input files
  • Standardize a mixed library of DVR and camcorder recordings into a single MTS format for unified media management
  • Extract usable AVCHD clips from a DVR recording to integrate with other MTS footage shot on a consumer camcorder during the same event

Frequently Asked Questions

Because both the DVR source and the MTS output use lossy H.264 compression, converting between them involves a generation of quality loss — the video is decoded and then re-encoded, which introduces additional compression artifacts. At the default CRF 23, the output is visually close to the source for most DVR footage, but if the source was already encoded at a low bitrate (common in surveillance DVRs), artifacts may become more apparent. Using a lower CRF value like 18 produces higher quality output at the cost of a larger file.
The AVCHD specification and the MPEG-2 Transport Stream container format require video streams to conform to specific profile, level, and bitstream framing requirements. DVR files often store H.264 in a proprietary or non-standard wrapper that does not meet those requirements, meaning a direct stream copy would produce a file that players and editors reject. Re-encoding with libx264 ensures the output is a fully spec-compliant AVCHD stream.
Standard DVR recordings do not support multiple audio tracks or subtitles, so there is nothing to carry over in this conversion. However, the MTS format itself does support multiple audio tracks, so if you later need to add a second audio track (such as a commentary track) you could do so in a post-processing step. Subtitles are also supported by MTS but would need to be added separately since the DVR source has no subtitle data.
Adjust the -crf value to control video quality. CRF operates on a scale where lower numbers mean higher quality and larger file sizes — CRF 18 is considered near-visually lossless for most content, while CRF 28 produces noticeably smaller files with more compression. For DVR surveillance footage, which often contains static backgrounds, values between 20 and 28 are typically sufficient. Replace '23' in the command with your chosen value: for example, '-crf 18' for higher quality output.
Yes. On Linux or macOS, you can run a shell loop such as: for f in *.dvr; do ffmpeg -i "$f" -c:v libx264 -c:a aac -crf 23 -b:a 128k "${f%.dvr}.mts"; done. On Windows Command Prompt, use: for %f in (*.dvr) do ffmpeg -i "%f" -c:v libx264 -c:a aac -crf 23 -b:a 128k "%~nf.mts". This is especially practical for converting a full DVR archive, since the browser-based tool handles one file at a time.
Sony Vegas Pro and Adobe Premiere Pro both support importing MTS files directly via their AVCHD handlers, and an MTS file produced with libx264 and AAC using this command is generally recognized correctly by both. Final Cut Pro expects AVCHD files to be organized inside a specific folder structure (AVCHD/BDMV/STREAM/) rather than as standalone MTS files, so you may need to place the output file in that structure or use a rewrapping tool for FCP compatibility.

Technical Notes

The DVR format is a proprietary container — there is no single universal DVR specification, and different manufacturers (Hikvision, Dahua, standalone set-top DVRs) implement it differently. This means the input file's internal codec may vary, but most modern DVRs encode using H.264 (libx264-compatible) video and AAC audio, which aligns with the codec chain used in this conversion. The MTS output uses the MPEG-2 Transport Stream container, which is inherently a streaming-oriented format with fixed-size 188-byte transport packets — this structure makes MTS more resilient to data corruption than file-oriented containers but also means the container overhead is slightly higher than formats like MP4. Because DVR files do not carry chapter markers, subtitle streams, or embedded metadata beyond basic timing, none of those are preserved (or lost) in this conversion. The audio bitrate default of 128k AAC is appropriate for speech-dominant DVR content like surveillance recordings; for broadcast-captured content with music or complex audio, consider raising this to 192k or 256k. The output MTS file will not be embedded in an AVCHD folder structure, which is fine for most editing applications but may require manual organization for strict AVCHD disc authoring workflows.

Related Tools