-
Notifications
You must be signed in to change notification settings - Fork 397
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
Issues using exec, curl, and pipes #551
Comments
Alright, FWIW, I've worked around the issue by putting the original command that works in a shell script, mounting that script via docker, and then using Will leave this open just for a bit to see if:
|
Here you output video to file. But not to go2rtc |
Ah, yeah, sorry, just copy-pasted wrong. It's |
Can you share stream with me? |
Info sent on Discord. |
TP-Link Kasa source added to latest version https://github.com/AlexxIT/go2rtc/releases/tag/v1.7.0 |
I'm running into an issue with a bit of a niche use case. I have a KC401 camera that exposes a sort of weird MJPEG stream that I can only seem to consume via ffmpeg. This command successfully creates a working
.mp4
file:curl -vv -k -u "me@example.com:pAsShAsH" --ignore-content-length https://192.168.0.127:19443/https/stream/mixed --output - | ffmpeg -i - test.mp4
I think the root problem ends up being a combination of curl's parsing and go2rtc's QuoteSplit function.
I initially (naively) tried:
But go.exec doesn't do pipes, so I have to wrap things in a
bash -c
command. This is where the quote issues come to play. There's two ways I can think of to do this:But test2 fails, I think, because QuoteSplit is only looking for double quotes so the bash argument gets all mangled. And test3 fails because for whatever reason curl just includes the single quotes as part of the username. The quotes around the username:password is required because without them curl's parser gets confused by the username being an email address and I get a "no such file or directory" error.
Am I missing some other way to process this stream? Can QuoteSplit be modified to also look for single quotes and support quotes-in-quotes as escaped quotes? Or some other quote-escaping process so I can pass double-quotes to the curl command?
Additional context: ffmpeg can't directly consume the stream because of the required
--ignore-content-length
which only curl seems to support. If I just put curl in without the ffmpeg, I get an unknown format error.The text was updated successfully, but these errors were encountered: