Showing posts with label boxee. Show all posts
Showing posts with label boxee. Show all posts

Thursday, December 4, 2008

Boxee redux

Trying to rebuild the latest Boxee and run into these problems:



1] AppManager.h:52 - change "static bool CAppManager::RunInBG(InstallOrUpgradeAppBG* pJob);" to "static bool RunInBG(InstallOrUpgradeAppBG* pJob);". g++ doesn't like the redundant qualification. Wonder what version of g++ the XBMC crew uses, as that's a common error I see alot from code coming over from Windows.



2] LinuxFileSystem.cpp:188 Change

shares.strName += " (" + g_localizeStrings.Get(51350) + ")";

to
share.strName += " (" + g_localizeStrings.Get(51350) + ")";


A very strange and impossible bug - it was using the Vector, not the CMediaShare. Maybe we shouldn't be doing HAL?



3] I got an error about missing libtxml.a. Needs tinyxml:

$ cd xbmc/lib/libBoxee
$ tar xzvf tinyxml_2_5_3.tar.gz


Not sure why it wasn't in there. Then I had to add a target to the Makefile found in xbmc/lib/libBoxee:




all: libBoxee.a libtxpath.a libtxml.a

libtxml.a:
make -C tinyxml
$(AR) $(ARFLAGS) libtxml.a tinyxml/*.o
ranlib libtxml.a


And that finally compiled. A lot cleaner and faster compiler than the previous version. This creates a ./Boxee. Now another problem cropped up - I can't seem to find any sort of script to create a new installation, like I create before. And there is no plugins folder, like there used to be. But I just faked it, using my make-boxee.sh script and copying in plugins folder from my previous install.



So I copy the create opt/boxee folder into /opt/boxee. And try to run it. It sort of worked, although I had to try a few times to log in, as it kept complaining of an invalid password. I assume that is just because the server is getting pounded due to all the people trying out the new version.



But even once I got logged in, it still wasn't very stable. Whenever the left menu would try to come up, Boxee locked up hard, requiring me to Ctrl-Alt-F2 to a text console and killing the process. Trying to play anything just crashes it. And I can't seem to find any log file :( Oh well.





Sunday, November 23, 2008

Media PC Mania

Boxee has me so excited about a home theater computer that I have begun to spec out building a new one to add to my home theater set up. Coincidentally enough, ASUS has recently come out with a new motherboard complete with HDMI out and 7.1 hi def audio, so here's what my list looks like:




  • P5N7A-VM - looks like they did this one up right. Plenty of connectors, including HDMI, DVI, Display Port and VGA (you can use two at a time), plus Optical SPDIF, 6 jack audio, etc. Includes the latest nVidia 9300 mobile GPU (I guess it is the equivalent of the 8200 card; I have an 8600 in the openSUSE box). A microATX form factor means I can use a "home theater" designed case.

  • Speaking of cases, it looks like I could go a few different ways. High end would be the Antec Fusion series, a real sweet "home theater" (replete with dials and guages) box. But at around $200, it seems like overkill. Slightly cheaper is the nMediaPC HTPC 1000, at around $100, although some reviews have been unkind. Cheaper still is the Apex DM series, which isn't really all the "home theater" looking, but is still pretty small and about $50, albeit with a pretty wimpy powersupply.

  • Intel Core 2 Duo E6550 chip - ExtremeTech suggests this chip and given that we aren't going to do much besides render video streams, this mid-level chip should be enough. It should go for about US$160. Although given that the Core 2 Quad Q6600 I have in my main box goes for only about $20 more, maybe I should step up here.

  • An optional enhancement would be a BluRay DVD player, which runs about US$100. In the beginning, a regular DVD player, which I have all over the place here, would suffice, as I already have a BluRay player with my PS3.

  • And then add in a Samsung 1TB hard drive for about US$100 and a couple gigs of DDR2-800 RAM for US$20.



So all told, it would start at about US$500 for the box, plus the US$100 for the BluRay player. Very tempting. I would also probably run a UPnP server like MediaTomb to serve up my media. The costs look like this:





































Component
Name
Price
MotherboardASUS P5N7A-VM$140
CaseApex DM$75
CPUE6600$160
MemoryDDR2-800 2gb$30
SATA Harddrive1TB Samsung HD103UJ$100
BluRay PlayerLite-On$100



I don't really need a media PC, as my regular PC works just fine. Of course, it is a real PC in a real case, and I have to unplug it and carry it over to my home theater setup, but how bad is that? Still, I can scheme for one, can't I?



Thursday, November 6, 2008

Getting SUSEy with Boxee

It's alive! As yet another side project, I have been trying to get Boxee to work on my openSUSE box. Boxee is a cool new media player / social app that lets you play all kinds of multimedia, including streaming video from sites like Hulu, CNN, last.fm etc. It first came out on the Mac and a Linux version was recently released. Unfortunately, only Ubuntu is supported, so I decided to see what I could do about getting it run on my openSUSE box.



So I downloaded the source tarball and unpacked it with 'tar xzvf'. This created a working set of folders, but unfortunately, no Boxee instructions. At the time I didn't realize this was mostly a XBMC (Xbox Media Center) source tree, with a layer of Boxee graphics and helper apps. There are some READMEs, but turns out they don't really have much to do with installing Boxee. So rather than let you in on all my blundering about, here's how you should build Boxee on your openSUSE (or any other) Linux box:




  • The first thing you need to do is to get the myriad number of development packages required by XBMC. The README.linux file lists the packages needed when building under Ubuntu, but the names don't always match up for openSUSE. I'm going to assume you have the g++ packages installed, so here's the list of openSUSE packages:
    SDL-devel SDL_image-devel SDL_gfx-devel SDL_mixer-devel SDL_sound-devel
    freetype2 freetype2-devel lzo lzo-devel fribidi fribidi-devel sqlite3
    sqlite3-devel libogg-devel alsa-devel python-sqlite2 glew glew-devel
    libcurl-devel xorg-x11-devel xorg-x11-libXrender-devel pmount libmad0
    libmad-devel libtre-devel libvorbis-devel libmysqlclient-devel hal hal-devel
    pcre-devel subversion libjasper-devel libjasper fontconfig-devel libbz2-devel
    boost-devel libtool nasm libfaac-devel libenca-devel automake cmake
    xorg-x11-libXt-devel xorg-x11-libxmu-devel gperf unzip libpng-devel
    libjpeg-devel

    I think this is all of them, but I can't be sure as I already had some installed. The README.linux file lists the Ubuntu 'apt-get' command you can use to get all of these. I imagine there is an equivalent yast2 and/or rpm command to do the same but I just went through the Software Management module of Yast2 and selected them by hand.


  • $ autoconf
    : there isn't a 'configure' script and autoconf is the only way I know how to create it, even though it isn't mentioned in the README.linux file. I'm not sure if there is a better way, but this seems to work

  • $ ./configure -C --disable-debug
    : the -C creates a configure cache (presumably for running faster in later invocations) and U figure we might as well build an optimized, non-debug version of xmbc

  • $ make
    : now we'll make the Boxee executable (which is really just a renamed xbmc.bin, which is what the xbmc build creates. Now go make a fresh cup of coffee, as you will have plenty of time to brew another pot! I get a strange error from LaTex, as I think it is building some help files:
    ! Package inputenc Error: Unicode char \u8:éph not set up for use with LaTeX.

    See the inputenc package documentation for explanation.
    Type H for immediate help.
    ...

    l.49 \item[Author:]Stéph
    ane Borel $<${\tt stef@via.ecp.fr}$>$
    ?

    This is some odd error for Unicode. Using some Google-fu, you can fix this by typing in

    e
    (to edit the file), then
    :wq!
    to write out the file and quit (those are vi commands). Then run the make again. And go pour yourself another cuppa.


  • After the make has finished, you have a basic XBMC installation ready to go. So now you need to make a Boxee home. The script debian/make_debian.sh seems to be a script for the developers to set up a launching area to create the .deb file for the Ubuntu install. I modified it to create a nice Boxee subfolder. I called it make-boxee.sh and it is here:
    #!/bin/bash

    curr_dir=`pwd`

    SRC=../
    TMP=./tmp
    DEST=${TMP}/opt/boxee

    /bin/rm -rf ${TMP}
    mkdir -p ${DEST}/
    mkdir -p ${TMP}/usr/share/applications
    mkdir -p ${TMP}/usr/share/pixmaps

    # language
    mkdir -p ${DEST}/language/
    cp -r ${SRC}/language/* ${DEST}/language/

    # media
    mkdir ${DEST}/media
    cp ${SRC}/media/defaultrss.png ${SRC}/media/downloadrss.png ${SRC}/media/test_sound.mp3 ${SRC}/media/weather.rar ${DEST}/media
    chmod 644 ${DEST}/media/*
    mkdir ${DEST}/media/Fonts
    cp ${SRC}/media/Fonts/boxee* ${DEST}/media/Fonts
    chmod 644 ${DEST}/media/Fonts/*

    # screensavers
    mkdir ${DEST}/screensavers
    cp ${SRC}/screensavers/Plasma.xbs ${SRC}/screensavers/Solarwinds.xbs ${SRC}/screensavers/Euphoria.xbs ${DEST}/screensavers

    # scripts
    mkdir ${DEST}/scripts
    # Lyrics
    cp -r ${SRC}/scripts/Lyrics ${DEST}/scripts
    cp -r ${SRC}/scripts/RTorrent ${DEST}/scripts
    cp -r ${SRC}/scripts/Apple\ Movie\ Trailers ${DEST}/scripts
    cp -r ${SRC}/scripts/OpenSubtitles ${DEST}/scripts

    # plugins
    mkdir ${DEST}/plugins
    mkdir ${DEST}/plugins/music
    mkdir ${DEST}/plugins/pictures
    cp -r ${SRC}/plugins/pictures/flickr ${DEST}/plugins/pictures
    cp -r ${SRC}/plugins/pictures/PicasaWeb ${DEST}/plugins/pictures
    mkdir ${DEST}/plugins/video
    cp -r ${SRC}/plugins/video/Youtube ${DEST}/plugins/video
    cp -r "${SRC}/plugins/video/CNN Video" ${DEST}/plugins/video
    cp -r "${SRC}/plugins/video/Movie Trailers" ${DEST}/plugins/video

    # skin
    mkdir -p ${DEST}/skin/Boxee\ Skin\ NG
    cp -r ${SRC}skin/Boxee\ Skin\ NG/* ${DEST}/skin/Boxee\ Skin\ NG

    # system
    mkdir ${DEST}/system
    cp ${SRC}/system/*-i486-linux.so ${SRC}/system/asound.conf ${DEST}/system
    mkdir ${DEST}/system/players
    mkdir ${DEST}/system/players/dvdplayer
    cp ${SRC}/system/players/dvdplayer/*-i486-linux.so ${DEST}/system/players/dvdplayer
    mkdir ${DEST}/system/players/paplayer
    cp ${SRC}/system/players/paplayer/*-i486-linux.so ${DEST}/system/players/paplayer
    mkdir ${DEST}/system/players/flashplayer
    cp ${SRC}/system/players/flashplayer/*linux* ${SRC}/system/players/flashplayer/bxoverride.so ${DEST}/system/players/flashplayer
    chmod 755 ${DEST}/system/players/flashplayer/*
    mkdir ${DEST}/system/python
    cp ${SRC}/system/python/*-i486-linux.so ${DEST}/system/python
    mkdir ${DEST}/system/python/lib
    cp ${SRC}/xbmc/lib/libPython/Python/build/lib.linux-i686-2.4/*.so ${DEST}/system/python/lib
    cd ${SRC}/xbmc/lib/libPython/Python/Lib
    python -O >/dev/null << EOF
    import compileall
    compileall.compile_dir(".", force=1)
    EOF
    /bin/rm -rf test
    tar cf - `find . -name \*.pyo` | (cd $curr_dir; cd ${DEST}/system/python/lib; tar xf -)
    cd $curr_dir
    mkdir ${DEST}/system/scrapers
    cp -r ${SRC}/system/scrapers/* ${DEST}/system/scrapers
    mkdir ${DEST}/system/cdrip
    cp ${SRC}/system/cdrip/*-i486-linux.so ${DEST}/system/cdrip

    # userdata
    mkdir -p ${DEST}/UserData
    cp ${SRC}system/Keymap.xml ${SRC}system/Lircmap.xml ${DEST}/system
    chmod 644 ${DEST}/system/*.xml
    cp ${SRC}UserData/sources.xml.in.linux ${DEST}/UserData
    cp ${SRC}UserData/sources.xml.in.diff.linux ${DEST}/UserData
    chmod 644 ${DEST}/UserData/*
    ln -s UserData ${DEST}/userdata

    # visualizations
    mkdir ${DEST}/visualisations
    cp ${SRC}visualisations/opengl_spectrum.vis ${SRC}visualisations/ProjectM.vis ${SRC}visualisations/Waveform.vis ${DEST}/visualisations
    cp -r ${SRC}visualisations/projectM ${SRC}visualisations/projectM.presets ${DEST}/visualisations

    # rtorrent
    mkdir -p ${DEST}/bin
    cp ${SRC}/bin-linux/boxee-rtorrent ${DEST}/bin
    cp ${SRC}/system/rtorrent.rc.linux ${DEST}/system

    # binary
    cp ${SRC}/Boxee ${DEST}/
    strip ${DEST}/Boxee
    cp ${SRC}/run-boxee-desktop.in ${DEST}/run-boxee-desktop

    # give_me_my_mouse_back
    cp ${SRC}/give_me_my_mouse_back ${DEST}/
    strip ${DEST}/give_me_my_mouse_back

    # desktop stuff
    cp boxee.desktop ${TMP}/usr/share/applications
    cp boxee.png ${TMP}/usr/share/pixmaps

    # update debian control file with version number
    mkdir tmp/DEBIAN
    cp -f postinst ${TMP}/DEBIAN/
    chmod 755 ${TMP}/DEBIAN/postinst

    I removed some subversion stuff and other dev kind of things. I also changed the python invocation to not use the one that came with the source tarball. You can see the make_debian.sh script use ../python, but that gave me errors, so I just use the one I have already and it went well. This puts a full Boxee installation into the tmp folder.

  • to run Boxee, run opt/boxee/run-boxee-desktop script. You'll need to disable Compiz if you are runnig it. If you have dual monitors, you'll want to add the line:
    export SDL_VIDEO_FULLSCREEN_HEAD=1

    up near the top. This way, it will show up only on one display, rather than covering both displays, with most of it ending up in the middle, straddling your displays. See the README.linux file for more info.




With a small amount of luck, you should be running Boxee. Be sure to add me as a friend - jdarnold. Report back any success or failures in the Boxee Linux forum.