Right now have a couple of fine mplayer ports for our systems, but none of them support the va.library, when that exists on the system.
I would like to ask if there is any plan to update mplayer to support it, and maybe with a fallback to comp_yuv2, or plain comp? I think comp_yuv modes do not work at all on systems with Radeon RX, but comp seems to work, so I would go with this one.
Also, that would be a good opportunity to update it to latest public version. What do you say guys? Should we hope for something like that?
It would be great if we could get va.library support on ffplay, that comes with ffmpeg as well.
On the other hand, there is always the awesome Emotion which support va.library and streaming video from online sources, but it is always good to have alternatives, right?
I know I'm over-ambitious, but I'd love to see the work done on Emotion and on porting the ffmpeg core to Amiga, opened up into a proper multimedia framework API for Amiga. Amiga OS development stopped just before Apple got QuickTime and Windows got DirectShow, and while we got datatypes, and realtime library, mpega and camd, we never got a fully integrated framework for playing containerised source-independent, sink-independent multimedia streams with support for file sources, socket sources, stream sources, in-memory sources, progressive rendering, codec plugins, container format plugins, stream muxing/demuxing, hardware specific accelerated codecs etc etc.
The closest any amigoid platform has to this is the Reggae framework on MorphOS and even that is largely incomplete.
Replace libva with va.library, I guess its replace some heder files, remove libva from linking, and open va.library, is naive work needed. Assuming thats all thats need to be done, its not too hard.
What can go wrong, well lots of things, most likely thing I’m not thinking about, incompability, between versions, is on top of that list.
Way I don’t work on it, well my HD card is watter cooled, it sucks pooling it out, CFE does support RX card, and need to buy watter cooling block for the RX card, or cut it out of the loop, and I need to buy drivers etc.
But that does not stop anyone else from working on it.
Edited by LiveForIt on 2021/9/16 21:26:47
(NutsAboutAmiga)
Basilisk II for AmigaOS4 AmigaInputAnywhere Excalibur and other tools and apps.
yes it be great if everyone was able to use same graphic cards.
I was a bit chocked when Acube acctually tried to update UBOOT, and support HD cards work on Sam440, the Sam440 is prity old now, and its where limited. I guess they did becouse they wonted RX and HD cards to work on Sam460.
Acube alos has a laptop project around cornor, it be great if solved the problem.
Maybe we should have bunty for updated Firmware insted.
(NutsAboutAmiga)
Basilisk II for AmigaOS4 AmigaInputAnywhere Excalibur and other tools and apps.
At the moment a hex editor can probably be used to modify RadeonHD to RadeonRX in mplayer to get it working with comp_yuv2. The name is hardcoded (check this post).
Nice tip! I used Zaphod to find and change RadeonHD to RadeonRX in MickJT's mplayer version. When I tested a sample AVI file with the RadeonHD version, CPU usage was ~15%, with the RadeonRX version it was ~8%. So something changed! :)
I then tested with Emotion 1.9 and the CPU use was in line with the RX hacked Mplayer.
New question, is this "hack" possible with ffplay?
Thanks! Bill "tekmage" Borsari
PS Don't forget to get your raffle tickets for AmiWest 2021 - www.amiwest.net
New question, is this "hack" possible with ffplay?
No, the check tells Mplayer you have supported graphic card, and now it can use bitmaps with yuv422 format. (without it has to convert to ARGB bitmap.)
FFMPEG does not display the graphic so nothing you can't get any improvments.
Mplayer does not do hardware decoding, no VA.library when Mplayer was compiled.
If get same result in Emotion it most be becouse its not using VA.library or it the video file is so tiny that most cpu time is not spent on decoding. I will suggest you making sure you have the latest version of Emotion, and lastest drivers installed. can all RX cards support VA.library?
MPlayer is configured with lowest decoding settings, and lot time was spent on trying to find the fastest version of FFMPEG, as thats what it uses. (it might have help)
The MickJT version was compiled with different compiler I belive.
Edited by LiveForIt on 2021/9/20 20:07:28
(NutsAboutAmiga)
Basilisk II for AmigaOS4 AmigaInputAnywhere Excalibur and other tools and apps.
In recent months, a new version of mplayer 1.5 has been released, building on the work of previous releases of this program under AOS4. New things have been added and some things have been improved. From the beginning, the idea was that mplayer could also use the va-api video output. For a few months now, we have been testing a solution based on the mplayer port under Linux, where there is a vaapi video output. To make it work, we need to undo some changes in the ffmpeg code and add the code to mplayer. Changes to ffmpeg and mplayer alone will not make it work. It was also necessary to adapt the va-api implementation to work with the existing va-api version under AOS4.
Lastly, mplayer and ffmpeg itself appears to work under AOS4. The only problem is the video output. The video output in mplayer itself is on X11. For testing, a simple output was made to simulate operation under AOS4. What is missing is for this output to be rewritten/re-written in order to lastdznie confirm the operation. Here is my request, is there any person who could help with this ?
Example log from mplayer vaapi output under AOS4 where you can see
Playing PRUEBAS:Big_Buck_Bunny_1080_10s_30MB.mp4.
libavformat version 60.16.100 (internal)
libavformat file format detected.
[lavf] stream 0: video (h264), -vid 0
VIDEO: [H264] 1920x1080 24bpp 30.000 fps 24559.9 kbps (2998.0 kbyte/s)
[vaapi] initialised (API version 1.5).
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
libavcodec version 60.31.102 (internal)
Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
==========================================================================
Clip info:
major_brand: isom
minor_version: 512
compatible_brands: isomiso2avc1mp41
title: Big Buck Bunny, Sunflower version
artist: Blender Foundation 2008, Janus Bager Kristensen 2013
composer: Sacha Goedegebure
encoder: Lavf57.63.100
comment: Creative Commons Attribution 3.0 - http://bbb3d.renderfarming.net genre: Animation
Load subtitles in PRUEBAS:
Audio: no sound
Starting playback...
Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
VO: [vaapi] 1920x1080 => 1920x1080 H.264 VAAPI acceleration
[vaapi] hardware supports codec: format H.264 VAAPI acceleration -> VAProfile 7.
[vaapi] context initialised: config 0x1, context 0x14.
[h264 @ 0x436e86a8]Using deprecated struct vaapi_context in decode.
Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
VO: [vaapi] 1920x1080 => 1920x1080 H.264 VAAPI acceleration
[vaapi] OSD drawing is not supported.
--
For comparison, here is the log from mplayer vaapi under Linux
MPlayer SVN-r38423-snapshot-12 (C) 2000-2023 MPlayer Team
do_connect: could not connect to socket
connect: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.
Playing /home/markus/Wideo/2020/2020-03-04_09-49-20.mp4.
libavformat version 60.3.100 (internal)
libavformat file format detected.
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x556a3bdac2c0]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 eng
VIDEO: [H264] 1280x720 24bpp 45000.000 fps 14004.9 kbps (1709.6 kbyte/s)
libva info: VA-API version 1.14.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_1_6
libva info: va_openDriver() returns 0
[vaapi] initialised (API version 1.14).
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
libavcodec version 60.3.100 (internal)
Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
==========================================================================
Clip info:
major_brand: mp42
minor_version: 0
compatible_brands: isommp42
creation_time: 2020-03-04T08:49:20.000000Z
location: +50.3001+018.8347/
location-eng: +50.3001+018.8347/
com.android.version: 7.1.2
Load subtitles in /home/markus/Wideo/2020/
==========================================================================
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
AUDIO: 48000 Hz, 2 ch, floatle, 96.0 kbit/3.12% (ratio: 12000->384000)
Selected audio codec: [ffaac] afm: ffmpeg (FFmpeg AAC (MPEG-2/MPEG-4 Audio))
==========================================================================
couldn't open play stream: Device or resource busy
ao2: can't open sndio
[AO OSS] audio_setup: Can't open audio device /dev/dsp: No such file or directory
AO: [alsa] 48000Hz 2ch floatle (4 bytes per sample)
Starting playback...
Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
VO: [vaapi] 1280x720 => 1280x720 H.264 VAAPI acceleration
[vaapi] hardware supports codec: format H.264 VAAPI acceleration -> VAProfile 7.
[vaapi] context initialised: config 0x1000000, context 0x2000000.
[h264 @ 0x556a3bdd1de0]Using deprecated struct vaapi_context in decode.
Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
VO: [vaapi] 1280x720 => 1280x720 H.264 VAAPI acceleration
[vaapi] OSD drawing is not supported.