mpeg-ts playback
Dave Walker
dave at happybits.co
Tue Mar 4 01:05:35 PST 2014
I've been attempting to get MPEG-TS content to play back using the Android
mediacodec decoders. I finally got it working and wanted to report my
findings and ask a couple questions about how to proceed. My device is a
Samsung Galaxy S4, and I'm not sure how commonplace this behavior is.
When I started the audio decoder failed to start. When buffering the first
frame I got the following from the OMX codec:
E/SEC_AAC_DEC( 208): This is unsupported profile in SAACD. Profile 31 is
not supported
E/SEC_AAC_DEC( 208): SAACD only supports AAC-LC Profile
So, the decoder's confused about profile. Often this data is passed in via
a 'csd-0' element in the MediaFormat, and sure enough it looks like this
has helped people in the past. The link below also points out an "is-adts"
flag in MediaFormat that should be sent to decode ADTS content, which is
what I have.
http://stackoverflow.com/questions/18784781/how-to-initialize-mediaformat-to-configure-a-mediacodec-to-decode-raw-aac-data
I added both csd-0 and is-adts to my MediaFormat, and this shifted around
the error a bit but ultimately didn't get rid of it. However, if I strip
out the 7 byte ADTS headers but leave the csd-0 buffer in place to include
the format parameters, then the content plays fine.
My question is - how should I best implement this for real? The ADTS format
is slightly more complicated than a simple 7 byte header, and I'm not sure
converting from adts->raw is really the business of the amc component. It
appears that this may be a device-specific foible, and that in general
devices should support this as long as is-adts is in the format. But my
device is a super common one - adding a workaround seems reasonable and par
for the course for the MediaCodec support. In any case the csd-0 element
will be needed to properly decode ADTS content, and the tsdemux component
isn't producing the codec data. I assume the correct fix here is to have
the demuxer create this data as part of its caps.
Thanks, and apologies in advance for any misunderstandings or mistaken
terminology. This is my first project in gstreamer.
Thanks for any advice you can provide.
Dave
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-android/attachments/20140304/697d46de/attachment.html>
More information about the gstreamer-android
mailing list