Gstreamer: error de análisis de mayúsculas opus, ¿alguien sabe cómo solucionarlo?

2022-12-01 06:26:34

¿Qué está mal en mi análisis? Está fallando al analizar correctamente las mayúsculas opus (pero no speex) y causando que no funcione, alguien sabe, ¿dónde tengo que agregar más símbolos \ o / o " o ' para que sean mayúsculas válidas?

$ gst-launch-0.10 -v gstrtpbin name=rtpbin latency=100 udpsrc caps="application/x-rtp, media=(string)audio, clock-rate=(int)48000, encoding-name=(string)X-GST-OPUS-DRAFT-SPITTKA-00, caps=(string)\"audio/x-opus\,\ multistream\=\(boolean\)false\,\ streamheader\=\(buffer\)\<\ 4f707573486561640101000080bb0000000000\,\ 4f707573546167731e000000456e636f6465642077697468204753747265616d6572204f707573656e63010000001a0000004445534352495054494f4e3d617564696f74657374207761766501\ \>\", ssrc=(uint)3090172512, payload=(int)96, clock-base=(uint)4268257583, seqnum-base=(uint)10001" port=5002 ! rtpbin.recv_rtp_sink_1 rtpbin. ! rtpopusdepay ! opusdec ! audioconvert ! audioresample ! alsasink device=2 name=uudpsink0 udpsrc port=5003 ! rtpbin.recv_rtcp_sink_1 rtpbin.send_rtcp_src_1 ! udpsink port=5007 host=%s sync=false async=false

(gst-plugin-scanner:25672): GStreamer-WARNING **: Failed to load plugin '/usr/lib/gstreamer-0.10/libgstsimsyn.so': /usr/lib/gstreamer-0.10/libgstsimsyn.so: undefined symbol: gst_controller_sync_values

(gst-plugin-scanner:25672): GStreamer-WARNING **: Failed to load plugin '/usr/lib/gstreamer-0.10/libgstaudiodelay.so': /usr/lib/gstreamer-0.10/libgstaudiodelay.so: undefined symbol: gst_base_transform_set_gap_aware

(gst-plugin-scanner:25672): GStreamer-WARNING **: Failed to load plugin '/usr/lib/gstreamer-0.10/libgstbml.so': /usr/lib/gstreamer-0.10/libgstbml.so: undefined symbol: gst_base_src_set_format
WARNING: erroneous pipeline: could not set property "caps" in element "udpsrc0" to "application/x-rtp, media=(string)audio, clock-rate=(int)48000, encoding-name=(string)X-GST-OPUS-DRAFT-SPITTKA-00, caps=(string)"audio/x-opus\,\ multistream\=\(boolean\)false\,\ streamheader\=\(buffer\)\<\ 4f707573486561640101000080bb0000000000\,\ 4f707573546167731e000000456e636f6465642077697468204753747265616d6572204f707573656e63010000001a0000004445534352495054494f4e3d617564696f74657374207761766501\ \>", ssrc=(uint)3090172512, payload=(int)96, clock-base=(uint)4268257583, seqnum-base=(uint)10001"

- user285594

Source
Responder


0
  • No creo que se necesite un escape especial. Si su canalización es correcta, esto debería funcionar:

    gst-launch-0.10 -v gstrtpbin name=rtpbin latency=100 udpsrc caps="application/x-rtp, media=(string)audio, clock-rate=(int)48000, encoding-name=(string)X-GST-OPUS-DRAFT-SPITTKA-00, caps=(string)audio/x-opus, multistream=(boolean)false, streamheader=(buffer)<4f707573486561640101000080bb0000000000,4f707573546167731e000000456e636f6465642077697468204753747265616d6572204f707573656e63010000001a0000004445534352495054494f4e3d617564696f74657374207761766501>, ssrc=(uint)3090172512, payload=(int)96, clock-base=(uint)4268257583, seqnum-base=(uint)10001" port=5002 ! rtpbin.recv_rtp_sink_1 rtpbin. ! rtpopusdepay ! opusdec ! audioconvert ! audioresample ! alsasink device=2 name=uudpsink0 udpsrc port=5003 ! rtpbin.recv_rtcp_sink_1 rtpbin.send_rtcp_src_1 ! udpsink port=5007 host=%s sync=false async=false
    

    Si necesita cuidar los caracteres especiales que bash podría estar interpretando, cambie caps="..." a caps='...'.

    Aquí hay una versión torpe de Python:

    import subprocess                                                                                                                                                                                  
    
    args=[  'gst-launch-0.10',
            '-v',
            'gstrtpbin',
            'name=rtpbin',
            'latency=100',
            'udpsrc',
            'caps="application/x-rtp, media=(string)audio, clock-rate=(int)48000, encoding-name=(string)X-GST-OPUS-DRAFT-SPITTKA-00, caps=(string)audio/x-opus, multistream=(boolean)false, streamheader=(buffer)<4f707573486561640101000080bb0000000000,4f707573546167731e000000456e636f6465642077697468204753747265616d6572204f707573656e63010000001a0000004445534352495054494f4e3d617564696f74657374207761766501>, ssrc=(uint)3090172512, payload=(int)96, clock-base=(uint)4268257583, seqnum-base=(uint)10001"',
            'port=5002',
            '!',
            'rtpbin.recv_rtp_sink_1',
            'rtpbin.',
            '!',
            'rtpopusdepay',
            '!',
            'opusdec',
            '!',
            'audioconvert',
            '!',
            'audioresample',
            '!',
            'alsasink',
            'device=2',
            'name=uudpsink0',
            'udpsrc',
            'port=5003',
            '!',
            'rtpbin.recv_rtcp_sink_1',
            'rtpbin.send_rtcp_src_1',
            '!',
            'udpsink',
            'port=5007',
            'host=%s',
            'sync=false',
            'async=false',
    
            ]
    
    child = subprocess.Popen(args, stdout=subprocess.PIPE)
    streamdata = child.communicate()[0] # streamdata will contain output of gst-launch-0.10
    rc = child.returncode # rc will contain the returncode of gst-launch-0.10
    
    print streamdata
    print "\nprocess returned %d" %(rc)
    

    Creo que es mejor encontrar un buen módulo de python para gstreamer que usar un subproceso o similar.

    ¡Espero que esto ayude!