15

I am trying to playback a stream that is multicasted over RTP using ffplay on Windows 7 64 bits. The computer that serves the audio over RTP runs:

ffmpeg -re -f dshow -audio_buffer_size 15 -ac 1 -i audio="Mic in at front Mic-in (Realtek" -ar 8k -acodec pcm_alaw -vn -f rtp rtp://127.0.0.1:5000

The client runs:

ffplay rtp://127.0.0.1:5000

While this was working correctly in release 3.3, release 3.4 fails with this error:

SDL_OpenAudio (1 channels, 8000 Hz): WASAPI can't initialize audio client: CoInitialize has not been called.

No more combinations to try, audio open failed
Failed to open file 'rtp://127.0.0.1:5000' or configure filtergraph

Anyone has an idea of whats going on ?

Thanks

UPDATE #1:

A workaround is to specify an alternate output driver. Set SDL_AUDIODRIVER environment variable value to the driver you want to use. Under windows 7, directsound and winmm both solved my issue.

1

1 Answer 1

8

To solve the problem, it is better to set the SDL_AUDIODRIVER in user environment variables:

  1. Press Win+R to open Run. Type SystemPropertiesAdvanced and press OK button.
  2. Press the Environment Variables... button.

System Properties

  1. In User variables section, press the New... button.
  2. In front of "Variable name" type SDL_AUDIODRIVER. In front of "Variable value" type directsound or winmm.

New Variable

  1. Press OK buttons recursively.
  2. Reopen the terminal and run ffplay.
2
  • Dont forget to restart the system after changing the variable.
    – Summit
    Nov 13, 2020 at 10:32
  • It works, but I'm curious of the reason, and where does the solution come from... @Summit: "Dont forget to restart the system after changing the variable", no need, restarting the application is enough.
    – mins
    Feb 20, 2021 at 19:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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