Add .mts (AVCHD), .m2ts (Blu-ray), and AVCHD-ZIP input support#665
Open
EdmundLimBoEn wants to merge 2 commits into
Open
Add .mts (AVCHD), .m2ts (Blu-ray), and AVCHD-ZIP input support#665EdmundLimBoEn wants to merge 2 commits into
EdmundLimBoEn wants to merge 2 commits into
Conversation
FFmpeg's format auto-discovery maps the mpegts demuxer to the ".ts" extension. This leaves .mts files (AVCHD camcorders: JVC, Sony, Panasonic) and .m2ts files (Blu-ray BDMV) unrecognised by the handler, even though FFmpeg can already decode them perfectly. Follows the same pattern used for .wmv (maps to "asf") and .qta (maps to "mov"): push explicit format entries with the correct extension and MIME type (video/mp2t) that delegate to the existing mpegts demuxer. Both formats are input-only (to: false) — converting TO AVCHD transport streams is an unusual workflow and the mpegts muxer entry already covers it via the auto-discovered ".ts" entry. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
On macOS, dragging an AVCHD folder into a browser silently zips the entire package. Users end up uploading a .zip that wraps the BDMV/ STREAM/*.mts file tree rather than the .mts files directly. This new handler unpacks such a ZIP with JSZip, collects every .mts / .m2ts entry (regardless of nesting depth), and emits them as FileData so the graph can route them onward to FFmpeg for conversion. Conversion path added: ZIP (avchd-zip) → MTS → (any video format via FFmpeg) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Three related additions that make AVCHD camcorder footage (JVC, Sony, Panasonic) and Blu-ray rips fully usable in the converter:
mpegtsbut assigns the.tsextension..mtsfiles from AVCHD camcorders go unrecognised. A manual format entry (same pattern as.wmv→asf) mapsmtsto thempegtsdemuxer.src/handlers/avchd.ts) — on macOS, dragging an AVCHD folder into a browser silently zips the entire package. Users end up uploading a.zipwrappingBDMV/STREAM/*.mtsinstead of the files directly. This new handler uses JSZip (already a dependency) to unpack any such ZIP, collect all.mts/.m2tsentries regardless of nesting depth, and emit them asFileDataso the graph routes them to FFmpeg. Conversion path: ZIP → MTS → (any video format).Test plan
.mtsfile directly — should be recognised as "MTS – AVCHD Video" and convert to MP4/WebM/etc..m2tsfile — samePRIVATE/AVCHD/BDMV/STREAM/…) and upload the ZIP — should be recognised and the MTS files extracted for conversion.tsfiles still work (no regression on auto-discoveredmpegtsentry)Notes
🤖 Generated with Claude Code