<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>HI Nicolas<div> </div><div> First up, let me explain how did I try to prove colorspace conversation is not the bottleneck. </div><div> I set property "block" of appsrc to true. So each time when I want to feed data to appsrc, the function will block, untill there is a vacant buffer available.</div><div> In android camer preview callback, each time when I got a new frame, I will feed the data to appsrc through jni synchronously. If there is no vacant buffer available at appsrc, the feeding will block. I count the framerate in camera preview callback. </div><div> In this way I can evaluate how fast the pipeline encoding frames.</div><div><br></div><div> I really appreciate if neon optimization can be in the soft encoder :).</div><div><br></div><div> I heard some one encounter some problems in using hardware encoder. They said the bitrate is very high. I didn't try in person. I will try it later.</div><div><br></div><div> BTW, by many times try, I found the property "speed-preset" magically improved the encoding speed . Now I can get 8 fps for320x240 video.</div><div><br></div><div>Thank you very much for your help as ever!</div><div><br></div><div>Best Regards,</div><div>Haiming Wang </div><div><br><br><div>> Subject: Re: x264enc on android: very slow.<br>> From: nicolas.dufresne@collabora.com<br>> To: gstreamer-devel@lists.freedesktop.org<br>> Date: Wed, 31 Jul 2013 00:36:19 +0200<br>> <br>> Le lundi 29 juillet 2013 ¨¤ 21:28 +0800, Haiming Wang a ¨¦crit : <br>> > Hi Nicolas,<br>> > <br>> > <br>> > Thank you very much for your help. <br>> > <br>> > <br>> > Regarding the colorspace conversation, as I mentioned in my previous<br>> > email, I used a pipeline in which I replaced all the elements just<br>> > after ffmpegcolorspace with fakesink , and I found the speed is still<br>> > quite quick. The framerate is around the same as the camera preview<br>> > frame rate(15fps), So I believe the bottle neck should not be at<br>> > color space conversation.<br>> <br>> I don't fully understand what you have done to prove there was no<br>> colorspace conversion issues, neither in what replacing the encoder by<br>> fakesink show that. But I'm just giving you hints and this is might not<br>> be your issue. I had problem produce 30 fps in QSIF sized stream in the<br>> past because of that NV12 to I420 conversion issue on both iOS and<br>> Android. This is fixed upstream but not in any released version. Sharing<br>> more details about your build would help in figuring if you might have<br>> an affected build.<br>> <br>> > Regarding the profiling tool, what profiling tool do you suggest me<br>> > to use? I have some experience with gprof on android, but it was<br>> > said the tool doesn't support multi-thread very well. It's also not<br>> > easy to use. Do you have any suggestion about the tool?<br>> <br>> I have never used any profiling tools on Android. Last time I had the<br>> iOS profiling tool to show be the bottleneck. I have been told that<br>> oprofile and prof may way, but will require a rooted device and a kernel<br>> rebuild.<br>> <br>> > <br>> > You also suggest me using a simpler profile. Does the profile here<br>> > means h264 profile? Can it be configed by x264enc properties? <br>> <br>> Yes, h264 profile is usually set through caps, but that might not be<br>> true if you are using 0.10.<br>> <br>> > Yes, I also considered to use the hardware encoder on android.<br>> > However I didn't think the performance of the software is so<br>> > unacceptable. I see some software encoder running on Android, and the<br>> > frame rate can reach 15 fps, and the performance is quite acceptable.<br>> > I want to know if there are some settings for x264enc, which can<br>> > improve the performance.<br>> <br>> That being said, I realized it's not written yet, see:<br>> <br>> https://bugzilla.gnome.org/show_bug.cgi?id=705129<br>> <br>> Also, as Arun have said, if you are using the SDK, it is built without<br>> NEON acceleration. Adding that does increase the performance a lot.<br>> <br>> regards,<br>> Nicolas <br>> <br>> _______________________________________________<br>> gstreamer-devel mailing list<br>> gstreamer-devel@lists.freedesktop.org<br>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel<br></div></div> </div></body>
</html>