Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I like to turn my music off when I start watching Flash videos. It used to be that Flash videos were cached in /tmp, so I could watch for them with inotify:

sorghum:~% incrontab -l
/tmp IN_CREATE /home/dmwit/.scripts/flash_movie_start $#
sorghum:~% cat .scripts/flash_movie_start 
case "$1" in
        mpc pause

This recently stopped working (at least for YouTube, though some other video sites do still seem to trigger this). After digging around online, I think this may be because YouTube has recently switched over to using RTMP, which doesn't store a cache on disk anywhere.

Is there a way to detect when a browser starts retrieving an RTMP stream?

share|improve this question
Still works here, according to inotifywait -mqe create /tmp. – grawity Nov 6 '11 at 17:45
@grawity Try it with a video that YouTube doesn't own the copyright to, such as this one. (I assume inotifywait is supposed to die when the video starts, right? It doesn't do so here.) – Daniel Wagner Nov 6 '11 at 18:10
Die? No, -m makes it monitor continuously: $ inotifywait -mqe create /tmp/tmp/ CREATE FlashXXlanUc5, when playing that video. – grawity Nov 6 '11 at 18:26
@grawity It doesn't make any output or do anything at all here. =( flashplugin-, chromium 14.0.835.202-1 – Daniel Wagner Nov 6 '11 at 18:40
flashplugin, chromium 15.0.874.106-1, firefox 7.0.1-1, opera 11.52-1... works just fine. You could try looking in lsof -p <pid>, where <pid> is from pgrep -lf chromium | grep flash. – grawity Nov 6 '11 at 19:30

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.