A20 and h264 hardware encoding

Started by pier71, October 19, 2015, 08:14:43 PM

Previous topic - Next topic

pier71

Hi, I am looking to get a good h264 hardware encoding on Olinuxino-LIME A20 board.
With a USB Webcam with FFmpeg-Cedrus is possible to encoding up to 640x480 , if I try to get 1280x720 the frame-rate drop to 5/6 fps.
In any case the cpu load is high. I have not yet investigate what is the reason.

I would like to know if someone with a CSI camera have try to get a 1280x720 or 640x480 with low cpu load ? (CSI should be better than USB about cpu load).

I have try also to encode some RAW yuv  file to h264 with FFmpeg-Cedrus but the frame-rate is low with hd resolution.
With the original allwinner binary blob is possible to get good frame-rate and quality with hd resolutions ? (1080p, 720p)

For my project I am in R&D stage, I am looking a board that is capable to encode in realtime h264 with a low cpu load. I am planning to prototype with a raspberry pi , the software already works fine on the raspberry pi  but I would like to find some other boards for the production stage.

thanks,
Pier




lhavc

You might not get 720p@30FPS output rate steady of a USB webcam caused it may exceed the bandwidth, choose CSI interface if you want good quality of video, but not for CPU consumption. AFAIK the open source project Cedrus can only encode I-frames for H264 stream, and there is no sample to a whole CSI camera capture solution, so you must write such codes yourself. For the question of the SDK and hardware capability itself can meet the requirement, I can say Yes.

pier71

Hi, thanks for the reply,

I have compiled this one:    https://github.com/stulluk/FFmpeg-Cedrus
now should generate also P frames ,
but the problem is that I have try to encode a local YUV file from the SD card but the SD  is too slow to handle a yuv 720p stream at 30fps.

I think that the USB2 should handle the 720p stream in yuv420  format or other yuv format but should be also near the limit of usb2 (60mbyte/sec), so the CSI camera is the solution.

about software for the CSI camera I think that on linux the driver should works as v4l2 standard device.

about the CSI camera where I can buy a CSI camera with the cable ready to connect to the olinuxino a20 lime ?

thanks
Pier

lhavc

I think Olimex don't have external module for this, you can firstly try with a USB camera on 480p resolution for evaluation, and you should be ware of the pixel package format to avoid any software conversation since sunxi chips don't support I420 for input format AFAIK, and theirs hardware colorspace converter can't be utilized to process data without output to screen.

pier71

ok,  thanks, with a usb cam at 480p works now  I am looking to get a good quality with 1mbit of bitrate.

Then I have to look something like this https://www.olimex.com/Products/Components/Camera/CAM-GT2005/ and build an adapter to connect to my olinuxino board.