fierce-television-48756
08/19/2025, 7:16 AMHello! I'm using TrackEgress to stream an audio track (audio/opus) to my Node.js server via WebSocket. My server receives the audio chunks fine.
When I pipe these chunks to an ffmpeg child process using "-i pipe:0", ffmpeg crashes with the error: "Error opening input: Invalid data found when processing input".
My ffmpeg command is: ffmpeg -i pipe:0 -f s16le -ar 16000 -ac 1 pipe:1
What is the exact container format (e.g., Ogg) of the WebSocket stream from TrackEgress? What are the correct ffmpeg input flags (like -f and -c:a) required to reliably decode this stream from stdin?
tall-airline-16756
08/19/2025, 7:16 AMtall-airline-16756
08/19/2025, 7:17 AMffmpeg -f s16le -ac 2 -ar 48000 -i pipe:0
Just a heads up — make sure you only grab the binary frames that actually contain audio data from the WebSocket stream before sending them to ffmpeg. The stream might also have text frames with JSON events mixed in, so filtering those out will keep things running smoothly.
Sources: Track Egress | LiveKit Docs | Universal Egress | pkg/pipeline/builder/video.go