Hardware accelerated video encoding
#1
According to the user manual (http://files.pine64.org/doc/datasheet/pi...l_V1.0.pdf) of the Allwinner A64, it supports Hardware accelerated video encoding.


Quote:A64 provides almostfull  motion  playback  of  up  to 4K high-definition  video,and  supports H.265 decoder by 4K@30fps ,H.264 decoder by 1080p@60fps, MPEG1/2/4 decoder by 1080p@60fps, VP8 decoder by 1080p@60fps, AVS/AVS+   decoder   by   1080p@60fps,VC1   decoder   by   1080p@30fps,   H.264   encoder   by 1080p@60fps with dedicated hardware.


Can anyone guide me in the right direction how to encode video hardware accelerated?

The following script records 10 seconds of video, but it uses raw video and after the recording it converts it to mp4:
Code:
#!/bin/bash
sudo chmod 777 /dev/media1
sudo chmod 777 /dev/video1
NAME=$(date +"%Y%m%dT%H%M%S")
media-ctl -d /dev/media1 --set-v4l2 '"ov5640 2-003c":0[fmt:UYVY2X8/1280x720]'
ffmpeg -f rawvideo -pixel_format yuv420p -s 1280x720 -f video4linux2 -i /dev/video1 -vcodec copy -t 10  ~/Videos/$NAME.yuv
ffmpeg -f rawvideo -pixel_format yuv420p -s 1280x720 -i ~/Videos/$NAME.yuv ~/Videos/$NAME.mp4
rm ~/Videos/$NAME.yuv

Or see here: https://github.com/dirkjanbuter/pinephon.../bin/video
#2
i imagine cedrus would be the place to start:
https://linux-sunxi.org/Sunxi-Cedrus
https://linux-sunxi.org/Cedrus

sorry if that is obvious, i'm not following pinephone things much but this crossed my path while i'm working on similar projects for pbp.
#3
Thank you, that is what I was looking for. I see that only decoding (h264) is working for now.
#4
I think meg1, mpeg2, h264, and h265 are supported in decoding, but some have limitations.
#5
Sorry, I was not correct by only mention h264, I did not menton all becouse I was typing from my mobile phone.


Possibly Related Threads…
Thread Author Replies Views Last Post
  Battery Life- hardware abstraction layer-GPU VS optomizing app for GPU-openGL biketool 1 243 09-20-2024, 04:04 AM
Last Post: Kevin Kofler
  Microphone on Hardware Model 1.2 is Unusably Noisy In Some Circomstances ASmartSuitedSimpleton 4 4,812 03-23-2024, 10:55 AM
Last Post: Ferriah
Photo Can no longer take pictures, /dev/video* not recognized as video devices 64_Tesseract 0 801 01-26-2023, 10:19 AM
Last Post: 64_Tesseract
  720p video in Firefox notramo 4 2,509 11-28-2022, 06:09 AM
Last Post: dante404
  Is the hardware still being developed and refined? orbital 10 6,682 09-01-2022, 08:05 PM
Last Post: orbital
  How to check hardware revision? jojuma 1 2,042 07-16-2022, 12:28 AM
Last Post: bokomaru
  Modem Hardware bad? Not ready for 5g?? linux76 8 6,055 05-31-2022, 06:41 PM
Last Post: SwordfishII
  Any experiences with hardware mod to improve eMMC speeds? kqlnut 9 7,434 04-19-2022, 02:36 PM
Last Post: kk22
  Hardware switch for mic is not working properly submariner 10 9,354 01-25-2022, 07:01 AM
Last Post: wibble
  Case hardware request/idea HobanWashburn 5 5,386 09-15-2021, 04:02 AM
Last Post: biketool

Forum Jump:


Users browsing this thread: 2 Guest(s)