@torrent-tv/proxy 2.95.12 → 2.95.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -152,8 +152,12 @@ export function buildRunCommand({
|
|
|
152
152
|
}
|
|
153
153
|
} else {
|
|
154
154
|
args.push("-copyts");
|
|
155
|
-
|
|
156
|
-
|
|
155
|
+
// Audio's output seek removes demux preroll and subtracts that absolute
|
|
156
|
+
// seek from packet timestamps. Restore the published position explicitly;
|
|
157
|
+
// positive copied AAC timestamps alone are not retained by every movenc.
|
|
158
|
+
const offset = audioOnly ? startSeconds : -sourceStartTime;
|
|
159
|
+
if (offset !== 0) {
|
|
160
|
+
args.push("-output_ts_offset", ffmpegSeconds(offset));
|
|
157
161
|
}
|
|
158
162
|
}
|
|
159
163
|
const runEnd = Number.isInteger(endIndex) ? endIndex : -1;
|
|
@@ -175,6 +179,8 @@ export function buildRunCommand({
|
|
|
175
179
|
audioCodecArgs.push("-af", `atrim=start=${ffmpegSeconds(seekAt)}`);
|
|
176
180
|
}
|
|
177
181
|
if (audioOnly === true) {
|
|
182
|
+
// Input seeking locates bytes; copied audio also needs an output trim.
|
|
183
|
+
if (keyframeGrid) args.push("-ss", ffmpegSeconds(seekAt));
|
|
178
184
|
args.push("-vn", "-map", `0:a:${audioSourceTrackIndex}?`, ...audioCodecArgs);
|
|
179
185
|
} else if (servesAudioSeparately) {
|
|
180
186
|
args.push("-an", "-map", `0:v:${videoSourceTrackIndex}?`, ...videoCodecArgs);
|