Playing 4K 60 FPS videos without hardware acceleration (GPU decoding)

Non release banter
User avatar
babam
Warlord
Warlord
Posts: 528
Joined: 16 Nov 2016, 10:30
Distribution: Porteus 5.0rc3 Xfce K6.1.1
Location: Rainy city

Playing 4K 60 FPS videos without hardware acceleration (GPU decoding)

Post#1 by babam » 10 Dec 2022, 18:17

My laptop with Intel i3 1115G4 is very bad for playing 4K 60 FPS videos without hardware acceleration (GPU decoding).
Video playback is very stuttering.

Maybe with a more powerful CPU like i5, i7 or Ryzen it will play videos smoothly.

For those who want to try it, here is an example video (10 seconds - 15.3MB) https://drive.google.com/uc?export=down ... 0WHy7CbkMK

Code: Select all

$ mpv av1-4k60fps.webm
$ ffplay av1-4k60fps.webm
Thanks.
Sorry, my English is bad.

User avatar
Rava
Contributor
Contributor
Posts: 5416
Joined: 11 Jan 2011, 02:46
Distribution: XFCE 5.01 x86_64 + 4.0 i586
Location: Forests of Germany

Playing 4K 60 FPS videos without hardware acceleration (GPU decoding)

Post#2 by Rava » 11 Dec 2022, 00:34

babam wrote:
10 Dec 2022, 18:17
My laptop with Intel i3 1115G4 is very bad for playing 4K 60 FPS videos without hardware acceleration (GPU decoding).
Did you try using SM-Windoze doing the same, aka having no specific GPU hardware acceleration active in your windows setup? (Usually most hardware developers use some kind of native video drivers in connection with SM-Windoze)
I am asking because it is normal that video playback, especially larger format files like 4K 60 FPS, being unable to be playing back without any native driver specific to your hardware.
Even SM-Windoze would show in that instance that non-native generic drivers are unable to do that flawlessly therefore my specific question on that.


I played your video using my native NV driver for older hardware (010-nvidia-340.108-k.5.4.30-porteus-v5.0-x86_64_rava.xzm - using, of course kernel 5.4.30-porteus) but I have older more or less inferior hardware and it utterly fails. While ffplay did not report anything mpv did report this:

Code: Select all

Audio/Video desynchronisation detected! Possible reasons include too slow
hardware, temporary CPU spikes, broken drivers, and broken files. Audio
position will not match to the video (see A-V status field).
Its full output:

Code: Select all

guest@porteus:/7/video/TEST$ mpv av1-4k60fps.webm 
 (+) Video --vid=1 (*) (av1 3840x2160 59.940fps)
 (+) Audio --aid=1 --alang=eng (*) (opus 2ch 48000Hz)
AO: [pulse] 48000Hz stereo 2ch float
[autoconvert] Converting yuv420p10 -> yuv420p
VO: [gpu] 3840x2160 yuv420p
AV: 00:00:00 / 00:00:10 (4%) A-V:  0.472 Dropped: 10

Audio/Video desynchronisation detected! Possible reasons include too slow
hardware, temporary CPU spikes, broken drivers, and broken files. Audio
position will not match to the video (see A-V status field).

AV: 00:00:09 / 00:00:10 (100%) A-V:  0.000 Dropped: 324

Exiting... (End of file)
Cheers!
Yours Rava

User avatar
AcnapyxoB
Samurai
Samurai
Posts: 191
Joined: 24 Dec 2014, 10:15
Distribution: Porteus 5.01
Location: Planet Earth

Playing 4K 60 FPS videos without hardware acceleration (GPU decoding)

Post#3 by AcnapyxoB » 11 Dec 2022, 09:52

It's the same with Intel Core i5-4210M

Code: Select all

 (+) Video --vid=1 (*) (av1 3840x2160 59.940fps)
 (+) Audio --aid=1 --alang=eng (*) (opus 2ch 48000Hz)
AO: [pulse] 48000Hz stereo 2ch float
[ffmpeg/video] av1: No support for codec av1 profile 0.
[ffmpeg/video] av1: Your platform doesn't suppport hardware accelerated AV1 decoding.
[ffmpeg/video] av1: Failed to get pixel format.
Error while decoding frame (hardware decoding)!
VO: [gpu] 3840x2160 yuv420p10
AV: 00:00:00 / 00:00:10 (5%) A-V:  0.436 Dropped: 14

Audio/Video desynchronisation detected! Possible reasons include too slow
hardware, temporary CPU spikes, broken drivers, and broken files. Audio
position will not match to the video (see A-V status field).

AV: 00:00:01 / 00:00:10 (12%) A-V:  1.517 Dropped: 47
Audio device underrun detected.
AV: 00:00:02 / 00:00:10 (23%) A-V:  3.392 Dropped: 92
Audio device underrun detected.
AV: 00:00:02 / 00:00:10 (25%) A-V:  4.033 Dropped: 104
Audio device underrun detected.
AV: 00:00:02 / 00:00:10 (28%) A-V:  4.804 Dropped: 115
Audio device underrun detected.
AV: 00:00:09 / 00:00:10 (100%) A-V:  0.000 Dropped: 367

Exiting... (End of file)
...and similar with Core i5-8265U

Code: Select all

 (+) Video --vid=1 (*) (av1 3840x2160 59.940fps)
 (+) Audio --aid=1 --alang=eng (*) (opus 2ch 48000Hz)
AO: [pulse] 48000Hz stereo 2ch float
VO: [gpu] 3840x2160 yuv420p10
AV: 00:00:01 / 00:00:10 (13%) A-V:  0.480 Dropped: 58

Audio/Video desynchronisation detected! Possible reasons include too slow
hardware, temporary CPU spikes, broken drivers, and broken files. Audio
position will not match to the video (see A-V status field).

AV: 00:00:09 / 00:00:10 (100%) A-V:  0.000 Dropped: 430

Exiting... (End of file)
Porteus v5.01 KDE x86_64

User avatar
babam
Warlord
Warlord
Posts: 528
Joined: 16 Nov 2016, 10:30
Distribution: Porteus 5.0rc3 Xfce K6.1.1
Location: Rainy city

Playing 4K 60 FPS videos without hardware acceleration (GPU decoding)

Post#4 by babam » 11 Dec 2022, 10:34

@Rava,
My Porteus-5.0 of course has drivers for Intel GPU (intel-media-driver) and can play av1-4k60fps.webm smoothly.

Can a more powerful CPU be able to play 4K 60 FPS videos smoothly without hardware acceleration.
Sorry, my English is bad.

User avatar
babam
Warlord
Warlord
Posts: 528
Joined: 16 Nov 2016, 10:30
Distribution: Porteus 5.0rc3 Xfce K6.1.1
Location: Rainy city

Playing 4K 60 FPS videos without hardware acceleration (GPU decoding)

Post#5 by babam » 11 Dec 2022, 10:53

AcnapyxoB wrote:
11 Dec 2022, 09:52
It's the same with Intel Core i5-4210M
...and similar with Core i5-8265U
Thanks for sharing.
Sorry, my English is bad.

User avatar
AcnapyxoB
Samurai
Samurai
Posts: 191
Joined: 24 Dec 2014, 10:15
Distribution: Porteus 5.01
Location: Planet Earth

Playing 4K 60 FPS videos without hardware acceleration (GPU decoding)

Post#6 by AcnapyxoB » 11 Dec 2022, 11:51

babam wrote:
11 Dec 2022, 10:53
Thanks for sharing.
The bad is that I tried with intel-media-driver (21.3.5) and it is not going smoothly.
Porteus v5.01 KDE x86_64

User avatar
Rava
Contributor
Contributor
Posts: 5416
Joined: 11 Jan 2011, 02:46
Distribution: XFCE 5.01 x86_64 + 4.0 i586
Location: Forests of Germany

Playing 4K 60 FPS videos without hardware acceleration (GPU decoding)

Post#7 by Rava » 11 Dec 2022, 13:18

babam wrote:
11 Dec 2022, 10:34
Can a more powerful CPU be able to play 4K 60 FPS videos smoothly without hardware acceleration.
A very state of the art GPU might be able doing so. But I think we are the wrong forum.
A more specialized in video would probably more informative on that. E.g. http://www.doom9.org/index.html?/faqs.htm or http://forum.doom9.org/ might be more helpful? It says about itself "The definitive DVD backup resource" - but it is also about more generic video on PCs related stuff as well.
Cheers!
Yours Rava

fulalas
DEV Team
DEV Team
Posts: 2050
Joined: 26 Oct 2016, 15:34
Distribution: Porteus
Location: Brazil

Playing 4K 60 FPS videos without hardware acceleration (GPU decoding)

Post#8 by fulalas » 11 Dec 2022, 21:47

On a Ryzen 2700X (8 cores + 8 threads) this snake/sloth video runs at 85% CPU load dropping no frames :)

CPUs are too generic for this heavy task. GPUs can do better because they have a dedicated pipeline for decoding videos.

User avatar
babam
Warlord
Warlord
Posts: 528
Joined: 16 Nov 2016, 10:30
Distribution: Porteus 5.0rc3 Xfce K6.1.1
Location: Rainy city

Playing 4K 60 FPS videos without hardware acceleration (GPU decoding)

Post#9 by babam » 11 Dec 2022, 22:06

fulalas wrote:
11 Dec 2022, 21:47
On a Ryzen 2700X (8 cores + 8 threads) this snake/sloth video runs at 85% CPU load dropping no frames :)
Thanks, Ryzen 7 2700X is very powerful, R7 2700X has 8 cores + 16 threads
Sorry, my English is bad.

fulalas
DEV Team
DEV Team
Posts: 2050
Joined: 26 Oct 2016, 15:34
Distribution: Porteus
Location: Brazil

Playing 4K 60 FPS videos without hardware acceleration (GPU decoding)

Post#10 by fulalas » 12 Dec 2022, 02:03

Well, technically the CPU has 16 threads, but 8 of them are physical cores and the other 8 are virtual (using idle parts of the physical pipeline). :P

fulalas
DEV Team
DEV Team
Posts: 2050
Joined: 26 Oct 2016, 15:34
Distribution: Porteus
Location: Brazil

Playing 4K 60 FPS videos without hardware acceleration (GPU decoding)

Post#11 by fulalas » 15 Dec 2022, 11:02

@babam, try your video again using these modules:

https://www.mediafire.com/file/fgchymgc ... 6_64-1.xzm

https://www.mediafire.com/file/qwzqbnv0 ... x86_64.xzm

https://www.mediafire.com/file/dufiquqx ... 6_64-2.xzm

:)

EDIT: even faster: run the video using this exact command:

Code: Select all

/usr/bin/mpv av1-4k60fps.webm
If you want to improve video performance without having to run via terminal all the time, edit both /usr/local/bin/cell_hwdec and /usr/local/bin/mpv_hwdec and remove all instances of this:

Code: Select all

--video-sync=display-resample

User avatar
Rava
Contributor
Contributor
Posts: 5416
Joined: 11 Jan 2011, 02:46
Distribution: XFCE 5.01 x86_64 + 4.0 i586
Location: Forests of Germany

Playing 4K 60 FPS videos without hardware acceleration (GPU decoding)

Post#12 by Rava » 16 Dec 2022, 03:06

Is this one really helping?
In my Port 5 I have this one already:

Code: Select all

ffmpeg version 4.4.1 Copyright (c) 2000-2021 the FFmpeg developers
  built with gcc 11.2.0 (GCC)
Is your module a somehow patched ffmpeg version 4.4.1 without altering the version number in the module name?
────────────────────────────────────
Thanks for the tips on removing the

Code: Select all

--video-sync=display-resample
parts. :friends:
Cheers!
Yours Rava

User avatar
babam
Warlord
Warlord
Posts: 528
Joined: 16 Nov 2016, 10:30
Distribution: Porteus 5.0rc3 Xfce K6.1.1
Location: Rainy city

Playing 4K 60 FPS videos without hardware acceleration (GPU decoding)

Post#13 by babam » 16 Dec 2022, 11:23

fulalas wrote:
15 Dec 2022, 11:02
@babam, try your video again using these modules:

EDIT: even faster: run the video using this exact command:

Code: Select all

/usr/bin/mpv av1-4k60fps.webm
If you want to improve video performance without having to run via terminal all the time, edit both /usr/local/bin/cell_hwdec and /usr/local/bin/mpv_hwdec and remove all instances of this:

Code: Select all

--video-sync=display-resample
Unfortunately I didn't get any difference in performance.

What is the difference between mpv av1-4k60fps.webm vs /usr/bin/mpv av1-4k60fps.webm

Code: Select all

$ which mpv
/usr/bin/mpv
Sorry, my English is bad.

User avatar
Rava
Contributor
Contributor
Posts: 5416
Joined: 11 Jan 2011, 02:46
Distribution: XFCE 5.01 x86_64 + 4.0 i586
Location: Forests of Germany

Playing 4K 60 FPS videos without hardware acceleration (GPU decoding)

Post#14 by Rava » 16 Dec 2022, 13:33

babam wrote:
16 Dec 2022, 11:23
What is the difference between mpv av1-4k60fps.webm vs /usr/bin/mpv av1-4k60fps.webm
There is no difference for you me thinks.
babam wrote:
16 Dec 2022, 11:23
Unfortunately I didn't get any difference in performance.
:(
Does ffplay work better for you?
Cheers!
Yours Rava

User avatar
babam
Warlord
Warlord
Posts: 528
Joined: 16 Nov 2016, 10:30
Distribution: Porteus 5.0rc3 Xfce K6.1.1
Location: Rainy city

Playing 4K 60 FPS videos without hardware acceleration (GPU decoding)

Post#15 by babam » 16 Dec 2022, 13:51

Rava wrote:
16 Dec 2022, 13:33
Does ffplay work better for you?
ffplay is worse than mpv.
Sorry, my English is bad.

Post Reply