Unexpected behaviour when switching from videotestsrc to appsrc

themanonthemoon adkyriazis at gmail.com
Tue Sep 18 07:34:52 UTC 2018


I have a pipeline that goes from a source, gets mpeg1 encoded, gets contained
in an mpeg-ts transport and gets served via tcpserversink. This gets served
to a js client that demuxes/decodes etc.

videotestsrc is-live=true ! video/x-raw, format=RGB16,width=640,height=480 !
videoconvert ! avenc_mpeg1video ! mpegtsmux ! tcpserversink host=127.0.0.1
port=8081

This works, and I can correctly see the video in the browser.

As soon as I substitute my own custom source into the pipeline, I cannot get
the video to play

appsrc name=src ! video/x-raw, format=RGB16,width=640,height=480 !
videoconvert ! avenc_mpeg1video ! mpegtsmux ! tcpserversink host=127.0.0.1
port=8081

width additionally set caps and settings:

g_object_set(G_OBJET(appsrc),
"stream-type",0,
"format", GST_FORMAT_TIME,
"is-live", TRUE,
"do-timestamp", TRUE,
NULL);

g_object_set(G_OBJECT(appsrc), "caps",
gst_caps_new_simple("video/x-raw",
"format", G_TYPE_STRING, "RGB16",
"width", G_TYPE_INT, 640,
"height", G_TYPE_INT, 480,
"framerate", GST_TYPE_FRACTION, 5, 1, NULL), NULL);


Note: this appsrc element worked correctly in all other pipelines I have
used so far. I suspect it has something to do with the combination of MPEG1
encoding with my appsrc element.

Any thoughts as to why I can't seamlessly switch out the test src for my
own?





--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/


More information about the gstreamer-devel mailing list