I encoded SMPTE bars using FFmpeg/libx264 with no special flags. I got a file flagged limited range BT.709. It plays perfectly in VLC Player. But in Win 10 Windows Media Player, and in a MediaElement control in a .NET app, I get hue and saturation shifts as shown below. Most notably, green is too dark. Gray levels are fine. What could be going on? A serious bug in WMF decoder? I have noted the same color shifts on another Win 10 system using a different graphics adapter.
[Attachment 49453 - Click to enlarge]
+ Reply to Thread
Results 1 to 17 of 17
I can't help with Direct Show or Media Foundation as I decided to give it up in favor of libmpv which is an amazing library for embedding video playback, I'm not sure how well it integrates in WPF though, some links:
https://github.com/hudec117/Mpv.NET.lib (this is totally unrelated to my little player)
Thanks for the suggestion. Looks like libmpv has to run in a WindowsFormsHost, which is always-on-top and won't work in my app since I have overlays.
Please upload file
VidCoder (HandBrake) and has the flagging. Same problem as FFmpeg version.
For quick testing I encoded a testvideo, see attached file.
I used that source pic:
How is that videofile with your players? I have a thought but need info first.
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L4.1
Format settings : CABAC / 4 Ref Frames
Format settings, CABAC : Yes
Format settings, RefFrames : 4 frames
Codec ID : avc1
Codec ID/Info : Advanced Video Coding
Duration : 30 s 30 ms
Bit rate : 18.5 kb/s
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 29.970 (30000/1001) FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.000
Stream size : 67.8 KiB (82%)
Writing library : x264 core 148 r2708 86b7198
Encoding settings : cabac=1 / ref=4 / deblock=1:0:0 / analyse=0x3:0x113 / me=umh / subme=8 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=12 / lookahead_threads=2 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=2 / b_bias=0 / direct=3 / weightb=1 / open_gop=0 / weightp=2 / keyint=300 / keyint_min=30 / scenecut=40 / intra_refresh=0 / rc_lookahead=50 / rc=crf / mbtree=1 / crf=18.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / vbv_maxrate=62500 / vbv_bufsize=78125 / crf_max=0.0 / nal_hrd=none / filler=0 / ip_ratio=1.40 / aq=1:1.00
Encoded date : UTC 2019-06-23 17:48:18
Tagged date : UTC 2019-06-23 17:48:18
Color range : Limited
Color primaries : BT.709
Transfer characteristics : BT.709
Matrix coefficients : BT.709
That was exactly my thought, but I am not a user of VLC, so I didn't want to blame VLC for an error of this extent.
But this issue in VLC (treats all rec.701 files as rec.601) "solves" the issue for this wrong encoded file (rec.601 color but flagged as rec.709), but any other rec709 is displayed wrong.
Take a look at MPC-BE or also MPC-HC, life's too short to use *not*good* players
What was your source for the file created with ffmpeg?
How does my file work for you?
I'm still on Windows 7 and still use Windows Media Center for TV recording. When live viewing or viewing recordings through Media Center, the colors are always wrong with it displaying 709 content as 601. Seems to be a running theme with Windows builtin players.
What colors you get in Windows can depend on the player, the codecs you have installed, other installed video filters, and the graphics driver.