filesink and tcpserversink

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

filesink and tcpserversink

Akmal
Hello everyone,

I'm currently using GStreamer 1.8.3 on Jetson TX2 Linux. By using the pipeline below on command line, it works perfectly.

gst-launch-1.0 nvcamerasrc aeLock=true sensor-id=0 fpsRange='30.0 30.0' intent=3 ! 'video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080, format=(string)I420, framerate=(fraction)30/1' ! tee name=t ! omxh264enc bitrate=400000 control-rate=constant-skip-frames ! mpegtsmux name=mux ! filesink location=test.mp4 t. ! queue ! nvtee ! nvvidconv ! 'video/x-raw, width=(int)640, height=(int)480' ! x264enc tune=zerolatency byte-stream=true ! tcpserversink host=192.168.x.x port=7001

But when I'm using the same pipeline in gst_parse_launch in a C/C++ program, 

gst_parse_launch("nvcamerasrc aeLock=true sensor-id=0 fpsRange='30.0 30.0' intent=3 ! 'video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080, format=(string)I420, framerate=(fraction)30/1' ! tee name=t ! omxh264enc bitrate=400000 control-rate=constant-skip-frames ! mpegtsmux name=mux ! filesink location=test.mp4 t. ! queue ! nvtee ! nvvidconv ! 'video/x-raw, width=(int)640, height=(int)480' ! x264enc tune=zerolatency byte-stream=true ! tcpserversink host=192.168.x.x port=7001", NULL);

It gives me these kinds of errors and warning :

(gstleopard:4137): GStreamer-CRITICAL **: gst_element_make_from_uri: assertion 'gst_uri_is_valid (uri)' failed
(gstleopard:4137): GStreamer-CRITICAL **: gst_element_make_from_uri: assertion 'gst_uri_is_valid (uri)' failed
(gstleopard:4137): GStreamer-WARNING **: Trying to link elements t and queue0 that don't share a common ancestor: queue0 hasn't been added to a bin or pipeline, and t is in pipeline0
 
Anybody knows some tricks to make it work on C/C++ program?

Thanks in advance
Akmal

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: filesink and tcpserversink

Tim Müller
On Wed, 2018-07-11 at 11:06 +0200, Akmal Hisyam wrote:

Hi,

> But when I'm using the same pipeline in gst_parse_launch in a C/C++
> program,
>
> > gst_parse_launch("nvcamerasrc aeLock=true sensor-id=0
> > fpsRange='30.0 30.0' intent=3 ! 'video/x-raw(memory:NVMM),
> > width=(int)1920, height=(int)1080, format=(string)I420,
> > framerate=(fraction)30/1' ! tee name=t ! omxh264enc bitrate=400000
> > control-rate=constant-skip-frames ! mpegtsmux name=mux ! filesink
> > location=test.mp4 t. ! queue ! nvtee ! nvvidconv ! 'video/x-raw,
> > width=(int)640, height=(int)480' ! x264enc tune=zerolatency byte-
> > stream=true ! tcpserversink host=192.168.x.x port=7001", NULL);
>
> It gives me these kinds of errors and warning :
>
> > (gstleopard:4137): GStreamer-CRITICAL **:
> > gst_element_make_from_uri: assertion 'gst_uri_is_valid (uri)'
> > failed
> > (gstleopard:4137): GStreamer-CRITICAL **:
> > gst_element_make_from_uri: assertion 'gst_uri_is_valid (uri)'
> > failed
> > (gstleopard:4137): GStreamer-WARNING **: Trying to link elements t
> > and queue0 that don't share a common ancestor: queue0 hasn't been
> > added to a bin or pipeline, and t is in pipeline0

I think those warnings indicate problems with the parse-launch syntax
parser.

I think what might throw it off is the use of the single quotes which
when using the gst-launch-1.0 command on the command line are really
for the shell so never passed to gst_parse_launch(). Try using double
quotes (foo="bar bar").

Same for the caps filters, try dropping the single quotes and get rid
of the spaces, e.g.:

 .... ! video/x-raw,width=(int)640,height=(int)480 ! ...


If you want to see the pipeline string that gets passed to
gst_parse_launch() when you use the command line tool you can do that
with:

 $ GST_DEBUG=GST_PIPELINE:6 gst-launch-1.0 ... 2>&1 | grep
gst_parse_launch_full


Cheers
-Tim

--
Tim Müller, Centricular Ltd - http://www.centricular.com

Join us at the GStreamer Conference! 25-26 October 2018 in Edinburgh,
Scotland
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel