- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试使用带有 ipv6 地址的 opencv 中的 VideoCapture 函数从我的树莓派流式传输到我的 debian 虚拟机,但是当我尝试时,标题中出现错误。
我已经确认通过 netcat 和 mplayer 可以访问 ipv6 地址,具体如下:
Debian 主机:
网猫-l -6 -u 2222
树莓派:
/opt/vc/bin/raspivid -t 0 -w 300 -h 300 -hf -fps 20 -o - | nc -u(ipv6地址)2222
代码:
VideoCapture vcap;
const string videoStreamAddress = "udp://" + "(my Ipv6 address)" + ":2222";
vcap.open(videoStreamAddress);
最佳答案
以您指定的格式使用的 IPv6 地址 <protocol>://
, 需要用括号括起来( [
和 ]
)。这最初是在 RFC 2732, Format for Literal IPv6 Addresses in URL's 中指定的。并继续 RFC 3896:, Uniform Resource Identifier (URI): Generic Syntax :
3.2.2. Host
The host subcomponent of authority is identified by an IP literalencapsulated within square brackets, an IPv4 address in dotted-decimal form, or a registered name. The host subcomponent is case-insensitive. he presence of a host subcomponent within a URI does notimply that the scheme requires access to the given host on theInternet. In many cases, the host syntax is used only for the sake ofreusing the existing registration process created and deployed forDNS, thus obtaining a globally unique name without the cost ofdeploying another registry. However, such use comes with its owncosts: domain name ownership may change over time for reasons notanticipated by the URI producer. In other cases, the data within thehost component identifies a registered name that has nothing to dowith an Internet host. We use the name "host" for the ABNF rulebecause that is its most common purpose, not its only purpose.
host = IP-literal / IPv4address / reg-name
The syntax rule for host is ambiguous because it does not completelydistinguish between an IPv4address and a reg-name. In order todisambiguate the syntax, we apply the "first-match-wins" algorithm: Ifhost matches the rule for IPv4address, then it should be considered anIPv4 address literal and not a reg-name. Although host iscase-insensitive, producers and normalizers should use lowercase forregistered names and hexadecimal addresses for the sake of uniformity,while only using uppercase letters for percent-encodings.
A host identified by an Internet Protocol literal address, version 6[RFC3513] or later, is distinguished by enclosing the IP literalwithin square brackets ("[" and "]"). This is the only place wheresquare bracket characters are allowed in the URI syntax. Inanticipation of future, as-yet-undefined IP literal address formats,an implementation may use an optional version flag to indicate such aformat explicitly rather than rely on heuristic determination.
IP-literal = "[" ( IPv6address / IPvFuture ) "]"
IPvFuture = "v" 1*HEXDIG "." 1*( unreserved / sub-delims / ":" )The version flag does not indicate the IP version; rather, itindicates future versions of the literal format. As such,implementations must not provide the version flag for the existingIPv4 and IPv6 literal address forms described below. If a URIcontaining an IP-literal that starts with "v" (case-insensitive),indicating that the version flag is present, is dereferenced by anapplication that does not know the meaning of that version flag, thenthe application should return an appropriate error for "addressmechanism not supported".
A host identified by an IPv6 literal address is represented inside thesquare brackets without a preceding version flag. The ABNF providedhere is a translation of the text definition of an IPv6 literaladdress provided in [RFC3513]. This syntax does not support IPv6scoped addressing zone identifiers.
A 128-bit IPv6 address is divided into eight 16-bit pieces. Each pieceis represented numerically in case-insensitive hexadecimal, using oneto four hexadecimal digits (leading zeroes are permitted). The eightencoded pieces are given most-significant first, separated by coloncharacters. Optionally, the least-significant two pieces may insteadbe represented in IPv4 address textual format. A sequence of one ormore consecutive zero-valued 16-bit pieces within the address may beelided, omitting all their digits and leaving exactly two consecutivecolons in their place to mark the elision.
IPv6address = 6( h16 ":" ) ls32
/ "::" 5( h16 ":" ) ls32
/ [ h16 ] "::" 4( h16 ":" ) ls32
/ [ *1( h16 ":" ) h16 ] "::" 3( h16 ":" ) ls32
/ [ *2( h16 ":" ) h16 ] "::" 2( h16 ":" ) ls32
/ [ *3( h16 ":" ) h16 ] "::" h16 ":" ls32
/ [ *4( h16 ":" ) h16 ] "::" ls32
/ [ *5( h16 ":" ) h16 ] "::" h16
/ [ *6( h16 ":" ) h16 ] "::"
ls32 = ( h16 ":" h16 ) / IPv4address
; least-significant 32 bits of address
h16 = 1*4HEXDIG
; 16 bits of address represented in hexadecimalA host identified by an IPv4 literal address is represented indotted-decimal notation (a sequence of four decimal numbers in therange 0 to 255, separated by "."), as described in [RFC1123] byreference to [RFC0952]. Note that other forms of dotted notation maybe interpreted on some platforms, as described in Section 7.4, butonly the dotted-decimal form of four octets is allowed by thisgrammar.
IPv4address = dec-octet "." dec-octet "." dec-octet "." dec-octet
dec-octet = DIGIT ; 0-9
/ %x31-39 DIGIT ; 10-99
/ "1" 2DIGIT ; 100-199
/ "2" %x30-34 DIGIT ; 200-249
/ "25" %x30-35 ; 250-255A host identified by a registered name is a sequence of charactersusually intended for lookup within a locally defined host or servicename registry, though the URI's scheme-specific semantics may requirethat a specific registry (or fixed name table) be used instead. Themost common name registry mechanism is the Domain Name System (DNS). Aregistered name intended for lookup in the DNS uses the syntax definedin Section 3.5 of [RFC1034] and Section 2.1 of [RFC1123]. Such a nameconsists of a sequence of domain labels separated by ".", each domainlabel starting and ending with an alphanumeric character and possiblyalso containing "-" characters. The rightmost domain label of a fullyqualified domain name in DNS may be followed by a single "." andshould be if it is necessary to distinguish between the completedomain name and some local domain.
reg-name = *( unreserved / pct-encoded / sub-delims )
If the URI scheme defines a default for host, then that defaultapplies when the host subcomponent is undefined or when the registeredname is empty (zero length). For example, the "file" URI scheme isdefined so that no authority, an empty host, and "localhost" all meanthe end-user's machine, whereas the "http" scheme considers a missingauthority or empty host invalid.
This specification does not mandate a particular registered namelookup technology and therefore does not restrict the syntax of reg-name beyond what is necessary for interoperability. Instead, itdelegates the issue of registered name syntax conformance to theoperating system of each application performing URI resolution, andthat operating system decides what it will allow for the purpose ofhost identification. A URI resolution implementation might use DNS,host tables, yellow pages, NetInfo, WINS, or any other system forlookup of registered names. However, a globally scoped naming system,such as DNS fully qualified domain names, is necessary for URIsintended to have global scope. URI producers should use names thatconform to the DNS syntax, even when use of DNS is not immediatelyapparent, and should limit these names to no more than 255 charactersin length.
The reg-name syntax allows percent-encoded octets in order torepresent non-ASCII registered names in a uniform way that isindependent of the underlying name resolution technology. Non-ASCIIcharacters must first be encoded according to UTF-8 [STD63], and theneach octet of the corresponding UTF-8 sequence must be percent-encoded to be represented as URI characters. URI producingapplications must not use percent-encoding in host unless it is usedto represent a UTF-8 character sequence. When a non-ASCII registeredname represents an internationalized domain name intended forresolution via the DNS, the name must be transformed to the IDNAencoding [RFC3490] prior to name lookup. URI producers should providethese registered names in the IDNA encoding, rather than apercent-encoding, if they wish to maximize interoperability withlegacy URI resolvers.
关于opencv - vcap 无法打开 [udp @ 0x56378e8a76a0] 绑定(bind)失败 : Permission denied,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55384201/
我通过 spring ioc 编写了一些 Rest 应用程序。但我无法解决这个问题。这是我的异常(exception): org.springframework.beans.factory.BeanC
我对 TestNG、Spring 框架等完全陌生,我正在尝试使用注释 @Value通过 @Configuration 访问配置文件注释。 我在这里想要实现的目标是让控制台从配置文件中写出“hi”,通过
为此工作了几个小时。我完全被难住了。 这是 CS113 的实验室。 如果用户在程序(二进制计算器)结束时选择继续,我们需要使用 goto 语句来到达程序的顶部。 但是,我们还需要释放所有分配的内存。
我正在尝试使用 ffmpeg 库构建一个小的 C 程序。但是我什至无法使用 avformat_open_input() 打开音频文件设置检查错误代码的函数后,我得到以下输出: Error code:
使用 Spring Initializer 创建一个简单的 Spring boot。我只在可用选项下选择 DevTools。 创建项目后,无需对其进行任何更改,即可正常运行程序。 现在,当我尝试在项目
所以我只是在 Mac OS X 中通过 brew 安装了 qt。但是它无法链接它。当我尝试运行 brew link qt 或 brew link --overwrite qt 我得到以下信息: ton
我在提交和 pull 时遇到了问题:在提交的 IDE 中,我看到: warning not all local changes may be shown due to an error: unable
我跑 man gcc | grep "-L" 我明白了 Usage: grep [OPTION]... PATTERN [FILE]... Try `grep --help' for more inf
我有一段代码,旨在接收任何 URL 并将其从网络上撕下来。到目前为止,它运行良好,直到有人给了它这个 URL: http://www.aspensurgical.com/static/images/a
在过去的 5 个小时里,我一直在尝试在我的服务器上设置 WireGuard,但在完成所有设置后,我无法 ping IP 或解析域。 下面是服务器配置 [Interface] Address = 10.
我正在尝试在 GitLab 中 fork 我的一个私有(private)项目,但是当我按下 fork 按钮时,我会收到以下信息: No available namespaces to fork the
我这里遇到了一些问题。我是 node.js 和 Rest API 的新手,但我正在尝试自学。我制作了 REST API,使用 MongoDB 与我的数据库进行通信,我使用 Postman 来测试我的路
下面的代码在控制台中给出以下消息: Uncaught DOMException: Failed to execute 'appendChild' on 'Node': The new child el
我正在尝试调用一个新端点来显示数据,我意识到在上一组有效的数据中,它在数据周围用一对额外的“[]”括号进行控制台,我认为这就是问题是,而新端点不会以我使用数据的方式产生它! 这是 NgFor 失败的原
我正在尝试将我的 Symfony2 应用程序部署到我的 Azure Web 应用程序,但遇到了一些麻烦。 推送到远程时,我在终端中收到以下消息 remote: Updating branch 'mas
Minikube已启动并正在运行,没有任何错误,但是我无法 curl IP。我在这里遵循:https://docs.traefik.io/user-guide/kubernetes/,似乎没有提到关闭
每当我尝试docker组成任何项目时,都会出现以下错误。 我尝试过有和没有sudo 我在这台机器上只有这个问题。我可以在Mac和Amazon WorkSpace上运行相同的容器。 (myslabs)
我正在尝试 pip install stanza 并收到此消息: ERROR: No matching distribution found for torch>=1.3.0 (from stanza
DNS 解析看起来不错,但我无法 ping 我的服务。可能是什么原因? 来自集群中的另一个 Pod: $ ping backend PING backend.default.svc.cluster.l
我正在使用Hibernate 4 + Spring MVC 4当我开始 Apache Tomcat Server 8我收到此错误: Error creating bean with name 'wel
我是一名优秀的程序员,十分优秀!