mpv-player / mpv

🎥 Command line video player
https://mpv.io
Other
27.84k stars 2.87k forks source link

Dolby Vision with wrong colors #7326

Closed Doofussy2 closed 2 years ago

Doofussy2 commented 4 years ago

mpv version and platform

Windows 10

mpv 0.31.0-11-g49cbc5017c Copyright © 2000-2019 mpv/MPlayer/mplayer2 projects
  built on Sun Dec 29 09:31:44 +08 2019
  ffmpeg library versions:
  libavutil       56.38.100
  libavcodec      58.65.100
  libavformat     58.35.101
  libswscale      5.6.100
  libavfilter     7.69.101
  libswresample   3.6.100
  ffmpeg version: git-2019-12-28-6399eed4

Reproduction steps

Play some Dolby Vision videos. Not all videos play this way, and I tested with and without an mpv.conf. Same result.

Expected behavior

Play with correct color

Actual behavior

Picture plays in purple and green mpv-shot0001

Log file

Portable mpv log.txt

Sample files

Can be found, here

Popyacap commented 2 years ago

Hello, I am new here and I am not very knowledgeable about this stuff but I enjoy learning. Currently I am trying to play DV video and I am having the green red hue problem. What I am seeking to know is how to set up mpv player. I already have ffmpeg installed but am unclear about libplacebo. I am using Windows 10. I am having trouble understanding "vo=gpu-next" as to what it is and how to 'enter' it. Sorry if this is something that has been answered and I am missing it or is being asked in the wrong place. I am not the swiftest cat with forums. I can follow instructions but I am a noob with a lot of this. Thanks anyone who can help.

cinnamonmatexfce commented 2 years ago

Hello, I am new here and I am not very knowledgeable about this stuff but I enjoy learning. Currently I am trying to play DV video and I am having the green red hue problem. What I am seeking to know is how to set up mpv player. I already have ffmpeg installed but am unclear about libplacebo. I am using Windows 10. I am having trouble understanding "vo=gpu-next" as to what it is and how to 'enter' it. Sorry if this is something that has been answered and I am missing it or is being asked in the wrong place. I am not the swiftest cat with forums. I can follow instructions but I am a noob with a lot of this. Thanks anyone who can help.

Using prompt go inside the folder where the mpv.exe is and then go with: mpv.exe --vo=gpu-next C:\path\to\video\filename.ext

ghost commented 1 year ago

Yeah, indeed, this is supported now with --vo=gpu-next and sufficiently recent ffmpeg/libplacebo (ffmpeg 5.0, libplacebo 4.192.0).

Can ffmpeg convert DV to HDR/SDR now?

haasn commented 1 year ago

Yeah, indeed, this is supported now with --vo=gpu-next and sufficiently recent ffmpeg/libplacebo (ffmpeg 5.0, libplacebo 4.192.0).

Can ffmpeg convert DV to HDR/SDR now?

Yes, see https://ffmpeg.org/ffmpeg-filters.html#Examples-90

It is done automatically by the vf_libplacebo filter when DV metadata is present.

stefan1983 commented 1 year ago

How would one be able to use it within macOS then?

Warning: ffmpeg 5.1.2_6 is already installed and up-to-date.
To reinstall 5.1.2_6, run:
  brew reinstall ffmpeg
sg-nb3:Downloads sg$ mpv --target-trc=pq --target-prim=bt.2020 vo=gpu-next dolby-vision-nasa-\(dolby-vision\)-\(www.demolandia.net\).mp4 
Playing: vo=gpu-next
[file] Cannot open file 'vo=gpu-next': No such file or directory
Failed to open vo=gpu-next.

Playing: dolby-vision-nasa-(dolby-vision)-(www.demolandia.net).mp4
 (+) Video --vid=1 (*) (hevc 3840x2160 59.940fps)
 (+) Audio --aid=1 (*) (eac3 6ch 48000Hz)
AO: [coreaudio] 48000Hz stereo 2ch floatp
VO: [libmpv] 3840x2160 yuv420p10
AV: 00:00:09 / 00:02:23 (7%) A-V:  0.000 Dropped: 152

Exiting... (Quit)
sg-nb3:Downloads sg$ 
hooke007 commented 1 year ago

No gpu-next in Mac https://github.com/mpv-player/mpv/issues/11308 https://github.com/mpv-player/mpv/issues/10978 https://github.com/mpv-player/mpv/issues/11301

stefan1983 commented 1 year ago

OK, so no dolby vision playback on macOS possible at the moment?

I tried to play the testfile as mentioned in the original post, but with the same result.

Akczht commented 1 year ago

how can I play hdr files on macOS Apple Silicon, I've compiled mpv myself, it does recognise the file as hdr and shows proper colors to use 2020-ncl*, but it just doesnt look as bright/colorful(maybe), like the same video played over safari, it's a lg oled video https://youtu.be/njX2bu-_Vw4

h-2 commented 1 year ago

I have the following versions installed:

ffmpeg-6.0_1,1                 Realtime audio/video encoder/converter and streaming server
ffmpeg4-4.4.4_2                Realtime audio/video encoder/converter and streaming server (legacy 4.* series)
libplacebo-6.292.0             Reusable library for GPU-accelerated video/image rendering
mpv-0.35.1_5,1                 Free and open-source general-purpose video player
nvidia-driver-535.54.03        NVidia graphics card binary drivers for hardware OpenGL rendering

And I have set vo=gpu-next, but I still get funky colours. Is there anything else I need to do?

edit: it's weird how it affects certain parts of the image and not others (depends on scene).

image

but gpu-next certanly looks better then for example XV:

image