Active Topics

 



Notices


Reply
Thread Tools
MountainX's Avatar
Posts: 415 | Thanked: 193 times | Joined on Jun 2009 @ A place with no mountains
#51
Originally Posted by legendemeritus View Post
i hope this gets done for Maemo 5!
getting this thread back on topic
__________________
Hi! I would like to help make your experience on these forums better. If I can help with anything, just ask!

Useful links for newcomers: New members say hello , New users start here, Community subforum, Beginners' wiki page, Maemo5 Intro, Frequently Asked Questions (FAQ)

Choosing open source is an important purchasing decision for your future. The closed source model of computing is a form of exploitation -- of us! Open source empowers us. Be smart -- chose open source.
 
christexaport's Avatar
Posts: 1,589 | Thanked: 720 times | Joined on Aug 2009 @ Arlington (DFW), Texas
#52
I meant getting it owrking on my current two set of hardware, which all just plug and play with Vista Media Center. I already know Those cards are good, but supposedly mine are to, just I couldn't get it going. I gave up before I pulled out my hair.
__________________
Maemo-Freak.com
"...and the Freaks shall inherit the Earth."
 
Posts: 24 | Thanked: 8 times | Joined on Oct 2007
#53
I appreciate this is an old thread, but I thought I'd post here rather than start a new one.

I have MythTV, and I use it with my mobile phones (including my new N900) but I don't have a full frontend on it.

I have a darwin streaming server running on the MythTV backend which presents all my recordings AND my video collection as 3GP RTSP streams over the Internet. This allows me to watch all my recordings or my DVD collection over a 3G connection. This worked nicely on the N900 out of the box, but sadly seems to have temporarily stopped working with the latest Maemo update (from what I can find it's a known bug that will be fixed in the next version).

The other thing I have setup, is that all my MythTV recordings are re-transcoded into DivX video files. Then I can copy the files locally for viewing in areas with no or poor signal. I intend to make them available via an RSS feed so that it 'auto-synchronises' over my WiFi when at home (mythexport does something similar).

There are pro's and con's to this. The main con is that it doesn't allow you to watch Live TV, but given I can schedule recordings remotely, it sort of allows you to not miss anything. The 3GP quality is poor, but watchable. I am sure with a bit of tweaking I could improve this. The quality of the DivX files can be as high as you want.

The main pro is that it works with almost everything out of the box! I previously used the 3GP streams on everything like my Laptop, my N82, N800 and N810. It also works on my girlfriends N95 and N97mini.

The DivX files I have previously used to sync with my PSP (albeit that was actual MP4's instead).

As most myth users will know you can have a job kick off after each recording has finished, but I choose to batch this stuff to run overnight. If anyone is interested, I can post the details up here, although it's not especially sophisticated and I am sure someone could do the same thing better.

Anyway - rather longer than I intended it to be, but basically. I use mythtv with my N900, albeit a full frontend would be nice.

Last edited by danmiddle2; 2010-01-30 at 14:54.
 
Posts: 4 | Thanked: 0 times | Joined on Feb 2010
#54
Originally Posted by danmiddle2 View Post
If anyone is interested, I can post the details up here, although it's not especially sophisticated and I am sure someone could do the same thing better.
I use MythTV religiously at home in the UK - we never watch live TV anymore at all. I have also just received my N900, but cant get the UPNP feature of Mythv to work.

I'd live to know more about the Darwin server you have running on your box
 
Posts: 24 | Thanked: 8 times | Joined on Oct 2007
#55
Originally Posted by SingingDwarf View Post
I use MythTV religiously at home in the UK - we never watch live TV anymore at all. I have also just received my N900, but cant get the UPNP feature of Mythv to work.

I'd live to know more about the Darwin server you have running on your box

Usual at your own risk caveat. These instructions are remembered so if I get anything not quite right then please reply and I will correct and help out.

Darwin Streaming Server is Apples Open Source media streaming server, which has a Linux version which can be downloaded here: (There are newer releases but I believe these are lacking a Linux install script, please correct me if I am wrong).

Code:
http://static.macosforge.org/dss/downloads/
http://static.macosforge.org/dss/downloads/DarwinStreamingSrvr5.5.5-Linux.tar.gz
then unpack and install
Code:
tar xvzf DarwinStreamingSrvr5.5.5-Linux.tar.gz
cd DarwinStreamingSrvrlinux-Linux
./Install
Then launch it
Code:
sudo /usr/local/sbin/streamingadminserver.pl
Then configure it using a web browser
Code:
http://127.0.0.1:1220
This will allow you to configure where the server looks for files to stream, in my case I put them in
Code:
 /var/lib/mythtv/myth3gp
Thats the streaming server all set up. Now we need to transcode files to view remotely. This script is a mess, so please feel free to butcher, improve and recirculate. For example the web pages created could be PHP, but I have to copy the files to systems without PHP. You could also simplify it to run as a user job after each recording, but for reasons unique to me I run mine overnight as a cron job. It also creates divx files for local playback on the N900, so you need to create the directory.

Code:
/var/lib/mythtv/mythn900
It also uses mythtv-status to see if the system is recording currently so that it doesn't produce partial files. But it stops if it starts recording (cleanly in between files, but is less than ideal).

Ensure you enter your mythtv sql database username and password.

Code:
#!/bin/bash

#this part creates a divx and a 3gp file for each and every mythtv recording
#it will not start if the backend is currently recording it will stop
#between files if the backend starts to record whilst the script is underway

for recording in `ls -t /var/lib/mythtv/recordings/ | grep -i ".mpg" | cut -d "." -f1,2 | sort -u`; do
        recname=`echo $recording`
        recpath="/var/lib/mythtv/recordings"
        out="/var/lib/mythtv/mythn900"
	out3gp="/var/lib/mythtv/myth3gp"
        humanname=`mysql -umythtv -pPASSWORD -e "select concat(title, ' ', progstart) as name from recorded where basename = '$recname' limit 1;" --database mythconverg -NE \
        | grep name: | sed 's/name: //' | sed 's/00$//' | sed 's/://g' | sed 's/$/.avi/'`
	liver=`mysql -umythtv -pPASSWORD -e "select concat(recgroup) as name from recorded where basename = '$recname' limit 1;" \
        --database mythconverg -NE  | grep -i "name:" | cut -d " " -f2`	
	if [ ! -e $out/$recname.* ]
	then
        if [ $liver != "LiveTV" ]
        then
	mythtv-status | grep -A 2 -i Encoders > /tmp/mythstatus.txt
	diff  /usr/local/bin/mythstatus.txt /tmp/mythstatus.txt -q | grep -i differ | cut -d " " -f5 > /tmp/differmyth.txt
	echo "linetwo" >> /tmp/differmyth.txt
	differences=`head -1 /tmp/differmyth.txt`
        if  [ $differences = "differ" ]
        then
        echo "system is currently recording, exiting"
        rm /tmp/mythstatus.txt
        rm /tmp/differmyth.txt
        exit
	else
	echo "backend is not recording and file does not exist, creating divx file"
	rm /tmp/mythstatus.txt
        rm /tmp/differmyth.txt
	ffmpeg -i "$recpath/$recname" -vtag DIVX -f avi -vcodec mpeg4 -aspect 16:9 -s 400x240 -b 690000 -acodec libmp3lame -ab 128000 -ar 48000 -ac 2  "$out/$recname.$humanname"
	ffmpeg -i "$recpath/$recname" -s 352x288 -ar 8000 -ac 1 -ab 12.2k "$out3gp/$recname.$humanname.3gp"
        MP4Box -3gp -mtu 1450 -hint "$out3gp/$recname.$humanname.3gp"
	fi
	fi
	fi
done


#this part of the script will remove all divx files that do not correspond to a current recording

for oldfile in `ls -t /var/lib/mythtv/mythn900/*.avi | cut -d "." -f1,2 | cut -d "/" -f6`; do
	oldname=`echo $oldfile`
	realrec="/var/lib/mythtv/recordings"
	if [ -e $realrec/$oldname ]
	then
	echo "file exists, leaving"
	else
	echo "file does not exist, removing avi file"
	rm /var/lib/mythtv/mythn900/$oldname.*
fi
done


#this part of the script will remove all 3gp files that do not correspond to a current recording

for oldfile in `ls -t /var/lib/mythtv/myth3gp/*.3gp | cut -d "." -f1,2 | cut -d "/" -f6`; do
        oldname=`echo $oldfile`
        realrec="/var/lib/mythtv/recordings"
        if [ -e $realrec/$oldname ]
        then
        echo "file exists, leaving"
        else
        echo "file does not exist, removing 3gp file"
        rm /var/lib/mythtv/myth3gp/$oldname.*
fi
done

#this part of the script updates all the hyperlinks to the streams

rm /var/www/mythmobile/3gp_remote.html
rm /var/www/mythmobile/3gp_local.html
rm /var/www/mythmobile/3gp_proxied.html
echo "<span style=\"font-weight: bold; font-size: 1.2em;\">MythTV Mobile Remote URLs</span><br />&nbsp;<br />" > /var/www/mythmobile/3gp_remote.html
echo "<span style=\"font-weight: bold; font-size: 1.2em;\">Last updated `date`</span><br />&nbsp;<br />" >> /var/www/mythmobile/3gp_remote.html
echo "<span style=\"font-weight: bold; font-size: 1.2em;\">MythTV Mobile Local URLs</span><br />&nbsp;<br />" > /var/www/mythmobile/3gp_local.html
echo "<span style=\"font-weight: bold; font-size: 1.2em;\">Last updated `date`</span><br />&nbsp;<br />" >> /var/www/mythmobile/3gp_local.html
echo "<span style=\"font-weight: bold; font-size: 1.2em;\">MythTV Mobile Proxied URLs</span><br />&nbsp;<br />" > /var/www/mythmobile/3gp_proxied.html
echo "<span style=\"font-weight: bold; font-size: 1.2em;\">Last updated `date`</span><br />&nbsp;<br />" >> /var/www/mythmobile/3gp_proxied.html

ls -t /var/lib/mythtv/myth3gp/ -1 -C | grep -i 3gp | while read newfile; do
        urlfile=`echo $newfile | sed 's/ /%20/g'`
	hrname=`echo $newfile | cut -d "." -f3`
        echo "<a href="rtsp://merrycottage.demon.co.uk/$urlfile">$hrname</a><br>" >> /var/www/mythmobile/3gp_remote.html
        echo "<a href="rtsp://192.168.0.3/$urlfile">$hrname</a><br>" >> /var/www/mythmobile/3gp_local.html
        echo "<a href="rtsp://127.0.0.1/$urlfile">$hrname</a><br>" >> /var/www/mythmobile/3gp_proxied.html
done


#this part of the script updates all the hyperlinks to the local divx files

rm /var/lib/mythtv/mythn900/tv_recordings.html
echo "<span style=\"font-weight: bold; font-size: 1.2em;\">MythTV Recordings</span><br />&nbsp;<br />" > /var/lib/mythtv/mythn900/tv_recordings.html
echo "<span style=\"font-weight: bold; font-size: 1.2em;\">Last updated `date`</span><br />&nbsp;<br />" >> /var/lib/mythtv/mythn900/tv_recordings.html

ls -t /var/lib/mythtv/mythn900/ -1 -C | grep -i avi | while read newfile; do
        urlfile=`echo $newfile | sed 's/ /%20/g'`
        hrname=`echo $newfile | cut -d "." -f3`
        echo "<a href="./$urlfile">$hrname</a><br>" >> /var/lib/mythtv/mythn900/tv_recordings.html
done
Oh and once, before first use of the script, you need to create a text file (another messy bit). Do this when the mythtv backend is idle. The script compares this with the current result to ensure the backend is not in use.
Code:
mythtv-status | grep -A 2 -i Encoders > /usr/local/bin/mythstatus.txt
I can't remember all the dependencies etc, but if you have any issues please let me know and I will assist. It should be easy enough to identify from the script.

Oh, and I forgot to mention. Feel free to auto-start the server how you choose, but I did this for the user that runs myth on startup.
Code:
nano ~/.gnomerc
and then add the line
Code:
sleep 60 && sudo /usr/local/sbin/streamingadminserver.pl
You also have to add a line into /etc/sudoers so that it can run the server without prompting for a password. Please ensure you understand the security concerns before you begin.

Code:
sudo nano /etc/sudoers
and then add under # Cmnd alias specification
Code:
Cmnd_Alias DARWINLAUNCH = /usr/local/sbin/streamingadminserver.pl
and then at the bottom of the same file
Code:
username ALL=(ALL) NOPASSWD: DARWINLAUNCH

Last edited by danmiddle2; 2010-02-07 at 16:25.
 

The Following User Says Thank You to danmiddle2 For This Useful Post:
Posts: 7 | Thanked: 1 time | Joined on Mar 2010
#56
Instead of porting mythtv to maemo5 i tried a different route

I installed easy debian, then installed mythtv-frontend from the debian repositories(inside easy debian chroot)


You need to start it with(inside easy debian chroot) :

Code:
[user@easy-debian-m5: /]DISPLAY=:0 EXPERIMENTALLY_ALLOW_PULSE_AUDIO=1 mythfrontend
It takes some time to load, but....
Mythtv loads!

Now come the issues I still need to work out.
No sound yet, (this is probably easy debian/pulseaudio related according to my research, + mplayer cant put out audio also...)

The screen remains black, after an occasional image flicker of 1-2 seconds(of the recording!) on start which is weird, b/c the terminal isnt outputting any big errors imho

Code:
Xlib:  extension "XFree86-VidModeExtension" missing on display ":0.0".
2010-03-22 02:07:53.888 MythXGetRefreshRate(): X11 ModeLine query failed
2010-03-22 02:07:55.125 VideoOutputXv: XVideo Adaptor Name: 'SGX Textured Video'
2010-03-22 02:07:57.930 OSD Theme Dimensions W: 1280 H: 720
2010-03-22 02:08:02.392 TV: StartPlayer(0, Watching WatchingPreRecorded, main) -- end ok
2010-03-22 02:08:02.461 TV: Changing from None to Watching WatchingPreRecorded
Xlib:  extension "XFree86-VidModeExtension" missing on display ":0.0".
2010-03-22 02:08:02.763 MythXGetRefreshRate(): X11 ModeLine query failed
2010-03-22 02:08:02.851 Couldn't load deinterlace filter none
2010-03-22 02:08:02.855 New DB connection, total: 3
2010-03-22 02:08:02.944 Realtime priority would require SUID as root.
2010-03-22 02:08:03.523 Connected to database 'mythconverg' at host: 192.168.1.3
Xlib:  extension "XFree86-VidModeExtension" missing on display ":0.0".
2010-03-22 02:08:03.764 MythXGetRefreshRate(): X11 ModeLine query failed
2010-03-22 02:08:03.766 Video timing method: USleep with busy wait
2010-03-22 02:08:04.428 Couldn't load deinterlace filter none
2010-03-22 02:08:04.429 Failed to enable deinterlacing
2010-03-22 02:08:08.216 NVP(0): prebuffering pause
2010-03-22 02:08:09.660 NVP(0): prebuffering pause
So i would like some help here, if anyones interested

Last edited by idfx; 2010-03-22 at 01:22.
 
Posts: 7 | Thanked: 1 time | Joined on Mar 2010
#57
Already some progress!
Code:
2010-03-22 02:37:29.266 TV: Attempting to change from None to Watching WatchingLiveTV
2010-03-22 02:37:29.846 MythContext: Connecting to backend server: 192.168.1.3:6543 (try 1 of 1)
2010-03-22 02:37:30.052 Using protocol version 50
2010-03-22 02:37:30.154 Spawning LiveTV Recorder -- begin
2010-03-22 02:37:30.460 Spawning LiveTV Recorder -- end
2010-03-22 02:37:34.659 We have a playbackURL(myth://192.168.1.3:6543/227250_20100322023640.nuv) & cardtype(V4L)
2010-03-22 02:37:35.171 We have a RingBuffer
2010-03-22 02:37:35.390 TV: StartPlayer(0, Watching WatchingLiveTV, main) -- begin
2010-03-22 02:37:39.209 Opening audio device 'default'. ch 2(2) sr 32000
2010-03-22 02:37:39.224 Opening ALSA audio device 'default'.
ALSA lib pcm.c:2162:(snd_pcm_open_conf) Cannot open shared library /usr/lib/alsa-lib/libasound_module_pcm_alsa_dsp.so
2010-03-22 02:37:39.242 AudioOutput Error: snd_pcm_open(default): No such file or directory
2010-03-22 02:37:39.243 NVP(1): Disabling Audio, reason is: snd_pcm_open(default): No such file or directory
Xlib:  extension "XFree86-VidModeExtension" missing on display ":0.0".
2010-03-22 02:37:47.904 MythXGetRefreshRate(): X11 ModeLine query failed
2010-03-22 02:37:47.913 VideoOutputXv: Falling back to X shared memory video output.
                              *** May be slow ***
2010-03-22 02:37:48.410 OSD Theme Dimensions W: 1280 H: 720
Xlib:  extension "XFree86-VidModeExtension" missing on display ":0.0".
2010-03-22 02:37:52.260 MythXGetRefreshRate(): X11 ModeLine query failed
Xlib:  extension "XFree86-VidModeExtension" missing on display ":0.0".
2010-03-22 02:37:52.280 MythXGetRefreshRate(): X11 ModeLine query failed
2010-03-22 02:37:52.282 Video timing method: USleep with busy wait
2010-03-22 02:37:52.283 Realtime priority would require SUID as root.
2010-03-22 02:37:53.024 TV: StartPlayer(0, Watching WatchingLiveTV, main) -- end ok
2010-03-22 02:37:53.029 TV: Changing from None to Watching WatchingLiveTV
2010-03-22 02:37:53.035 TV: State is LiveTV & mctx == ctx
2010-03-22 02:37:53.608 TV: UpdateOSDInput done
2010-03-22 02:37:53.612 TV: UpdateLCD done
2010-03-22 02:37:53.714 TV: ITVRestart done
2010-03-22 02:37:53.888 NVP(1): Prebuffer wait timed out 10 times.
2010-03-22 02:37:59.102 VideoOutputXv Error:
***
* Your system is not capable of displaying the
* full framerate at 800x480 resolution.  Frames
* will be skipped in order to keep the audio and
* video in sync.

2010-03-22 02:38:00.629 NVP(1): prebuffering pause
2010-03-22 02:38:01.902 NVP(1): prebuffering pause
Running with the xshm renderer in "configuration -> TV-settings->playback"

Appearantly this is the only renderer that will work on the n900?
 
Posts: 306 | Thanked: 106 times | Joined on Feb 2010
#58
Janneg on #mythtv compiled 0.22-fixes in scratchbox using the following parameters:

Code:
./configure --compile-type=release --cpu=armv7-a --enable-neon
--extra-cflags='-mfpu=neon -mfloat-abi=softfp' --extra-cxxflags='-mfpu=neon
-mfloat-abi=softfp' --prefix=/opt/mythtv --disable-distcc --disable-opengl
--disable-ffmpeg-pthreads --disable-v4l --disable-joystick-menu
--without-bindings=perl,python
I intend to give this a try once PR1.2 is available.
 
Posts: 7 | Thanked: 1 time | Joined on Mar 2010
#59
Any idea about the dependencies? Are there a lot to build/port?
 
Posts: 306 | Thanked: 106 times | Joined on Feb 2010
#60
The dependencies are all available in the repos as far as i am aware. One of the issues is opengl support. Myth needs opengl which is not available and thus need to be disabled at compile time.
 
Reply

Tags
encoding, maemo 5, mobile, mythtv, streaming


 
Forum Jump


All times are GMT. The time now is 06:42.