![]() |
|
Accelerated H.264 and HEVC video decoding with Cedrus - 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: Accelerated H.264 and HEVC video decoding with Cedrus (/showthread.php?tid=424) |
Accelerated H.264 and HEVC video decoding with Cedrus - longsleep - 03-12-2016 Starting with Kernel 3.10.65-2-pine64-longsleep-43 the media modules are included. This means one could use the hardware video engine on the SoC. So i felt why not try it - and surprisingly it worked . Pine64 decodes 1080p H.264 and HEVC just fine and smooth with Cedrus from linux-sunxi community. You can do it yourself following the Cedrus build instructions on http://linux-sunxi.org/Cedrus HEVC bbb-1920x1080-cfg02.mkv Code: MPlayer 1.2.1 (Debian), built with gcc-5.3.1 (C) 2000-2016 MPlayer Team
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.
Playing bbb-1920x1080-cfg02.mkv.
libavformat version 56.40.101 (external)
libavformat file format detected.
[lavf] stream 0: video (hevc), -vid 0
[lavf] stream 1: audio (aac), -aid 0
VIDEO: [HEVC] 1920x1080 0bpp 60.000 fps 0.0 kbps ( 0.0 kbyte/s)
Clip info:
encoder: libebml v1.3.0 + libmatroska v1.4.1
creation_time: 2014-04-22 08:46:13
Load subtitles in ./
[VDPAU SUNXI] VE version 0x1689 opened
[VDPAU SUNXI] OSD disabled!
==========================================================================
Forced video codec: ffmpeg12vdpau
Forced video codec: ffh264vdpau
Forced video codec: ffhevcvdpau
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
libavcodec version 56.60.100 (external)
Selected video codec: [ffhevcvdpau] vfm: ffmpeg (FFmpeg HEVC / H.265 (VDPAU))
==========================================================================
==========================================================================
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
AUDIO: 48000 Hz, 6 ch, floatle, 0.0 kbit/0.00% (ratio: 0->1152000)
Selected audio codec: [ffaac] afm: ffmpeg (FFmpeg AAC (MPEG-2/MPEG-4 Audio))
==========================================================================
AO: [pulse] Init failed: Connection refused
Failed to initialize audio driver 'pulse'
AO: [alsa] 48000Hz 2ch floatle (4 bytes per sample)
Starting playback...
Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
VO: [vdpau] 1920x1080 => 1920x1080 HEVC VDPAU acceleration
Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
VO: [vdpau] 1920x1080 => 1920x1080 HEVC VDPAU acceleration
A: 1.9 V: 0.8 A-V: 1.089 ct: 0.056 0/ 0 86% 135% 7.5% 50 0H.264 big_buck_bunny_1080p_H264_AAC_25fps_7200K.MP4 Code: MPlayer 1.2.1 (Debian), built with gcc-5.3.1 (C) 2000-2016 MPlayer Team
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.
Playing big_buck_bunny_1080p_H264_AAC_25fps_7200K.MP4.
libavformat version 56.40.101 (external)
libavformat file format detected.
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fb6fd8688]Protocol name not provided, cannot determine if input is local or a network protocol, buffers and access patterns cannot be configured optimally without knowing the protocol
[lavf] stream 0: video (h264), -vid 0
[lavf] stream 1: audio (aac), -aid 0, -alang und
VIDEO: [H264] 1920x1080 24bpp 25.000 fps 7254.9 kbps (885.6 kbyte/s)
Clip info:
major_brand: mp42
minor_version: 1
compatible_brands: isommp423gp5
creation_time: 2011-08-04 01:51:12
title: big_buck_bunny_1080p_surround.avi_006.AVI.MP4
artist: created with SUPER(C).v2011.bld.49
encoder: eRightSoft
comment: 09:51:32
Load subtitles in ./
[VDPAU SUNXI] VE version 0x1689 opened
[VDPAU SUNXI] OSD disabled!
==========================================================================
Forced video codec: ffmpeg12vdpau
Forced video codec: ffh264vdpau
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
libavcodec version 56.60.100 (external)
Selected video codec: [ffh264vdpau] vfm: ffmpeg (FFmpeg H.264 (VDPAU))
==========================================================================
==========================================================================
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
AUDIO: 44100 Hz, 2 ch, floatle, 96.1 kbit/3.40% (ratio: 12009->352800)
Selected audio codec: [ffaac] afm: ffmpeg (FFmpeg AAC (MPEG-2/MPEG-4 Audio))
==========================================================================
AO: [pulse] Init failed: Connection refused
Failed to initialize audio driver 'pulse'
AO: [alsa] 44100Hz 2ch floatle (4 bytes per sample)
Starting playback...
Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
VO: [vdpau] 1920x1080 => 1920x1080 H.264 VDPAU acceleration
Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
VO: [vdpau] 1920x1080 => 1920x1080 H.264 VDPAU acceleration
A: 7.5 V: 6.7 A-V: 0.776 ct: 0.071 0/ 0 60% 42% 1.4% 50 0Pine64 SoC temperature is stable at around 70C while decoding HEVC 1080p (without a heat sink, no enclosure). For easy mplayer launches with the correct parameters feel free to use https://github.com/longsleep/build-pine64-image/blob/master/simpleimage/platform-scripts/mplayer-play.sh I will not support this overly much, but it confirms that the BSP Kernel has everything which is needed to use the media decoder in the Pine64. Cheers Simon RE: Accellerated H.264 and HEVC video decoding with Cedrus - Ghost - 03-12-2016 This is a development that may please a lot of people, thank you for your efforts. RE: Accellerated H.264 and HEVC video decoding with Cedrus - ssvb - 03-12-2016 (03-12-2016, 01:27 PM)longsleep Wrote: Starting with Kernel 3.10.65-2-pine64-longsleep-43 the media modules are included. This means one could use the hardware video engine on the SoC. So i felt why not try it - and surprisingly it workedYes, because Jens Kuske (jemk) has done the job, required for supporting Allwinner A64 - https://github.com/linux-sunxi/libvdpau-sunxi/commit/cba127cf8457a7e4a2e02832f0b653e85f2c97c7 ![]() And it reused a lot of the earlier Allwinner H3 related code, that's why the Allwinner A64 patch is so small. RE: Accellerated H.264 and HEVC video decoding with Cedrus - Andrew2 - 03-12-2016 (03-12-2016, 01:27 PM)longsleep Wrote: Pine64 SoC temperature is stable at around 70C while decoding HEVC 1080p. You should add that your Pine64+ is not even wearing a heatsink ![]() If you would spend the 50 Cent for an el cheapo heatsink then the temperature would be below 60°C already. BTW: Using VDPAU you can then also use VLC (2.2.0 or above, no support for HEVC currently) or mpv to watch video HW accelerated (also in a desktop environment). RE: Accellerated H.264 and HEVC video decoding with Cedrus - longsleep - 03-12-2016 (03-12-2016, 02:00 PM)Andrew2 Wrote: You should add that your Pine64+ is not even wearing a heatsink Done. I also forgot to mention that this temperature was HEVC 1080p@60FPS. Decoding spreed-1080p.mkv which is HEVC 1080p@29.97FPS is 55-60C around 65C (again without heat-sink). (03-12-2016, 02:00 PM)Andrew2 Wrote: BTW: Using VDPAU you can then also use VLC (2.2.0 or above, no support for HEVC currently) or mpv to watch video HW accelerated (also in a desktop environment). I tried VLC (from Ubuntu Xenial repository) and it does freeze with H.264 after a couple of seconds - so for now mplayer it is. RE: Accellerated H.264 and HEVC video decoding with Cedrus - Andrew2 - 03-12-2016 (03-12-2016, 03:33 PM)longsleep Wrote: I tried VLC (from Ubuntu Xenial repository) and it does freeze with H.264 after a couple of seconds - so for now mplayer it is. In Armbian we include an own mpv package since a few days: Code: tk@bananapi:~$ mpv --version
mpv 0.16.0-git-9d2980d (C) 2000-2016 mpv/MPlayer/mplayer2 projects
built on Sat Mar 5 16:11:21 EET 2016
ffmpeg library versions:
libavutil 55.17.103
libavcodec 57.24.102
libavformat 57.25.100
libswscale 4.0.100
libavfilter 6.31.100
libswresample 2.0.101
ffmpeg version: n3.0I just tried it out with a desktop/GUI build for the old slow dual core A20, connected an USB disk that was lying around, double clicked a huge .mp4 and to my surprise even this 1080p/H.264 file was played absolutely smoothly on this old board. I will try to build a .deb for Pine64 the next days and post a link. RE: Accellerated H.264 and HEVC video decoding with Cedrus - tllim - 03-12-2016 (03-12-2016, 01:58 PM)ssvb Wrote:(03-12-2016, 01:27 PM)longsleep Wrote: Starting with Kernel 3.10.65-2-pine64-longsleep-43 the media modules are included. This means one could use the hardware video engine on the SoC. So i felt why not try it - and surprisingly it workedYes, because Jens Kuske (jemk) has done the job, required for supporting Allwinner A64 - https://github.com/linux-sunxi/libvdpau-sunxi/commit/cba127cf8457a7e4a2e02832f0b653e85f2c97c7 Thanks to jemk and longsleep. ... TL Lim RE: Accelerated H.264 and HEVC video decoding with Cedrus - vedranius - 04-11-2016 Hi, I'm really a n00b with this stuff, but I need to run RTMP stream smoothly on Pine64+ 2GB Any suggestions how can I do this? I've tried with mplayer, mpv, cvlc, and all of them are really slow, dropping frames and such. I suppose any of them isn't HW accelerated? Thanks! ![]() EDIT: And I've tried to install vdpau, pixman and all dependencies. And every time I get this error when trying to make and make install "libvdpau-sunxi": Code: fatal error:"pixman.h: No such file or directory"Any idea what's wrong? Thanks! RE: Accelerated H.264 and HEVC video decoding with Cedrus - longsleep - 04-11-2016 I am probably stating the obvious but you are missing 'pixman.h' in the include path. RE: Accelerated H.264 and HEVC video decoding with Cedrus - vedranius - 04-11-2016 (04-11-2016, 01:38 PM)longsleep Wrote: I am probably stating the obvious but you are missing 'pixman.h' in the include path. Ye, kinda solved that. But now when I try to play I get that this is missing: libvdpau_nvidia.so |