-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
When using LoadVideoDirectoryV2 to extract audio, the node fails with this ffmpeg error:
[out#0/f32le @ ...] Output with label 's0:a' does not exist in any defined filter graph
Error opening output files: Invalid argument
!!! Exception during processing !!! 'NoneType' object is not subscriptable
The problem occurs because the node’s load_audio() function chains .audio onto an ffmpeg input stream after applying ss (seek) and/or an atrim filter.
When trimming is applied, the ffmpeg-python graph loses its reference to the labeled audio stream (s0:a), which causes ffmpeg to throw this error and return None.
That None value later triggers a crash in the downstream save_audio node.
How to Reproduce
- Use LoadVideoDirectoryV2 on any MP4 with an audio track.
- Enable
skip_framesor use a short clip (so trimming occurs). - Connect the node’s audio output to a
Save Audionode. - Observe the
s0:aerror andNoneTypetraceback.
Fix
Remove the .audio chain from the load_audio() function so that the audio stream remains correctly linked to the trimmed input.
Replace:
process = (stream.audio
.output('pipe:', format='f32le', acodec='pcm_f32le', ac=2, ar=44100)
.overwrite_output()
.run_async(pipe_stdout=True, pipe_stderr=True))with:
process = (
stream
.output('pipe:', format='f32le', acodec='pcm_f32le', ac=2, ar=44100, vn=None)
.overwrite_output()
.run_async(pipe_stdout=True, pipe_stderr=True)
)This keeps trimming (ss / atrim) intact, avoids the missing stream label issue, and works across all tested MP4s.
Result
After this change:
- Audio extraction works correctly, including trimmed segments.
- No more
s0:aorNoneTypeerrors. - Downstream
Save Audionode functions normally.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels