Open ldct-polemos opened 3 months ago
This works for me. But this only an example, ffmepg parameter should be optimized
streams:
Test:
- exec:ffmpeg -hwaccel vaapi -vaapi_device /dev/dri/renderD128 -i "rtsp://XXXXXXX" -c:v mjpeg -q:v 1 -f mpjpeg -an -
In first config you have list inside streams section. This is wrong. Also you have bracket at the end - also wrong.
Second config right. Are you sure it's not working? You can increase log level to trace and check why ffmpeg can't start.
Hi all, I have a web application that for historical reasons can accept only MJPEG format, server-size pushed, with the famous "img" tag. Basically the browser issues an HTTP request and then it pretends that the server responds with a multipart content type:
"Content-Type", "multipart/x-mixed-replace; boundary=--someboundary"
Such response ends only when browser closes connection. Early millennium stuff.Now I would like to stream contents from a camera that produces RTSP (in the example below I'm simulating it locally with a gstreamer pipe). I'm able to visualize the stream via WebRTC module by using this config:
This correctly works in Chrome. Then I tried to follow the transcoding guidelines for MJPEG and changed the config as follows:
But once I try to open http://localhost:1984/stream.html?src=cameramjpegconverted&mode=mjpeg I get the following error:
ERR github.com/AlexxIT/go2rtc/internal/mjpeg/init.go:166 > error="streams: EOF"
I also tried this:
And by opening http://localhost:1984/stream.html?src=camera1&mode=mjpeg I get:
ERR github.com/AlexxIT/go2rtc/internal/mjpeg/init.go:166 > error="streams: codecs not matched: H264 => JPEG"
What can be the problem?
Thanks and congrats for the great project!