TiVo Community Forum banner
121 - 140 of 481 Posts

·
Registered
Joined
·
425 Posts
Can anyone think of any reason that I can't access it from my Tivo? It's over a wireless network - not sure if that makes any difference.
I had a problem getting tivostream (which uses this somehow I think) after my TiVo was upgraded to v11.0.P3. Turns out that I had to turn "turbo mode" off in my wireless connection!? Very surprised.

Anyway it's POSSIBLE your wireless is at issue somehow...
 

·
Registered
Joined
·
16 Posts
I modified the up() and down() functions in the listview module.
Code:
    def down(self, i):
        if self.pos < self.startpos + self.pagesize - 1:    #if pos != bottom of current page
            if self.pos + i > self.startpos + self.pagesize - 1:    #page down
                self.pos = self.startpos + self.pagesize - 1    #set pos to bottom of current page
            else:    #increment pos
                self.pos += i
        else:    #new page
            if self.startpos + self.pagesize + self.pagesize > len(self.items) - 1:    #if end of new page is beyond last item in list
                self.startpos = len(self.items) - self.pagesize    #set startpos to last item - pagesize
            else:    #increment startpos
                self.startpos += self.pagesize
            if self.pos + i > len(self.items) - 1:    #if newpos > last item in list
                self.pos = len(self.items) - 1    #set pos to last item in list
            else:    #increment pos
                self.pos += i
            self.redraw()
        self.pos_update()

    def up(self, i):
        if self.pos > self.startpos:
            if self.pos - i < self.startpos:    #page up
                self.pos = self.startpos
            else:
                self.pos -= i
        else:    #new page
            if self.startpos - self.pagesize < 0:
                self.startpos = 0
            else:
                self.startpos -= self.pagesize
            if self.pos - i < 0:
                self.pos = 0
            else:
                self.pos -= i
            self.redraw()
        self.pos_update()
I also broke out the bookmarking functionality in to it's own module:
Code:
import os

LENGTH = 0
BOOKMARK = 0

def save(filename, buffer, position):
    if position > 5:
        global LENGTH, BOOKMARK
        buffer = int(round(float(buffer) / 1000))
        position = int(round(float(position) / 1000))
        if LENGTH < BOOKMARK + buffer:    #previous play underran
            LENGTH = BOOKMARK + buffer
        new_bookmark = BOOKMARK + position
        try:
            filehandler = open(filename + ".bkm", 'w')
            filehandler.writelines('&#37;s\n' % LENGTH)
            filehandler.writelines('%s' % new_bookmark)
            filehandler.flush()
            filehandler.close()
        except IOError:
            print "Error saving bookmark!"

def load(filename):
    START_TIME = ''
    if os.path.exists(filename + '.bkm'):
        try:
            filehandler = open(filename + ".bkm", 'r')
            global LENGTH, BOOKMARK
            LENGTH = int(filehandler.readline())
            BOOKMARK = int(filehandler.readline())
            if BOOKMARK >= 5:
                BOOKMARK -= 5
            filehandler.flush()
            filehandler.close()
            START_TIME = '--start-time=%s' % BOOKMARK
        except IOError:
            print "Error loading bookmark!"
    return START_TIME

def erase(filename):
    try:
        if os.path.exists(filename + '.bkm'):
            os.remove(filename + '.bkm')
    except IOError:
        print "Error erasing bookmark!"
I added:
Code:
                    bookmark.save(self.stream_url, self.duration, self.position)
to the handle_resource_info() and handle_key_press() functions in the hmevlc module.

I made the following changes to the vlc module:
  1. Added ,soverlay to PARAMS so I could use subtitle files:
    Code:
    PARAMS = '#transcode{vcodec=%(VCODEC)s,vb=%(VBITRATE)d,' + \
             'acodec=%(ACODEC)s,ab=%(ABITRATE)d,audio-sync,samplerate=44100,' + \
             'fps=29.97,soverlay}:std{access=http,dst=:%(SERVER)d,mux=ps}'    #Added ",soverlay" to transcode options, to show subtitles from seperate subtitle files.
  2. Inserted the second line below, in the vlc.start function; and modified the now third line accordingly:
    Code:
        if client_count == 1:
            start_time = bookmark.load(url)    #Added by Mel Smith
            pid = subprocess.Popen([vlcpath, url, '-I', 'dummy', '-V', 'dummy', start_time, '--sout', PARAMS % globals()]).pid    # Added "start_time" parameter to VLC command line options.
 

Attachments

·
Registered
Joined
·
41 Posts
I love this app, and I have to imagine that all XBMC-type improvements to HME are going to be forked off of this. So thank you for all your hard work William. I use it almost daily.

That being said, I am amazed at how many types of files I cannot play on my TiVo with this. The expectation being that since VLC can play anything, I should be able to stream anything to the TiVo.

I have a lot of self-encoded iPod/iPhone/AppleTV encoded files that this app refuses to stream (some in .mp4, some in .m4v). In fact, the .m4v files won't even show up in the directory list. On both types of files, I constantly get "error reading stream." Now some work, while most don't. .mpg works fine. Other file types just don't show up.

VLC as an app should be able to transcode anything to TiVo compliant video. My gut tells me there should be some built-in transcoding logic that works roughly this:

1. Display all video file types (.avi,.mp4,.m4v,wmv,etc)
2. Attempt to play selected stream as pass-through
3. If pass through fails (error reading stream), then re-attempt with transcode

I am guessing the logic currently works like this:
1. If file type = mp4 or mpg, then pass-through without transcoding

--side note: the needs_vlc variable doesn't seem to have any effect on my tests.

Live TV streams and tvants stream and transcode just fine, so my gut tells me with a little logic and error checking, just about anything should too. It's also possible that it currently works like this and I am totally missing something...
 

·
Registered
Joined
·
61 Posts
VLC as an app should be able to transcode anything to TiVo compliant video. My gut tells me there should be some built-in transcoding logic that works roughly this:

1. Display all video file types (.avi,.mp4,.m4v,wmv,etc)
2. Attempt to play selected stream as pass-through
3. If pass through fails (error reading stream), then re-attempt with transcode

I am guessing the logic currently works like this:
1. If file type = mp4 or mpg, then pass-through without transcoding

--side note: the needs_vlc variable doesn't seem to have any effect on my tests.

Live TV streams and tvants stream and transcode just fine, so my gut tells me with a little logic and error checking, just about anything should too. It's also possible that it currently works like this and I am totally missing something...
That's pretty much correct. If you look at the __init__.py file, you'll see this:

Code:
PASSTHROUGH_EXTS = ('.mpg', '.mp4')
TRANSCODE_EXTS = ('.mov', '.wmv', '.asf', '.flv', '.mkv', '.avi', '.m4v')
Pretty self-explanatory...so if you want your .mpg or .mp4 files to run through VLC just erase them from the PASSTHROUGH_EXTS and put them in the TRANSCODE_EXTS. Also, that's where you can add any other extensions that you want the app to display, since it basically does a union of the two EXTS lists to come up with the extensions it will display on the tivo as eligible files for opening.

Also, as an aside, I'll add that I modified the vlc.py file and changed the PARAMS string to this:

Code:
PARAMS = '#transcode{vcodec=%(VCODEC)s,vb=%(VBITRATE)d,' + \
         'fps=29.97}:std{access=http,dst=:%(SERVER)d,mux=ps}'
Basically, I took out the instructions to VLC to transcode the audio so that the audio track would be passed through natively (though the video portion still gets transcoded). This allows me to encode files with AC3 audio (dvd's, high-def recordings from the tivo, etc) with "pass-thru" settings under handbrake and play back that audio without degradation. Otherwise, VLC's attempt to re-encode the AC3 resulted in the channel ordering being all messed up (the center channel coming out the rear right, etc). Maybe that would be a good config.ini setting to include in future releases...a "passthru_audio = 1" or something?

Anyway, hope that helps someone...

Merry Christmas all :)

-Tex
 

·
Registered
Joined
·
1,221 Posts
I would like to request a feature, could someone add support for ShoutCast TV? VLC already supports this by opening the playlist in VLC and selecting Manage->Services Discovery->Shoutcast TV Listings. If you click info on the Shoutcast TV menu item you will see this URL:
http://www.shoutcast.com/sbin/newtvlister.phtml?alltv=1
That URL links to XML that contains all the info needed to make a menu and play the video streams.

For Example, here is one of the entries in the XML:
Code:
<station name="Mystery Science Theater 3000" id="471002" br="128" rt="PG13" ct="" load="99" genre="Video" lc="99" />
as you can see the station's name is "Mystery Science Theater 3000" and the URL to a playlist would be:
http://www.shoutcast.com/sbin/tunein-tvstation.pls?id=471002
VLC can play that playlist URL or you can parse it to find each video in the playlist. This playlist looks like this:
Code:
[playlist]
numberofentries=1
File1=http://91.121.196.82:9290;stream.nsv
Title1=(#1 - 99/100) Mystery Science Theater 3000
Length1=-1
Version=2
I would add this feature but I'm not very good with Python, Thanks.
 

·
Registered
Joined
·
1,221 Posts
Allanon, what would "this feature" be?

If VLC can play it from a URL, then just pass the URL, and set needs_vlc=true. But I know that you already know that, so there must be something I'm missing. :confused:
ShoutCast TV is a website that keeps track of streaming video stations. These stations are not always streaming so ShoutCast TV keeps track of which station is streaming and what they are streaming. I want the VLC/HME program to check the URL that has a list of all active video streams and list them so I can use the Tivo to choose which I want to watch. I don't want to manually place the URLs in to the config.ini because they may not be valid when I go to watch next time plus new video stations are always popping up.

Anyway, I decided to implement this feature and I have a prototype right now that goes out and reads the XML file and makes a dynamic list of all available video channels. What I still need to implement is the playing of the stream. I should be done with this later today or some time in the next few days, I will post the updated file.
 
121 - 140 of 481 Posts
This is an older thread, you may not receive a response, and could be reviving an old thread. Please consider creating a new thread.
Top