Meego Wiki
Views

ARM/N900/Ideas/DSP

From MeeGo wiki
< ARM | N900 | Ideas
Jump to: navigation, search

Contents

Steps to utilize DSP codecs with included videoplayer(s) in N900CE

as root do...

install gstreamer DSP elements

# zypper install gst-dsp dsp-tools

download & extract DSP codecs

# wget http://gst-dsp.googlecode.com/files/tidsp-binaries-23.i3.8.tar.gz -P /tmp/
# mkdir -p /lib/dsp/
# tar xvzf /tmp/tidsp-binaries-23.i3.8.tar.gz --strip-components=1 -C /lib/dsp/

make dsp drivers to load in boot

# cat >> /etc/rc.local << EOF
> modprobe mailbox_mach
> modprobe bridgedriver base_img=/lib/dsp/baseimage.dof
> chgrp video /dev/DspBridge
> chmod 660 /dev/DspBridge
> EOF
# /etc/rc.local

That's basically all that should be needed in terms of "codecs post-install" if running on Summer Release or more recent N900CE image.

As an test case, lets transfer clip from original 'Tips and Tricks' into device:

# wget http://koti.kapsi.fi/~sh8dfwk/bbb_mpeg4_vorbis_854x480.mkv -P /home/meego/Videos/

try playback from cli

as user (su meego)...

# export DISPLAY=:0
# gst-launch-0.10 filesrc location=/home/meego/Videos/bbb_mpeg4_vorbis_854x480.mkv ! matroskademux name=demux demux. ! queue ! dspvdec ! omapxvsink demux. ! queue ! vorbisdec ! pulsesink


switching videoplayer UI(s) to use omapxvsink

<this-is-obsolete> Final N900CE Summer release does not need this step. Issue was solved in temporary qt-mobility patch and player application should be ready to playback content supported by gst-dsp right after the above post-installation steps are done.

note: this step will currently brake videoplayer(s) ability to play pre-installed sample media (ogg/theora)

This is basically easy if man chooses to ignore general support for video formats like ogg/theora. We just choose omapxvsink over xvimagesink in qgstreamerplayerservice implementation and that's it As long as overlay implementation is used for qgraphicsvideoitem as now, it will be able to playback content using dspvdec ! omapxvsink pair. For non native pipes, this setup has unsolved problems so the playbin2 flag GST_PLAY_FLAG_NATIVE_VIDEO was preserved. I have provided yet another qt-mobility repo where such neat patch is enabled.

upgrade libqtmultimediakit1 with patched version.

# zypper -p http://repo.pub.meego.com/home:/theodor:/branches:/qtm-video-fix/standard/ install --force libqtmultimediakit1-1.2.0~beta0+git2726-35.2.DE

(note. it will upgrade whole qt-mobility and take few minutes. Forceful libs replace would also work)

Afaik, there's aplenty of other options to make it fixed, e.g. we have optional external gst elements supported and ones that are natively written in qt-mobility. Newer devices will probably use GL texture rendering, which will be priority for generic Meego. It is however, not performing that well on N900 so lets try to keep the overlay spirit and make videos working with it as well.

To test, start 'Videos' or 'Meego Video' application and start transferred clip from there. Above sample clip is named as 'AviDemux' (in file meta) for some reason.

Troubleshooting

why the default sintel_trailer-240p.ogv won't play anymore ?

- Not running final Summer release ? explained above, read carefully.

why the default sintel_trailer-240p.ogv looks skewed ?

- there's probably a bug in handling video pixel widths not multiple of 8 at least with current theora pipe. Not sure yet where the issue lies. The default 240p sample clip in Meego is converted from 16:9 material by strictly maintaining the aspect ratio - making width 427. While e.g. 424 would work.

why some clip just wont play correctly ?

- there's probably bug in application level lacking warning dialog etc to inform user about playback problems. So even in cases when format is clearly not supported, man gets no indication of that. For the rest files that should play, man should try playback from cli before filing bugs. Some issue might be common to Meego while others are specific. In each cases report should be filled with as much information as possible.

gst-launch playbin2 uri=file:<absolute file path> video-sink=omapxvsink

..and when there's a problem attach GST_DEBUG output into reports (not available in production branch based images).

GST_DEBUG_NO_COLOR=1 GST_DEBUG=*:5 gst-launch playbin2 uri=file:<absolute file path> video-sink=omapxvsink &> gst-log-for-bug-report.log

..to record full logs from actual player application, run

GST_DEBUG_NO_COLOR=1 GST_DEBUG=*:5 /usr/bin/meegovideo -output-level debug &> gst-log-for-bug-report.log

Camera

Video capture

Experimental video capture feature got enabled in N900CE images starting 1.2.0.90.12.20110805.1.DE.2011-08-08.1 in ce-testing. Video camera icon shows up in lower right corner after installing DSP codecs (See #Steps to utilize DSP codecs with included videoplayer(s) in N900CE).

Capture uses dspmp4venc (DSP MPEG-4 video encoder) to encode VGA resolution clip using 1mbps bitrate.

resolution and quality are available to configure using /etc/xdg/Nokia/meego-handset-camera.conf.

"video-encoding-quality" stands for QtMultimediaKit::EncodingQuality for which the backend adjusts following bitrate values.

Value Constant Bitrate
0 QtMultimediaKit::VeryLowQuality 1000000
1 QtMultimediaKit::LowQuality 2000000
2 QtMultimediaKit::NormalQuality 4000000
3 QtMultimediaKit::HighQuality 8000000
4 QtMultimediaKit::VeryHighQuality 16000000


Note: 'video-capture-resolution' limits to wvga resolution due encoder. Capture pipe is capable of scaling and cropping different resolutions using ISP hardware. However, viewfinder will show the same resolution configured for capture and some result less optimal outcome than others. Therefore even smaller resolutions may result lagging pipelines. So, using the preset default is preferred. The rest of preset optimal ones are todo.

Call for easy post-installer package for Tricks/DSP

Summary

Tricks/DSP page was an early step to utilize DSP with Meego on N900. Until this day, there hasn't been any public decisions that N900CE will collaborate proprietary dspcodecs into its official images. However, as the tricks using binaries from other parties seem to work decently - N900CE team might be able to help to generalize the Meego framework to utilize user installed codecs better.

especially for these binaries provided by TI, N900CE might even accept a package that does the tricks in post-install script for example? well, just maybe - but a real post-install & startup scripts would always be handier than manual steps.

Personal tools