@@ -30,7 +30,8 @@ describe("buildPadTrimAudioArgs", () => {
3030 expect ( plan . steps ) . toHaveLength ( 1 ) ;
3131 const args = plan . steps [ 0 ] ! . args ;
3232 expect ( args [ args . indexOf ( "-i" ) + 1 ] ) . toBe ( "/tmp/in.aac" ) ;
33- expect ( args [ args . indexOf ( "-af" ) + 1 ] ) . toBe ( "apad=whole_dur=5.000000" ) ;
33+ expect ( args [ args . indexOf ( "-af" ) + 1 ] ) . toBe ( "apad,atrim=0:5.000000" ) ;
34+ expect ( args . join ( " " ) ) . not . toContain ( "whole_dur" ) ;
3435 expect ( args [ args . indexOf ( "-t" ) + 1 ] ) . toBe ( "5.000000" ) ;
3536 expect ( args [ args . indexOf ( "-c:a" ) + 1 ] ) . toBe ( "aac" ) ;
3637 // The single-step filter plan has no intermediate artifacts to clean up.
@@ -92,13 +93,9 @@ describe("buildPadTrimAudioArgs", () => {
9293 expect ( trimNeeded . operation ) . toBe ( "trim" ) ;
9394 } ) ;
9495
95- it ( "uses apad for Windows-safe duration normalization" , ( ) => {
96- // Regression pin for field-signal reports ts=1784169914 / 1784177061 /
97- // ts=1784177375 (win32/x64, CLI 0.7.59, ffmpeg 8.1.1-full_build). The
98- // concat demuxer's file open on Windows in FFmpeg 8.x rejects
99- // `file:///C:/…` URLs with "Impossible to open …". The concat script
100- // MUST use bare paths. Match sibling `assemble.ts` /
101- // `chunkEncoder.ts` conventions.
96+ it ( "uses the portable apad/atrim filter for Windows duration normalization" , ( ) => {
97+ // Bundled Windows FFmpeg builds reject `apad=whole_dur`. Match the
98+ // portable finite-padding shape used by the main audio mixer.
10299 const winPlan = buildPadTrimAudioPlan (
103100 "C:\\Users\\alice\\AppData\\Local\\Temp\\hf-render-abc\\audio.aac" ,
104101 "C:\\Users\\alice\\AppData\\Local\\Temp\\hf-render-abc\\audio-padded.aac" ,
@@ -108,7 +105,8 @@ describe("buildPadTrimAudioArgs", () => {
108105 expect ( winPlan . operation ) . toBe ( "pad" ) ;
109106 const args = winPlan . steps [ 0 ] ! . args ;
110107 expect ( args ) . toContain ( "-af" ) ;
111- expect ( args [ args . indexOf ( "-af" ) + 1 ] ) . toBe ( "apad=whole_dur=5.000000" ) ;
108+ expect ( args [ args . indexOf ( "-af" ) + 1 ] ) . toBe ( "apad,atrim=0:5.000000" ) ;
109+ expect ( args . join ( " " ) ) . not . toContain ( "whole_dur" ) ;
112110 } ) ;
113111} ) ;
114112
0 commit comments