简体   繁体   English

gstreamer 1.0 android - 使用视频盒将视频分解为多个表面

[英]gstreamer 1.0 android - video de-compositing with videobox to multiple surfaces

I am trying to decompose a video stream that was encoded from multiple input sources through a compositor element, which is working fine.我正在尝试分解通过合成器元素从多个输入源编码的视频流,这工作正常。

I am trying to take that stream and split it with tee after decoding and passing each src pad of the tee to a videobox element to crop the segment corresponding to the composite stream to unique surface instances in android.我正在尝试获取该流并在解码并将 tee 的每个 src pad 传递给 videobox 元素以将与复合流对应的片段裁剪为 android 中唯一的表面实例后,将其与 tee 分开。 Actually, I think the issue is more with how I'm (mis)using videobox.实际上,我认为问题更多在于我(错误)使用视频盒的方式。

I can use a single videobox element fine and it crops out the correct composited segment, but when I use multiple videobox elements, there seems to be no flow to the downstream elements.我可以很好地使用单个 videobox 元素,它会裁剪出正确的合成片段,但是当我使用多个 videobox 元素时,似乎没有流向下游元素。

I'm getting similar symptoms on my Windows and Mac machines, but the target platform is Android.我在 Windows 和 Mac 机器上遇到了类似的症状,但目标平台是 Android。

As an example, this Mac pipeline works:例如,此 Mac 管道有效:

gst-launch-1.0 rtspsrc location=rtsp://192.168.0.25:7768/tiles ! gst-launch-1.0 rtspsrc location=rtsp://192.168.0.25:7768/tiles ! rtph264depay ! rtph264depay ! h264parse ! h264解析! vtdec ! tee name=t !发球台名称= t ! queue !队列 ! videoconvert !视频转换! videobox left=0 right=960 top=0 bottom=540 !视频框左=0 右=960 上=0 下=540 ! glimagesink render-rectangle='<990,570,960,540>' glimagesink 渲染矩形='<990,570,960,540>'

This Mac pipeline runs, but nothing is displayed and no errors:此 Mac 管道运行,但未显示任何内容且没有错误:

gst-launch-1.0 rtspsrc location=rtsp://192.168.0.25:7768/tiles ! gst-launch-1.0 rtspsrc location=rtsp://192.168.0.25:7768/tiles ! rtph264depay ! rtph264depay ! h264parse ! h264解析! vtdec !虚拟机! tee name=t !发球台名称= t ! queue !队列 ! videoconvert !视频转换! videobox left=0 right=960 top=0 bottom=540 !视频框左=0 右=960 上=0 下=540 ! glimagesink render-rectangle='<990,570,960,540>' t. glimagesink 渲染矩形='<990,570,960,540>' t。 ! queue !队列 ! videoconvert !视频转换! videobox left=960 right=1920 top=0 bottom=540 !视频框左=960 右=1920 上=0 下=540 ! glimagesink render-rectangle='<20,20,960,540>' glimagesink 渲染矩形='<20,20,960,540>'

Appreciate any feedback - Doug感谢任何反馈 - 道格

I had interpreted the use of left/right/top/bottom incorrectly.我错误地解释了左/右/上/下的使用。 After reading info on videocrop, I discovered those parameters indicate how much to crop off of each corresponding edge.在阅读有关 videocrop 的信息后,我发现这些参数表示从每个相应的边缘裁剪多少。

This works: (right=0 on second occurrance on videobox)这有效:(在视频盒上第二次出现时右 = 0)

gst-launch-1.0 rtspsrc location=rtsp://192.168.0.25:7768/tiles ! gst-launch-1.0 rtspsrc location=rtsp://192.168.0.25:7768/tiles ! rtph264depay ! rtph264depay ! h264parse ! h264解析! vtdec !虚拟机! tee name=t !发球台名称= t ! queue !队列 ! videoconvert !视频转换! videobox left=0 right=960 top=0 bottom=540 !视频框左=0 右=960 上=0 下=540 ! glimagesink render-rectangle='<990,570,960,540>' t. glimagesink 渲染矩形='<990,570,960,540>' t。 ! queue !队列 ! videoconvert !视频转换! videobox left=960 right=0 top=0 bottom=540 !视频框左=960 右=0 上=0 下=540 ! glimagesink render-rectangle='<20,20,960,540>' glimagesink 渲染矩形='<20,20,960,540>'

That's what I get for working late on Friday : )这就是我周五加班得到的回报:)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM