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


Messages In This Thread
Hardware accelerated video encoding - by PinePhoneCoder - 02-19-2020, 04:39 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Battery Life- hardware abstraction layer-GPU VS optomizing app for GPU-openGL biketool 1 899 09-20-2024, 04:04 AM
Last Post: Kevin Kofler
  Microphone on Hardware Model 1.2 is Unusably Noisy In Some Circomstances ASmartSuitedSimpleton 4 5,924 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 1,064 01-26-2023, 10:19 AM
Last Post: 64_Tesseract
  720p video in Firefox notramo 4 3,363 11-28-2022, 06:09 AM
Last Post: dante404
  Is the hardware still being developed and refined? orbital 10 8,982 09-01-2022, 08:05 PM
Last Post: orbital
  How to check hardware revision? jojuma 1 2,833 07-16-2022, 12:28 AM
Last Post: bokomaru
  Modem Hardware bad? Not ready for 5g?? linux76 8 7,467 05-31-2022, 06:41 PM
Last Post: SwordfishII
  Any experiences with hardware mod to improve eMMC speeds? kqlnut 9 9,135 04-19-2022, 02:36 PM
Last Post: kk22
  Hardware switch for mic is not working properly submariner 10 11,551 01-25-2022, 07:01 AM
Last Post: wibble
  Case hardware request/idea HobanWashburn 5 6,493 09-15-2021, 04:02 AM
Last Post: biketool

Forum Jump:


Users browsing this thread: 1 Guest(s)