Jump to content

Trouble playing 1080p video


Veers

Recommended Posts

Hi,

 

I juste made a fresh install of MB3 server and I have some trouble when I try to play 1080p video with the web client. I have smooth video for about 5 sec and it freeze for 5 sec, play again for 5 sec and again and again.

 

My MB3 server computer is a VM configure with 6 core (E7330) @ 2.4Ghz and 4Gb ram. When I play 1080p video, I have a CPU usage around 45%, 1.4Gb RAM used and disk and network are nothing near to be busy.

 

I have the same usage when I play a 720p video but the are all running great.

 

I attach to this post a log file of one of the video I tried to play. For what I understand, I did not get enough fps for a smooth video. My question is since I use less than 50% of my CPU power, How is this happening? Is there a limitation that I'm not aware of? There is some setting that I can tweak?

 

Thank you,

 

Ben

 

 

ffmpeg-18175176-982c-4cab-99cf-f9dd7315d835.txt

Link to comment
Share on other sites

Tikuf

For starters turn off ffmpeg debug logging (it is more for internal use). From that log the video is converting too slowly. We are currently only using 2 threads to convert webm (this will change very soon) and hopefully sort your issue out.

 

Can you please repost the log with ffmpeg debug turned off.

Link to comment
Share on other sites

For starters turn off ffmpeg debug logging (it is more for internal use). From that log the video is converting too slowly. We are currently only using 2 threads to convert webm (this will change very soon) and hopefully sort your issue out.

 

Can you please repost the log with ffmpeg debug turned off.

 

 

I figured that was something like that. Here the log with ffmpeg debug off. Is there a way to increase the number of thread for testing?

 

 

 

ffmpeg-1ad86652-d270-42ff-a02f-63484bad4664.txt

Link to comment
Share on other sites

Tikuf

Not at this time webm is not properly multi threaded in the ffmpeg build we are using the new build supports multi threads and will requires some changes to the server which we have sorted our just not coded yet.  If you drop down to 720p for now you should see some improvement. Also what settings do you have set in advanced/transcoding in the dash? If it is not set to auto give that a shot if it is set to auto try higher speed.

Link to comment
Share on other sites

Guest virtualtinker

When you say E7330 is this a single or dual socket setup?  From what I am seeing online, this is a 4 core processor, so how many cores does your computer have?  Are you running hyperthreading?  Also, you mention that you made your VM a 6 core machine.  How many other VM's are you running on this machine?  I am wondering if you've allocated too many virtual cores and thrown your virtual to physical core ratio out of balance.  You may also be experiencing something called ready time where your VM is basically twiddling its thumbs waiting on the physical CPU to have cores available to hop onto.  Because you made your VM 6 cores, your host has to have 6 cores available all at the same time in order for your VM to get time on the physical cores to pass their instruction set.

 

My first thought would be to lower your cores to at least 4.  That will at the very least get your VM residing on one NUMA node and, if it is a ready time issue, make it easier for your VM to get time on the physical CPUs.  If you are running a single socket processor and it's hyperthreaded as well, then you're not really doing yourself any favors as you are essentially double dipping on your cores which would probably explain why you think you are only seeing 50% usage on your CPU.

Link to comment
Share on other sites

Not at this time webm is not properly multi threaded in the ffmpeg build we are using the new build supports multi threads and will requires some changes to the server which we have sorted our just not coded yet.  If you drop down to 720p for now you should see some improvement. Also what settings do you have set in advanced/transcoding in the dash? If it is not set to auto give that a shot if it is set to auto try higher speed.

 

I tried at 720p. It better but not smooth... I have set it a 480p to get it perfect. If a take a 720p video and play it at 720p, it's work but when I take a 1080p encode video and try to play it HD, this is when I have trouble. I also try all setting in transcoding and I get the same result.

 

When you say E7330 is this a single or dual socket setup?  From what I am seeing online, this is a 4 core processor, so how many cores does your computer have?  Are you running hyperthreading?  Also, you mention that you made your VM a 6 core machine.  How many other VM's are you running on this machine?  I am wondering if you've allocated too many virtual cores and thrown your virtual to physical core ratio out of balance.  You may also be experiencing something called ready time where your VM is basically twiddling its thumbs waiting on the physical CPU to have cores available to hop onto.  Because you made your VM 6 cores, your host has to have 6 cores available all at the same time in order for your VM to get time on the physical cores to pass their instruction set.

 

My first thought would be to lower your cores to at least 4.  That will at the very least get your VM residing on one NUMA node and, if it is a ready time issue, make it easier for your VM to get time on the physical CPUs.  If you are running a single socket processor and it's hyperthreaded as well, then you're not really doing yourself any favors as you are essentially double dipping on your cores which would probably explain why you think you are only seeing 50% usage on your CPU.

 

This is a 4 core 4 CPU server (16 core total) running 6 VM and a total of core allocated of 14. I also set the CPU affinity on core 0-5. I tried with 4 core and I got the same result. No HT (since this processor dosen't support it and I know thos is not really a good idea for this kind of job).

Link to comment
Share on other sites

Tikuf

Once we update to the new ffmpeg I am hoping that it will resolve your issue the fact that we are decoding and encoding on only 2 threads puts us to close to the edge on quite a few cpu's. Hopefully with the new setting coming soon we will be able to use 5 cores on your vm which will get us over the line with 1080p (i hope  :) )

Link to comment
Share on other sites

Once we update to the new ffmpeg I am hoping that it will resolve your issue the fact that we are decoding and encoding on only 2 threads puts us to close to the edge on quite a few cpu's. Hopefully with the new setting coming soon we will be able to use 5 cores on your vm which will get us over the line with 1080p (i hope  :) )

 

I hope too ;o)

 

Thank for your help!

Link to comment
Share on other sites

  • 4 months later...
  • 4 months later...

What kind of update?

 

 

 

Once we update to the new ffmpeg I am hoping that it will resolve your issue the fact that we are decoding and encoding on only 2 threads puts us to close to the edge on quite a few cpu's. Hopefully with the new setting coming soon we will be able to use 5 cores on your vm which will get us over the line with 1080p (i hope   :) )

 

On that :o)

Link to comment
Share on other sites

  • 2 weeks later...
Jackrats

I'm also curious about the option to use more threads for ffmpeg transcoding. I'm having 1080p videos buffer to Roku due to slow transcoding and have more cores available.

 

It sounded like there was an ffpmeg limitation of 2 threads for webm encoding with the version of ffpmeg which was being used back in March when this post was first being discussed. Does that 2 thread limit also apply to MP4 encoding for Roku?

Link to comment
Share on other sites

Only way is to change the server side transcoding settings, but that may cause other params to get affected and create really high cpu usage. there is currently no individual control over that one individual parameter.

Link to comment
Share on other sites

Only way is to change the server side transcoding settings, but that may cause other params to get affected and create really high cpu usage. there is currently no individual control over that one individual parameter.

 

How can we change server side trancoding setting, see how it affect performance and CPU usage.

 

Thank you!

Link to comment
Share on other sites

  • 1 month later...

I'm having trouble with this also, and the only way I can get ffmpeg to process my 1080p .wtv files is to increase the -threads to 5.  This is on an i5-4690k system.

Link to comment
Share on other sites

I'm having trouble with this also, and the only way I can get ffmpeg to process my 1080p .wtv files is to increase the -threads to 5.  This is on an i5-4690k system.

 

Where can you change this setting?

Link to comment
Share on other sites

I don't think you can in MB3, or at least I couldn't find a way.  

 

I ran ffmpeg using the same options as it was using in the logfile and played around with the threads setting until I could get it up to the 29-30 fps output that would be required to view it without stuttering.

Link to comment
Share on other sites

I think I figured this out - it's related to EIST/power management settings.  ffmpeg isn't putting a sufficient load on the cpu (oddly enough), so the core speed hovers around 1GHz.  If you put the power plan on the "high performance" setting it locks the cores at the highest setting (at least it does on my setup) and is more than enough to transcode it smoothly.

  • Like 1
Link to comment
Share on other sites

However, having an adjustable thread setting on MB3 would help here - if I increase the thread count on ffmpeg it will also generate a sufficient load to step the core up so it works properly without tinkering with the power plans.

Link to comment
Share on other sites

  • 4 weeks later...
jlachesk

I think I figured this out - it's related to EIST/power management settings.  ffmpeg isn't putting a sufficient load on the cpu (oddly enough), so the core speed hovers around 1GHz.  If you put the power plan on the "high performance" setting it locks the cores at the highest setting (at least it does on my setup) and is more than enough to transcode it smoothly.

 

This totally solved my problem with live and recorded TV (via ServerWMC) (thread here: http://mediabrowser.tv/community/index.php?/topic/17690-chromebook-livetv-performance).

 

I was able to set the Minimum processor state to 5% via the "Advanced power settings", so the CPU still ramps down when idle. As soon as ffmpeg starts, the CPU ramps up to 100%. This is sort of best of both worlds for me since I aim to minimize power draw from my server (on 24x7). Hopefully this tip helps others as well.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...