小编ens*_*nic的帖子

如何使用curl在分块帖子中指定块大小

我正在尝试将音频发送到希望将音频作为分块帖子的网络服务。发送预先录制的文件工作正常,但运行下面的代码不会像看起来那样向服务器发送任何内容。卷曲是否试图将所有内容都发送到一个块中?我找不到任何选项,例如要求它对每个 xxx 字节进行分块。

gst-launch-1.0 pulsesrc ! "audio/x-raw,rate=16000,channels=1,format=S16LE" ! fdsink sync=false | \
curl --header "Transfer-Encoding: chunked" --data-binary @- http://...
Run Code Online (Sandbox Code Playgroud)

curl chunked-encoding

7
推荐指数
1
解决办法
6099
查看次数

如何使用 gstreamer 创建实时 Steam?

我想流式传输我的网络摄像头,我尝试使用 vlc,但同一网络上的服务器和客户端之间有 10-15 秒的延迟

vlc v4l2:// :v4l2-dev=/dev/video0 :v4l2-width=640 :v4l2-height=480 --sout="#transcode{vcodec=h264,vb=800,scale=1,acodec=mp4a,ab=128,channels=2,samplerate=44100}:rtp{sdp=rtsp://:8554/live.ts}" -I dummy
Run Code Online (Sandbox Code Playgroud)

现在我想测试 gstreamer,但我找不到任何示例,如何使用 gstreamer 设置实时网络摄像头流(rtsp 或 http)?

gstreamer gst-launch

5
推荐指数
1
解决办法
5378
查看次数

xsd 验证同时抱怨缺少属性和错误属性

我从 xsd 验证中得到了一些精神分裂的行为。此链接显示了 xml 和 xsd + 在线模式验证器中的错误。当我使用 xmllint 在本地运行此命令时

xmllint --noout --nonet --schema devhelp2.xsd tester.devhelp2
Run Code Online (Sandbox Code Playgroud)

我收到类似的警告:

tester.devhelp2:5: element sub: Schemas validity error : Element '{urn:devhelp}sub', attribute 'name': The attribute 'name' is not allowed.
tester.devhelp2:5: element sub: Schemas validity error : Element '{urn:devhelp}sub', attribute 'link': The attribute 'link' is not allowed.
tester.devhelp2:5: element sub: Schemas validity error : Element '{urn:devhelp}sub': The attribute '{urn:devhelp}name' is required but missing.
tester.devhelp2:5: element sub: Schemas validity error : Element '{urn:devhelp}sub': The attribute …
Run Code Online (Sandbox Code Playgroud)

xml schema xsd-validation

4
推荐指数
1
解决办法
2696
查看次数