LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 09-27-2020, 07:03 PM   #1
lpallard
Senior Member
 
Registered: Nov 2008
Posts: 1,045

Rep: Reputation: Disabled
Cant play 4k videos - Linux Mint desktop


I am trying to determine why I cant play 4k videos on my Linux mint desktop. Searching the web, I've seen people with lower spec'ed machines play 4k.

I tried to see if network speed was the cause by playing from videos stored locally on the computer as well as on my Freenas server. Same identical result.

No matter which player I tried (VLC, xplayer, SMplayer, mpv, etc) I experience TONS of dropped frames and image corruption, extremely high CPU usage on all cores and VLC throws tons of this error:

Code:
avcodec error: more than 5 seconds of late video -> dropping frame (computer too slow ?)
The sound however is just fine.

I tried installing x264 codecs, playing with VLC's settings etc, to no avail... Best playback is with mpv and this is pretty sluggish and the image lags behing the sound (cant watch a movie).

As suggested by VLC, could it simply be that this computer simply can't keep up with 4k?

Specs:
Code:
System:    Host: computer Kernel: 5.4.0-48-generic x86_64 bits: 64 compiler: gcc v: 7.5.0 
           Desktop: Xfce 4.14.1 tk: Gtk 3.22.30 wm: xfwm4 dm: LightDM 
           Distro: Linux Mint 19.3 Tricia base: Ubuntu 18.04 bionic 
Machine:   Type: Desktop Mobo: ASUSTeK model: M5A97 v: Rev 1.xx serial: <filter> 
           BIOS: American Megatrends v: 1605 date: 10/25/2012 
Battery:   Device-1: hidpp_battery_0 model: Logitech Wireless Mouse MX Master 3 serial: <filter> 
           charge: 100% status: Discharging 
CPU:       Topology: Quad Core model: AMD Phenom II X4 965 bits: 64 type: MCP arch: K10 rev: 3 
           L2 cache: 2048 KiB 
           flags: lm nx pae sse sse2 sse3 sse4a svm bogomips: 27292 
           Speed: 3400 MHz min/max: 800/3400 MHz Core speeds (MHz): 1: 3400 2: 2200 3: 800 4: 800 
Graphics:  Device-1: NVIDIA GP108 [GeForce GT 1030] vendor: ASUSTeK driver: nvidia v: 435.21 
           bus ID: 01:00.0 chip ID: 10de:1d01 
           Device-2: NVIDIA GF108 [GeForce GT 440] vendor: ZOTAC driver: N/A bus ID: 05:00.0 
           chip ID: 10de:0de0 
           Display: x11 server: X.Org 1.19.6 driver: nvidia 
           resolution: 1920x1080~60Hz, 3440x1440~60Hz 
           OpenGL: renderer: GeForce GT 1030/PCIe/SSE2 v: 4.6.0 NVIDIA 435.21 direct render: Yes 
Audio:     Device-1: AMD SBx00 Azalia vendor: ASUSTeK driver: snd_hda_intel v: kernel 
           bus ID: 00:14.2 chip ID: 1002:4383 
           Device-2: NVIDIA GP108 High Definition Audio vendor: ASUSTeK driver: snd_hda_intel 
           v: kernel bus ID: 01:00.1 chip ID: 10de:0fb8 
           Device-3: NVIDIA GF108 High Definition Audio vendor: ZOTAC driver: snd_hda_intel 
           v: kernel bus ID: 05:00.1 chip ID: 10de:0bea 
           Sound Server: ALSA v: k5.4.0-48-generic 
Network:   Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet 
           vendor: ASUSTeK P8P67 and other motherboards driver: r8169 v: kernel port: d000 
           bus ID: 02:00.0 chip ID: 10ec:8168 
           IF: enp2s0 state: up speed: 1000 Mbps duplex: full mac: <filter> 
           IF-ID-1: br0.200 state: up speed: N/A duplex: N/A mac: <filter> 
           IF-ID-2: br0.300 state: up speed: N/A duplex: N/A mac: <filter> 
           IF-ID-3: enp2s0.200 state: up speed: 1000 Mbps duplex: full mac: <filter> 
           IF-ID-4: enp2s0.300 state: up speed: 1000 Mbps duplex: full mac: <filter> 
Drives:    Local Storage: total: 419.20 GiB used: 278.03 GiB (66.3%) 
           ID-1: /dev/sda vendor: Crucial model: CT250BX100SSD1 size: 232.89 GiB speed: 6.0 Gb/s 
           serial: <filter> 
           ID-2: /dev/sdb vendor: Hitachi model: HTS722020K9A300 size: 186.31 GiB speed: 3.0 Gb/s 
           serial: <filter> 
[...]
Info:      Processes: 244 Uptime: 4h 13m Memory: 11.66 GiB used: 4.36 GiB (37.4%) Init: systemd 
           v: 237 runlevel: 5 Compilers: gcc: 7.5.0 alt: 7 Client: Unknown python3.6 client 
           inxi: 3.0.32
 
Old 09-28-2020, 01:52 AM   #2
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
2 Nvidia cards, one of them good enough, the other "entry level" from 2011.
Your system is probably getting confused, using the wrong one.
Can you simply disable or remove the GeForce GT 440?
 
Old 09-28-2020, 04:24 PM   #3
lleb
Senior Member
 
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora/Pop!_OS
Posts: 2,983

Rep: Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551
the 1030 is not capable of 4k resolution without a Display port. Does yours have the Display port, and are you configured to set output to the Display port?

The HDMI point may on some 1030 cards can at max do 4k at 30Hz, but that will depend on the CPU/MB it is paired on.

https://forums.tomshardware.com/thre...-60hz.3136913/

https://www.nvidia.com/en-us/geforce...n-netflix-4k-/
 
Old 09-28-2020, 06:03 PM   #4
antithesis85
LQ Newbie
 
Registered: Jul 2020
Posts: 8

Rep: Reputation: Disabled
It's probably not using the GPU at all; a Phenom II X4 is definitely way too old to handle 4K content on the CPU. Usually mpv's status messages will clue you in on whether it's using hardware decoding, but (assuming you have some way of making sure it's going to the 1030), have you tried using --hwdec=yes? What do the status messages say?

x264 won't help you. A) It's an encoder, and B) the format(s) you're most likely to encounter at 4K are HEVC (a.k.a. H.265, not H.264) and VP9. Maybe AV1, but that's still in the initial roll-out phase and companies are only just now announcing commercially-available hardware decoders for it. The GT 1030 has hardware decoders for both H.265 4:2:0 (8-, 10-, and 12-bit), and VP9 (8-, 10-, and 12-bit).

So, what compression format are the videos encoded in? It matters. You can check this using mediainfo.


RE: the part about people with lower-specced machines, if you're talking about things like little mini-PCs (Intel NUCs or the Azulle Byte series, for example), those may have underpowered CPUs without AVX/AVX2, but they still contain more or less the right versions of Intel UHD Graphics which can do 4K decode.
 
Old 10-02-2020, 09:03 AM   #5
lpallard
Senior Member
 
Registered: Nov 2008
Posts: 1,045

Original Poster
Rep: Reputation: Disabled
@ondoho: The GT440 is passed thru to a VM, at the kernel level so it is not "visible" to the base OS. The 4k issues pre-dates the installation of that old video card side by side with the 1030.

@lleb: I am using this 1030 via HDMI to a LG 34in Ultra widescreen monitor (3440x1440). The card does have a Display port though.

@antithesis85: You were right. The playback didnt seem to use GPU at all. Using mpv with the CLI argument "--hwdec=yes" allows to play the movie in native 4k format in a way that I didn't think possible on this computer. Its so "fluid" and smooth, it plays perfectly. You were also right, I got confused with the x264 being an encoder and not a decoder... To be honest, there are so many codecs formats, protocols, standards, and they change so fast/frequently... Its a real mess, especially in linux where there are absolutely no standards in anything whatsoever.

Here's a typical CLI output of playing movies with "mpv --hwdec=yes":

Quote:
(+) Video --vid=1 (*) (hevc 3840x2080 23.976fps)
(+) Audio --aid=1 --alang=eng (*) (aac 8ch 48000Hz)
(+) Subs --sid=1 --slang=eng (*) (subrip)
Subs --sid=2 --slang=eng 'SDH' (subrip)
File tags:
Title: BLABLABLA | BLABLABLABLABLABLABLABLABLABLABLABLABLABLABLABLABLABLA
Using hardware decoding (nvdec).
AO: [pulse] 48000Hz 7.1 8ch float
VO: [gpu] 3840x2080 cuda[p010]
Now, is it possible to have VLC autodetect it is 4k and switch to hardware playback? Or better, have VLC use hardware playback all the time?
 
Old 10-02-2020, 11:45 AM   #6
antithesis85
LQ Newbie
 
Registered: Jul 2020
Posts: 8

Rep: Reputation: Disabled
I just stick with mpv; hwdec=yes can be added to the config file, so you don't have to specify it every time - it'll only activate when the graphics card supports the format. I don't even have VLC installed.

But from the VLC Wiki:
Quote:
From the menu toolbar select Tools → Preferences → Input & Codecs → Codecs → Hardware-accelerated decoding. To disable, select Disable. To re-enable, select Automatic (unless a particular hardware acceleration method is desired).

Remember to press Save to save VLC settings and restart VLC after that to make sure changes are enabled.
 
Old 10-03-2020, 02:33 PM   #7
lpallard
Senior Member
 
Registered: Nov 2008
Posts: 1,045

Original Poster
Rep: Reputation: Disabled
Yeah, I'll stick with mpv I think. VLC was already set to use HW decoding (automatic) but performance is crap compared to mpv. Its not usable..

Thanks antithesis for the trick with mpv!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] How can I play rented HD youtube videos on Linux, say KDE Neon or Mint? Novatian Linux - Software 2 09-19-2020 12:35 PM
Yahoo.news videos will not play in Linux Mint 17 fasimmons Linux - Desktop 9 09-08-2014 09:07 AM
Videos don't play over network, wireless or wired, using sftp but will play locally rrrssssss Gentoo 5 12-30-2010 12:19 PM
Cant play videos in browser since dual boot pwd_pwd_omg_pwd Linux - Newbie 1 09-02-2009 01:31 AM
cant play embeded videos in suse 10.1 computer SUSE / openSUSE 1 07-28-2006 01:40 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 06:43 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration