Troubleshooting Common tsMuxeR Errors with Transport Stream muxertsMuxeR (Transport Stream muxer) is a lightweight, widely used tool for multiplexing/demultiplexing video, audio, subtitles and chapters into MPEG-TS, M2TS (Blu-ray) and other container formats. Because it deals directly with stream formats and codec parameters, users commonly run into problems ranging from simple configuration issues to codec/container incompatibilities. This article walks through the most frequent errors, how to diagnose them, and practical fixes.
1. Installation and basic environment checks
Before troubleshooting specific errors, confirm the basics:
- Ensure you’re using a recent tsMuxeR build (bug fixes and codec updates appear in newer releases).
- Verify the binary you downloaded matches your OS (Windows x64, Linux, or macOS).
- Check file permissions: the input files must be readable and output location writable.
- Confirm dependent codecs and tools (if you use external encoders) are installed and in PATH.
If tsMuxeR doesn’t launch at all, try running it from a terminal/command prompt to capture stdout/stderr — error text there often points to missing libraries or incorrect platform build.
2. “Invalid file” or “Unsupported stream” errors
Symptoms:
- tsMuxeR reports that an input file is invalid or shows “unsupported stream” for certain tracks.
Causes and fixes:
- Corrupt or incomplete source files. Verify by playing the file in VLC or ffmpeg:
- Use ffmpeg to inspect: ffmpeg -i input.ext
- Unsupported codec format (e.g., uncommon profiles of HEVC, AV1, or certain audio codecs). tsMuxeR supports common H.264/HEVC/VC-1 and typical audio (AC3, DTS, AAC), but may not support some variants or wrappers.
- Remux or re-encode using ffmpeg to a supported codec/container:
- Example to rewrap video: ffmpeg -i input.mkv -c copy -map 0:v -map 0:a output.mp4
- Example to re-encode audio to AC3: ffmpeg -i input.mkv -c:v copy -c:a ac3 output.mkv
- Remux or re-encode using ffmpeg to a supported codec/container:
- Strange container wrappers (e.g., some MKV features). Remux with mkvmerge or ffmpeg to a simpler container then try tsMuxeR again.
3. Incorrect timestamps / A/V sync drift
Symptoms:
- Audio is progressively ahead or behind video after remuxing.
- Playback stutters or jumps at certain timestamps.
Causes and fixes:
- PTS/DTS issues in the source or during remux. tsMuxeR typically preserves timestamps but can be sensitive to malformed streams.
- Solution steps:
- Use ffmpeg to re-encode or remux while forcing correct timestamps:
- ffmpeg -i input.ext -c copy -avoid_negative_ts make_zero output.ts
- If audio stream sample rate or frame rate flags are wrong, re-encode audio to a stable codec (AC3) or force sampling rate:
- ffmpeg -i input.ext -c:v copy -c:a ac3 -ar 48000 output.m2ts
- For complex cases, re-encode short problematic portions and then remux.
- Use ffmpeg to re-encode or remux while forcing correct timestamps:
4. Codec/profile compatibility errors with Blu-ray (M2TS)
Symptoms:
- tsMuxeR complains or Blu-ray authoring tools reject the generated M2TS.
Causes and fixes:
- Blu-ray requires strict codec profiles and parameters:
- H.264 must be within Blu-ray profile constraints ([email protected] or similar); HEVC/AVC settings must meet Blu-ray spec.
- Audio codecs should be AC3, E-AC3 or LPCM (and follow channel/sample-rate rules).
- How to produce Blu-ray-compliant streams:
- Re-encode video to H.264 with constrained parameters:
- ffmpeg -i input -c:v libx264 -profile:v high -level 4.1 -pix_fmt yuv420p -b:v
-x264opts keyint=24 output_h264.mp4
- ffmpeg -i input -c:v libx264 -profile:v high -level 4.1 -pix_fmt yuv420p -b:v
- Convert audio to AC3 48 kHz:
- ffmpeg -i input -c:a ac3 -ar 48000 -b:a 640k output_ac3.mkv
- Re-encode video to H.264 with constrained parameters:
- After ensuring compliance, remux with tsMuxeR and validate with a Blu-ray validator or playback on a Blu-ray player.
5. Subtitles and chapters not appearing / wrong encoding
Symptoms:
- Subtitles don’t show, positioning is off, or special characters are garbled.
- Chapters aren’t recognized in the output.
Causes and fixes:
- Subtitle format incompatibility: tsMuxeR expects supported subtitle types (PGS for Blu-ray, SSA/ASS may not be supported for certain targets).
- Convert subtitles:
- For PGS (sup) convert from ASS/SSA using Subtitle Edit or ffmpeg with appropriate filters, or create SUP images for Blu-ray.
- For text-based output (e.g., MKV) ensure correct encoding (UTF-8 vs CP1251). Convert text encoding if characters are garbled.
- iconv -f CP1251 -t UTF-8 subs.srt > subs_utf8.srt
- Convert subtitles:
- Chapters: make sure the chapter file is in a supported format (simple text chapter list or XML) and correctly referenced in the tsMuxeR job. If using GUI, ensure the chapters box is checked.
6. Output file won’t play on target device
Symptoms:
- Output plays on PC but not on TV, set-top, or Blu-ray player.
Causes and fixes:
- Device-specific playback limitations (resolution, framerate, codec profiles, bitrate ceilings).
- Check device specs and adapt:
- Reduce bitrate or resolution to device-supported maxima.
- Use accepted container/codec combos (e.g., M2TS with H.264 @ compatible level + AC3 audio for many Blu-ray players).
- Test with a known-good sample that plays on the device, then mirror its parameters (container, codecs, resolution, framerate, bitrate).
7. “Stream has no PES headers” or “error parsing” messages
Symptoms:
- tsMuxeR prints parsing errors referencing PES headers, PCR, or PID tables.
Causes and fixes:
- Broken or nonstandard transport stream structure (corrupted TS or produced by nonstandard muxer).
- Try remuxing or regenerating TS with ffmpeg:
- ffmpeg -i bad.ts -c copy -map 0 -f mpegts repaired.ts
- If the source has missing PCR/PTS info, re-encode or use ffmpeg’s timing fixes (see avoid_negative_ts above).
8. GUI vs CLI differences (Windows quirks)
Symptoms:
- Job works in tsMuxeR CLI but not in the GUI, or vice versa.
Causes and fixes:
- GUI may retain stale settings or paths; CLI uses explicit command-line flags.
- Use the GUI’s job list to inspect generated command lines, or run the equivalent command in a terminal to see errors.
- On Windows, run tsMuxeR as Administrator if writing to protected folders.
9. Large file size or bitrate issues after muxing
Symptoms:
- Output file much larger than expected or bitrate spikes.
Causes and fixes:
- Remuxing with copying codecs shouldn’t change bitrate significantly; unexpectedly large sizes often result from re-encoding or incorrect muxer options.
- When re-encoding, explicitly set bitrate/CQ settings:
- ffmpeg -i input -c:v libx264 -crf 18 -preset medium -b:v 4M -maxrate 5M -bufsize 10M output.mp4
- For MPEG-TS containers, overhead can add size. Use appropriate settings and validate bitrate with MediaInfo.
10. Best-practice troubleshooting checklist
- Reproduce the issue with a short sample clip (trim with ffmpeg: ffmpeg -ss 00:00:00 -t 00:00:30 -i input -c copy sample.ext).
- Inspect streams: ffmpeg -i sample.ext and MediaInfo for codec/profile details.
- Try remuxing to a simple container (MP4 or MKV) and then run tsMuxeR.
- Re-encode only the problematic stream (e.g., audio) rather than whole file.
- Run tsMuxeR from terminal to capture exact error messages.
- Keep a copy of original timestamps and logs for deeper analysis.
Conclusion
Most tsMuxeR issues stem from codec/container mismatches, malformed timestamps, or device-specific constraints. Using diagnostic tools (ffmpeg, MediaInfo), testing with a short sample, and selectively remuxing or re-encoding problematic streams will solve the majority of problems. When all else fails, consult tsMuxeR changelogs and user forums for bug reports tied to specific builds or formats.
Leave a Reply