I have been trying to pipe 2 levels deep.
I can pipe successfully:
- ffmpeg | grep
- ffmpeg | sed
I can not pipe
- ffmpeg | grep | sed
- ffmpeg | sed | grep
I don't understand, does ffmpeg limit to only one pipe in the chain?
This code has NO OUTPUT with 2 pipes and no errors:
ffmpeg -i "https://17563.live.streamtheworld.com/WETAFM.mp3?nocache=Ag6q8pw2" -af silencedetect=n=-10dB:d=0.5 -f null - 2>&1 | grep silence_duration | sed "s/.*silence_duration: \(.*\).*/\1/"
Expected Output:
2.06442
0.719252
0.594036
0.562698
0.500295
This code has the correct output with 1 pipe:
ffmpeg -i "https://17563.live.streamtheworld.com/WETAFM.mp3?nocache=Ag6q8pw2" -af silencedetect=n=-10dB:d=0.5 -f null - 2>&1 | grep silence_duration
Output:
[silencedetect @ 0000018027f9bd00] silence_end: 2.06442 | silence_duration: 2.06442
[silencedetect @ 0000018027f9bd00] silence_end: 3.45971 | silence_duration: 0.719252
[silencedetect @ 0000018027f9bd00] silence_end: 7.04399 | silence_duration: 0.594036
[silencedetect @ 0000018027f9bd00] silence_end: 7.81501 | silence_duration: 0.562698
[silencedetect @ 0000018027f9bd00] silence_end: 9.05535 | silence_duration: 0.500295
This code has the correct output with 1 pipe:
ffmpeg -i "https://17563.live.streamtheworld.com/WETAFM.mp3?nocache=Ag6q8pw2" -af silencedetect=n=-10dB:d=0.5 -f null - 2>&1 | sed "s/.*silence_duration: \(.*\).*/\1/"
Output:
[silencedetect @ 000001a48277b980] silence_start: 0
2.06442
[silencedetect @ 000001a48277b980] silence_start: 2.74045
0.719252
[silencedetect @ 000001a48277b980] silence_start: 6.44995
0.594036
[silencedetect @ 000001a48277b980] silence_start: 7.25231
0.562698
[silencedetect @ 000001a48277b980] silence_start: 8.55506
0.500295