sward 26 Posted October 19, 2021 Share Posted October 19, 2021 Why is FFMPEG running at 50-60% utilization on my 10-core CPU whenever I launch a new recording, and is there a way to prevent that? Seems to last 5-6 minutes for a one hour recording. Link to comment Share on other sites More sharing options...
Luke 37064 Posted October 19, 2021 Share Posted October 19, 2021 HI, if it has to be transcoded to play then this might be normal. Are you trying to play in the web app? Link to comment Share on other sites More sharing options...
sward 26 Posted October 19, 2021 Author Share Posted October 19, 2021 There is no need for transcoding - most of my recordings are 1080i MPEG2 transport streams, and I use the Windows 10 Emby Theater app to play them back. But this behavior seems to occur regardless of video format. It needs to stop. Link to comment Share on other sites More sharing options...
Carlo 4330 Posted October 19, 2021 Share Posted October 19, 2021 Hi, is this purely a DVR recording with no one watching it? The only reason I would think you should see a spike like that in ffmpeg is if the stream needs converting. If you like PM me the m3u file you're using as well as a specific channel number or two you see this with and I'll try it on a test server to duplicate your results and determine for you why this happens and if possible how to avoid it. If I can't duplicate what you see then we can setup a remote session to get a better look on your system. Carlo Link to comment Share on other sites More sharing options...
Luke 37064 Posted October 19, 2021 Share Posted October 19, 2021 10 hours ago, sward said: There is no need for transcoding - most of my recordings are 1080i MPEG2 transport streams, and I use the Windows 10 Emby Theater app to play them back. But this behavior seems to occur regardless of video format. It needs to stop. Hi there @sward, if it is transcoding, have you explored the stats feature in the video player to learn why it was transcoding? Link to comment Share on other sites More sharing options...
sward 26 Posted October 19, 2021 Author Share Posted October 19, 2021 @Luke - I have not explored the stats feature. How would I do that? @cayars - this spike in ffmpeg happens when playing any DVR recording locally via the Windows 10 Emby Theater app. No streaming is taking place. Does Emby Theater need to transcode 1080i MPEG2 transport stream files? I could perhaps do a remote session tomorrow (Wednesday) afternoon at 6PM EST if that works for you. Link to comment Share on other sites More sharing options...
Luke 37064 Posted October 19, 2021 Share Posted October 19, 2021 Quote I have not explored the stats feature. How would I do that? Click the gear icon in the video player, then stats for nerds. Let us know what it says. Link to comment Share on other sites More sharing options...
sward 26 Posted October 20, 2021 Author Share Posted October 20, 2021 OK - that explains it, it's transcoding b/c of "unsupported container" which in my case is wtv files. This is surprising since the video content is still plain old MPEG2. Any chance of supporting wtv files natively? They contain a lot more metadata than ts files (which basically contain no metadata). Link to comment Share on other sites More sharing options...
Carlo 4330 Posted October 20, 2021 Share Posted October 20, 2021 Here's a few examples of playing back and NFL game I recorded Sunday in a couple clients. Chrome Web Browser Windows Theater Store version Emby Theater for Desktop As you can see for my quick tests the Desktop version of Emby Theater is more robust and can direct play the video. So I'm going to recommend if you haven't tried the Desktop version to give this a try as it might be a better solution for you. https://emby.media/emby-theater.html Can you give that a try and let us know how you make out? Link to comment Share on other sites More sharing options...
sward 26 Posted October 20, 2021 Author Share Posted October 20, 2021 So I tried the desktop version of Emby Theater, and you are correct that it doesn't need to transcode, however CPU utilization remains at ~15% for the duration of video playback, as I'm unable to enable hardware acceleration despite selecting "gpu" as my video output, and "D3D" as my hardware acceleration mode. I'm therefore left with the following choice: using Emby Theater app which needs to transcode for 5 minutes at 60% utilization (after which utilization drops to ~1%), or using desktop version of Emby Theater which doesn't need to transcode, but uses ~15% of my CPU for the duration of playback. Any chance of switching to VLC player which doesn't have these (and other) issues? Link to comment Share on other sites More sharing options...
Carlo 4330 Posted October 21, 2021 Share Posted October 21, 2021 Doesn't seem like there is much to think about based on that info as the Desktop version is much better than the store version for Live TV. Are you running Theater desktop on the server machine? Is your server already setup to use the GPU for transcoding to clients? If so you might not be able to share the GPU with both the server and a client. You can use VLC or any other player in Theater for Desktop if you like. You won't have the OSD (on screen display) of course like you would in the Emby Player but you can certainly do this pretty easily. Link to comment Share on other sites More sharing options...
sward 26 Posted October 21, 2021 Author Share Posted October 21, 2021 I definitely want the OSD, so that rules out VLC. Regarding the desktop version of Emby Theater, I played around with it some more and discovered that HW acceleration works but only with H.264 recordings. I can't get it to work with MPEG2 recordings, which are the vast majority of my recordings. Any ideas why? Regarding the store version, I read elsewhere on the forums that it uses WMP as the underlying player, yet WMP can play wtv files natively (i.e. without transcoding), whereas the store version of Emby Theater cannot. Why is that? Link to comment Share on other sites More sharing options...
Luke 37064 Posted October 21, 2021 Share Posted October 21, 2021 It's a Microsoft provided player. We are working on unifying the two though and will ultimately have the best of both. Link to comment Share on other sites More sharing options...
Carlo 4330 Posted October 21, 2021 Share Posted October 21, 2021 HW acceleration should work for any video type your hardware supports. MPEG2 isn't an advanced codec and isn't compressed like AVC or HEVC so there really isn't much to assist with in GPU. Theater for desktop can direct play DVR recordings just fin. This is playing back an NFO football game. Link to comment Share on other sites More sharing options...
GrimReaper 3292 Posted October 21, 2021 Share Posted October 21, 2021 (edited) Phew, luckily you know that FPS to the 14th decimal. And that Aspect Ratio on 16th decimal surely comes in handy (yes, I counted them ). Can't imagine what would one do without that. Edited October 21, 2021 by GrimReaper Typo 1 Link to comment Share on other sites More sharing options...
Carlo 4330 Posted October 21, 2021 Share Posted October 21, 2021 Can't make this guy jealous Gotta have those decimal places. LOL I think aspect ratio could be rounded to 2 decimal places and fps at 1. Would make it a little cleaner looking. 1 Link to comment Share on other sites More sharing options...
sward 26 Posted October 21, 2021 Author Share Posted October 21, 2021 @cayarsYour screenshot clearly shows "hardware acceleration: no" during MPEG2 direct play, so you have the same issue. @LukeWhen you unify the two (Microsoft?) players, will you support wtv natively? Link to comment Share on other sites More sharing options...
Luke 37064 Posted October 21, 2021 Share Posted October 21, 2021 1 hour ago, sward said: @cayarsYour screenshot clearly shows "hardware acceleration: no" during MPEG2 direct play, so you have the same issue. @LukeWhen you unify the two (Microsoft?) players, will you support wtv natively? Yes it will be. Link to comment Share on other sites More sharing options...
Carlo 4330 Posted October 21, 2021 Share Posted October 21, 2021 6 hours ago, sward said: @cayarsYour screenshot clearly shows "hardware acceleration: no" during MPEG2 direct play, so you have the same issue. Doesn't really matter. I manually selected libmpv vs auto or GPU. Link to comment Share on other sites More sharing options...
Carlo 4330 Posted October 21, 2021 Share Posted October 21, 2021 BTW, with the store version I can direct play TS files that were already recorded. For live TV with the store version I can't direct play. Link to comment Share on other sites More sharing options...
sward 26 Posted October 21, 2021 Author Share Posted October 21, 2021 @cayars I agree - according to your screenshots MPEG-2 hardware acceleration isn't working regardless of whether you select gpu or libmpv, which confirms what I'm experiencing with the desktop version of Emby Theater. More to come on this after I've conducted some additional testing this evening, but it appears to be unrelated to container type... Link to comment Share on other sites More sharing options...
sward 26 Posted October 22, 2021 Author Share Posted October 22, 2021 So here are my findings after conducting some additional testing this evening: Emby Theater desktop version: uses HW acceleration for H.264 content, but not MPEG-2 content or HEVC 4k content. These results hold true regardless of container type (i.e. holds true for both wtv and ts files). Emby Theater Windows store app: in this case behavior seems to be completely driven by container type. I can direct play MPEG-2, H.264 and HEVC 4k ts files. With this player there's no "hardware acceleration" entry in stats for nerds, but judging from 3-4% CPU utilization, it appears to be using HW acceleration. However all wtv files require transcoding; this holds true for both MPEG-2 and H.264. I don't currently have any HEVC 4k wtv files, but assume that transcoding would likewise take place. BTW, I don't see Intel QuickSync as an option under Video HW acceleration types, although it is listed as an option in the transcoding section. Link to comment Share on other sites More sharing options...
Carlo 4330 Posted October 22, 2021 Share Posted October 22, 2021 That is actually not correct as it will depend on your specific setup. Here's an example of HEVC playback with option set to GPU mode. Here you can see it using the hardware decoder as well. Now get this. I change the option to AUTO and it auto selected libmpv However it's using more resources on my system this way. Could be different on someone else's computer. That is why I set Desktop Theater on my notebook to GPU mode. MPEG2 is simple codec compared to AVC or HEVC and doesn't need decode assistance. Link to comment Share on other sites More sharing options...
sward 26 Posted October 22, 2021 Author Share Posted October 22, 2021 "MPEG2 is simple codec compared to AVC or HEVC and doesn't need decode assistance." Then why is playback of MPEG-2 achieving 15% utilization of my Core i9-11900 CPU? Furthermore, seems to me that if your system supports HW acceleration for H.264, it should also support HW acceleration for MPEG-2 since it is less complex as you correctly pointed out. BTW the vast majority of cable broadcasts are still using MPEG2, and since I have a cable-card recorder, that means most of my recordings are MPEG2. Link to comment Share on other sites More sharing options...
Carlo 4330 Posted October 23, 2021 Share Posted October 23, 2021 Because the CPU has work to do handling any video moving it around the different busses perhaps? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now