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]
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 17 of 17
Thread
-
-
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/stax76/mpv.net
https://github.com/hudec117/Mpv.NET.lib (this is totally unrelated to my little player)
https://github.com/mpv-player/mpv-examples/tree/master/libmpv/csharp -
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.
-
This one was done with VidCoder (HandBrake) and has the flagging. Same problem as FFmpeg version.
https://drive.google.com/open?id=1PoyhBdALaBt2a-pXP0ZW-GdeItorCPo0 -
You might not need a Win32 window handle as you can do your own rendering using OpenGL.
https://github.com/mpv-player/mpv/blob/master/libmpv/render.h -
Maybe update Win 10 to 1903 if you didn't already.
-
For quick testing I encoded a testvideo, see attached file.
I used that source pic:
https://upload.wikimedia.org/wikipedia/commons/thumb/6/66/SMPTE_Color_Bars.svg/2000px-...r_Bars.svg.png
How is that videofile with your players? I have a thought but need info first. -
-
And yet the stream is flagged 709. Wouldn't this mean that it was encoded 601 and then flagged 709 by FFmpeg/x264?
Video
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
EDIT:
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.
Similar Threads
-
Mpeg1 to H.264 is bad
By roxics in forum Video ConversionReplies: 7Last Post: 30th Aug 2018, 11:34 -
Performance problems with 4K H.264 playback on NVIDIA GTX 770
By dfischer in forum Software PlayingReplies: 5Last Post: 18th Mar 2017, 12:14 -
Why is .264 encode getting blocks on it during playback?
By killerteengohan in forum RestorationReplies: 10Last Post: 7th Feb 2015, 23:52 -
Video playback has garbled colors and blocks all over it
By killerteengohan in forum Software PlayingReplies: 1Last Post: 17th Jan 2015, 05:09