androidmedia encoder problems

stic at free.fr stic at free.fr
Tue Feb 4 07:39:37 PST 2014


Hi Sebastian,

as you previously said, do you think you will have soon some time to review this patch ?
That would be really so great because it is almost working well, there are just few things that I am not able to manage myself to make it better and more stable.
And I would really like to be able to use it.

Thank you so much,
Stic

----- Mail original -----
De: "Sebastian Dröge" <sebastian at centricular.com>
À: "Discussions about GStreamer on Android" <gstreamer-android at lists.freedesktop.org>
Envoyé: Dimanche 19 Janvier 2014 10:05:26
Objet: Re: androidmedia encoder problems

On Sa, 2014-01-18 at 23:55 +0100, stic at free.fr wrote:
> Hi all,
> 
> I'm still trying to use androidmedia encoder provided here by cee1: https://bugzilla.gnome.org/show_bug.cgi?id=705129
> I try h264 video encoder. One of the problem I have with the encoder is the following:
> it seems codec config data (sps pps) are sent only 1 time when the stream begins to send data ... so if a client tries to connect to the pipeline server later (not at the stream startup) then it doesn't have received such information and can't display anything.
> 
> I also tried to use h264parse interval-config=xxx to resend config at xxx interval but it does not work -> message saying: no SPS/PPS yet, will be dropped

That would either indicate a bug in h264parse, or there really was no
SPS/PPS yet... but then decoding would fail in general.

> There is probably a way to ask the encoder the resend config when needed, but how can this be done ?

Check
https://developer.android.com/reference/android/media/MediaCodec.html#PARAMETER_KEY_REQUEST_SYNC_FRAME
and
https://developer.android.com/reference/android/media/MediaCodec.html#setParameters%28android.os.Bundle%29

This would need to be called when a keyframe is requested for the
current frame, which is GST_VIDEO_CODEC_FRAME_FLAG_FORCE_KEYFRAME and
can be checked with GST_VIDEO_CODEC_FRAME_IS_FORCE_KEYFRAME(frame).

See some other encoders for the implementation.


However the API of MediaCodec and what exactly it expects as input and
what it outputs seems rather undefined to me. I'm not sure if it will be
simple to get something that works in general on all devices.

I hope to find some time to look at this patch myself in the near
future...

-- 
Sebastian Dröge, Centricular Ltd - http://www.centricular.com
Expertise, Straight from the Source

_______________________________________________
gstreamer-android mailing list
gstreamer-android at lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/gstreamer-android


More information about the gstreamer-android mailing list