@milkstraw/traceframe 0.5.0 → 0.5.1
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 +1 -1
- package/src/render.mjs +2 -1
package/package.json
CHANGED
package/src/render.mjs
CHANGED
|
@@ -87,7 +87,8 @@ export function buildFilterScript({ trace, scale, audio }) {
|
|
|
87
87
|
const trim = number(Math.max(0, -audio.offset))
|
|
88
88
|
const delay = number(Math.max(0, audio.offset) * 1000)
|
|
89
89
|
// Reset the selected stream before trimming: its first sample may start after the container's video.
|
|
90
|
-
filters.
|
|
90
|
+
// Preserve real gaps before sample-count filters, tolerating normal recorder timestamp jitter.
|
|
91
|
+
filters.push(`[${input}:a:0]asetpts=PTS-STARTPTS,aresample=async=1:min_hard_comp=0.02,atrim=start=${trim},asetpts=PTS-STARTPTS,adelay=${delay}:all=1,apad[finalAudio]`)
|
|
91
92
|
}
|
|
92
93
|
return filters.join(';')
|
|
93
94
|
}
|