maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Maemo 5 / Fremantle (https://talk.maemo.org/forumdisplay.php?f=40)
-   -   [HOWTO]Watch 720p videos on n900 [09.12.2011 VIDEOCALL WORKS] (https://talk.maemo.org/showthread.php?t=77695)

freemangordon 2011-12-17 18:07

Re: [HOWTO]Watch 720p videos on n900 [09.12.2011 VIDEOCALL WORKS]
 
Quote:

Originally Posted by maacruz (Post 1138784)
Instead of lowering priority it would be easier and better just to create a cgroup for it with low enough cpu.shares (editing /usr/share/policy/etc/current/syspart.conf). No need to move it among cgroups, as long as other process in a better cgroup doesn't need the cpu, it'll get all available cpu resources.

The main problem is that I don't have any clue why LOWERING the priority leads to higher framerates and reduced stuttering.

@nikolai - seems your dbus commands are missing true/false parameters. And something like killall gst-video-thumbnailerd will be needed too.

maacruz 2011-12-17 19:08

Re: [HOWTO]Watch 720p videos on n900 [09.12.2011 VIDEOCALL WORKS]
 
Quote:

Originally Posted by freemangordon (Post 1138791)
The main problem is that I don't have any clue why LOWERING the priority leads to higher framerates and reduced stuttering.

@nikolai - seems your dbus commands are missing true/false parameters. And something like killall gst-video-thumbnailerd will be needed too.

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.

freemangordon 2011-12-17 20:01

Re: [HOWTO]Watch 720p videos on n900 [09.12.2011 VIDEOCALL WORKS]
 
Quote:

Originally Posted by maacruz (Post 1138810)
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.

freemangordon 2011-12-17 21:51

Re: [HOWTO]Watch 720p videos on n900 [09.12.2011 VIDEOCALL WORKS]
 
Quote:

Originally Posted by g0r (Post 1138525)
Edit: just tried video call (skype) after installing the new libgstdsp.so and is not working :( (I can receive video but if I activate my cam the call gets cut off) for me, anybody else have the same problem? :confused:

First post updated with new libgstdsp.zip

Gusse 2011-12-18 18:58

Re: [HOWTO]Watch 720p videos on n900 [09.12.2011 VIDEOCALL WORKS]
 
There seems to be sort of problems to play MP4 Video files (*.m4v).
These video files that I have on N900 were playable at least some time ago. At least before I applied these video updates.

Sound is OK, but screen remains black. If I scroll video, then it show still picture from that specific point.

Also thumbnails of m4v files are different compared to OK video files (showing generic video thumbnail only).

freemangordon 2011-12-19 08:02

Re: [HOWTO]Watch 720p videos on n900 [09.12.2011 VIDEOCALL WORKS]
 
Quote:

Originally Posted by Gusse (Post 1139169)
There seems to be sort of problems to play MP4 Video files (*.m4v).
These video files that I have on N900 were playable at least some time ago. At least before I applied these video updates.

Sound is OK, but screen remains black. If I scroll video, then it show still picture from that specific point.

Also thumbnails of m4v files are different compared to OK video files (showing generic video thumbnail only).

Why it is so hard to name and date the things? i.e. instead of "these", "new", "some time ago", etc. It will be much easier for me to if bug reports say "since i update libgstdsp.so to build dated xx.xx.xxxx" or "the update made on xx.xx.xxxx broke this and that".

Nkirk, I am pointing at you too.

Gusse 2011-12-19 08:33

Re: [HOWTO]Watch 720p videos on n900 [09.12.2011 VIDEOCALL WORKS]
 
Sorry that I didn't give exact info. At least same behavior with last two libgstdsp.so. I tested both versions.
No errors in dmesg.
I'll try to be more specific on next time.

If there is anything that I can do for further debugging, please let me know.

freemangordon 2011-12-19 08:43

Re: [HOWTO]Watch 720p videos on n900 [09.12.2011 VIDEOCALL WORKS]
 
Quote:

Originally Posted by Gusse (Post 1139346)
Sorry that I didn't give exact info. At least same behavior with last two libgstdsp.so. I tested both versions.
No errors in dmesg.
I'll try to be more specific on next time.

If there is anything that I can do for further debugging, please let me know.

You can upload one of the problematic videos and put the link here, so I can test it on my device.

Gusse 2011-12-19 11:27

Re: [HOWTO]Watch 720p videos on n900 [09.12.2011 VIDEOCALL WORKS]
 
Here is one sample that seems to cause problem. Really rarely it is playable, most of the time screen is blanc.
H264_profile.m4v

Video
Encoder: H.264
Res: 640*480
Frame: 29.97fps
Bit rate: 1500 kbps

Same file but with Xvid encoder. This is OK.
Xvid_profile.m4v

Before DSP updates and libgstdsp.so my 2nd N900 could play both files OK. After update both my N900 have difficulties to play H.264 file.

knobby 2011-12-19 12:16

Re: [HOWTO]Watch 720p videos on n900 [09.12.2011 VIDEOCALL WORKS]
 
Quote:

Originally Posted by Gusse (Post 1139417)
Here is one sample that seems to cause problem. Really rarely it is playable, most of the time screen is blanc.
H264_profile.m4v

Video
Encoder: H.264
Res: 640*480
Frame: 29.97fps
Bit rate: 1500 kbps

Same file but with Xvid encoder. This is OK.
Xvid_profile.m4v

Before DSP updates and libgstdsp.so my 2nd N900 could play both files OK. After update both my N900 have difficulties to play H.264 file.

sometimes my phone plays these videos fine with stock mp (latest libgstdsp and hd codecs) and othertimes don't (referring to h264) but kmplayer and mplayer...always play


All times are GMT. The time now is 23:34.

vBulletin® Version 3.8.8