How to extract private codec data from encoder?

Nicolas Dufresne nicolas.dufresne at gmail.com
Thu Apr 14 19:15:50 UTC 2016


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


More information about the gstreamer-devel mailing list