Integration of xbmc, mythtv and altbinz
#1
Following on from Here (NZB PLAY) and Here (Mythtv), I would like to hear others thoughts and experiences of integrating these three linux programs (and any others which are related).

Please note this is not a place for feature requests or nagging as xbmc linux is still in early stages of development.
Reply
#2
holy crap. Thats really nice. Its a shame its not open sourced though.

I applaud what they've done, but what would be really great is if it was more of a middleware protocol, then anything could attach to it.

I'd friggen love to see something like this available for xbmc. I've integrated my favorite nzb source into my custom software to browse. Something like this would enable amazing On Demand content for XBMC.

* goes off to research
Reply
#3
hellanzb is an opensource project in python that can do most of what altbinz does. I've talked to the developer and taken some notes on how best to hack it to reorder the RARs (a feature thats currently not implemented -- not last time I checked anyway). I would prefer hellanzb's use over altbinz since it is open source and written in python.
Reply
#4
IMO using the Myth backend, which is pretty much proven solid and easy to install, with some sort of customized frontend script or GUI would be awesome - once XBMC is a little more done for Linux. Presently I've got XBMC installed alongside Myth and do find that hopping between them is a pain - I'll try the linked script idea. Really though I only get locals so in the long run unless the providers get their act together I'm not sure how useful "TV" will be on the HTPC <sigh>
Reply
#5
Actually using myth and xbmc together has been quite a treat. The script that launches it from the home menu works perfectly and then escape brings you right back to the xbmc menu. The only thing i could wish for is that xbmc didn't leave fullscreen mode when it lost focus. it only happens for a few seconds though. Or perhaps that it opened in an "xbmc" window. Im sure all that is low on the priority list though. Next i am going to work out a script that transcodes all my myth recordings to xvid then puts them in my tv folder and scans them to the xbmc db. shouldn't bee too difficult. Cheers.
Reply
#6
Originally I was running just Myth but went and bought an xbox for the sole reason of setting up XBMC. Really what drove me to do this was because I beileve that XBMC has a way more responsive UI. The remote worked far better on the xbox than I could get it to work in Linux and things seemed to respond quicker.

Besides this the directFB support for Myth was never really completed and I hated having to run X just to use Myth. It made it seem too much of a computer and not enough of an appliance, as a result the guests I have who won't use Myth love XBMC.

Really if XBMC can have itself run (perhaps without a window manager) as the UI and media organizer it would be awesome to then see the DVR/LiveTV portion of Myth incorporated in. That said, the real reason I'm interested in seeing XBMC on Linux is more because I need the processing power for HD playback.

Also I think Myth has XBMC beat on the web interface.

Devan
Reply
#7
Rand Al Thor Wrote:Actually using myth and xbmc together has been quite a treat. The script that launches it from the home menu works perfectly and then escape brings you right back to the xbmc menu. The only thing i could wish for is that xbmc didn't leave fullscreen mode when it lost focus. it only happens for a few seconds though. Or perhaps that it opened in an "xbmc" window. Im sure all that is low on the priority list though. Next i am going to work out a script that transcodes all my myth recordings to xvid then puts them in my tv folder and scans them to the xbmc db. shouldn't bee too difficult. Cheers.

I have a script which will transcode to xvid. Currently I use it for HD recordings so it is geared towards that. I found the original script here Xvid Script so credit goes to Steve for writing this. I made a few modifications based on my requirements. The original cut down the resolution to 960x540 which is half-HD (1920x1080) but my projector outputs 720p so I set the output resolution to 1280x720 instead, I also adjusted the target file sizes. Under 32 mins ~500mb(1/2 hour show) and between 33 and 62 ~1gb(1 hour show). More arguments could be added I suppose if you wanted to transcode movies as well but I use it for TV usually so really didn't need much more than an hour. I have also noticed that on some files once they are converted the index gets lost and you can't skip back and forth so I tried adding "-idx" to my final mencoder command but it didn't seem to work when tested so I may have to add a 3rd mencoder to fix the index separately. The script also checks to see if the file is 29 for 59 fps and adjusts it's output accordingly. I also guess this could be modified to use x264 instead of xvid but I find xvid is easier to deal with currently and actually the original xbox can more or less play these files(I have only tested a coupel and noticed minimal frame drop). Here is the script I am currently using, also this script will retain the AC3 soundtrack:

Code:
#!/bin/bash
#

#variables
overheadbytes=16
server_default=POT

#Functions
#Video Length Calculation
function VideoSizeCalc() {
        audiosize=`pc $audiobitrate/1000*$totalseconds*0.1220703125/1024`
        echo "Audio Size in MB = $audiosize"
        totalseconds=`echo $totalseconds|sed -e 's/\.[0-9]*//'`
        if [ $totalseconds -lt 1920 ]; then
                totalsize=500
        elif [ $totalseconds -lt 3720 ]; then
                totalsize=1000
        else
                echo "I don't know how to handle this length!"
                exit 1
        fi
        echo "Total Size = $totalsize"
        videosize=`pc $totalsize-$audiosize`    # new one since overhead doesn't

                                                #really matter its so small
        videosize=`echo `${videosize:0:3}``
        echo "Videosize = $videosize MB"
}


#test for arguements
if [[ -z "@ARGV" ]]; then
        echo "first arguement is the original mpg"
        echo "second arguement is the new folder name, will be used for filename"
        exit
else
        #Reassign variables
        if [[ ! -e $1 ]]; then
                echo "no such input mpg!"
                exit
        else
                original_name=$1
        fi
        folder_name=$2
        file_name=$3
        # display arguments
        echo "Original mpeg is: $original_name"
        echo "Folder name will be: $folder_name"
        echo "File name will be: $file_name"
fi

#Grab input file information
echo "Determining total file length..."
totalseconds=`mencoder "$original_name" -ovc copy -nosound -o /dev/null -quiet 2>&1 | awk '/^Video stream:/{print $10+$10/$12}'`
echo "total seconds = $totalseconds"
audiobitrate=`mplayer -vo null -ao null -frames 0 -identify "$original_name" 2>/dev/null | grep "ID_AUDIO_BITRATE" | sed -e 's/ID_AUDIO_BITRATE=0//' | grep "ID_AUDIO_BITRATE" | sed -e 's/ID_AUDIO_BITRATE=//'`
echo "audio bitrate = $audiobitrate"
videowidth=`mplayer -vo null -ao null -frames 0 -identify "$original_name" 2>/dev/null | grep "ID_VIDEO_WIDTH" | sed -e 's/ID_VIDEO_WIDTH=//'`
videoheight=`mplayer -vo null -ao null -frames 0 -identify "$original_name" 2>/dev/null | grep "ID_VIDEO_HEIGHT" | sed -e 's/ID_VIDEO_HEIGHT=//'`
videofps=`mplayer -vo null -ao null -frames 0 -identify "$original_name" 2>/dev/null | grep "ID_VIDEO_FPS" | sed -e 's/ID_VIDEO_FPS=//'`
videofps=`echo `${videofps:0:2}``
echo "FPS: $videofps"
aspect=1.78
#`pc $videowidth/$videoheight`
#aspect=`echo "$aspect" | tr -s [:digit:]`
echo "Aspect Ratio: $aspect"
#Calculate Video size
VideoSizeCalc
sleep 10
videosize=`pc $videosize*1024`
echo "Videosize = $videosize"
        if [[ "$videofps" -eq "59" ]]; then
                nice -n 17 mencoder "$original_name" -oac copy -ovc xvid -vf decimate=2:1000:1600:.001,scale=1280:720 -ofps 24000/1001 -xvidencopts pass=1:vhq=0:me_quality=5:turbo:quant_type=mpeg:aspect=$aspect:max_bframes=0:bitrate=-$videosize -o /dev/null
                #
                nice -n 17 mencoder "$original_name" -oac copy -ovc xvid -vf decimate=2:1000:1600:.001,scale=1280:720 -ofps 24000/1001 -xvidencopts pass=2:quant_type=mpeg:aspect=$aspect:max_bframes=0:bitrate=-$videosize -o $folder_name$file_name.avi
        elif [[ "$videofps" -eq "29" ]]; then
                nice -n 17 mencoder "$original_name" -oac copy -ovc xvid -vf pullup,softskip,scale=1280:720 -ofps 24000/1001 -xvidencopts pass=1:vhq=0:me_quality=5:turbo:quant_type=mpeg:aspect=$aspect:max_bframes=0:bitrate=-$videosize -o /dev/null
                #
                nice -n 17 mencoder "$original_name" -oac copy -ovc xvid -vf pullup,softskip,scale=1280:720 -ofps 24000/1001 -xvidencopts pass=2:vhq=0:me_quality=5:quant_type=mpeg:aspect=$aspect:max_bframes=0:bitrate=-$videosize -o $folder_name$file_name.avi
        fi
exit


For this to work you need PerlCalc. You can find it here PerlCalc. You run the command like this:

Code:
/path/to/hrhd.sh originalfile.mpg /out/put/folder/ outputfilename

Here is how I call this from with a MythTV userscript:

Code:
/home/kevin/hrhd.sh /media/mythtv/Recordings/"%FILE%" /media/video/dlvideo/transcode/ "%FILE%"

If you wanted to remove the commercials first, you could run this after manually making sure your commercial breaks are correctly flagged using Myth's built in editor:

Code:
/usr/bin/mythtranscode -c %CHANID% -s %STARTTIME% --mpeg2 --honorcutlist; mv /media/mythtv/Recordings/"%FILE%" /media/mythtv/Recordings/"%FILE%.old"; mv /media/mythtv/Recordings/"%FILE%.tmp" /media/mythtv/Recordings/"%FILE%"; /usr/bin/mythcommflag -c %CHANID% -s %STARTTIME% --rebuild --clearcutlist

Or if you're pretty confident that mythcommflag is pretty accurate you could replace the first line of that with this:

Code:
/usr/bin/mythcommflag -c %CHANID% -s %STARTTIME% --gencutlist

This would use mythcommflag's cuts as the cutlist rather than manually doing it through myth. I prefer to verify so I don't end up with half a show where mythcommflag messed up. So if you made the output folder where you store your tv shows for XBMC this should almost work for you I think.

Feel free to comment or modify the script as I am always looking to improve it.

Thanks,

kevin
Reply
#8
oops I just realized I spent a whole bunch of time replying to an old thread. Oh well maybe it will help someone out.

Kevin
Reply
#9
I am assuming that this creates a transcoded xvid, but leaves the original mpeg2 intact. Is is possible to transcode to xvid and replace the original mpeg2 with the transcoded xvid, such that the xvid is pointed to by the myth database and therefore playable using myth:// ?
Reply

Logout Mark Read Team Forum Stats Members Help
Integration of xbmc, mythtv and altbinz0