I'm doing this with ffmpeg...

nohup ffplay -reorder_queue_size 0 -nostats -i /tmp/stl-app/stream.sdp -protocol_whitelist "file,http,https,tcp,tls,udp,rtp" -nodisp -af astats=metadata=1:reset=1,ametadata=print:key=lavfi.astats.Overall.RMS_level &> /tmp/stl-app/stream-stats.log &

The problem I'm running in to is that I have tmpfs drive setup with 100M of free space. I'm burning through that in about 90 mins. I've tried echoing a blank file to the stream-stats.log and just deleting it. But because of the way that FFMPEG writes to it, if I delete it, it just doesn't write to that any more. I need a way to clear the file every x mins or at least limit it to a manageable size that I can keep reading from.

I really only need an update every second or so and I don't need to keep the file obviously. What's the right way to handle this?

UPDATE Based on a commend from @gyan I created a pipe at /tmp/stl-app/icecaststats and then reran my command like

nohup ffplay -reorder_queue_size 0 -nostats -i /tmp/stl-app/stream.sdp -protocol_whitelist "file,http,https,tcp,tls,udp,rtp" -nodisp -af astats=metadata=1:reset=1,ametadata=print:key=lavfi.astats.Overall.RMS_level > /tmp/stl-app/icecaststats &

But I'm not getting any data there for some reason?

  • Create a file using mkfifo and write to that. Whatever's read from there will be removed.
    – Gyan
    Aug 28, 2019 at 18:39

1 Answer 1


So a working solution for me was to update the -af flag

ffplay -autoexit -nodisp -f mp3 -i $ICECASTURL -af asetnsamples=44100,astats=metadata=1:reset=1,ametadata=print:key=lavfi.astats.Overall.RMS_level

Setting asetnsamples tells ffplay how big of a sample size you want. Since I'm running audio at 44100Hz I set the sample size to that and thus it only updates every second. Drastically reducing the file size that I'm logging to.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.