View previous topic :: View next topic |
Author |
Message |
ExecutorElassus Veteran
Joined: 11 Mar 2004 Posts: 1465 Location: Berlin, Germany
|
Posted: Sun Dec 08, 2024 5:40 pm Post subject: why does mplayer play HEVC files with weird colors? [SOLVED] |
|
|
I'm about four years behind the trends, it seems, but I keep running across videos encoded with HEVC/x265, and on my version of mplayer the colors come out weird (lots of purple and teal).
Code: | # emerge -pv ffmpeg
These are the packages that would be merged, in order:
Calculating dependencies... done!
Dependency resolution took 56.23 s (backtrack: 0/20).
[ebuild R ] media-video/ffmpeg-6.1.2:0/58.60.60::gentoo USE="X alsa bzip2 chromium dav1d encode gnutls gpl iconv ieee1394 jack mp3 network openal opengl openh264 openssl opus pic postproc sdl speex svg theora threads truetype vaapi vdpau vorbis vulkan x264 x265 xvid zlib -amf -amr -amrenc (-appkit) -bluray -bs2b -cdio -chromaprint -codec2 -cpudetection -cuda -debug -doc -fdk -flite -fontconfig -frei0r -fribidi -gcrypt -glslang -gme -gmp -gsm -hardcoded-tables -iec61883 -jpeg2k -jpegxl -kvazaar -ladspa -lcms -libaom -libaribb24 -libass -libcaca -libdrm -libilbc -libplacebo -librtmp -libsoxr -libtesseract -libv4l -libxml2 -lv2 -lzma (-mipsdspr1) (-mipsdspr2) (-mipsfpu) -modplug -nvenc -opencl -oss -pulseaudio -qsv -rav1e -rubberband -samba -shaderc -snappy -sndio -soc -srt -ssh -static-libs -svt-av1 -test -twolame -v4l -verify-sig -vidstab -vmaf -vpx -webp -zeromq -zimg -zvbi" ABI_X86="32 (64) (-x32)" CPU_FLAGS_X86="mmx mmxext sse sse2 -3dnow -3dnowext -aes -avx -avx2 -fma3 -fma4 -sse3 -sse4_1 -sse4_2 -ssse3 -xop" FFTOOLS="aviocat cws2fws ffescape ffeval ffhash fourcc2pixfmt graph2dot ismindex pktdumper qt-faststart sidxindex trasher" 10,221 KiB
|
Code: | # emerge -pv mpv
These are the packages that would be merged, in order:
Calculating dependencies... done!
Dependency resolution took 3.80 s (backtrack: 0/20).
[ebuild R ] media-video/mpv-0.39.0:0/2::gentoo USE="X alsa cli drm dvd egl iconv jack javascript jpeg libmpv lua openal opengl uchardet vaapi vdpau vulkan xv zlib (-aqua) -archive -bluray -cdda (-coreaudio) -debug -dvb -gamepad -lcms -libcaca -nvenc -pipewire -pulseaudio -rubberband -sdl (-selinux) -sixel -sndio -soc -test -tools -wayland -zimg" LUA_SINGLE_TARGET="(luajit) (-lua5-1)" PYTHON_SINGLE_TARGET="python3_12 -python3_10 -python3_11 -python3_13" 0 KiB
|
Code: | # emerge -pv mplayer
These are the packages that would be merged, in order:
Calculating dependencies... done!
Dependency resolution took 3.59 s (backtrack: 0/20).
[ebuild R ] media-video/mplayer-1.5_p20241125::gentoo USE="X a52 alsa cdio dvd dvdnav enca encode fbcon ftp iconv ipv6 jack joystick jpeg libass mad mp3 network opengl osdmenu png shm speex theora truetype unicode vdpau vorbis x264 xscreensaver xv xvid -aalib (-aqua) -bidi -bl -bluray -bs2b -cddb -cdparanoia -cpudetection -debug -dga -doc -dts -dv -dvb -faac -faad -ggi -gsm -ladspa -libcaca -libmpeg2 -lirc -live -lzo -md5sum -mng -nas -openal -oss -pnm -pulseaudio -pvr -radio -rar -rtc -rtmp -samba -sdl (-selinux) -tga -toolame -tremor -twolame -v4l -vcd (-vidix) -xinerama -yuv4mpeg -zoran" CPU_FLAGS_X86="mmx mmxext sse sse2 -3dnow -3dnowext -avx -avx2 -fma3 -fma4 -sse3 -sse4_1 -sse4_2 -ssse3 -xop" VIDEO_CARDS="-mga" 0 KiB
|
Video card is a Radeon RX 5700 XT. Monitors are Eizo 24-inch from about six years ago that have 10-bit color capability, which is why I wanted to use HEVC files in the first place.
What am I missing?
Cheers,
EE
Last edited by ExecutorElassus on Mon Dec 09, 2024 5:40 pm; edited 1 time in total |
|
Back to top |
|
|
Ionen Developer
Joined: 06 Dec 2018 Posts: 2891
|
Posted: Mon Dec 09, 2024 4:59 am Post subject: |
|
|
I see mpv in your output, do you mean mpv is doing the same thing? Generally mpv tries hard to get colors correct and mostly keeps up with quirks of modern hardware and file formats. If so, didn't sound like it but are these hevc files from the same group/person? (it's possible they've been encoded wrong too).
I'd be less surprised if mplayer is doing something odd, it was great back in the days but I find it hard to recommend over mpv nowadays unless you need support for some old thing that mpv dropped support of.
Edit: if mpv looks wrong too, fwiw may want to try --vo=gpu-next --gpu-api=vulkan on mpv. Will eventually replace the default in a future version (mpv-9999 already defaults to vulkan, but not gpu-next yet), and has bit different handling for colors.
Edit2: just noticed that have USE=xv enabled on mpv (disabled by default), if you're using `-vo xv` on either mpv or mplayer (maybe mplayer uses it by default, I haven't checked recently, mpv doesn't), note that it has rather limited color spaces support and can lead to washed out colors or potentially other issues when the files support something better. GL, Vulkan and most other modern output methods don't have that problem. |
|
Back to top |
|
|
ExecutorElassus Veteran
Joined: 11 Mar 2004 Posts: 1465 Location: Berlin, Germany
|
Posted: Mon Dec 09, 2024 10:53 am Post subject: |
|
|
Hi Ionen,
I don't actually know what engine mplayer uses for its playback (I thought it used mpv as a backend). Is that not the case? Should I build mpv without the xv USE-flag enabled?
To answer your general questions: no, these are videos from different sources, but they all use HEVC. It might be the case that they use one of Dolby Video's proprietary encodings, but I honestly don't know.
I use mplayer for video playback because it's relatively lightweight and VLC kept lagging out with larger video files (ie, the video would pause every few seconds while it buffered again). I was using xine for the longest time, but got tired of its very rudimentary UI. Is there some better video player I should be using?
Edit: in mplayer's settings I have "vdpau" as the output driver and "mpv" as its multimedia engine. I'll try setting it to gpu-next and mplayer, respectively, and see what happens.
Edit2: so gpu-next isn't available if mplayer is the engine, but it is if I use mpv. So I set it to use mpv as the engine and gpu-next as the output driver, and now the colors are correct (and much nicer). So is this "solved"?
Cheers,
EE |
|
Back to top |
|
|
Ionen Developer
Joined: 06 Dec 2018 Posts: 2891
|
Posted: Mon Dec 09, 2024 4:47 pm Post subject: |
|
|
mpv is an alternative to mplayer, and was in fact forked from mplayer2 which itself is a fork of mplayer. You'll find mpv to be rather similar even if it does not share much of the original code base anymore. So... they not use each others, both are standalone players (like e.g. VLC) that mostly just use ffmpeg to handle the different video formats.
I can't really help with mplayer anyhow, been years since I've last used it since I moved on to mpv instead. Was mostly wondering if you were having the same color issues with mpv as well, thought you had tried it given listed it. |
|
Back to top |
|
|
ExecutorElassus Veteran
Joined: 11 Mar 2004 Posts: 1465 Location: Berlin, Germany
|
Posted: Mon Dec 09, 2024 5:40 pm Post subject: |
|
|
I realize now that I'd been confusing mplayer (the backend) with SMplayer (the frontend). I had SMplayer configured to use mpv, but didn't have those two options set (ie, gpu-next and vulkan). Now that I do, the colors work as desired. Cheers. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|