Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Error during the microphone stream #113

Closed
Arcens opened this issue Nov 5, 2020 · 8 comments
Closed

Error during the microphone stream #113

Arcens opened this issue Nov 5, 2020 · 8 comments
Labels
bug Something isn't working

Comments

@Arcens
Copy link

Arcens commented Nov 5, 2020

Which version are you using?

v0.11.0

Which operating system are you using?

Windows

Describe the problem

Description

Firstly, thank you for this amazing library. I have an error when I add the folowing config in the yml file
ffmpeg -f dshow -i audio="Microphone (Realtek Audio)" -c:a libmp3lame -f rtsp rtsp://localhost:8554/mic, however when i execute this line directly in the power whell when the server is started, is work perfectly.
mic: runOnDemand: ffmpeg -f dshow -i audio="Microphone (Realtek Audio)" -c:a libmp3lame -f rtsp rtsp://localhost:8554/mic
Bellow the error displayed by the server when I try to execute the stream with VLC

e780] Could not find audio only device with name ["Microphone] among source devices of type audio. [dshow @ 000002182a47e780] Searching for audio device within video devices for "Microphone [dshow @ 000002182a47e780] Could not find audio only device with name ["Microphone] among source devices of type video. audio="Microphone: I/O error

Do you have an idea how can I resolve the issue ?

Thank you for you support.

@jazzy348
Copy link

jazzy348 commented Nov 5, 2020

Hi Arcens,

This looks like an FFMPEG error, not a RTSP server issue. Make sure your DShow device name is correct, you can have FFMPEG search for devices with this command:
ffmpeg -list_devices true -f dshow -i dummy

Kind regards,
Jazzy

@Arcens
Copy link
Author

Arcens commented Nov 5, 2020

Hi Jazzy,
Yes, I have executed this command, and I have the following devices displayed
DirectShow audio devices
[dshow @ 0000020fdfa1dac0] "Microphone (Realtek Audio)"

And if I try the same command directly in power shell, ffmpeg works perfectly. But If I add the same command in the config yml ffmpeg doesn't work.

Best regards,
Arcens

@Arcens
Copy link
Author

Arcens commented Nov 5, 2020

Hi Jazzy,
In order to explain my problem, below the screen shares

  1. Works directly in powershell from Windows

Works with power shell

2.Not works when the command is inside the yml config

doesntwork

Best regards,
Arcens

@aler9
Copy link
Member

aler9 commented Nov 7, 2020

Hello, it seems like the server is stripping away the part of the device name in the parenthesis, so "Microphone (Realtek Audio)" becomes "Microphone".
This is caused by a bad implementation of external commands under Windows (https://github.com/aler9/rtsp-simple-server/blob/master/internal/externalcmd/externalcmd.go#L94), and will be fixed ASAP.

@aler9 aler9 added the bug Something isn't working label Nov 7, 2020
@aler9
Copy link
Member

aler9 commented Nov 8, 2020

External commands with quotes on Windows are now parsed correctly; the fix will be added to the next release.

@Arcens
Copy link
Author

Arcens commented Nov 9, 2020

Hi Aler9,

Thank you for you support.
Look forward to the next delivery :)

Best regards,

@aler9
Copy link
Member

aler9 commented Nov 11, 2020

added in v0.12.1

@aler9 aler9 closed this as completed Nov 11, 2020
@github-actions
Copy link
Contributor

github-actions bot commented Jan 1, 2023

This issue is being locked automatically because it has been closed for more than 6 months.
Please open a new issue in case you encounter a similar problem.

@github-actions github-actions bot locked and limited conversation to collaborators Jan 1, 2023
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants