convert to mp4 
ffmpeg -i input.mp4 -pix_fmt yuv420p -vcodec libx264 -acodec aac output.mp4

[ view entry ] ( 1248 views )   |  print article
mtp mount Galaxy S3 with jmtpfs or simple-mtpfs 
kio-mtp and mtp-detect stopped working :-(

But jmtpfs seams to work - i decided to mount on usb plug in with an udev rule
#> apt-get install jmtpfs
#> mkdir -p /media/mtp
ACTION=="add", ENV{ID_MTP_DEVICE}=="1", RUN="/usr/bin/jmtpfs -o allow_other /media/mtp"
ACTION=="remove", ENV{ID_MTP_DEVICE}=="1", RUN="/bin/fusermount -u /media/mtp""

A little bit faster is simple-mtpfs, but you have to compile

apt-get install libusb-dev libmtp-dev

git clone
cd imple-mtpfs
mkdir build && cd build
../configure --prefix=/usr
sudo make install

ACTION=="add",ENV{ID_MTP_DEVICE}=="1",RUN="/usr/bin/simple-mtpfs -o allow_other /media/mtp"
ACTION=="remove", ENV{ID_MTP_DEVICE}=="1", RUN="/bin/fusermount -u /media/mtp""

[ view entry ] ( 4720 views )   |  print article
sound conversion 

decode to wav

avconv -i input.m4a output.wav
for f in *.m4a; do avconv -i "$f" "${f/%m4a/wav}"; done
faad -o output.wav input.aac
sox -t raw -r 8000 -A -b 8 -c 1 file.alaw file.wav
sox -t raw -r 8000 -U -b 8 -c 1 file.mulaw test.wav

decode from wav

sox file.wav -t raw -r 8000 -c 1 -b 8 -U file.mulaw
sox file.wav -t raw -r 8000 -c 1 -b 8 -A file.alaw


sox test.wav 60secs.wav --show-progress trim 0 01:00

[ view entry ] ( 1732 views )   |  print article
android tvheadend compile 
build standalone toolchain from Android NDK.

wget ... 64.tar.bz2
tar -xjv android-ndk-r8e-linux-x86_64.tar.bz2

run this script ( )

export ANDROID_NDK=android-ndk-r8e
export ANDROID_NDK_TOOLCHAIN_ROOT=android-toolchain-14
$ANDROID_NDK/build/tools/ \
--system=linux-x86_64 \
--toolchain=arm-linux-androideabi-4.4.3 \
--platform=android-14 \

remove "--system=linux-x86_64" for 32 Bit Linux

build openssl for android

git clone
cd openssl-android
cd ..

link missing header and copy libs into android toolchain
ln -s ../../../../../rockchip-rk30xx-mk808/include/linux/dvb android-toolchain-14/sysroot/usr/include/linux/dvb
ln -s ../../../../openssl-android/include/openssl android-toolchain-14/sysroot/usr/include/openssl
cp openssl-android/libs/armeabi/ android-toolchain-14/lib
cp openssl-android/libs/armeabi/ android-toolchain-14/lib

build tvheadend for android
cd tvheadend-tvheadend-android
./configure --disable-avahi \
--disable-libav \
--enable-bundle \
--enable-android \
--arch=armeabi-v7a \
--cc=../android-toolchain-14/bin/arm-linux-androideabi-gcc \
adb push build.linux/tvheadend /data/dvb
adb push ../android-toolchain-14/lib/ /data/dvb
adb push ../android-toolchain-14/lib/ /data/dvb
adb shell
root@android:/data/dvb # ./tvheadend -C

Because of bad signal i applied and modified a patch for tvheadend git master
git clone
cd tvheadend
git checkout e343bfdcca877d4a19a2d86d1713fb0f46ab0b50
patch -p1 <tvheadend-android.patch

[ view entry ] ( 5296 views )   |  print article
android rk3066 kernel dvb module compile ( my dvbt stick is a af9015 ) 
Pull rk3066 kernel source from omegamoon
git clone git://

With the toolchain (4.6) from omegamoon on dvbt usb stick plugin i got with dmesg
af9015: command failed:166
af9015: command failed:1
af9015: command failed:39
af9015: command failed:3
af9015: eeprom read failed:-1
dvb_usb_af9015: probe of 2-1.3:1.0 failed with error -1

With toolchain (4.4.3) taken from Android NDK it worked

Run default config with this script
ARCH=arm CROSS_COMPILE=$TOOLCHAIN make mk808-hdmi-720p_defconfig

Select needed dvb modules for kernel config with
make menuconfig

Compile with this script

If everything is ok copy the modules with adb and insmod them
adb push dvb-core.ko /mnt/sdcard
adb shell
root@android:/ # cd /mnt/sdcard
root@android:/ # insmod dvb-core.ko
root@android:/ # dmesg

if module loading failed and you see in dmesg output
Unknown symbol _GLOBAL_OFFSET_TABLE_ (err 0)

add -fno-pic to CFLAGS_MODULE of the main Makefile

For my af9015 i need these modules
af9013.ko dvb-core.ko dvb-usb.ko mt2060.ko mxl5007t.ko tda18271.ko
dvb-pll.ko dvb-usb-af9015.ko mc44s803.ko mxl5005s.ko qt1010.ko tda18218.ko

with this firmware dvb-usb-af9015.fw
adb remount
adb push dvb-usb-af9015.fw /etc/firmware

To load i use the script startdvb
insmod dvb-core.ko
insmod dvb-pll.ko
insmod dvb-usb.ko
insmod af9013.ko
insmod mc44s803.ko
insmod mt2060.ko
insmod mxl5005s.ko
insmod mxl5007t.ko
insmod qt1010.ko
insmod tda18218.ko
insmod tda18271.ko
insmod dvb-usb-af9015.ko
mkdir /dev/dvb
mkdir /dev/dvb/adapter0
ln -s /dev/dvb0.frontend0 /dev/dvb/adapter0/frontend0
ln -s /dev/dvb0.demux0 /dev/dvb/adapter0/demux0
ln -s /dev/dvb0.dvr0 /dev/dvb/adapter0/dvr0
ln -s /dev/dvb0.dvr0 /dev/dvb/adapter0/dvr0.ts
chmod 777 /dev/dvb*

To unload i use the script stopdvb
rmmod dvb_usb_af9015
rmmod af9013
rmmod mc44s803
rmmod mt2060
rmmod mxl5005s
rmmod mxl5007t
rmmod qt1010
rmmod tda18218
rmmod tda18271
rmmod dvb_usb
rmmod dvb_pll
rmmod dvb_core
rm /dev/dvb/adapter0/frontend0
rm /dev/dvb/adapter0/demux0
rm /dev/dvb/adapter0/dvr0
rm /dev/dvb/adapter0/dvr0.ts
rmdir /dev/dvb/adapter0
rmdir /dev/dvb

test and upload
adb shell
root@android:/data # cd /data
root@android:/data # mkdir dvb
adb push . /data/dvb
root@android:/data # cd dvb
root@android:/data/dvb # ./startdvb

lsmod shows loaded modules
dmesg shows kernel logs

For testing i pushed droidtv.apk and installed with
root@android:/ # pm install droidtv.apk

compile against linux media

git clone git://
cd media_build

i use following script to compile
export ARCH=arm
export CROSS_COMPILE=$(pwd)/../android-toolchain-14/bin/arm-linux-androideabi-
export DIR=$(pwd)/../rockchip-rk30xx-mk808
export MYCFLAGS=-fno-pic

#make -j4

when you see something like


press Ctrl-C

remark "./build" and unremark "make -j4"

make menuconfig

//[ ] Misc devices --->


Multimedia support / Encoders, decoders, sensors and other helper chips --->
< > SMIA++/SMIA sensor support

if not unchecked you get something like

./media_build/v4l/smiapp-core.c: In function 'smiapp_registered':
./media_build/v4l/smiapp-core.c:2359: error: implicit declaration of function 'devm_regulator_get'
./media_build/v4l/smiapp-core.c:2359: warning: assignment makes pointer from integer without a cast

to build dib9000.ko uncheck "Multimedia support / Autoselect"

if you see "exported twice. Previous export was in vmlinux" then
this happens for modules built into rk3066 kernel and selected as modul.

[ view entry ] ( 3061 views )   |  print article

<<First <Back | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | Next> Last>>