- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我正在尝试使用 gaminganywhere (gaminganywhere.org) 从 AWS 访问我的 EC2 Ubuntu 实例。安全组策略是允许所有连接,但无法连接到服务器。这是来自客户端和服务器的日志。
客户端
# [7860] 1522686205.894230 # include: config/common/controller.conf
# [7860] 1522686205.894569 # include: config/common/video-x264.conf
# [7860] 1522686205.894755 # include: config/common/audio-lame.conf
# [7860] 1522686205.895002 # RTSP[config]: using 'udp' for RTP flows.
# [7860] 1522686205.895012 # RTSP[config]: controller port = 8555
# [7860] 1522686205.895016 # RTSP[config]: controller via 'udp' protocol.
# [7860] 1522686205.895058 # RTSP[config]: video-encoder = libx264 (libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10)
# [7860] 1522686205.895071 # RTSP[config]: audio-encoder = libmp3lame (libmp3lame MP3 (MPEG audio layer 3))
# [7860] 1522686205.895101 # RTSP[config]: video specific option: threads = auto
Remote server @ 18.188.161.135[18.188.161.135]:8554
# [7860] 1522686205.971505 SDL: prefer opengl hardware renderer.
# [7860] 1522686205.971532 controller queue: initialized size=32708 (481 units)
# [7860] 1522686205.971693 controller socket: socket address [18.188.161.135:8555]
# [7860] 1522686205.971727 controller client-thread started: tid=7863.
watchdog: launched, waiting for audio/video frames ...
# [7860] 1522686205.971813 rtspclient: max tolerable video delay disabled.
*** SAVEFILE: YUV image saved to 'NULL'; timestamp saved to 'NULL'.
RTP reordering threshold = 300000
# [7860] 1522686205.971959 qos-measurement: initialized.
Opening connection to 18.188.161.135, port 8554...
...remote connection opened
Sending request: DESCRIBE rtsp://18.188.161.135:8554/desktop RTSP/1.0
CSeq: 2
User-Agent: RTSP Client (LIVE555 Streaming Media v2014.05.27)
Accept: application/sdp
Received 619 new bytes of response data.
Received a complete DESCRIBE response:
RTSP/1.0 200 OK
CSeq: 2
Date: Mon, Apr 02 2018 16:23:26 GMT
Content-Base: rtsp://10.0.0.73:8554/desktop/
Content-Type: application/sdp
Content-Length: 456
v=0
o=- 1522685876960515 1 IN IP4 10.0.0.73
s=GamingAnywhere Server
i=desktop
t=0 0
a=tool:LIVE555 Streaming Media v2014.05.27
a=type:broadcast
a=control:*
a=range:npt=0-
a=x-qt-text-nam:GamingAnywhere Server
a=x-qt-text-inf:desktop
m=video 0 RTP/AVP 96
c=IN IP4 0.0.0.0
b=AS:3000
a=rtpmap:96 H264/90000
a=fmtp:96 packetization-mode=1;profile-level-id=4D4020;sprop-parameter-sets=Z01AILaAUAIGhAAAAwAEAAADAMI8YMqA,aO88gA==
a=control:track1
[URL:"rtsp://10.0.0.73:8554/desktop/"]: Got a SDP description:
v=0
o=- 1522685876960515 1 IN IP4 10.0.0.73
s=GamingAnywhere Server
i=desktop
t=0 0
a=tool:LIVE555 Streaming Media v2014.05.27
a=type:broadcast
a=control:*
a=range:npt=0-
a=x-qt-text-nam:GamingAnywhere Server
a=x-qt-text-inf:desktop
m=video 0 RTP/AVP 96
c=IN IP4 0.0.0.0
b=AS:3000
a=rtpmap:96 H264/90000
a=fmtp:96 packetization-mode=1;profile-level-id=4D4020;sprop-parameter-sets=Z01AILaAUAIGhAAAAwAEAAADAMI8YMqA,aO88gA==
a=control:track1
# [7860] 1522686206.581278 qos-measurement: source #0 added, prefix=-281002320
video decoder: use decoder h264
video decoder(0): sprop configured with 'Z01AILaAUAIGhAAAAwAEAAADAMI8YMqA,aO88gA==', decoded-size=36
SPROP = [ 00 00 00 01 67 4d 40 20 b6 80 50 02 06 84 00 00 03 00 04 00 00 03 00 c2 3c 60 ca 80 00 00 00 01 68 ef 3c 80 ]
video decoder(0): codec h264 (H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10)
video decoder(0) initialized (client port 44578)
[URL:"rtsp://10.0.0.73:8554/desktop/"]: Initiated the "video/H264" subsession (client ports 44578-44579)
Sending request: SETUP rtsp://10.0.0.73:8554/desktop/track1 RTSP/1.0
CSeq: 3
User-Agent: RTSP Client (LIVE555 Streaming Media v2014.05.27)
Transport: RTP/AVP;unicast;client_port=44578-44579
Received 212 new bytes of response data.
Received a complete SETUP response:
RTSP/1.0 200 OK
CSeq: 3
Date: Mon, Apr 02 2018 16:23:26 GMT
Transport: RTP/AVP;unicast;destination=117.206.20.30;source=10.0.0.73;client_port=44578-44579;server_port=6970-6971
Session: CBA2E074;timeout=65
[URL:"rtsp://10.0.0.73:8554/desktop/"]: Set up the "video/H264" subsession (client ports 44578-44579)
[URL:"rtsp://10.0.0.73:8554/desktop/"]: Created a data sink for the "video/H264" subsession
Receiver buffer increased to 2097152
NAT hole punching: fd=11, local-port=44578/44578 server-port=6970
Sending request: PLAY rtsp://10.0.0.73:8554/desktop/ RTSP/1.0
CSeq: 4
User-Agent: RTSP Client (LIVE555 Streaming Media v2014.05.27)
Session: CBA2E074
Range: npt=0.000-
watchdog: initialized, but no frames received ...
Received 184 new bytes of response data.
Received a complete PLAY response:
RTSP/1.0 200 OK
CSeq: 4
Date: Mon, Apr 02 2018 16:23:27 GMT
Range: npt=0.000-
Session: CBA2E074
RTP-Info: url=rtsp://10.0.0.73:8554/desktop/track1;seq=32456;rtptime=2677630715
[URL:"rtsp://10.0.0.73:8554/desktop/"]: Started playing session...
watchdog: initialized, but no frames received ...
watchdog: initialized, but no frames received ...
watchdog: initialized, but no frames received ...
watchdog: initialized, but no frames received ...
watchdog: initialized, but no frames received ...
watchdog: initialized, but no frames received ...
服务器
# [4432] 1522685876.873593 # include: config/common/server-common.conf
# [4432] 1522685876.873731 # include: config/common/controller.conf
# [4432] 1522685876.873810 # include: config/common/video-x264.conf
# [4432] 1522685876.873882 # include: config/common/video-x264-param.conf
# [4432] 1522685876.873974 # include: config/common/audio-lame.conf
# [4432] 1522685876.874060 # RTSP[config]: using 'udp' for RTP flows.
# [4432] 1522685876.874100 # RTSP[config]: controller port = 8555
# [4432] 1522685876.874131 # RTSP[config]: controller via 'udp' protocol.
# [4432] 1522685876.874189 # RTSP[config]: video-encoder = libx264 (libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10)
# [4432] 1522685876.874230 # RTSP[config]: audio-encoder = libmp3lame (libmp3lame MP3 (MPEG audio layer 3))
# [4432] 1522685876.874281 # RTSP[config]: video specific option: b = 3000000
# [4432] 1522685876.874316 # RTSP[config]: video specific option: g = 48
# [4432] 1522685876.874348 # RTSP[config]: video specific option: intra-refresh = 1
# [4432] 1522685876.874378 # RTSP[config]: video specific option: me_method = dia
# [4432] 1522685876.874410 # RTSP[config]: video specific option: me_range = 16
# [4432] 1522685876.874440 # RTSP[config]: video specific option: preset = faster
# [4432] 1522685876.874471 # RTSP[config]: video specific option: profile = main
# [4432] 1522685876.874501 # RTSP[config]: video specific option: refs = 1
# [4432] 1522685876.874532 # RTSP[config]: video specific option: slices = 4
# [4432] 1522685876.874563 # RTSP[config]: video specific option: threads = 4
# [4432] 1522685876.874594 # RTSP[config]: video specific option: tune = zerolatency
# [4432] 1522685876.874625 *** Crop disabled.
# [4432] 1522685876.878908 sink server: live555-rtsp-server registered
# [4432] 1522685876.878957 key-blocking initialized: 0+0 keys blocked.
# [4432] 1522685876.879015 sdl_replayer: sizeof(sdlmsg) = 64
# [4432] 1522685876.879465 sdl replayer: Replay using XTest (version 2.2) for display :0 screen 0, size=1280x1024.
# [4432] 1522685876.879793 XShm extention version 1.2 with shared pixmaps
# [4432] 1522685876.879832 X-Window-init: dimension: 1280x1024x8 @ 0/1
# [4432] 1522685876.879917 dpipe: 'video-0' initialized, 8 frames, framesize = 16384092
# [4432] 1522685876.913130 video-source: video-0 initialized max-curr-out = (2560x1600)-(1280x1024)-(1280x1024)
# [4432] 1522685876.914241 Frame converter created: from (1280,1024)[30] -> (1280,1024)[0]
# [4432] 1522685876.914343 dpipe: 'filter-0' initialized, 8 frames, framesize = 16384092
# [4432] 1522685876.948463 video encoder: video source #0 from 'filter-0' (1280x1024).
# [4432] 1522685876.948720 vencoder-init: option b = 3000000
# [4432] 1522685876.948755 vencoder-init: option g = 48
# [4432] 1522685876.948783 vencoder-init: option intra-refresh = 1
# [4432] 1522685876.948811 vencoder-init: option me_method = dia
# [4432] 1522685876.948839 vencoder-init: option me_range = 16
# [4432] 1522685876.948867 vencoder-init: option preset = faster
# [4432] 1522685876.948894 vencoder-init: option profile = main
# [4432] 1522685876.948921 vencoder-init: option refs = 1
# [4432] 1522685876.948949 vencoder-init: option slices = 4
# [4432] 1522685876.948977 vencoder-init: option threads = 4
# [4432] 1522685876.949004 vencoder-init: option tune = zerolatency
[libx264 @ 0x9518b40] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX AVX2 FMA3 LZCNT BMI2
[libx264 @ 0x9518b40] profile Main, level 3.2
[libx264 @ 0x9518b40] 264 - core 142 - H.264/MPEG-4 AVC codec - Copyleft 2003-2014 - http://www.videolan.org/x264.html - options: cabac=1 ref=1 deblock=1:0:0 analyse=0x1:0x111 me=dia subme=4 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=1 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=4 lookahead_threads=4 sliced_threads=1 slices=4 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=1 keyint=48 keyint_min=4 scenecut=40 intra_refresh=1 rc=abr mbtree=0 bitrate=3000 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
# [4432] 1522685876.958913 video encoder: initialized.
# [4432] 1522685876.959008 video encoder: ffmpeg-video-encoder registered
# [4432] 1522685876.959137 RGB2YUV filter[4443]: pipe#0 from 'video-0' to 'filter-0' (output-resolution=1280x1024)
# [4432] 1522685876.959229 video source thread started: tid=4442
# [4432] 1522685876.959290 controller socket: socket address [0.0.0.0:8555]
# [4432] 1522685876.959337 controller server started: tid=4441.
# [4432] 1522685876.960458 encoder: packet queue initialized (3x3145728 bytes)
# [4432] 1522685876.960516 qos-measurement: initialized.
# [4432] 1522685876.960587 (Use port 8000 for optional RTSP-over-HTTP tunneling.)
# [4432] 1522685983.386797 video encdoer: all started (1)
# [4432] 1522685983.386926 encoder client registered: total 1 clients.
# [4432] 1522685983.386990 encoder: pktqueue #0 callback registered (0xf55a88a0)
# [4432] 1522685983.387065 video encoder: h.264/found sps@4(24); pps@32(4)
# [4432] 1522685983.387118 GAMediaSubsession: video/H264 SPS=0xdcfc346c(24); PPS=0xdcfc356c(4); profile_level_id=4d4020
# [4432] 1522685983.387191 qos: add sink#1 for H.264, rtpsink=0xdc6061f8
# [4432] 1522685983.387255 encoder client unregistered: 0 clients left.
# [4432] 1522685983.387290 encoder: no more clients, quitting ...
# [4432] 1522685983.387355 video encoding started: tid=4445 1280x1024@24fps, nalbuf_size=15828640, pic_in_size=1966080.
# [4432] 1522685983.387402 video encoder: thread terminated (tid=4445).
# [4432] 1522685983.387446 video encdoer: all stopped (1)
[libx264 @ 0x9518b40] final ratefactor: 23.57
# [4432] 1522685983.388265 video encoder: deinitialized.
# [4432] 1522685983.741415 video encoder: video source #0 from 'filter-0' (1280x1024).
# [4432] 1522685983.741772 vencoder-init: option b = 3000000
# [4432] 1522685983.741819 vencoder-init: option g = 48
# [4432] 1522685983.741870 vencoder-init: option intra-refresh = 1
# [4432] 1522685983.741926 vencoder-init: option me_method = dia
# [4432] 1522685983.741975 vencoder-init: option me_range = 16
# [4432] 1522685983.742020 vencoder-init: option preset = faster
# [4432] 1522685983.742086 vencoder-init: option profile = main
# [4432] 1522685983.742123 vencoder-init: option refs = 1
# [4432] 1522685983.742154 vencoder-init: option slices = 4
# [4432] 1522685983.742188 vencoder-init: option threads = 4
# [4432] 1522685983.742218 vencoder-init: option tune = zerolatency
[libx264 @ 0xdc605f40] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX AVX2 FMA3 LZCNT BMI2
[libx264 @ 0xdc605f40] profile Main, level 3.2
[libx264 @ 0xdc605f40] 264 - core 142 - H.264/MPEG-4 AVC codec - Copyleft 2003-2014 - http://www.videolan.org/x264.html - options: cabac=1 ref=1 deblock=1:0:0 analyse=0x1:0x111 me=dia subme=4 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=1 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=4 lookahead_threads=4 sliced_threads=1 slices=4 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=1 keyint=48 keyint_min=4 scenecut=40 intra_refresh=1 rc=abr mbtree=0 bitrate=3000 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
# [4432] 1522685983.749123 video encoder: initialized.
# [4432] 1522685983.749175 video encdoer: all started (1)
# [4432] 1522685983.749209 encoder client registered: total 1 clients.
# [4432] 1522685983.749241 encoder: pktqueue #0 callback registered (0xf55a88a0)
# [4432] 1522685983.749301 video encoder: h.264/found sps@4(24); pps@32(4)
# [4432] 1522685983.749336 GAMediaSubsession: video/H264 SPS=0xdcfc353c(24); PPS=0xdcfc363c(4); profile_level_id=4d4020
# [4432] 1522685983.749385 qos: add sink#1 for H.264, rtpsink=0xe3471b60
# [4432] 1522685983.749480 video encoding started: tid=4454 1280x1024@24fps, nalbuf_size=15828640, pic_in_size=1966080.
# [4432] 1522685983.775570 first video frame written (pts=0)
# [4432] 1522686049.085120 encoder client unregistered: 0 clients left.
# [4432] 1522686049.085221 encoder: no more clients, quitting ...
# [4432] 1522686049.102929 video encoder: thread terminated (tid=4454).
# [4432] 1522686049.103052 video encdoer: all stopped (1)
[libx264 @ 0xdc605f40] frame I:1 Avg QP: 7.00 size: 447
[libx264 @ 0xdc605f40] frame P:1568 Avg QP: 0.01 size: 216
[libx264 @ 0xdc605f40] mb I I16..4: 99.9% 0.0% 0.1%
[libx264 @ 0xdc605f40] mb P I16..4: 3.2% 0.0% 0.0% P16..4: 0.0% 0.0% 0.0% 0.0% 0.0% skip:96.8%
[libx264 @ 0xdc605f40] final ratefactor: -29.32
[libx264 @ 0xdc605f40] coded y,uvDC,uvAC intra: 0.0% 0.0% 0.0% inter: 0.0% 0.0% 0.0%
[libx264 @ 0xdc605f40] i16 v,h,dc,p: 94% 0% 6% 0%
[libx264 @ 0xdc605f40] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 0% 0% 100% 0% 0% 0% 0% 0% 0%
[libx264 @ 0xdc605f40] i8c dc,h,v,p: 100% 0% 0% 0%
[libx264 @ 0xdc605f40] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0xdc605f40] kb/s:41.58
# [4432] 1522686049.104181 video encoder: deinitialized.
我认为 RTSP header 中的 IP 地址是导致连接失败的设备的 LAN IP。同样的软件在 LAN 上运行良好。感谢您的帮助。
最佳答案
如果您在 NAT 后面,gaminganywhere 客户端可能收不到流。
碰巧,这周我尝试了同样的事情。我在 EC2 实例上设置了一个 gaminganywhere 服务器,在我的机器上设置了一个客户端,我观察到了您所描述的确切行为。 (“未收到任何帧...”,DESCRIBE 回复中的私有(private) IP...)。起初我也认为服务器发送的私有(private) IP 是问题所在,但在我的情况下,我没有收到流只是因为我在 NAT 后面。
我尝试用 vlc 打开 RTSP URL,并且......它成功了。在用 wireshark 检查流量后,似乎 VLC 首先要求服务器通过 UDP 发送流,几秒钟后没有 UDP 数据包到达我的机器,它再次请求流,这次请求 TCP。然后 TCP 数据包开始流动,随后发生流式传输。
回到 GA,我找不到强制客户端请求 TCP 的配置选项(编辑:忽略本段),即使代码似乎允许这样做。所以我在修改代码后编译了客户端,强制使用TCP,这次流式传输成功了。 (我的更改既快又脏:我在调用 rtspClient->sendSetupCommand()
之前在 rtspclient.cpp
中添加了 rtpOverTCP = true
。 )
编辑:在更仔细地检查代码后,服务器配置中定义的 core.proto
应该在客户端配置中。我无法测试,但在客户端配置中添加 core.proto = tcp
应该可以。
(注意:gaminganywhere 的变更日志中提到了“NAT 打洞”功能。不确定它是什么或是否有帮助。)
关于linux - 通过 Internet 访问托管在 AWS 上的 RTSP 服务器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49615084/
我有一个简单的 Rtsp 客户端...客户端将 Rtsp 命令发送到 Rtsp 服务器并从服务器获取 RTP 数据包。 The problem is that after a time( about
所以我正在尝试创建一个流式传输音乐的 RTSP 服务器。 我不明白服务器如何播放音乐,不同的请求会得到当时正在播放的内容。 所以,整理我的问题: 1)服务器如何播放音乐文件? 2) 对服务器的请求如何
我已经安装 gst-rtsp-server我想尝试一个简单的代码。但是在编译时我收到以下错误: In function `main': test-launch01.c:(.text+0x64): un
已关闭。此问题不符合Stack Overflow guidelines 。目前不接受答案。 要求我们推荐或查找工具、库或最喜欢的场外资源的问题对于 Stack Overflow 来说是偏离主题的,因为
我刚刚开始研究流媒体库和底层协议(protocol)。我了解 rtsp/rtp 流媒体以及这两种协议(protocol)的用途。但是,如果我们需要 IP 地址、编解码器和 rtsp/rtp 协议(pr
我想从 Live-CAM 捕获 Rtsp 流,然后我想将其重新流式传输到另一个 Rtsp 服务器。 基本上,我的计算机将使用 FFMpeg 作为中继服务器。 我已经尝试过这个临时命令,但我无法让它工作
我正在使用 java web 应用程序使用 rtsp 从 IP 摄像机检索视频; rtsp url 在 url 本身中嵌入了用户名/密码,这似乎很不安全。例如rtsp://用户:密码@ip/... 有
对不起,我的英语不好 我正在为 rtsp 通信程序工作 此 RTSP 服务器在我的 SETUP 请求中回复 459 错误(不允许聚合操作) 我对此一无所知。 请帮我。我做错了什么? ==== Mess
对于这个问题的普遍性,我深表歉意。我尝试了很多东西,但似乎没有任何效果。我有服务器? (我们称它为 服务器 A)驻留在局域网中,那里也有一个 IP 网络摄像头。该网络摄像头不断在地址上提供 RTSP
对于这个问题的普遍性,我深表歉意。我尝试了很多东西,但似乎没有任何效果。我有服务器? (我们称它为 服务器 A)驻留在局域网中,那里也有一个 IP 网络摄像头。该网络摄像头不断在地址上提供 RTSP
我有一个 RTSP 视频源 (h265),我可以使用 VLC 显示它。我想将流分成两部分,一个以原始分辨率(使用 h265 编码),另一个以新的较低分辨率(使用 h264 编码)。这两个新流也应该是
实时流协议(protocol) (RTSP) 版本 1.0 发布为 RFC 2326 1998 年。 现在将近 20 年后,2.0 版发布为 RFC 7826 2016 年 12 月。 我想知道这些更
我想使用 Kurento 作为媒体服务器,它将 WebRTC 作为输入并提供 RTSP 流作为 url:rtsp://kurento/streamName 这可能吗? 我看到了https://gith
我正在使用 rtsp-simple-server ( https://github.com/aler9/rtsp-simple-server ) 并向 RTSP 服务器提供 FFMPEG 流。 我使用
关注:https://github.com/kyriesent/node-rtsp-stream和 How to display IP camera feed from an RTSP url ont
我目前有一个采用 H.264 编码的 IP 摄像机流式视频 (RTSP)。 我想使用 FFmpeg 将此 H.264 编码流转换为另一个 RTSP 流,但 MPEG-2 编码。我该怎么做?我应该使用哪
我目前正在为 Android 设备开发通过 RTSP/UDP 进行的视频流。我的目标是通过 4G 蜂窝网络流式传输视频。我面临的问题是所使用的方法不适用于 Samsung Galaxy Core SM
获取 [rtsp @ 000002aa9df0cb80] 方法设置失败:500 内部服务器错误 当我尝试在 opencv python 中流式传输 rtsp 相机但一段时间后它可以正常工作几分钟并且不
我是这个论坛的新手,我的英语水平不是最好的! 我有一个网站,在那里我发布了摄像机的视频流,以显示在嵌套时间现场发生的事情!一个具有高 IT 技能的人为我构建了一个小服务器用于重新流 (Datarhei
我收到一个 HTTP 错误 400,以响应下面显示的函数正在处理的以下 RTSP URL。 描述 rtsp://root:pass@192.168.1.47/axis-media/media.amp
我是一名优秀的程序员,十分优秀!