I need to extract audio from live stream. I want to generate an audio file every 5s.
ffmpeg -i ***.flv -c:a aac -fs 128k output.aac<
Use the segment muxer:
ffmpeg -i input -map 0:a -f segment -segment_time 5 output_%03d.aac
Add -c copy and use a compatible output container format if you don't want to re-encode.
-c copy