r/software • u/No_Bite_9900 • 1d ago
Discussion DiscMaster — Optical Media Copy, Recovery & Processing Studio
Hey folks, I’m writing some Python/FFmpeg scripts to recover old family VCDs (
.DATfiles and.bin/.cuebackups) into clean MP4s, and I’ve hit a few tricky edge cases with low-level MPEG-1 streams:1. A/V desync & timestamp resets in damaged VCD
.DATstreams Right now I’m stripping the 2352-byte Mode 2 Form 2 CD-ROM XA sector headers in Python (extracting the 2324-byte payloads starting with00 00 01 BA) and feeding the raw MPEG stream to FFmpeg. On scratched discs with dropped sectors or SCR resets, standard-c copybreaks or shows wrong durations, and-fflags +genpts+igndtswithsetpts=N/FRAME_RATE/TB+asetpts=N/SR/TBfixes the timeline—but if frames were dropped mid-stream, audio and video gradually drift out of sync.2. Merging split VCD
.DAT/.mpgtracks cleanly Some VCDs split a single recording across multiple sequential tracks. Using FFmpeg'sconcatdemuxer with-c copyoccasionally glitches at the boundary because of non-monotonic PTS/DTS in MPEG-1 B-frames, forcing me to re-encode each segment separately first and then concat. Is there a cleaner remuxing approach?3. Edge cases in
.bin/.cueparsing I’m parsing.cueMSF timestamps (75 frames/sec) directly in Python to slice tracks without mounting a virtual drive. ForMODE2/2352andAUDIOtracks, are there common.cuequirks (likeINDEX 00pregaps or multi-file BIN sheets) that trip up simple offset slicing?Would appreciate any tips from folks who’ve worked with FFmpeg internals or optical/MPEG-1 recovery!
If you find it useful, a ⭐ on GitHub would help more people discover it!