Encoding raw video

Dušan Poizl poizl at maindata.sk
Mon Oct 27 03:37:04 PDT 2014


my appsrc creation code

    GstVideoFormat format = gst_video_format_from_masks(24, 32, 4321,
255<<8, 255<<16, 255<<24, 0);
    GstVideoInfo info;
    gst_video_info_init(&info);
    gst_video_info_set_format(&info, format, w, h);
    info.fps_n = framerate.numerator;
    info.fps_d = framerate.denominator;

    GstCaps *caps = gst_video_info_to_caps(&info);
    gst_app_src_set_caps(GST_APP_SRC(appsrc), caps);

    gst_caps_unref(caps);
    g_object_set(appsrc,
                 "stream-type", GST_APP_STREAM_TYPE_STREAM,
                 "format", GST_FORMAT_TIME,
                 "do-timestamp", TRUE,
                 "is-live", TRUE,
                 "min-latency", (gint64)0,
                 "blocksize", info.size, NULL);

also why do you have three videoconvert elements? one is enough. also
remove capsfilter as appsrc will have caps set on their own.

Dňa 27.10.2014 o 08:51 truthz03 napísal(a):
> I have problems encoding and saving raw video data.
> First I created an pipeline which gives me bytes over an appsink. This bytes
> will be used to feed a second pipeline. If I feed the second pipeline only
> with audio data everything works fine. If I feed the second pipeline only
> with video data something strange happens. An output file will be created
> and also has an preview image so there are some pictures recorded, but when
> I try to play the file it stops immediately after it starts. Also strange is
> that when the recording is running the whole app stops after some seconds
> without any message.
> Me pipeline looks like this:
> appsrc->capsfilter->videoconvert->videoscale->videoconvert->videorate->videoconvert->avenc_mpeg4->mpeg4videoparse->matroskamux->filesink
>
> The appsrc has the following properties:
> g_object_set (videoSrc, "do-timestamp", TRUE, NULL);
> g_object_set (videoSrc, "is-live", TRUE, NULL);
> g_object_set (videoSrc, "block", FALSE, NULL);
> gst_app_src_set_latency(GST_APP_SRC(videoSrc), 0, 100);
>
> The capsfilter got the caps property from the first pipeline so the format
> should be ok.
>
> I hope you can help me. 
> Thanks Thomas
>
>
>
> --
> View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Encoding-raw-video-tp4669199.html
> Sent from the GStreamer-devel mailing list archive at Nabble.com.
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



More information about the gstreamer-devel mailing list