Page 1 of 2

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

Posted: 10 Dec 2022, 18:17
by babam
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.

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

Posted: 11 Dec 2022, 00:34
by Rava
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)

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

Posted: 11 Dec 2022, 09:52
by AcnapyxoB
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)

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

Posted: 11 Dec 2022, 10:34
by babam
@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.

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

Posted: 11 Dec 2022, 10:53
by babam
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.

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

Posted: 11 Dec 2022, 11:51
by AcnapyxoB
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.

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

Posted: 11 Dec 2022, 13:18
by Rava
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.

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

Posted: 11 Dec 2022, 21:47
by fulalas
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.

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

Posted: 11 Dec 2022, 22:06
by babam
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

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

Posted: 12 Dec 2022, 02:03
by fulalas
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

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

Posted: 15 Dec 2022, 11:02
by fulalas
@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

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

Posted: 16 Dec 2022, 03:06
by Rava
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:

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

Posted: 16 Dec 2022, 11:23
by babam
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

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

Posted: 16 Dec 2022, 13:33
by Rava
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?

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

Posted: 16 Dec 2022, 13:51
by babam
Rava wrote:
16 Dec 2022, 13:33
Does ffplay work better for you?
ffplay is worse than mpv.