【问题标题】:How to watch a h263 video via rtsp with gstreamer如何使用 gstreamer 通过 rtsp 观看 h263 视频
【发布时间】:2016-02-09 17:25:44
【问题描述】:

我正在尝试读取以 h263 格式编码的视频流,该视频流是通过 rtsp 和 gstreamer 在 Windows 上接收的。最后,我必须得到一个 BGR 或 RGB 格式(使用 Qimage/Qt)。

我可以用 vlc rtsp://172.22.1.2:8554/test

观看流程

我可以用 cmd 观察流程: gst-launch-1.0 rtspsrc location=rtsp://172.22.1.2:8554/test ! rtph263pdepay ! avdec_h263 ! autovideosink

我无法在我的程序中执行此操作。 我试过m_pipeline = gst_parse_launch("rtspsrc location=rtsp://172.22.1.2:8554/test ! rtph263pdepay ! avdec_h263 ! appsink name=sink caps=video/x-raw, format=BGR", &error);

我在rtspsrc location=.. 的状态下尝试了uridecodebin uri=..

我试过video/x-h263video/x-raw, format=RGB

我是否有关于上限的错误消息,或者程序崩溃。

我不知道我是否使用了正确的元素,或者我的命令的结尾是错误的还是其他......?

【问题讨论】:

    标签: video-streaming gstreamer rtsp rtsp-client h.263


    【解决方案1】:

    您可能会收到错误消息,因为 avdec_h263 的 src 上限与您为应用程序接收器指定的上限不匹配。运行cmdgst-inspect-1.0 avdec_h264可以看到src pad caps模板只支持video/x-raw format = I420,而你的appsink设置为video/x-raw format=BGR

    尝试将videoconvert 元素添加到解码器和appsink 之间的管道中: m_pipeline = gst_parse_launch("rtspsrc location=rtsp://172.22.1.2:8554/test ! rtph263pdepay ! avdec_h263 ! videoconvert ! appsink name=sink caps=video/x-raw, format=BGR", &error);

    【讨论】:

    • 我已经尝试过了,但没有成功,但我发现其他错误,所以我会重试。不幸的是,我不能在星期二之前尝试 =/
    • 最后我不使用 gstreamer,只使用带有 cv::VideoCapture("rtsp://...") 的 opencv。谢谢!
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-05-05
    • 2022-12-14
    • 1970-01-01
    • 2018-07-01
    • 1970-01-01
    • 2011-04-19
    相关资源
    最近更新 更多