Open felipecrs opened 1 year ago
By the way, it would be awesome if go2rtc had support for splitting the stream into two in a more integrated way:
#crop=top
and #crop=bottom
ffmpeg -i input -filter_complex "[0]crop=iw:ih/2:0:0[top];[0]crop=iw:ih/2:0:oh[bottom]" -map "[top]" top.mp4 -map "[bottom]" bottom.mp4
But directly mapping each output to different go2rtc streams.
Hard task. Will check someday
@felipecrs I'm facing the same issue. Please update if you resolved this issue somehow or had other workaround.
I did not resolve neither found any workaround.
- Simplified configuration, maybe something like
#crop=top
and#crop=bottom
Maybe more like #split=vertically
or #split=horizontally
.
@AlexxIT did you mean that allowing to use #raw=-filter_complex [0]crop=iw:ih/2:0:0
with #hardware
is a hard task, or did you mean that capturing the two outputs from a single ffmpeg command is a hard task?
If the first one worked, it would already make my life better.
Both. Split input via hardware. And handle two outputs.
Ok, I have some news.
#raw=-vf crop=in_w:in_h/2:0:in_h/2
I came up with this alternative command which is not filter_complex
#hardware
still doesn't work, but now instead of failing the stream, the filter simply doesn't get applied anymore it seems.I can still use #hardware
to do H265 to H264 transcoding and then applying the filter on the transcoded result, to minimize my CPU impact (given that I needed to transcode first).
How do you do the transcoding first then apply the filter using go2rtc? Do you have to setup mutliple streams or something?
How do you do the transcoding first then apply the filter using go2rtc? Do you have to setup mutliple streams or something?
That's correct. First stream to do the transcoding, then another stream consuming from the first stream.
@felipecrs do you are using the split of two cameras in Frigate? In first 15-20min the cpu is around 50%, after it it´s go to 100% and not decrease.
I no longer am. I replaced the camera with a 16:9 one.
But when I was, using the approach mentioned above (first transcode with hardware acceleration and then split), CPU usage was not a problem.
Intel N100
I just bought a new camera: https://aliexpress.com/item/1005005731238053.html
It has 2 lens, and it outputs both in a single RTSP stream, like this:
So, I want to crop the stream into two. I managed to do it with:
Unfortunately hardware acceleration cannot work together with
-filter_complex
, apparently. Error in logs:Then:
Camera stream details:
So I wonder if there is some issue in go2rtc.