Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Simos.805

macrumors member
Original poster
Apr 15, 2017
44
27
Athens, Greece
Hi, I have an iMac 5K 2017 with an i7 4.2GHz, 16GB RAM and Radeon Pro 580 graphics running macOS 10.13.6.
My problem is, I have some videos like this that are very high quality (4K, 60fps, HDR, high bitrates etc) that my top spec iMac can't play but my iPhone X can! I have the mpv player installed on my iMac, that is the most capable and optimized player I have found, and those videos lag as hell in that player! I tried INNA player, and the same problem occurs. Some of the videos are playing smooth in VLC, but the image quality isn't as good as it is on mpv or INNA. My iPhone X on the other hand plays those videos fine with the Infuse 5 or VLC for iOS.

So my question is, if my iPhone X can play fine these videos in great quality, there must be a way to get mpv (or other good quality players, not vlc) to play thos videos fine, because the hardware on the iMac is way more capable that the iPhone X! Can anyone help me?
 

T'hain Esh Kelch

macrumors 603
Aug 5, 2001
6,344
7,211
Denmark
Check how much CPU is being used when doing playback of the files. My guess is that the players aren't capable of doing hardware decoding of the particular video codecs. 10bit h.265 with HDR is not precise enough to give a proper guess, as it doesn't tell what codecs you are using.
I assume the video players can tell you what the codecs are.
 

Simos.805

macrumors member
Original poster
Apr 15, 2017
44
27
Athens, Greece
Check how much CPU is being used when doing playback of the files. My guess is that the players aren't capable of doing hardware decoding of the particular video codecs. 10bit h.265 with HDR is not precise enough to give a proper guess, as it doesn't tell what codecs you are using.
I assume the video players can tell you what the codecs are.
I think it's HEVC.? When the video was playing on mpv, the CPU usage was about 50% and the GPU usage under 10%.
 

Attachments

  • Στιγμιότυπο 2018-08-26, 18.11.02.png
    Στιγμιότυπο 2018-08-26, 18.11.02.png
    224.3 KB · Views: 279

T'hain Esh Kelch

macrumors 603
Aug 5, 2001
6,344
7,211
Denmark
HEVC is synonymous with h.265, and it is not a codec, it is a video compression standard.

I assume CPU usage should be lower for hardware decoding, but since it isn't peaking at higher, I'll leave it to others to verify that as I do not know.
But at least it isn't a problem with maxing out the CPU then. My guess is that it is down to either 10bit or the Rec. 2020 color gamut, so you can go through your videos and see if either of those are the common issue.
 

Simos.805

macrumors member
Original poster
Apr 15, 2017
44
27
Athens, Greece
HEVC is synonymous with h.265, and it is not a codec, it is a video compression standard.

I assume CPU usage should be lower for hardware decoding, but since it isn't peaking at higher, I'll leave it to others to verify that as I do not know.
But at least it isn't a problem with maxing out the CPU then. My guess is that it is down to either 10bit or the Rec. 2020 color gamut, so you can go through your videos and see if either of those are the common issue.
I think all these videos are 10-bit. But how my iPhone X can play them perfectly smooth? It's obviusly an optimization problem, but there must be a way to get the iMac ro play those files smoothly right?
 

HDFan

Contributor
Jun 30, 2007
6,683
2,920
Mediainfo is a good tool to see how the video was encoded:

https://mediaarea.net/en/MediaInfo

For your Samsung Pets clip it shows:

Screen Shot 2018-08-26 at 21.29.56.png

Here is a thread that discusses HDR 4k support

https://forums.macrumors.com/threads/hdr-4k-video-support-macos-vs-windows.2130924/#post-26329738

If I read this correctly with a 2017 iMac you have a 7th generation Kabylake which has hardware decoding.

What version of VLC are you using? It supports hardware decoding. Do you have that option checked?

Screen Shot 2018-08-26 at 21.06.24.png
I see the same jerky playing on my iMac Pro with all of the players I used. The problem seems to be the MPEG-TS container. The Sony Swordsmith HDR UHD 4K Demo which is mpeg-4 plays with no problems in Quicktime.

Screen Shot 2018-08-26 at 21.40.26.png

Here's an article about HEVC but doesn't seem to shine any light on the subject:

https://forums.macrumors.com/thread...ideo-in-macos-high-sierra-and-ios-11.2072075/
 

Attachments

  • Screen Shot 2018-08-26 at 21.02.44.png
    Screen Shot 2018-08-26 at 21.02.44.png
    288.4 KB · Views: 208

Simos.805

macrumors member
Original poster
Apr 15, 2017
44
27
Athens, Greece
Mediainfo is a good tool to see how the video was encoded:

https://mediaarea.net/en/MediaInfo

For your Samsung Pets clip it shows:

View attachment 778094

Here is a thread that discusses HDR 4k support

https://forums.macrumors.com/threads/hdr-4k-video-support-macos-vs-windows.2130924/#post-26329738

If I read this correctly with a 2017 iMac you have a 7th generation Kabylake which has hardware decoding.

What version of VLC are you using? It supports hardware decoding. Do you have that option checked?

View attachment 778085
I see the same jerky playing on my iMac Pro with all of the players I used. The problem seems to be the MPEG-TS container. The Sony Swordsmith HDR UHD 4K Demo which is mpeg-4 plays with no problems in Quicktime.

View attachment 778098

Here's an article about HEVC but doesn't seem to shine any light on the subject:

https://forums.macrumors.com/thread...ideo-in-macos-high-sierra-and-ios-11.2072075/
Yes my iMac have a 7th gen i7 with Hardware Decodig.
I have the latest stable version of VLC. VLC plays the videos smoothly (hardware decoding option checked) but the problem is that the quality isn't as good as on the other players (mpv or INNA). It's like on VLC the brightness is much more dim (while the display brightness is full) like it's missing the HDR-like effect. On mpv and INNA the quality of the image is great with popping colors and brightness, but it's very laggy...

If I open the "Samsung Pets" video with QuickTime it plays it only as a sound!
So you think the problem is just the .ts container and not the codec at all?

The iMac Pro isn't have Hardware Decoding support of H.265 because of the Xeon CPU, if I'm not wrong.
 

HDFan

Contributor
Jun 30, 2007
6,683
2,920
So you think the problem is just the .ts container and not the codec at all?

My best guess. Both the Swordfish and Pets videos are HEVC, HDR10, 10 bit, bt:2020, but Pets is MPEG-TS and Swords is MPEG-4. Hopefully someone else with more experience in this area can shed some light on the problem when it is daytime here in 2 hours.

The iMac Pro isn't have Hardware Decoding support of H.265 because of the Xeon CPU, if I'm not wrong.

Yes, it does not have the built in hardware decoding that you have so decoding is handled elsewhere. Playing the sword video the radeon 64 in my jumps to 60 frames per second and the windowserver to ~50% while playing the Sword video.
 

Simos.805

macrumors member
Original poster
Apr 15, 2017
44
27
Athens, Greece
My best guess. Both the Swordfish and Pets videos are HEVC, HDR10, 10 bit, bt:2020, but Pets is MPEG-TS and Swords is MPEG-4. Hopefully someone else with more experience in this area can shed some light on the problem when it is daytime here in 2 hours.



Yes, it does not have the built in hardware decoding that you have so decoding is handled elsewhere. Playing the sword video the radeon 64 in my jumps to 60 frames per second and the windowserver to ~50% while playing the Sword video.
Thank you for the research... but again it's ridiculous that the iPhone X can play these videos fine and a 3.500€ iMac can't...
 

Simos.805

macrumors member
Original poster
Apr 15, 2017
44
27
Athens, Greece
My best guess. Both the Swordfish and Pets videos are HEVC, HDR10, 10 bit, bt:2020, but Pets is MPEG-TS and Swords is MPEG-4. Hopefully someone else with more experience in this area can shed some light on the problem when it is daytime here in 2 hours.



Yes, it does not have the built in hardware decoding that you have so decoding is handled elsewhere. Playing the sword video the radeon 64 in my jumps to 60 frames per second and the windowserver to ~50% while playing the Sword video.
The Sony Swordsmith video plays smoothly with QuickTime, however, with mpv it lags a little bit (not as much as the Samsung pets does) but again the image quality on mpv I think it's better, surely it's brighter! I uploaded the screenshots on Dropbox because they're too big to upload them here, you can check them bellow. As you can see the colors are more reddish on the mpv and more yellowish on Quick Time but I don't know which one represents them more correct and I don't know why is there such a difference! Any ideas??

Edit: On the iPhone X with Infuse app the colors are more reddish, like on the mpv, so I think the colors and the overall image quality is better and more correct on mpv. But again, why is there a lag on mpv, and why the colors and the quality isn't perfect on the built in quick time??

mpv screenshot
quicktime screenshot
 
Last edited:

HDFan

Contributor
Jun 30, 2007
6,683
2,920
As you can see the colors are more reddish on the mpv and more yellowish on Quick Time

I see the same thing.

I don't know which one represents them more correct

Neither do I.


I don't know why is there such a difference! Any ideas??

This question is above my pay grade, but look at:

https://forums.creativecow.net/docs...mid=3&postid=993380&univpostid=993380&pview=t

How to color grade Premiere Pro projects if you bought a new 5K i-mac.

https://rnaphoto.com/how-to-color-grade-premiere-pro-projects-if-you-bought-a-new-5k-i-mac/

"VLC, will look over saturated on the i-mac screen since it has the same problem as Premiere Pro, namely being stuck in Rec 709,"

So my very uneducated guess here is that you have:

1) the color gamut on the original film
2. the color gamut of the published .mp4
2) the color gamut used by the player
3) the color gamut supported by the monitor

If these are all different then after 3 or more conversions things are likely not going to look good.


why is there a lag on mpv

What is your cpu usage when running mpv? I'm running at ~600%, but since I have the horsepower I don't see any lags. If you are running out of cpu then I would expect lags.
 

Simos.805

macrumors member
Original poster
Apr 15, 2017
44
27
Athens, Greece

I see the same thing.



Neither do I.




This question is above my pay grade, but look at:

https://forums.creativecow.net/docs...mid=3&postid=993380&univpostid=993380&pview=t

How to color grade Premiere Pro projects if you bought a new 5K i-mac.

https://rnaphoto.com/how-to-color-grade-premiere-pro-projects-if-you-bought-a-new-5k-i-mac/

"VLC, will look over saturated on the i-mac screen since it has the same problem as Premiere Pro, namely being stuck in Rec 709,"

So my very uneducated guess here is that you have:

1) the color gamut on the original film
2. the color gamut of the published .mp4
2) the color gamut used by the player
3) the color gamut supported by the monitor

If these are all different then after 3 or more conversions things are likely not going to look good.




What is your cpu usage when running mpv? I'm running at ~600%, but since I have the horsepower I don't see any lags. If you are running out of cpu then I would expect lags.
The CPU usage of mpv when playing the Sony Swordsmith video is at activity monitor is about 560%, and the total CPU usage is at about 75-85% running at 4.2GHz. I don't think the CPU isn't capable playing the video...
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.