streaming .mp4 file with appsrc from android via rtsp

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

streaming .mp4 file with appsrc from android via rtsp

valerik931
I want to start rtsp server, get from android code byte array and put it in pipeline via appsrc. how can I config appsrc caps to make it right and is this pipeline right?

"appsrc name=mysrc is-live=true max-bytes=0 do-timestamp=true min-latency=0 ! h264parse ! rtph264pay name=pay0 pt=96 "
Reply | Threaded
Open this post in threaded view
|

Re: streaming .mp4 file with appsrc from android via rtsp

Nicolas Dufresne-5
Le vendredi 16 juin 2017 à 06:25 -0700, valerik931 a écrit :
> I want to start rtsp server, get from android code byte array and put it in
> pipeline via appsrc. how can I config appsrc caps to make it right and is
> this pipeline right?

You need to set the "caps" property on appsrc, because you push the
first frame. The caps will depend on the H264 stream format you are
using. "video/x-h264,stream-format=..." should be sufficient, stream-
format would be one of avc, avc3 or byte-stream.
>
> "appsrc name=mysrc is-live=true max-bytes=0 do-timestamp=true min-latency=0
> ! h264parse ! rtph264pay name=pay0 pt=96 "
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (188 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: streaming .mp4 file with appsrc from android via rtsp

valerik931
I set caps to appsrc after media factory configuration.

Like this:
    g_object_set(G_OBJECT(data->source), "caps",
                 gst_caps_new_simple ("video/x-h264",
                                      "format", G_TYPE_STRING, "RGB16",
                                      "codec_data", GST_TYPE_BUFFER, buffer,
                                      "alignment", G_TYPE_STRING, "au",
                                      "stream-format",G_TYPE_STRING,"avc",
                                      "width", G_TYPE_INT, video_width,
                                      "height", G_TYPE_INT, video_height,
                                      "profile", G_TYPE_STRING, "baseline", NULL), NULL);
But I get this message:
gst_h264_parse_set_caps:<h264parse0> refused caps video/x-h264, format=(string)RGB16, codec_data=(buffer)<long sequence>

Is it right settings or I need to add smth or remove?