encode video stream to h264 via CedarX VPU !?

601 views
Skip to first unread message

p.haf...@gmail.com

unread,
Sep 10, 2014, 7:00:56 AM9/10/14
to linux...@googlegroups.com
Hey,
I want to encode a video stream (jpeg based) to a h264 video stream.
On this web page, I can see, it should be possible with the A20.
My HW is a BananaPi board with an A20.
I really want to try a h264 encoder on linux.

Any hint, where I can have a look, or more information ?

Thanks

ditma...@gmail.com

unread,
Sep 10, 2014, 8:59:46 AM9/10/14
to linux...@googlegroups.com
Take a look at the GPL driver for the decoding/encoding engine on Allwinner SoC.
http://linux-sunxi.org/Cedrus

Somewhre in the IRC log there was a diskussion about h.262 encoding for USB cameras.
http://irclog.whitequark.org/linux-sunxi/

psandmen

unread,
Sep 10, 2014, 2:28:58 PM9/10/14
to linux...@googlegroups.com, ditma...@gmail.com
Hmm, will have a look into that. I think, need to search a little bit more.
For my better understanding,
in the matrix, only the Blob-Encoder can Handle h264 encoder

- Blob Encoder is in this case, the original binary's from CedarX/allwinner. But this binary's are only working on Android ?
- On linux, it doesn't work ? Or doesn't work stable?

ditma...@gmail.com

unread,
Sep 10, 2014, 3:00:28 PM9/10/14
to linux...@googlegroups.com
CedarX is used successfull in some linux images. For example aruntu.
http://cubiuntu.com

Toroshin Dmitry

unread,
Sep 10, 2014, 3:20:44 PM9/10/14
to linux...@googlegroups.com
There is softfloat. It can work on armhf, bus static linking is impossible, but you can link it to shared object and load dinamicly like libhybris (simply use libhybris with android version.
As alternative you can use PoC opensource encoder, that can encode only I frames. It has very hing bitrate, but suitable, for example, for streaming.

psandmen

unread,
Sep 10, 2014, 4:03:33 PM9/10/14
to linux...@googlegroups.com
Ok, will read about softfloat.
PoC opensource encoder, I need to compress the mjpeg stream to a ~8Mbit video stream :-). (wifi)

psandmen

unread,
Sep 10, 2014, 4:04:06 PM9/10/14
to linux...@googlegroups.com, ditma...@gmail.com
Ok, thanks. Will have a look for it. Maybe possible to get this running on bananaPi

ditma...@gmail.com

unread,
Sep 10, 2014, 7:00:28 PM9/10/14
to linux...@googlegroups.com
.... and look here
Re: ffmpeg H264 encoding with cedrus (Cedarx, Transcoding, Allwinner A20, Mediatomb)
http://www.cubieforums.com/index.php?topic=2810.msg19772;topicseen#msg19772

psandmen

unread,
Sep 11, 2014, 6:14:35 AM9/11/14
to linux...@googlegroups.com, ditma...@gmail.com
Thanks for this information.
What I have to do to get this working on a  BananaPi?
How I undertstand......
1. installing cedrus like here
2. installing ffmpeg from the forum thread ?
Is that correct?

ditma...@gmail.com

unread,
Sep 11, 2014, 6:32:33 AM9/11/14
to linux...@googlegroups.com
I dont know. Haven`t done this. You need a player or streaming client that is compiled for cedarx usage.

psandmen

unread,
Sep 11, 2014, 6:35:56 AM9/11/14
to linux...@googlegroups.com, ditma...@gmail.com
No, didn't really want to play that video on BananaPi, I want to stream it forward to a WiFi device.
The BananaPi should "only" transcode the stream. :-)
So, ffmpeg would be nice, then I can incoming stream transcode to h264 codec.

Toroshin Dmitry

unread,
Sep 11, 2014, 7:23:59 AM9/11/14
to linux...@googlegroups.com
I think it is impissible to run decoder and encoder at the same time because it uses same memory regions.
But you can try to write converter you need. Decoder and encoder uses same libraries. Try look at the sample codes and encode each frame after encoding.
Other way is decoding some count of frames to buffer, deinit eecoder, init encoder and encode it in cycle.

psandmen

unread,
Sep 11, 2014, 7:49:56 AM9/11/14
to linux...@googlegroups.com
I have a raw byte image stream, that means, I can feed the encoder with raw jpeg files.
And this tream, I want to transcode into h264 codec via GPU.

This guy, is doing that via ffmpeg.
The only diffeerence I want to do is, to write it not to a file, I will write the output to gstreamer.
And gstreamer should only be a "rtsp" server, and managing the overlay.
Reply all
Reply to author
Forward
0 new messages