API/interface to pull recorded show listings, metadata, and files off of the Tablo

@krissy - I am glad that it is working for you.


As a note, cTivo is pretty nice, but I strongly recommend kmttg for downloading shows off of the tivo, so much more customizable - I use it to download everything off of my ota tivos (I have my own tivo renamer scripts to place it in position for plex)  I am looking forward to the tablos someday having surround sound so that I can finally get rid of the tivos (and not have to re-encode all videos to x264 like I have to do with tivo))

@jskenney


I am also looking forward to getting rid of my OTA tivo.  I use cTivo because it was easy for me to modify and use my Turbo.264 HD stick (to speed up encoding) and I could get the program to mark commericals.

With your scripts, I’m 95% there with the downloads, cc is a big plus for Scandal, lol.  Now all I need is the ability to mark commercials as chapters.  I like to hang onto the commercials just incase something gets a little off. :slight_smile:  Looking forward to version 3.

I think I’ll give kmttg another go.


I got mutagen installed, it seems to have a few glitches.  It tagged a show with S02E22 with s22e50 and the media kind shows incorrectly in iTunes.  I can use a 3rd party for tagging, just wanted to give mutagen a go.

Thanks again

Well it has been fun…  Version 2.0 has been posted at https://sites.google.com/a/moboard.com/tablo


New features:
- Auto detection of tablos
- Metadata embedding in .mp4 files
  (optional: requires install of mutagen module)
- Closed Captioning embedding in .mp4 files
  (optional: requires install of ccextractor)
- Configurable locations for TV, Movies, and Sporting Events
- iTunes style naming / Plex compatible names by default
- Customizable naming in general (or by movie, tv, sporting event)
- kmttg style tracking (by EpisodeDB or MovieDB numbers)
  – can work alongside a working kmttg instance
  – -a flag is similiar to kmttg’s and tablo2go can have a delay so that kmttg recording will take precedence
- cache database is optional for speeding up metadata retrieval
- list output is sorted by default
- new methods for displaying output and providing status
- ctrl-c gracefully shuts things down
- newer recordings take precedence

Happy downloading.  Until the next holiday.

@jskenney Here’s your last version with the modifications for using the python logging framework and rotating logs. I went the simple route and just incorporated the framework for the logging to a file and didn’t change the console prints. You could however use the framework for those as well. I also added some global variables at the top to change log file size and number of log file history to maintain.


Updated script: https://bitbucket.org/mjarends/tablo-scripts/src/c4ba59941328b4ff73f9e30e3154e453530400a0/tablo2go-2.0.55-with-logging.py?at=master

@jskenney


Did anything change?  The last time I ran the script on Jan 1, everything worked fine.  I did upgrade to Yosemite, but I don’t think would cause a problem.

I’m getting the error: No videos have been queued Unable to download video segments
I can list the data fine.  Any clues as to what’s going on?

@jskenney 


Ignore previous post.  I started from scratch with the latest release and it worked fine.  

:slight_smile:

Ok, new to Tablo here and have been going through a few problems, a small learning curve and in general getting used to the differences in the methodology. Lot to like, lot to improve - sure wish they had a better Live TV Guide that was also 2 Weeks - oh well maybe it can be added. Anyway, now thanks to your script, JSKenney, this is probably the best game in town.

Had just gone through upgrading my hard drive from a wd 150gb (it was only a temp solution - a drive I had on hand), which I installed after the Tablo (I purchased the 4 tuner version 12/17/2014) turned an old WD Passport 1tb into a brick.

Once I upgraded to a new WD Elements, I tried to get support to let me know how to transport the recordings from the 150gb to the new one.  As expected, no help there.

Then I saw this thread and your posts.

Had a couple of minor problems due to my lack of knowledge and familiarity with python, but was able to get all the files from both drives to convert to mp4s and moved them to my NAS media server. All now available to stream to the Roku.

Now I do have a couple of questions for anyone that can help me fine tune this. I used the following script (which I essentially copied from an earlier post and modified slightly):

python.exe tablo2go-2.0.55.py -db:tablo2go.db -Tablo:192.168.1.2 -ffmpeg:“d:\ffmpeg\bin\ffmpeg” -output:“I:\TabloRec” -temp:“I:\TabloTemp” -a -sleep:900

I have been running this directly in my python27 folder which is located  at d:\python27. THe script then compiles the Tablo video files int to the following 3 folders:

TV = D:\Python27\tv
Movies = D:\Python27\movies
Everything else = D:\Python27\fail

What I really want is to be able to have these files end up on my USB3 Media Drive Under the main folder: I:\Tablo
and then subdivided into TV, Movies and Unknown fr further manual processing

So, a couple of things:

1. What do I need to do to simplify the command line to just pull off the new videos from here forward?
2. Can I move all the files from the python folder to I:\Tablo? and if so do I need to move these files: tablyoxxx.py , tablo2go.db. tablo.history, tablo.log to that same folder and run python by pointing to it (d:\python27\python.exe …)?
3. What happens when I delete the content on the tablo? At a minimum I intend to delete the files from the old drive ASAP to remove them from the recording list when the 2tb is connected.

Hope I am not asking too much? If so just let me know.
And, Once again thanks for this Great Script!

I just started using this script today, first off thanks it works well.  Is there a way in the output that it can puts each TV show in a Season folder? For example “\Arrow\Season 1\Arrow S01E01.mp4”.


Thanks 

Take a look at the help in the file, it has a parameter for that.

@joelgilb - It looks like you are using the syntax for the version 1.0.23 version, vice the new 2.0.55 version.  Run the script with the -help flag to see all of the available options.  As an example the -output flag is no longer used and you can now specify paths for TV, Movies, and Sports.  All of the supporting files can be placed wherever you want them to be (there are flags for that as well).  No impact to the scripts when you delete things directly on the tablo, so no worries there.  If you are comfortable editing files it is easier to just edit the OPTIONS within the script to set the defaults to what you want them to be.


@mg45621 the default for TV shows is that format \TV Show\Season X\TV Show - SXXEXX - Title.mp4

Hope that helps, and I apologize that I don’t pay to much attention to the forums during the school year, to much time developing courses, preparing for classes and grading to have fun with this stuff, so it can be weeks between my checking the forums, but this is one of the friendliest sites I have visited and there are many people willing to help out.

Newbie drinking from a fire hydrant here on a win7 platform. I read this thread about 3 times and I can’t seem to locate my question.

Is there a way to drill down and extract a single movie/show rather than just the wholesale download of what’s on the Tablo and or new recordings? I ran the list command, and was able to see the EP008466780037 code for the show, and would like to just download that vs everything.

I’m upgrading to a 4 tuner unit, and I need to grab just a few tv shows and movies and not copy all of the data on Tablo’s drive.

As others have mentioned, great work jskenney.

My program, surlatablo, makes this pretty easy.  However, it does maintain a local (outside Tablo) cache, so first run will index everything (can take awhile).  Successive runs merely updates the local cache.  Searches are pretty easy and flexible.

See SurLaTablo here

There is an update coming that fixes a couple of minor issues.

@bigcitymike


You are almost there…

python tablo2go-2.0.55.py EP008466780037
or 
python tablo2go-2.0.55.py the addams family   {{{{you can download by the name of show or episode title}}}}

Also, if you look at the beginning of the script, jskenney gives many examples.  His program is very versatile and can do exactly what you are looking to do.



@cjcox

Thanks for the info. I’ll have to check it out.

@krissy

Thanks for the nudge. That did it for me.

I realize I’m a year late in the discussion but got part way through reading 8 pages and my eyes were burning from allergies so I stopped looking and decided to ask:


May I assume you/this script uses relative paths here - because this to me looks a lot like the paths I use in ASP and HTML and VB Scripts - 

‘ffmpeg’: [’./ffmpeg.exe’, ‘PATH’, 'Path to ffmpeg’

To me this is saying that if . is the current working folder (where the Python script itself is) then it is saying that the ffmpeg.exe file is in the current working folder.
Otherwise if it were ./ffmpeg/ffmpeg.exe it would mean go 1 level deeper from here to a folder named ffmpeg
So in short - relative paths, correct?

It’s been a few months since I’ve done much with ASP or just HTML in general so may have forgotten what I thought I might have known.

Don’t laugh please, I already feel like a sub-novice floundering in an ocean of experts.  
:-S

@ShadowsPapa - The script can handle absolute paths or relative paths.  If you are using windows you can use paths like C:/Users/bin/ffmpeg.exe if you want, or you can keep them relative to where you run the program.


You can set these by editing the script for your needs or just supplying the information on the command line.

@joelgilb - It looks like you are using the syntax for the version 1.0.23 version, vice the new 2.0.55 version.  Run the script with the -help flag to see all of the available options.  As an example the -output flag is no longer used and you can now specify paths for TV, Movies, and Sports.  All of the supporting files can be placed wherever you want them to be (there are flags for that as well).  No impact to the scripts when you delete things directly on the tablo, so no worries there.  If you are comfortable editing files it is easier to just edit the OPTIONS within the script to set the defaults to what you want them to be.
Thanks so much for the help. My busy time of the year as well, so it took me a bit to go through this and try and figure out a little more.

As for editing the script, well... I can sort of read it, but I am certainly not a programmer and haven't really got any idea where to change it. That's ok as your options seem to cover everything and I am starting to get a little more comfortable with them. For now I am using something similar to the command line syntax I posted above, without the old "output" sequence.

This gets me the files in essentially the folders I want them, with some minor shifting.

Again, great script and thanks for the help.

@cjcox glad to see someone else interested in this as well.  Feel free to use any of the functions in this script in yours, I think we have nearly identical goals.

@ShadowsPapa - The script can handle absolute paths or relative paths.  If you are using windows you can use paths like C:/Users/bin/ffmpeg.exe if you want, or you can keep them relative to where you run the program.

You can set these by editing the script for your needs or just supplying the information on the command line.

https://sites.google.com/a/moboard.com/tablo/


It was so simple I got it to grab a recording and convert it to mp4 with little trouble. I like the section that’s dedicated to setting defaults. I made the ffmpeg part easy - since it’s self-contained and not installed, I simply put a copy of the ffmpeg.exe into the same folder as the script. 
Since I have issues with short term memory I also like to launch things via command file, batch file or VB script, and set the switches or arguments that way, then have a batch file or script that either prompts me for something, or have some that are for a single purpose I may do multiple times. 
I’m not a pro at video, formats, etc. but noted it’s 640x  - is there a simple way to get better resolution as that reminds me so much of the CGA and VGA days…  maybe it’s not possible, or maybe NOT NEEDED but I was quite surprised to see that the 1 hour show I test with was only 600 and some meg, I expected roughly a gig for an hour show. 
It ran and ran FAST. The network hardly felt it and my computer didn’t hesitate at all.