Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Implement external commands for Windows #79

Closed
Fruchtzwerg94 opened this issue Sep 7, 2020 · 5 comments
Closed

Implement external commands for Windows #79

Fruchtzwerg94 opened this issue Sep 7, 2020 · 5 comments
Labels
enhancement New feature or request

Comments

@Fruchtzwerg94
Copy link
Contributor

Which version are you using?

v0.9.13

Describe the problem

Adding a custom command like
runOnPublish: ffmpeg -i rtsp://localhost:8554/$RTSP_SERVER_PATH -b:a 64k -f rtsp rtsp://localhost:8554/my/stream
to the configuration file does fail on windows:

ERR: exec: "/bin/sh": file does not exist

I think the reason is, /bin/sh should not be used on windows devices. The following two lines should be adapted to support different plattforms:

https://github.com/aler9/rtsp-simple-server/blob/79d0f2d053b4f5f6d1f1309652e49f061d580c95/path.go#L66
https://github.com/aler9/rtsp-simple-server/blob/1065fa010ba6832ef1a6674a0336de159eb139c5/client.go#L232

@aler9 aler9 added the enhancement New feature or request label Sep 7, 2020
@aler9
Copy link
Member

aler9 commented Sep 7, 2020

Hello, you're perfectly right, command should works on all platforms, i just did not have the time to do it.
Since the feature is simple to write, PRs are welcome.

@aler9 aler9 changed the title Windows custom command: ERR: exec: "/bin/sh": file does not exist Implement external commands for Windows Sep 7, 2020
@Fruchtzwerg94
Copy link
Contributor Author

Done. See #80

@dmenig
Copy link

dmenig commented Sep 8, 2020

Hi. This happens on my Ubuntu machine. Whatever the command I put in runOnDemand, I have the same error. Whatever the version.

Do you know what might be causing my container not to have such executables ?

This is the result of my docker inspect

...
            "Cmd": null,

...

@Fruchtzwerg94
Copy link
Contributor Author

Done.

@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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants