android h264 hardware encoding

cee1 fykcee1 at gmail.com
Fri Oct 18 03:24:04 CEST 2013


2013/10/18 yoyosuper8 <yoyosuper8 at yahoo.com>:
> So I implemented gstreamer 1.0 and patched androidmedia plugin to support
> hardware encoding. Everything compiles fine, but I get an error when a
> client tries to connect to my rtsp server running on android.
> The pipeline in the server is the following:
>
>       gst_rtsp_media_factory_set_launch (factory,
>              "( videotestsrc is-live=true do-timestamp=true ! capsfilter
> caps=video/
>              x-raw,width=480,height=640,framerate=12/1 !
> amcvidenc-omxtiducati1videoh264e
>              bitrate=1024 i-frame-interval=8 ! h264parse ! rtph264pay name=pay0
> pt=96 )");
>
> When a client (using vlc on a laptop) tries to connect to the rtsp server, I
> get the following errors:
>
> gstamcvideoenc.c:581:create_amc_format:<amcvideoenc-omxtiducati1videoh264e0>
> Unsopported profile 'constrained-baseline'

'constrained-baseline' is an alternative profile name, and
'gst_amc_avc_profile_from_string' not recognize it, which made
create_amc_format return -1 with the warning "Unsupported profile
'constrained-baseline'".

"Profile" is not used currently, so try to comment out related
branches in create_amc_format.


Also, you may try this:
http://dev.lemote.com/files/upload/software/rtsp-demo/mcplayer.tar.bz2 [1]

And modifies the pipelines in mcplayer/src/com/lemote/mcplayer/MCPlayer.java.

e.g.
Try "hw encoding test", this will encode videotestsrc output and send
to an udp addr.
If you can see data sent on the net, the encoder is probably working.

Then you can run a receiver on an other machine(Note: take care of
firewalls), the pipeline will be:
gst-launch-1.0 -v udpsrc uri=udp://0.0.0.0:3057
caps='application/x-rtp,media=(string)video,clock-rate=(int)90000,encoding-name=(string)H264,payload=(int)96,sprop-parameter-sets=(string)\"J0LgH41oBQBbpsgAAAMACAAAAwBAeKEVAA\\=\\=\\,KM4ESSA\\=\"'
! rtpjitterbuffer latency=10 ! rtph264depay ! avdec_h264 ! videoscale
! autovideosink


[1] Building instructions.
1. cd /path/to/mcplayer
2. android update project -t TARGET -p . # Get TARGET from 'android list'
3. ndk-build && ant debug



-- 
Regards,

- cee1


More information about the gstreamer-devel mailing list