|
1 | 1 | # ld-process-efm (DEPRECATED) |
2 | 2 |
|
3 | | -**⚠️ DEPRECATED: This single tool has been deprecated and replaced by a suite of specialized tools in `tools/efm-decoder/`. Use `efm-decoder-audio` for standard audio decoding, or other efm-decoder tools for specific use cases.** |
4 | | - |
5 | | -**Eight-to-Fourteen Modulation (EFM) Digital Audio Decoder** |
6 | | - |
7 | | -## Overview |
8 | | - |
9 | | -**Note:** This tool is deprecated. Please use the efm-decoder suite of tools located in `tools/efm-decoder/` for EFM decoding. The functionality of this single tool has been split into multiple specialized tools for better flexibility and control. |
10 | | - |
11 | | -ld-process-efm decodes digital audio data from LaserDisc captures. It processes Eight-to-Fourteen Modulation (EFM) encoded PCM audio data embedded in the RF signal, producing raw audio streams or WAV files. |
12 | | - |
13 | | -## Features |
14 | | - |
15 | | -### EFM Decoding |
16 | | -- **Full EFM Decoder**: Complete digital audio extraction |
17 | | -- **Error Correction**: Reed-Solomon error correction (CIRC) |
18 | | -- **Sync Detection**: Robust frame synchronization |
19 | | -- **Parity Checking**: Data integrity validation |
20 | | - |
21 | | -### Audio Processing |
22 | | -- **Sample Rates**: 44.1 kHz (CD quality) |
23 | | -- **Bit Depth**: 16-bit linear PCM |
24 | | -- **Channels**: Stereo (2 channel) |
25 | | -- **Byte Order**: Configurable endianness |
26 | | - |
27 | | -### Quality Features |
28 | | -- **Error Concealment**: Interpolation of uncorrectable errors |
29 | | -- **Dropout Handling**: Graceful degradation on signal loss |
30 | | -- **Statistics Reporting**: Detailed error and quality metrics |
31 | | -- **Validation**: Audio stream integrity checking |
32 | | - |
33 | | -### Output Formats |
34 | | -- **Raw PCM**: Uncompressed audio stream |
35 | | -- **WAV**: Standard WAV file format |
36 | | -- **Metadata**: Error statistics and quality reports |
37 | | - |
38 | | -## Usage |
39 | | - |
40 | | -### Basic Syntax |
41 | | -```bash |
42 | | -ld-process-efm [options] <input.efm> [output.pcm] |
43 | | -``` |
44 | | - |
45 | | -Or when integrated with ld-decode: |
46 | | -```bash |
47 | | -ld-decode --digital-efm input.ldf output.tbc output.efm |
48 | | -ld-process-efm output.efm output.pcm |
49 | | -``` |
50 | | - |
51 | | -## Options |
52 | | - |
53 | | -#### Common Options |
54 | | -- `-h, --help`: Display help on command-line options |
55 | | -- `-v, --version`: Display version information |
56 | | -- `-d, --debug`: Show debug information |
57 | | -- `-q, --quiet`: Suppress info and warning messages |
58 | | - |
59 | | -#### Audio Output |
60 | | -- `-c, --conceal`: Conceal corrupt audio data (default) |
61 | | -- `-s, --silence`: Silence corrupt audio data |
62 | | -- `-g, --pass-through`: Pass-through corrupt audio data |
63 | | -- `-p, --pad`: Pad start of audio from 00:00 to match initial disc time |
64 | | - |
65 | | -#### Decoder Mode |
66 | | -- `-b, --data`: Decode F1 frames as data instead of audio |
67 | | -- `-D, --dts`: Audio is DTS rather than PCM (allow non-standard F3 syncs) |
68 | | -- `-t, --time`: Non-standard audio decode (no time-stamp information) |
69 | | - |
70 | | -#### Debug Options |
71 | | -- `--debug-efmtof3frames`: Show EFM To F3 frame decode detailed debug |
72 | | -- `--debug-syncf3frames`: Show F3 frame synchronisation detailed debug |
73 | | -- `--debug-f3tof2frames`: Show F3 To F2 frame decode detailed debug |
74 | | -- `--debug-f2tof1frame`: Show F2 to F1 frame detailed debug |
75 | | - |
76 | | -#### Arguments |
77 | | -- `input`: Input EFM file (required) |
78 | | -- `output`: Output audio file (required) |
79 | | - |
80 | | -#### Verbosity |
81 | | -- `-q, --quiet`: Suppress info and warning messages |
82 | | -- `-d, --debug`: Show debug |
83 | | - |
84 | | -### Examples |
85 | | - |
86 | | -#### Basic EFM to PCM |
87 | | -```bash |
88 | | -ld-process-efm input.efm output.pcm |
89 | | -``` |
90 | | - |
91 | | -#### Silence Corrupt Audio |
92 | | -```bash |
93 | | -ld-process-efm -s input.efm output.pcm |
94 | | -``` |
95 | | - |
96 | | -#### Pad Audio to Match Disc Time |
97 | | -```bash |
98 | | -ld-process-efm -p input.efm output.pcm |
99 | | -``` |
100 | | - |
101 | | -#### Decode as Data |
102 | | -```bash |
103 | | -ld-process-efm -b input.efm output.dat |
104 | | -``` |
105 | | - |
106 | | -#### DTS Audio |
107 | | -```bash |
108 | | -ld-process-efm -D input.efm output.pcm |
109 | | -``` |
110 | | - |
111 | | -#### Full Pipeline from RF |
112 | | -```bash |
113 | | -# Decode RF with digital audio |
114 | | -ld-decode --digital-efm disc.ldf video.tbc audio.efm |
115 | | - |
116 | | -# Process EFM to WAV |
117 | | -ld-process-efm --audio-format wav audio.efm audio.wav |
118 | | -``` |
119 | | - |
120 | | -## EFM Technical Details |
121 | | - |
122 | | -### Eight-to-Fourteen Modulation |
123 | | -- **Encoding**: 8 data bits → 14 channel bits |
124 | | -- **Purpose**: DC-free signal, clock recovery |
125 | | -- **Frame Structure**: 588 channel bits per audio frame |
126 | | -- **Sync Patterns**: 24-bit + 3 merge bits |
127 | | - |
128 | | -### Error Correction (CIRC) |
129 | | -- **Method**: Cross-Interleaved Reed-Solomon Code |
130 | | -- **C1 Decoder**: First-level error correction (4 bytes) |
131 | | -- **C2 Decoder**: Second-level error correction (4 bytes) |
132 | | -- **Interleaving**: Delay-based (108 frames) |
133 | | -- **Capability**: Corrects bursts up to ~3900 bits |
134 | | - |
135 | | -### Audio Format |
136 | | -- **Sample Rate**: 44,056 Hz or 44,100 Hz (depends on disc) |
137 | | -- **Quantization**: 16-bit linear PCM |
138 | | -- **Channels**: 2 (Left and Right interleaved) |
139 | | -- **Frame Rate**: 7,350 frames/second |
140 | | - |
141 | | -## Processing Statistics |
142 | | - |
143 | | -When using `--statistics`, ld-process-efm reports: |
144 | | - |
145 | | -``` |
146 | | -EFM Processing Statistics: |
147 | | -========================== |
148 | | -Total frames processed: 735000 |
149 | | -Valid sync patterns: 734980 (99.997%) |
150 | | -C1 errors corrected: 125 (0.017%) |
151 | | -C2 errors corrected: 8 (0.001%) |
152 | | -Uncorrectable errors: 2 (0.0003%) |
153 | | -Concealed samples: 384 (0.00087%) |
154 | | -Output duration: 01:40:00 |
155 | | -Average bitrate: 1411.2 kbps |
156 | | -``` |
157 | | - |
158 | | -### Quality Metrics |
159 | | -- **<0.01% errors**: Excellent quality |
160 | | -- **0.01-0.1% errors**: Good quality, minor issues |
161 | | -- **0.1-1% errors**: Audible artifacts, poor source |
162 | | -- **>1% errors**: Severe problems, check RF capture |
163 | | - |
164 | | -## Error Concealment |
165 | | - |
166 | | -### Methods |
167 | | -1. **Interpolation**: Linearly interpolate between good samples |
168 | | -2. **Previous Sample Hold**: Repeat last good sample |
169 | | -3. **Muting**: Output silence (if concealment disabled) |
170 | | - |
171 | | -### Behavior |
172 | | -- Applied to uncorrectable errors after CIRC decoding |
173 | | -- Conceals up to ~13ms of audio (typical) |
174 | | -- Longer errors result in audible glitches |
175 | | - |
176 | | -## Integration Examples |
177 | | - |
178 | | -### Convert to WAV and Encode |
179 | | -```bash |
180 | | -# Extract digital audio |
181 | | -ld-process-efm --audio-format wav input.efm raw.wav |
182 | | - |
183 | | -# Encode to FLAC (lossless) |
184 | | -flac --best raw.wav -o output.flac |
185 | | - |
186 | | -# Or encode to MP3 |
187 | | -lame -V 0 raw.wav output.mp3 |
188 | | -``` |
189 | | - |
190 | | -### Process Multiple Sides |
191 | | -```bash |
192 | | -# Process side 1 |
193 | | -ld-decode --digital-efm side1.ldf side1.tbc side1.efm |
194 | | -ld-process-efm --audio-format wav side1.efm side1.wav |
195 | | - |
196 | | -# Process side 2 |
197 | | -ld-decode --digital-efm side2.ldf side2.tbc side2.efm |
198 | | -ld-process-efm --audio-format wav side2.efm side2.wav |
199 | | - |
200 | | -# Concatenate |
201 | | -sox side1.wav side2.wav complete.wav |
202 | | -``` |
203 | | - |
204 | | -### Analyze Quality |
205 | | -```bash |
206 | | -# Process with statistics |
207 | | -ld-process-efm --statistics --output-metadata meta.sqlite input.efm output.wav |
208 | | - |
209 | | -# Extract error rate |
210 | | -ld-export-metadata --csv meta.sqlite |
211 | | -``` |
212 | | - |
213 | | -## Troubleshooting |
214 | | - |
215 | | -### Issues |
216 | | - |
217 | | -**No audio output:** |
218 | | -- Verify EFM file is not empty (`ls -lh input.efm`) |
219 | | -- Check that ld-decode used `--digital-efm` option |
220 | | -- Ensure disc has digital audio tracks (not all LaserDiscs do) |
221 | | - |
222 | | -**High error rates:** |
223 | | -- Improve RF signal quality (better connection, cleaning) |
224 | | -- Check for disc damage (scratches, rot) |
225 | | -- Verify proper tracking during capture |
226 | | -- Try recapturing with different settings |
227 | | - |
228 | | -**Sync errors:** |
229 | | -- May indicate wrong sample rate or corrupted EFM file |
230 | | -- Check ld-decode didn't report errors during capture |
231 | | -- Verify file is complete (not truncated) |
232 | | - |
233 | | -**Audible glitches:** |
234 | | -- Normal for damaged discs (physical media errors) |
235 | | -- Consider error concealment if disabled |
236 | | -- May need manual audio repair in editing software |
237 | | - |
238 | | -**Wrong sample rate:** |
239 | | -- Some discs use 44,056 Hz instead of 44,100 Hz |
240 | | -- Use `--sample-rate` to override if needed |
241 | | -- Check disc specifications |
242 | | - |
243 | | -## LaserDisc Digital Audio |
244 | | - |
245 | | -### Format Types |
246 | | -- **PCM Audio**: Highest quality, occupies video lines |
247 | | -- **AC-3 (Dolby Digital)**: Compressed surround (use ld-process-ac3) |
248 | | -- **Analog Audio**: Standard LaserDisc audio (decoded separately) |
249 | | - |
250 | | -### Availability |
251 | | -- Not all LaserDiscs have digital audio |
252 | | -- Common on later discs (1990s+) |
253 | | -- Music discs typically have PCM |
254 | | -- Movies may have AC-3 instead |
255 | | - |
256 | | - |
257 | | - |
| 3 | +**⚠️ DEPRECATED: This single tool has been deprecated and replaced by a suite of specialized tools in `tools/efm-decoder/`. Use `efm-decoder-*` tools for digital audio decoding, and/or other efm-decoder tools for specific use cases.** |
258 | 4 |
|
0 commit comments