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
  Microphone on Hardware Model 1.2 is Unusably Noisy In Some Circomstances ASmartSuitedSimpleton 4 3,636 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 548 01-26-2023, 10:19 AM
Last Post: 64_Tesseract
  720p video in Firefox notramo 4 1,620 11-28-2022, 06:09 AM
Last Post: dante404
  Is the hardware still being developed and refined? orbital 10 4,695 09-01-2022, 08:05 PM
Last Post: orbital
  How to check hardware revision? jojuma 1 1,504 07-16-2022, 12:28 AM
Last Post: bokomaru
  Modem Hardware bad? Not ready for 5g?? linux76 8 4,498 05-31-2022, 06:41 PM
Last Post: SwordfishII
  Any experiences with hardware mod to improve eMMC speeds? kqlnut 9 5,713 04-19-2022, 02:36 PM
Last Post: kk22
  Hardware switch for mic is not working properly submariner 10 7,362 01-25-2022, 07:01 AM
Last Post: wibble
  Case hardware request/idea HobanWashburn 5 4,360 09-15-2021, 04:02 AM
Last Post: biketool
  PinePhone Hardware Critique KABA 2 2,826 08-13-2021, 06:47 PM
Last Post: Zebulon Walton

Forum Jump:


Users browsing this thread: 1 Guest(s)