View Single Post
Posts: 3,074 | Thanked: 12,964 times | Joined on Mar 2010 @ Sofia,Bulgaria
#753
Originally Posted by maacruz View Post
May be because showing the image in the screen is cpu intensive, or the background and UI processes keep interrupting the encoding process. Lowering the ui priority means that the ui will get less cpu time and can be interrupted by a higher priority task (like encoding). Timer granularity also matters.
I use my desktop for analog video recording with an old bt848 pci card. At first I couldn't get the recordings right, because background and UI tasks kept causing stuttering. To get them right I had to 1: increase timer frequency from 100 to 1000Hz, 2: setup cgroups , 3: increase priority to -5 for the encoding process.
Could be. Anyway for now(until I find a way to integrate gst-omapfb with camera-ui) I thing those will be the optimal settings:

Code:
#!/bin/sh
if [ "$1" == "1" ]; then
    
    run-standalone.sh dbus-send --print-reply --type=method_call --dest=org.freedesktop.Tracker.Indexer /org/freedesktop/Tracker/Indexer org.freedesktop.Tracker.Indexer.Pause
    run-standalone.sh dbus-send --print-reply --type=method_call --dest=org.freedesktop.Tracker /org/freedesktop/Tracker org.freedesktop.Tracker.SetBoolOption string:"Pause" boolean:true
    killall gst-video-thumbnailerd

    echo `pidof Xorg` > /syspart/tasks
    echo `pidof omap3camd` > /syspart/tasks
    echo `pidof camera-ui` > /syspart/tasks

    renice 20 `pidof camera-ui`
    renice 20 `pidof Xorg`
    renice 20 `pidof omap3camd`
else
    run-standalone.sh dbus-send --print-reply --type=method_call --dest=org.freedesktop.Tracker.Indexer /org/freedesktop/Tracker/Indexer org.freedesktop.Tracker.Indexer.Continue
    run-standalone.sh dbus-send --print-reply --type=method_call --dest=org.freedesktop.Tracker /org/freedesktop/Tracker org.freedesktop.Tracker.SetBoolOption string:"Pause" boolean:false

    echo `pidof Xorg` > /syspart/tasks
    echo `pidof omap3camd` > /syspart/applications/standby/background/tasks
    echo `pidof camera-ui` > /syspart/applications/standby/background/tasks

    renice 0 `pidof camera-ui`
    renice -8 `pidof Xorg`
    renice 0 `pidof omap3camd`
fi
With the above everything bellow 1280x720 is stable 30+ fps and no stutter. 1280x720 varies between 23 and 25+ fps and there is stutter from time to time on my primary phone(rarely indeed but still). But it seems it is DSP bridge driver to blame as it gives memory_sync_page errors.

nicolai, maacruz, (anyone) if you have other ideas re priority settings while recording please share them.

I will commit the above on gitorious and will start to play with gst-omapfb when gst-dsp seems working.
 

The Following 5 Users Say Thank You to freemangordon For This Useful Post: