How can I deal with the codec_data after qtdemux?

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

How can I deal with the codec_data after qtdemux?

zqhuan
hi, gstreamers

I can play mpegts files which contains h264 video and aac audio. But when I play mp4 files, qtdemux parse them to h264 video and aac audio, but my hardware decoders cannot decode them. I see the logs below
/GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0.GstGhostPad:src0: caps = video/x-h264, level=(string)4.1, profile=(string)main, codec_data
(buffer)014d4029ffe10018674d4029b91816824d080000030008000003019478c189c001000468ee0fc8, width=(i
nt)720, height=(int)576, framerate=(fraction)30000/1001, pixel-aspect-ratio=(fraction)16/15

I try to search some info about this from internet, but still not aware of this. So how I can deal with codec_data? any suggestions for this or any examples for this ?

Best regards,
zqhuan
 

ZiQiang Huan

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

Re: How can I deal with the codec_data after qtdemux?

Aihua Zhao
there are PPS, SPS in it,
refer it to:
https://gitorious.org/vaapi/gstreamer-vaapi/blobs/master/gst-libs/gst/vaapi/gstvaapidecoder_h264.c#line2366

在 2012年4月11日 下午1:54,ZiQiang Huan <[hidden email]>写道:
hi, gstreamers

I can play mpegts files which contains h264 video and aac audio. But when I play mp4 files, qtdemux parse them to h264 video and aac audio, but my hardware decoders cannot decode them. I see the logs below
/GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0.GstGhostPad:src0: caps = video/x-h264, level=(string)4.1, profile=(string)main, codec_data
(buffer)014d4029ffe10018674d4029b91816824d080000030008000003019478c189c001000468ee0fc8, width=(i
nt)720, height=(int)576, framerate=(fraction)30000/1001, pixel-aspect-ratio=(fraction)16/15

I try to search some info about this from internet, but still not aware of this. So how I can deal with codec_data? any suggestions for this or any examples for this ?

Best regards,
zqhuan
 

ZiQiang Huan

_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



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

回复: Re: How can I deal with the codec_data after qtdemux?

zqhuan
hi, Aihua Zhao
 
Thank you for your reply. I check the link you offer, but not very clear of it.
Now I can get the codec_data, then I need to parse it and got the PPS and SPS, right? After that, I need to package PPS and SPS to a GstBuffer and pass it downstream, but how can I package GstH264PPS to a GstBuffer, and does it work for me?
 
Best regards,
zqhuan
 

ZiQiang Huan
 
发件人: [hidden email]
发送时间: 2012-04-11 16:18
主题: Re: How can I deal with the codec_data after qtdemux?
there are PPS, SPS in it,
refer it to:
https://gitorious.org/vaapi/gstreamer-vaapi/blobs/master/gst-libs/gst/vaapi/gstvaapidecoder_h264.c#line2366

在 2012年4月11日 下午1:54,ZiQiang Huan <[hidden email]>写道:
hi, gstreamers

I can play mpegts files which contains h264 video and aac audio. But when I play mp4 files, qtdemux parse them to h264 video and aac audio, but my hardware decoders cannot decode them. I see the logs below
/GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0.GstGhostPad:src0: caps = video/x-h264, level=(string)4.1, profile=(string)main, codec_data
(buffer)014d4029ffe10018674d4029b91816824d080000030008000003019478c189c001000468ee0fc8, width=(i
nt)720, height=(int)576, framerate=(fraction)30000/1001, pixel-aspect-ratio=(fraction)16/15

I try to search some info about this from internet, but still not aware of this. So how I can deal with codec_data? any suggestions for this or any examples for this ?

Best regards,
zqhuan
 

ZiQiang Huan

_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



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

Re: 回复: Re: How can I deal with the codec_data after qtdemux?

Mohammed Sameer
Hi,

You need to pass the SPS and PPS to your hardware decoder in order to "initialize" it.

Cheers,

On Thu, Apr 12, 2012 at 11:05:54AM +0800, ZiQiang Huan wrote:

>  hi, Aihua Zhao
>
>
>
>  Thank you for your reply. I check the link you offer, but not very
>  clear of it.
>
>  Now I can get the codec_data, then I need to parse it and got the PPS
>  and SPS, right? After that, I need to package PPS and SPS to a
>  GstBuffer and pass it downstream, but how can I package GstH264PPS to a
>  GstBuffer, and does it work for me?
>
>
>
>  Best regards,
>  zqhuan
>
>
>  __________________________________________________________________
>
>  ZiQiang Huan
>
>
>
>  [1]Aihua Zhao
>  2012-04-11 16:18
>  [2]hzqhuan; [3]Discussion of the development of and with GStreamer
>  Re: How can I deal with the codec_data after qtdemux?
>
>  there are PPS, SPS in it,
>  refer it to:
>  [4]https://gitorious.org/vaapi/gstreamer-vaapi/blobs/master/gst-libs/gs
>  t/vaapi/gstvaapidecoder_h264.c#line2366
>  2012411 1:54ZiQiang Huan <[5][hidden email]>
>
>  hi, gstreamers
>  I can play mpegts files which contains h264 video and aac audio. But
>  when I play mp4 files, qtdemux parse them to h264 video and aac audio,
>  but my hardware decoders cannot decode them. I see the logs below
>  /GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0.GstGhostPad:src0:
>  caps = video/x-h264, level=(string)4.1, profile=(string)main,
>  codec_data
>  (buffer)014d4029ffe10018674d4029b91816824d080000030008000003019478c189c
>  001000468ee0fc8, width=(i
>  nt)720, height=(int)576, framerate=(fraction)30000/1001,
>  pixel-aspect-ratio=(fraction)16/15
>  I try to search some info about this from internet, but still not aware
>  of this. So how I can deal with codec_data? any suggestions for this or
>  any examples for this ?
>  Best regards,
>  zqhuan
>  __________________________________________________________________
>
>  ZiQiang Huan
>
>  _______________________________________________
>  gstreamer-devel mailing list
>  [6][hidden email]
>  [7]http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
> References
>
>  1. mailto:[hidden email]
>  2. mailto:[hidden email]
>  3. mailto:[hidden email]
>  4. https://gitorious.org/vaapi/gstreamer-vaapi/blobs/master/gst-libs/gst/vaapi/gstvaapidecoder_h264.c#line2366
>  5. mailto:[hidden email]
>  6. mailto:[hidden email]
>  7. http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


--
GPG-Key: 0xA3FD0DF7 - 9F73 032E EAC9 F7AD 951F  280E CB66 8E29 A3FD 0DF7
Debian User and Developer.
Homepage: www.foolab.org
_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel