[mythtv-users] Video jitter possibly cased by low cpu usage

Stuart Morgan stuart at tase.co.uk
Mon Dec 16 11:22:56 UTC 2013


On Monday 16 Dec 2013 12:07:05 Marius Schrecker wrote:
> Hi,
> 
>     After recenrt updates (I'm not sure what) I'm noticing slightly more
> jerkyness and jitter on some videos and (possibly unrelated) wandering
> audio sync on others.
> 
> System is a dual core opteron with nvidia 620 video adapter doing vdpau
> rendering and jitterometer tells me that when playing affected  full
> 1080 at 25p  content frame rate varies at +- 1-2 Hz of 25 and both CPU cores
> are running at around 15% capacity. One of my recent changes was upgrading
> the Nvidia driver from 304 to 310 and google tells me that teghre was a
> substantial performance increase bertween these two drivers. Something that
> might be causing my CPU usage and bus speed to drop so much that I'm
> getting throughput errors.
> 
> What's the best way to test the hypothesis?

Change the minimum cpu speed.

sudo echo {valid_speed} > 
/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq

Where {valid_speed} is something above the minimum from 
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies

You may need to try different values to find the best one, assuming it works at 
all.

These are the scripts I use to automatically boost my cpu speed during 
playback of video with vdpau, with them I get stutter/jitter issues.

-----------------

frequencyup.sh

#!/bin/bash

echo 1800000 | sudo tee /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq 
> /dev/null

-------------------

frequencydown.sh

#!/bin/bash

echo 1000000 | sudo tee /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq 
> /dev/null

--------------------

This is in my /etc/sudoers file
{username}    ALL=(ALL) PASSWD: ALL, NOPASSWD: /usr/bin/tee 
/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq

--------------------

Finally I trigger the scripts with the "Playback started" and "Playback 
stopped" system events. I also trigger the slower clockspeed when paused, and 
unpaused but that bit's optional.
-- 
Stuart Morgan
MythTV


More information about the mythtv-users mailing list