How to extract private codec data from encoder?

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

How to extract private codec data from encoder?

sonntex
I use gstreamer 1.8 in my c++ code to transcode h264 and mjpeg to h264 using vaapi.

Pipeline looks like:

pipeline_ = gst_parse_launch("appsrc name=appsrc0 ! vaapidecodebin ! vaapiencode_h264 ! appsink name=appsink0", nullptr);
src_ = gst_bin_get_by_name(GST_BIN(impl_->pipeline_), "appsrc0");
sink_ = gst_bin_get_by_name(GST_BIN(impl_->pipeline_), "appsink0");

How can I extract private codec data from encoder? For example, I have my own rtp stack and file muxing. So, I need to compute such attributes as sprop parameter sets, profile level id and packetization mode.

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

Re: How to extract private codec data from encoder?

Nicolas Dufresne-4
Le jeudi 14 avril 2016 à 20:11 +0300, sonntex a écrit :
> pipeline_ = gst_parse_launch("appsrc name=appsrc0 ! vaapidecodebin !
> vaapiencode_h264 ! appsink name=appsink0", nullptr);
> src_ = gst_bin_get_by_name(GST_BIN(impl_->pipeline_), "appsrc0");
> sink_ = gst_bin_get_by_name(GST_BIN(impl_->pipeline_), "appsink0");
>
> How can I extract private codec data from encoder? For example, I
> have my own rtp stack and file muxing. So, I need to compute such
> attributes as sprop parameter sets, profile level id and
> packetization mode.

First, make sure to select the right stream-format. If your encoder is
AVC, then you will find the codec data inside the caps (which are
attached to the GstSample). If you have a byte-stream encoder, you will
have to parse it yourself.

cheers,
Nicolas
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel