【问题标题】:How to escape quotes inside quotes for a sink defintion for gstreamer command line如何为 gstreamer 命令行的接收器定义转义引号内的引号
【发布时间】:2019-08-08 18:58:45
【问题描述】:

如何在 gstreamer 命令行的引号中使用引号。这是使用 bash shell 的 gstreamer 版本 1.14.4 和 ubuntu 版本 4.9.140-tegra,均在 Jetson Nano 开发系统上运行。

我尝试了各种逃生方法,但都没有奏效。

以下内容在接收器定义中带有双引号,并且不起作用。

gst-launch-1.0 playbin uri=file:///home/tom/Videos/UHD_demo_Nature.mp4 sink="glupload !  glshader fragment="\"`ca
t testfrag.frag`\"" ! glimagesinkelement"

我认为这是一个转义序列问题,我尝试了很多方法来逃避,但我不希望任何人看到这个问题。 opengl 片段是正确的,可以使用简单的命令行示例:

gst-launch-1.0 videotestsrc ! glupload ! glshader fragment="\"`cat testfrag.frag`\"" ! glimagesink

任何想法是我需要纠正的关于双引号的命令 shell 问题或 gstreamer 问题。

这是片段:

\#version 100

  #ifdef GL_ES

  precision mediump float;

  #endif

  varying vec2 v_texcoord;

  uniform sampler2D tex;

  uniform float time;

  uniform float width;

  uniform float height;
  vec4 myColor;


  void main () {

        myColor = texture2D( tex, v_texcoord );
        gl_FragColor = myColor;
        gl_FragColor.r = myColor.b;
        gl_FragColor.b = myColor.r;

  }

当我运行命令行时,出现以下错误:

Generates an error message:
WARNING: erroneous pipeline: no element "100"

【问题讨论】:

    标签: c command-line gstreamer double-quotes sink


    【解决方案1】:

    您是否尝试过%22 转义引号?

    This 站点显示了 html 编码,我从这一行得到了这个想法:

    新 URI 的查询字符串,以 '&' 分隔查询元素。包含“&”字符的元素应将它们编码为“%26”。

    来自this 网站。

    【讨论】:

      猜你喜欢
      • 2014-01-24
      • 1970-01-01
      • 2011-09-24
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-08-21
      • 2010-11-18
      • 1970-01-01
      相关资源
      最近更新 更多