PINE64
Pine64 accelerated H.264 encoding - Printable Version

+- PINE64 (https://forum.pine64.org)
+-- Forum: PINE A64(+) (https://forum.pine64.org/forumdisplay.php?fid=4)
+--- Forum: Linux on Pine A64(+) (https://forum.pine64.org/forumdisplay.php?fid=6)
+--- Thread: Pine64 accelerated H.264 encoding (/showthread.php?tid=1166)



Pine64 accelerated H.264 encoding - hngjms - 05-25-2016

Hi guys,

I'm trying to stream H264 video off of a USB webcam to my computer from my PINE64. 
I'm on longsleep's ubuntu and video packages (https://launchpad.net/~longsleep/+archive/ubuntu/ubuntu-pine64-flavour-makers).

I've tried using gstreamer1.0-vaapi plugins, as well as this https://github.com/ebutera/gst-plugin-cedar
but I've been having trouble getting the encoding element to work properly.



Code:
GST_DEBUG=4 gst-launch-1.0 videotestsrc ! vaapih264enc ! fakesink 

# gives

0:00:00.129807267 13532       0x630ca0 WARN            videoencoder gstvideoencoder.c:674:gst_video_encoder_setcaps:<vaapiencodeh264-0> rejected caps video/x-raw, width=(int)320, height=(int)240, framerate=(fraction)30/1, format=(string)I420, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1

even though 320x240 30fps I420 is part of vaapih264enc's sink capabilities. 

Has anyone had any experience with getting hardware H264 video encoding working on the PINE64?
The software based ones are really really laggy.


RE: Pine64 accelerated H.264 encoding - hamzahbondok - 10-15-2016

(05-25-2016, 08:57 PM)hngjms Wrote: Hi guys,

I'm trying to stream H264 video off of a USB webcam to my computer from my PINE64. 
I'm on longsleep's ubuntu and video packages (https://launchpad.net/~longsleep/+archive/ubuntu/ubuntu-pine64-flavour-makers).

I've tried using gstreamer1.0-vaapi plugins, as well as this https://github.com/ebutera/gst-plugin-cedar
but I've been having trouble getting the encoding element to work properly.



Code:
GST_DEBUG=4 gst-launch-1.0 videotestsrc ! vaapih264enc ! fakesink 

# gives

0:00:00.129807267 13532       0x630ca0 WARN            videoencoder gstvideoencoder.c:674:gst_video_encoder_setcaps:<vaapiencodeh264-0> rejected caps video/x-raw, width=(int)320, height=(int)240, framerate=(fraction)30/1, format=(string)I420, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1

even though 320x240 30fps I420 is part of vaapih264enc's sink capabilities. 

Has anyone had any experience with getting hardware H264 video encoding working on the PINE64?
The software based ones are really really laggy.

i had been wondering the same thing...


RE: Pine64 accelerated H.264 encoding - MarkHaysHarris777 - 10-15-2016

If you want to use video ; please use Android.


RE: Pine64 accelerated H.264 encoding - hamzahbondok - 10-15-2016

do you think that in the future there will be linux hw acceleration?
the orange pi is another board that is very similar in that it has mali gpu and they have hw acceleration 

thanks


RE: Pine64 accelerated H.264 encoding - MarkHaysHarris777 - 10-15-2016

(10-15-2016, 05:00 PM)hamzahbondok Wrote: do you think that in the future there will be linux hw acceleration?
the orange pi is another board that is very similar in that it has mali gpu and they have hw acceleration 

thanks

No, not for the PineA64 board; not in the near future.


RE: Pine64 accelerated H.264 encoding - CaptainZalo - 10-16-2016

(10-15-2016, 05:05 PM)MarkHaysHarris777 Wrote:
(10-15-2016, 05:00 PM)hamzahbondok Wrote: do you think that in the future there will be linux hw acceleration?
the orange pi is another board that is very similar in that it has mali gpu and they have hw acceleration 

thanks

No, not for the PineA64 board; not in the near future.

But would it be theoretically possible to take some parts of a git repo and build your own image with the graphics-bits from an SBC with a similar SoC?


RE: Pine64 accelerated H.264 encoding - MarkHaysHarris777 - 10-16-2016

(10-16-2016, 12:42 PM)CaptainZalo Wrote:
(10-15-2016, 05:05 PM)MarkHaysHarris777 Wrote:
(10-15-2016, 05:00 PM)hamzahbondok Wrote: do you think that in the future there will be linux hw acceleration?
the orange pi is another board that is very similar in that it has mali gpu and they have hw acceleration 

thanks

No, not for the PineA64 board; not in the near future.

But would it be theoretically possible to take some parts of a git repo and build your own image with the graphics-bits from an SBC with a similar SoC?

No.

... Simon (longsleep) has estimated that it would take two 'paid' serious developers 1.5 person years to reverse engineer the proprietary code and subsequently build the open product that would serve the community effort. This is not going to be a trivial effort , nor is it going to be a successful trial and guess accomplishment either.


RE: Pine64 accelerated H.264 encoding - pfeerick - 10-18-2016

(10-15-2016, 05:00 PM)hamzahbondok Wrote: do you think that in the future there will be linux hw acceleration?
the orange pi is another board that is very similar in that it has mali gpu and they have hw acceleration 

thanks

If you want access to the HW acceleration for encoding for using with a camera like the OP did ... then it already exists, and has been available for the last two-three months... 

https://github.com/avafinger/ffmpeg_cedrus264_A64

Credit: Thanks to tkasier for pointing that out over on Armbian, and here is the output log from @lex.