Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

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'm trying to troubleshoot a port binding issue in avconv/FFmpeg. I have two test commands; one which sends an audio stream over UDP:

avconv -i test.wav "udp://localhost:6613?localport=6614&reuse=1&connect=0"

And one that listens for it:

avconv -loglevel debug -f wav -ac 1 -i "udp://localhost:6613?reuse=1&connect=0" out.wav

If the second (listener) command is run before the first, it works; it simply hangs there until the first begins sending data across that port.

However, if the first command is started first, and begins sending data before the listener is set up, running the second command produces the following output:

Opening an input file: udp://localhost:6613.  
udp://localhost:6613: Operation not permitted

However, this is not a port binding error!

If I remove reuse=1 from the second command and run it twice - thereby actually trying to bind the socket twice - it generates the following message:

Opening an input file: udp://localhost:6613.
[udp @ 0x1a77140] bind failed: Address already in use
udp://localhost:6613: Input/output error

As long as reuse=1 is still in the command, running it twice will not raise an error from binding, and it's in the test commands in hopes that it would solve the problem... which it doesn't.

So, I would like to know why it has a problem listening to an ongoing stream - and, moreover, how to prevent that.

share|improve this question

You must log in to answer this question.

Browse other questions tagged .