x264enc on android: very slow.

Haiming Wang whm_buaa at hotmail.com
Mon Jul 29 01:18:12 PDT 2013


Hi buddies,
   Now I successfully create a   video capture+x264encoder+rtp     pipeline on android.   Thank you all for your help before.
 But I found the performance of x264enc is very low.
The framerate for 640x480 video is about 1 fps.   I change the video size to 320x240, the frame rate can only reach to 1, 2 or 3.   The pipeline  I used is below:

   data->pipeline = gst_parse_launch("gstrtpbin name=rtpbin appsrc block=true is-live=true name=app_src ! video/x-raw-yuv, format=(fourcc)NV21, width=(int)320, height=(int)240, framerate=(fraction)15/1 ! ffmpegcolorspace ! x264enc tune=zerolatency byte-stream=true bitrate=300 ! rtph264pay ! rtpbin.send_rtp_sink_0    rtpbin.send_rtp_src_0 ! udpsink name=udp_sink clients=192.168.1.106:50000", &error);

If I bypass the x264 encoder and use below pipeline , the framerate can reach about 15 , just around the same as the camera preview framerate. 

data->pipeline = gst_parse_launch("gstrtpbin name=rtpbin appsrc block=true is-live=true name=app_src ! video/x-raw-yuv, format=(fourcc)NV21, width=(int)320, height=(int)240, framerate=(fraction)15/1 ! ffmpegcolorspace !   fakesink", &error);



but if I involved x264enc as below, the framerate dropped to about 1 fps.
 data->pipeline = gst_parse_launch("gstrtpbin name=rtpbin appsrc block=true is-live=true name=app_src ! video/x-raw-yuv, format=(fourcc)NV21, width=(int)320, height=(int)240, framerate=(fraction)15/1 ! ffmpegcolorspace !  x264enc tune=zerolatency byte-stream=true bitrate=300 ! fakesink", &error);

So I think the performance issue must be at x264enc .
I doubt x264enc is not optimized for android(for example , maybe not use neon instruction)  . Anyone can give me some suggestion ?

Thanks and Regards,Haiming Wang 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20130729/07cb8918/attachment-0001.html>


More information about the gstreamer-devel mailing list