gstreamer 相关问题

与GStreamer(也称为Gst)相关的问题,这是一个开源多媒体框架,支持从Linux服务器和Linux桌面系统到大量嵌入式设备的所有功能。

Gstreamer:gstreamer找不到avdec_h264,brew无法再安装gst-libav

在 macOS 14.0 上。 我有一个带有 avdec_h264 的管道,但 gstreamer 找不到它。根据 Gstreamer 的网站,它是 gst-libav 的一部分。 当我尝试执行“brew install gst-libav”时,我得到以下信息: 警告:

回答 1 投票 0

gstreamer:没有这样的元素或插件“videotestsrc”

我已将 Linux 上的 gstreamer 升级到最新版本 1.4.0,包括 gst-plugins-base/good/bad/ugly。但是当我尝试播放视频时,我找不到很多元素,例如 xvimagesink,

回答 5 投票 0

Gstreamer:brew 未安装 gst-libav

在 macOS 14.0 上。 我有一个带有 avdec_h264 的管道,根据 Gstreamer 的网站,它是 gst-libav 的一部分。 当我尝试执行“brew install gst-libav”时,我得到以下信息: 警告:gstreamer 1.22.6_1 已...

回答 1 投票 0

DLStreamer 2023.0 版本中没有“vaapih264enc”元素

我想将直播流编码为 H264。 我正在使用 Windows 使用 Docker 容器运行 DLStreamer。 DLStreamer 停止支持 x264enc 等 GPL 编码器,因此我们需要使用硬件支持的

回答 1 投票 0

Gstreamer 无法处理来自 appsrc 的 u8 vec 中的 ts 段

我一直在尝试将 u8 vec 提供给我的应用程序,将从 RabbitMQ 读取到 appsrc 中以对其进行转码。 我正在尝试一个像下面这样的简单管道,无需解码来测试它。 gst-l...

回答 1 投票 0

为什么 gstreamer 解复用器需要队列?

我使用过各种 gstreamer 解复用器,例如 qt、ogg 和 matroska,每次我都会在每个解复用器垫之后不使用队列时发现死锁/停顿问题。 然而我似乎无法...

回答 1 投票 0

GStreamer:在 ctrl+c 上正确发送 EOS 事件

我可以通过以下命令成功地从 videotestsrc 录制视频: gst-launch-1.0 -e videotestsrc !视频转换! x264enc! mp4复用器!文件接收器位置=output.mp4 当我运行命令时...

回答 1 投票 0

使用 gstreamer 将自定义图像帧编码为视频

我正在制作一个 C++ 应用程序,其中有一堆帧(采用 unsigned char* 格式),我需要使用在 GPU 上运行的 gstreamer H265 编码器将它们编码为视频。 大多数 gstreamer s...

回答 1 投票 0

使用 Gstreamer 和 Nvidia AGX Orin 进行 RTSP 视频输入和录制视频

我正在尝试通过 gstreamer python 绑定设置 gstreamer 管道。 管道应该使用摄像机将镜头记录到文件(并滚动它们),它还应该支持客户端连接到...

回答 1 投票 0

GStreamer:不支持 TLS/SSL;安装 glib-networking

我正在尝试根据此示例在 macOS 上使用 GStreamer 1.22 建立安全的 WebRTC 连接。当尝试通过 wss:// 连接到信令服务器时,出现以下错误: HTTP/1.1 6...

回答 1 投票 0

网络串流(RTSP)但接收端无显示

我尝试进行流式传输,但在接收端没有看到任何显示。这是我的图表: 一张图像 --> 使用 UDP 的 RTSP(使用 GStreamer)--> ? 这是我在终端中的命令行和输出: 发送...

回答 1 投票 0

如何使用gstreamer和OpenCV为RTSP组播服务器提供服务?

我想编写一个程序,通过多播或广播 rtsp/rtp 服务器传输 cv2 帧。 我在下面编写了带有一些示例的代码,但是使用此代码我只能首先使用...

回答 1 投票 0

GStreamer 管道:将 H.264 从 Appsrc 解码到 Appsink

我正在开发一个项目,需要用单帧解码 H.264 文件。原始文件是从 NV12 格式编码的。现在,我想将其解码回 NV12,然后将其转换为 JPEG....

回答 1 投票 0

Gstreamer 1.0:教程中的视频无法在 MacOS 上播放

我正在尝试在 MacOS 10.11.3 上使用 Xcode 7.2 编译本教程 Tutorial_01,但没有收到任何视频:我可以听到音频,但视频窗口似乎在某处丢失了。 我尝试过...

回答 3 投票 0

使用appsrc和rtsp的Gstreamer

我们正在使用 h264 编码以 90000 比特率使用 rtsp 流式传输视频。我们能够在vlc媒体播放器中获取流,但是当我们使用Gstreamer pip时我们无法获取流......

回答 1 投票 0

无法在 Chromium 中的“RTCPeerConnection”上执行“setRemoteDescription”

我无法在 Chrome 和 Edge 中调用 rtcConnection.setRemoteDescription() 来获取此 SDP 优惠。它在 Firefox 中运行良好。在 Firefox 中,WebRTC 通信已建立并正常工作,但在 Chrome 中则不然......

回答 1 投票 0

pkg-config 无法找到 pangoft2 和 gstreamer

我使用命令 $ sudo apt install build-essential libpangoft2-1.0.0 在我的 debian 上安装了 pangoft2,并使用 $ sudo apt install build-essential gstreamer1.0-plugins-* 安装了 gstreamer 他们...

回答 1 投票 0

我想编写OpenCV代码,将文本写入网络摄像头视频并使用Gst库发送UDP

我编写了这段代码并尝试了其他功能,但我无法实现这个场景。我该怎么办? 问题出在代码、方法还是库中? #包括 #包括 我编写了这段代码并尝试了其他功能,但我无法实现这个场景。我该怎么办? 问题出在代码、方法还是库中? #include <gst/gst.h> #include <opencv2/opencv.hpp> #include <opencv2/highgui/highgui.hpp> #include <opencv2/imgproc/imgproc.hpp> #include <gst/app/gstappsrc.h> int main(int argc, char* argv[]) { // Initialize GStreamer gst_init(&argc, &argv); // Create a GStreamer pipeline GstElement* pipeline = gst_parse_launch("v4l2src device=/dev/video0 ! videoconvert ! video/x-raw,format=BGR ! appsink", NULL); // Check if the pipeline was created successfully if (!pipeline) { g_print("Pipeline could not be created. Exiting.\n"); return -1; } // Set the pipeline state to playing GstStateChangeReturn ret = gst_element_set_state(pipeline, GST_STATE_PLAYING); if (ret == GST_STATE_CHANGE_FAILURE) { g_print("Unable to set the pipeline to the playing state. Exiting.\n"); return -1; } // OpenCV VideoCapture for video capture cv::VideoCapture cap; if (!cap.open("appsrc ! videoconvert ! video/x-raw, format=YUY2,width=640,height=480,framerate=25/1 ! jpegenc ! rtpjpegpay ! appsink ! udpsink host=192.168.1.14 port=5000")) { std::cerr << "Error: Could not open OpenCV VideoCapture." << std::endl; return -1; } cv::Mat frame; cv::Scalar text_color(0, 255, 0); // Text color (BGR) int font = cv::FONT_HERSHEY_SIMPLEX; double font_scale = 1.0; int font_thickness = 2; std::string text = "Hello, GStreamer!"; while (true) { if (!cap.read(frame)) { std::cerr << "Error: Could not read frame from OpenCV VideoCapture." << std::endl; break; } // Add text to the video frame using OpenCV cv::putText(frame, text, cv::Point(10, 50), font, font_scale, text_color, font_thickness); // Display the processed frame using OpenCV cv::imshow("Processed Frame", frame); cv::waitKey(1); // Convert the OpenCV frame to GStreamer format GstBuffer* buffer = gst_buffer_new_allocate(NULL, frame.total() * frame.elemSize(), NULL); GstMapInfo map_info; gst_buffer_map(buffer, &map_info, GST_MAP_WRITE); memcpy(map_info.data, frame.data, frame.total() * frame.elemSize()); gst_buffer_unmap(buffer, &map_info); // Push the frame into the GStreamer pipeline GstFlowReturn ret = gst_app_src_push_buffer(GST_APP_SRC(gst_bin_get_by_name(GST_BIN(pipeline), "appsrc")), buffer); if (ret != GST_FLOW_OK) { g_print("Error pushing frame to GStreamer pipeline. Exiting.\n"); break; } } // Clean up cv::destroyAllWindows(); gst_element_set_state(pipeline, GST_STATE_NULL); gst_object_unref(pipeline); return 0; } 我收到此错误: (gstremear_and_opencv_driver:19685):GStreamer-CRITICAL **:15:24:59.492:gst_caps_get_struct:断言“GST_IS_CAPS(大写)”失败 (gstremear_and_opencv_driver:19685):GStreamer-CRITICAL **:15:24:59.492:gst_struct_get_int:断言“结构!= NULL”失败 [警告:[电子邮件受保护]]全局 cap_gstreamer.cpp:1707 打开 OpenCV | GStreamer 警告:无法查询视频宽度/高度 (gstremear_and_opencv_driver:19685):GStreamer-CRITICAL **:15:24:59.492:gst_struct_get_fraction:断言“结构!= NULL”失败 [警告:[电子邮件受保护]]全局 cap_gstreamer.cpp:1713 打开 OpenCV | GStreamer 警告:无法查询视频 fps [警告:[电子邮件受保护]]全局 cap_gstreamer.cpp:1728 打开 OpenCV | GStreamer 警告:无法查询视频位置:状态=0,值=-1,持续时间=-1 我尝试使用 opencv 在网络摄像头视频上编写文本并使用 udp gst 库发送。 我不确定你的确切目标是什么,但假设你想从默认输出原始视频的相机 0 读取帧(否则使用 v4l2-ctl -d0 --list-formats-ext 并在捕获中的 v4l2src 之后指定视频上限管道),然后通过 UDP 覆盖一些文本和流结果作为 RTP/JPEG,然后你就可以做到这一点: 1。使用 gstreamer 从命令行: gst-launch-1.0 v4l2src device=/dev/video0 ! videoscale ! video/x-raw,width=640,height=480,pixel-aspect-ratio=1/1 ! videoconvert ! videorate ! video/x-raw,framerate=25/1 ! textoverlay text="Hello, Gstreamer" valignment=2 deltax=-200 color=4278255360 ! queue ! videoconvert ! video/x-raw,format=YUY2 ! jpegenc ! rtpjpegpay ! udpsink host=127.0.0.1 port=5000 2。或者使用 OpenCv,从 V4L 相机捕获到 OpenCv,以及用于流输出的编写器,例如: #include <opencv2/opencv.hpp> #include <opencv2/videoio.hpp> #include <opencv2/highgui.hpp> #include <opencv2/imgproc.hpp> int main(int argc, char* argv[]) { // Create OpenCV VideoCapture for reading video from camera cv::VideoCapture cap("v4l2src device=/dev/video0 ! videoscale ! video/x-raw,width=640,height=480,pixel-aspect-ratio=1/1 ! videoconvert ! video/x-raw,format=BGR ! videorate ! video/x-raw,framerate=25/1 ! appsink drop=1", cv::CAP_GSTREAMER); if (!cap.isOpened()) { std::cerr << "Error failed to open camera" << std::endl; return -1; } unsigned int width = (unsigned int) cap.get(cv::CAP_PROP_FRAME_WIDTH); unsigned int height = (unsigned int) cap.get(cv::CAP_PROP_FRAME_HEIGHT); double fps = cap.get(cv::CAP_PROP_FPS); std::cout << "Capture input opened, Ffaming: " << width << " x " << height << " @" << fps << " FPS" << std::endl; // OpenCV VideoWriter to RTP/JPG streaming to client 192.168.1.14 over UDP/5000 cv::VideoWriter streamer("appsrc ! queue ! video/x-raw,format=BGR ! videoconvert ! video/x-raw,format=YUY2 ! jpegenc ! rtpjpegpay ! udpsink host=192.168.1.14 port=5000", cv::CAP_GSTREAMER, 0, (float)fps, cv::Size(width, height)); if (!streamer.isOpened()) { std::cerr << "Error: Failed to open streamer writer." << std::endl; return -2; } std::cout << "streamer opened, ready for streaming to client 192.168.1.14 over UDP/5000" << std::endl; cv::Scalar text_color(0, 255, 0); // Text color (BGR) int font = cv::FONT_HERSHEY_SIMPLEX; double font_scale = 1.0; int font_thickness = 2; std::string text = "Hello, GStreamer!"; cv::Mat frame; while (true) { if (!cap.read(frame)) { std::cerr << "Error: Could not read frame from OpenCV VideoCapture." << std::endl; break; } // Add text to the video frame using OpenCV cv::putText(frame, text, cv::Point(10, 50), font, font_scale, text_color, font_thickness); streamer.write(frame); // Display the processed frame using OpenCV cv::imshow("Processed Frame", frame); cv::waitKey(1); } // Clean up cv::destroyAllWindows(); return 0; }

回答 1 投票 0

没有名为 gi 的模块

我已经尝试了下面给出的所有可能的命令: pip 安装 pgi 、 pip 安装 PyGObject 、 pip 安装 python-gi 仍然无法在 python 中安装该模块。 安装了 python 3.7 也尝试一下...

回答 3 投票 0

使用 GStreamer 和 souphttpsrc 播放 HLS 流(10 秒后失败)

以下管道在 10 秒后失败。 gst-launch-1.0 -v souphttpsrc location=https://test-streams.mux.dev/x36xhzz/x36xhzz.m3u8 ! hlsdemux!解码器!视频转换!自动视频接收器 对于某些人

回答 1 投票 0

© www.soinside.com 2019 - 2024. All rights reserved.