AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / ubuntu / 问题

问题[rtsp](ubuntu)

Martin Hope
MikroPower
Asked: 2021-08-20 17:08:26 +0800 CST

无法播放 rtsp - Linux 流

  • 0

我无法播放来自 XUbuntu(21.04、20.04)或 Debian 11 的任何 rtsp 流。我也使用 Live-USB-Sticks 来拥有一个新系统。

作为软件,我尝试过使用 mplayer、vlc (3.012)、ffmpeg ......但没有成功。

在我的 Android 设备(平板电脑或手机)上,我可以使用 VLC 播放任何流媒体。在装有 Windows7 的笔记本电脑上,我可以使用 VLC 播放任何 Steam。

可能来自 ffplay 的此错误消息可以帮助找到问题:

~$ ffplay rtsp://192.168.178.2:8554/video
ffplay version 4.3.2-0+deb11u1ubuntu1 Copyright (c) 2003-2021 the FFmpeg developers
  built with gcc 10 (Ubuntu 10.2.1-20ubuntu1)
  configuration: --prefix=/usr --extra-version=0+deb11u1ubuntu1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu ...

  libavutil      56. 51.100 / 56. 51.100
  libavcodec     58. 91.100 / 58. 91.100
  libavformat    58. 45.100 / 58. 45.100
  libavdevice    58. 10.100 / 58. 10.100
  libavfilter     7. 85.100 /  7. 85.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  7.100 /  5.  7.100
  libswresample   3.  7.100 /  3.  7.100
  libpostproc    55.  7.100 / 55.  7.100

[rtsp @ 0x7f7008000bc0] method SETUP failed: 459 Client error=0/0   
rtsp://192.168.178.2:8554/video: Server returned 4XX Client Error, but not one of 40{0,1,3,4}
    nan    :  0.000 fd=   0 aq=    0KB vq=    0KB sq=    0B f=0/0   
~$

来自 MPlayer:

:~$ mplayer rtsp://192.168.178.2:8554/video
MPlayer 1.4 (Debian), built with gcc-10 (C) 2000-2019 MPlayer Team
do_connect: could not connect to socket
connect: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.

Playing rtsp://192.168.178.2:8554/video.
Resolving 192.168.178.2 for AF_INET6...

Couldn't resolve name for AF_INET6: 192.168.178.2
Connecting to server 192.168.178.2[192.168.178.2]: 8554...

rtsp: warning: setting NEW session: 48863bf289524adc;timeout=60;timeout=60
Timeout! No data from host 0.0.0.0
rtsp_session: unsupported RTSP server. Server type is 'VLC/3.0.11'.
libavformat version 58.45.100 (external)
libavformat file format detected.
[rtsp @ 0x7f5acb1ba180]method SETUP failed: 459 Client error
LAVF_header: av_open_input_stream() failed


Exiting... (End of file)
This is the VLC Debug-Log:

dbus debug: Getting All properties
dbus debug: Getting All properties
dbus debug: Getting All properties
dbus debug: Getting All properties
main debug: processing request item: rtsp://192.168.178.2:8554/video, node: Wiedergabeliste, skip: 0
main debug: rebuilding array of current - root Wiedergabeliste
main debug: rebuild done - 2 items, index 1
main debug: starting playback of new item
main debug: resyncing on rtsp://192.168.178.2:8554/video
main debug: rtsp://192.168.178.2:8554/video is at 1
main debug: creating new input thread
main debug: Creating an input for 'rtsp://192.168.178.2:8554/video'
main debug: requesting art for new input thread
main debug: using timeshift granularity of 50 MiB
main debug: using default timeshift path
main debug: `rtsp://192.168.178.2:8554/video' gives access `rtsp' demux `any' path `192.168.178.2:8554/video'
main debug: creating demux: access='rtsp' demux='any' location='192.168.178.2:8554/video' file='(null)'
main debug: looking for access_demux module matching "rtsp": 18 candidates
main debug: no access_demux modules matched
main debug: creating access: rtsp://192.168.178.2:8554/video
main debug: looking for access module matching "rtsp": 29 candidates
main debug: looking for meta fetcher module matching "any": 1 candidates
satip debug: try to open 'rtsp://192.168.178.2:8554/video'
satip debug: connect to host '192.168.178.2'
lua debug: Trying Lua scripts in /home/mikropower/.local/share/vlc/lua/meta/fetcher
main debug: net: connecting to 192.168.178.2 port 8554
lua debug: Trying Lua scripts in /usr/lib/x86_64-linux-gnu/vlc/lua/meta/fetcher
lua debug: Trying Lua scripts in /usr/share/vlc/lua/meta/fetcher
main debug: no meta fetcher modules matched
main debug: looking for art finder module matching "any": 2 candidates
lua debug: Trying Lua scripts in /home/mikropower/.local/share/vlc/lua/meta/art
lua debug: Trying Lua scripts in /usr/lib/x86_64-linux-gnu/vlc/lua/meta/art
lua debug: Trying Lua playlist script /usr/lib/x86_64-linux-gnu/vlc/lua/meta/art/00_musicbrainz.luac
lua debug: skipping script (unmatched scope) /usr/lib/x86_64-linux-gnu/vlc/lua/meta/art/00_musicbrainz.luac
lua debug: Trying Lua playlist script /usr/lib/x86_64-linux-gnu/vlc/lua/meta/art/01_googleimage.luac
lua debug: skipping script (unmatched scope) /usr/lib/x86_64-linux-gnu/vlc/lua/meta/art/01_googleimage.luac
lua debug: Trying Lua playlist script /usr/lib/x86_64-linux-gnu/vlc/lua/meta/art/02_frenchtv.luac
lua debug: skipping script (unmatched scope) /usr/lib/x86_64-linux-gnu/vlc/lua/meta/art/02_frenchtv.luac
lua debug: Trying Lua playlist script /usr/lib/x86_64-linux-gnu/vlc/lua/meta/art/03_lastfm.luac
lua debug: skipping script (unmatched scope) /usr/lib/x86_64-linux-gnu/vlc/lua/meta/art/03_lastfm.luac
lua debug: Trying Lua scripts in /usr/share/vlc/lua/meta/art
main debug: no art finder modules matched
main debug: connection succeeded (socket = 35)
main debug: net: opening 0.0.0.0 datagram port 9156
main debug: net: opening 0.0.0.0 datagram port 9157
qt debug: IM: Setting an input
satip error: Failed to setup RTSP session
main debug: net: connecting to 192.168.178.2 port 8554
main debug: connection succeeded (socket = 34)
access_realrtsp warning: Cseq mismatch, got 1, assumed 0
access_realrtsp debug: rtsp connected
access_realrtsp warning: only real/helix rtsp servers supported for now
main debug: no access modules matched
main debug: dead input
qt debug: IM: Deleting the input
main debug: changing item without a request (current 1/2)
main debug: nothing to play
dbus debug: Getting All properties
dbus debug: Getting All properties
dbus debug: Getting All properties

cvlc的调试:

...
lua art finder debug: Trying Lua scripts in /usr/share/vlc/lua/meta/art
main art finder debug: no art finder modules matched
satip stream error: Failed to setup RTSP session
main stream debug: net: connecting to 192.168.178.2 port 8554
main stream debug: connection succeeded (socket = 11)
access_realrtsp stream warning: Cseq mismatch, got 1, assumed 0
access_realrtsp stream debug: rtsp connected
access_realrtsp stream warning: only real/helix rtsp servers supported for now
main stream debug: no access modules matched
main input error: Ihre Eingabe konnte nicht geöffnet werden
main input error: VLC kann die Medienadresse 'rtsp://192.168.178.2:8554' nicht öffnen. Für Details bitte im Fehlerprotokoll nachsehen.
main playlist debug: dead input
main playlist debug: changing item without a request (current 0/1)
main playlist debug: nothing to play
dbus interface debug: Getting All properties
dbus interface debug: Getting All properties
...
rtsp
  • 2 个回答
  • 2222 Views
Martin Hope
LoukMouk
Asked: 2019-03-16 11:31:16 +0800 CST

编译 gst-rtsp-server 示例时出错

  • 0

我目前正在尝试设置一个 Ubuntu 服务器来重新分发来自网络摄像机的 rtsp 提要。

我看到 gstreamer 的gst-rtsp-server 库可以帮助我解决这个问题。

我安装了以下软件包:

sudo apt-get install libgstrtspserver-1.0-dev
sudo apt-get install gstreamer1.0-rtsp
sudo apt-get install libglib2.0-dev

然后我在我的桌面上克隆了 gst-rtsp-server 库 repo:

git clone https://github.com/GStreamer/gst-rtsp-server.git

但是,当我尝试编译gst-rtsp-server/examples/test-launch.c作为如何使用 gcc 使用库的示例给出的 C 文件 () 时:

gcc test-launch.c -I/usr/include/gstreamer-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include

我收到以下错误:

/tmp/ccM7e45N.o: In function `main':
test-launch.c:(.text+0x2e): undefined reference to `g_option_context_new'
test-launch.c:(.text+0x4a): undefined reference to `g_option_context_add_main_entries'
test-launch.c:(.text+0x4f): undefined reference to `gst_init_get_option_group'
test-launch.c:(.text+0x61): undefined reference to `g_option_context_add_group'
test-launch.c:(.text+0x79): undefined reference to `g_option_context_parse'
test-launch.c:(.text+0x99): undefined reference to `g_printerr'
test-launch.c:(.text+0xa5): undefined reference to `g_option_context_free'
test-launch.c:(.text+0xb1): undefined reference to `g_clear_error'
test-launch.c:(.text+0xc7): undefined reference to `g_option_context_free'
test-launch.c:(.text+0xd6): undefined reference to `g_main_loop_new'
test-launch.c:(.text+0xdf): undefined reference to `gst_rtsp_server_new'
test-launch.c:(.text+0x107): undefined reference to `g_object_set'
test-launch.c:(.text+0x113): undefined reference to `gst_rtsp_server_get_mount_points'
test-launch.c:(.text+0x11c): undefined reference to `gst_rtsp_media_factory_new'
test-launch.c:(.text+0x13a): undefined reference to `gst_rtsp_media_factory_set_launch'
test-launch.c:(.text+0x14b): undefined reference to `gst_rtsp_media_factory_set_shared'
test-launch.c:(.text+0x162): undefined reference to `gst_rtsp_mount_points_add_factory'
test-launch.c:(.text+0x16e): undefined reference to `g_object_unref'
test-launch.c:(.text+0x17f): undefined reference to `gst_rtsp_server_attach'
test-launch.c:(.text+0x19a): undefined reference to `g_print'
test-launch.c:(.text+0x1a6): undefined reference to `g_main_loop_run'
collect2: error: ld returned 1 exit status

有些东西我错过了,但我不知道是什么...><'

该错误显然来自缺少的标头,但是我在哪里可以得到它?

一如既往,感谢您的帮助/提示!

gcc gstreamer rtsp
  • 1 个回答
  • 3778 Views
Martin Hope
LoukMouk
Asked: 2018-11-24 14:50:58 +0800 CST

无法构建 gst-rtsp-server

  • 6

我正在尝试制作一个 rtsp 服务器,它可以从 onvif 相机捕获 rtsp 提要,然后将此流重新分发给连接到我的服务器的每个人。

我使用这个 iso 在 VMware Workstation 上创建了一个新的 Ubuntu 64 位虚拟机: https ://www.ubuntu.com/download/desktop/thank-you?version=18.04.1&architecture=amd64

然后我安装了 ubuntu-desktop:

$ sudo apt-get update
$ sudo apt-get install ubuntu-desktop
$ reboot

我将 gst-rtsp-server 从其 github 存储库克隆到我桌面上的文件夹:

$ cd Desktop
$ mkdir camSrv
$ cd camSrv
$ git clone https://github.com/GStreamer/gst-rtsp-server.git

然后我安装了这篇文章引用的依赖项:

$ sudo apt-get install autoconf -y
$ sudo apt-get install automake -y
$ sudo apt-get install autopoint -y
$ sudo apt-get install libtool -y

但是当我尝试构建 gst-rtsp-server 项目时,我不断收到错误...

我安装了一堆其他依赖项,但现在我遇到了错误:

configure: No package 'gstreamer-1.0' found
configure: error: no gstreamer-1.0 >= 1.15.0.1 (GSTreamer) found

我找不到我缺少的东西......我只想让这篇文章中提到的例子对我有用......

gstreamer rtsp
  • 1 个回答
  • 13696 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve