Closed Sammy1Am closed 1 year ago
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 exec:bash thescript.sh
.
Will leave this open just for a bit to see if:
Here you output video to file. But not to go2rtc exec:curl xxx - | ffmpeg -i - test.mp4
Ah, yeah, sorry, just copy-pasted wrong. It's ... | ffmpeg -i - -f h264 -
Can you share stream with me? https://github.com/AlexxIT/go2rtc/wiki/Tunnel-RTSP-camera-to-Intenet You can find contacts in the github profile.
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.