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

Yes, the latest download of Python includes PIP. 

I have mutagen but honestly can’t recall how I did it!  I think  have 1.27
The mutagen site indicates this for installing:

$ ./setup.py build $ su -c "./setup.py install"

I'm not sure if Pip is used as cjcox suggested or if the above applies.  I'm also unsure if this is entered the same way in a windows command line

I tried that in Windows and it gave me a shrug and a DUH?  So i ended up using pip, I Think! 

Found this:
https://docs.python.org/2/install/

not to rehash, but does anyone have a simple start to finish setup?

Maybe post under a new thread or on wiki?

1) How do you see the drive? Do you have to unplug and plug into a PC?

2) How do you setup script

3) How do you run?

I was able to get mutagen to install by following the instructions in the link above by doing a build and install in two steps. I think it went into the proper place. I then ran the tablo script to generate an MP4, although I don’t know how to tell if the metadata was transferred. In any case, I was able to successfully transfer files from a particular show and then watch. It was great. Thanks so much for this script!

not to rehash, but does anyone have a simple start to finish setup?

Maybe post under a new thread or on wiki?

1) How do you see the drive? Do you have to unplug and plug into a PC?

2) How do you setup script

3) How do you run?

It will always go through the Tablo - no disconnect drive. That’s never a good thing to do the way Tablo operates. Once that drive is connected, formatted by Tablo and used, I’d be leery of ever removing it for any reason as any single change could mean the loss of the shows. The drive and Tablo are supposed to be mated for life - not shared, not swapped around, etc.


There are currently 3 methods of accessing the recordings and getting them converted and copied to a PC or server, etc.
One is this script here, another is SurLaTablo, and other is a VLC add-in shown in another thread (which is more graphical, not sure of the power or flexibility behind that one)
You won’t currently find a “turn-key” system that is “put this on the computer, click, enjoy”. All will require some knowledge of scripts, Python, VLC or other open type of software, using, adding, manipulating add-ins or scripts and so on, at least at this point, because they are all 3rd party scripts or add-ins and not written by the Tablo people themselves, so they are using other calls, back doors for lack of a better term before I’ve had my coffee. 
Actually this is a good thing - it gives us choices, and allows the Tablo people to keep working on the greater priorities while these other folks donate their time and knowledge to make it nicer for geeks. 
I’d rather be able to say to Tablo support and engineering - you guys keep fixing what’s broken, others can make it pretty or give us some more flexibility. 
This is true in almost everything. Even Microsoft bought out most of the utilities and tools they now offer for Windows and Windows server OS, they sure didn’t create any of it. regmon and procmon are certainly not Microsoft creations.

The lack of a GUI or turnkey system is due in part to the facts that - these people also have to work for their food and computers, many of them run non-Windows OS so they are trying to make their apps or scripts operate under multiple operating systems (thus Python I suppose), there’s a big mix of Tablo customers as far as what computing systems and operating systems they own or run so we’re very lucky they are working to create tools that can be used on multiple platforms instead of writing only for their own favorite OS. 

It’s so simple to say all that, so hard to be patient and accept it myself! LOL   :wink:

brian0 and others, as I just figured this out, here’s a simple step-by-step under Windows…


  1. Download Python from here. Run installer after download and let it save to default c:\Python27
  2. Download ffmpeg from here. You’ll have something like ffmpeg-20150204-git-77f326d-win64-static.7z. Unzip to a folder, then go into folder and find the folder that has ‘bin’, ‘doc’, ‘licenses’ and other items. Rename this folder from something like ffmpeg-20150204-git-77f326d-win64-static to just ffmpeg
  3. Move the ffmpeg folder into c:\Python27 folder
  4. Now grab the latest tablo2go.py file from here. As of this writing, it’s tablo2go-2.0.56.py. Rename downloaded file to just tablo2go.py and also move it into c:\Python27 folder
  5. Now you’re ready to download shows off your Tablo. Open Windows Command Prompt… click Start > Run and type cmd.
  6. Type cd c:\, then cd python27, then python tablo2go.py -list
  7. After a little bit, you’ll see a list of your recorded shows, with episode # before each
  8. To download a specific show, type something like python tablo2go.py EP012513470137
  9. That’s it. You’ll end up with that show/episode as a mpeg4 .ts file in the c:\Python27 folder

Hope that helps.

Amateur here… and I know this is not a Python forum but just in case someone happens to know why the below would not work?  I want to change the variable ‘filename’ part “22 Minutes’ to 'This Hour Has 22 Minutes” thinking it would be easy so that Plex stops thinking it is “40 Minutes” documentary show.



    if (‘22 Minutes’ in filename):
        filename.replace(‘22 Minutes’, ‘This Hour Has 22 Minutes’)
        debug('Changing name to '+filename, ipaddr)

Fixed…I’ll go back to my day job now : )

if (‘22 Minutes’ in filename):
        filename = filename.replace(‘22 Minutes’, ‘This Hour Has 22 Minutes’)
        debug('Changing name to '+filename, ipaddr)

Finally had time to fire up your script @jskenney Works great! Thank you for sharing. Have you received a job offer from the @TabloTV yet?  :)) 

Great update. tried the GUI and the python script and the script is awesome.

One question is seem really slow. Any way to speed it up? Machine is pretty idle. I'm not sure if it's doing a bunch in the background or what. Just wondering.

Great app though.

Spoke too soon. I recieve the below error when converting a TV show

[Feb 08 15:43:05 2015] [192.168.12.56] - Converting video to .mp4
[Feb 08 15:43:05 2015] [192.168.12.56] - Creating mp4 file
Traceback (most recent call last):
  File "C:\\Python27\\tablo2go-2.0.56.py", line 1051, in
    filename = get_video(ipaddr, show_id, tmsid, rDict(OPTIONS, ['ffmpeg.exe'],
'ffmpeg')[0], OPTIONS, FLAGS, show_proc)
  File "C:\\Python27\\tablo2go-2.0.56.py", line 871, in get_video
    subprocess.call(cmd)
  File "C:\\Python27\\lib\\subprocess.py", line 522, in call
    return Popen(*popenargs, **kwargs).wait()
  File "C:\\Python27\\lib\\subprocess.py", line 710, in __init__
    errread, errwrite)
  File "C:\\Python27\\lib\\subprocess.py", line 958, in _execute_child
    startupinfo)
WindowsError: [Error 2] The system cannot find the file specified

@brian0


It looks like you may have an incorrect path to the ffmpeg.exe file in your script

Download speeds depend heavily on your home network speeds.  Here are some of my speeds …

HD-30 minute show 3min
HD-1 hour show 5min
HD-3 hour 45 min show 32min  (live basketball game with 1hour extended)

I noticed there is a slow download when saving directly to my NAS, so I download and save the file directly to my mac, then the file is moved to my NAS.  Those times are based on the download of the file, extracting CC, creating mp4 file.

My tablo 4 turner is wireless in another room.  My mac and NAS are connected directly to my router in another room via ethernet.

@BoomerTheWeim

I’m trying to post process the tablo2go with mcebuddy.  i’m having some issues with the metadata being way off (season # results in 56 when it should be 3 for example, similar issues with episode #'s) and i’m not sure if its because of the way tablo2go names when the mce option is selected, if its because I’m using the mutagen option, or if my problem lies in the mcebuddy process.  I noticed you made changes to the 33 version.  I"m using the 56 version of tablo2go.  Did you have a similar problem?  Also, what’s better to input to mce? .TS or MP4?

@dean5417

     <div class="Meta CommentMeta CommentInfo">&nbsp; <span class="MItem DateCreated"></span><br></div>I just save it from Tablo as @ .ts file.&nbsp; When it grabs the file from tablo it saves it as 'show_originalairdate'.&nbsp; Not all shows will be found in the db .&nbsp; Hope this helps<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'tv':&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [False,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '',&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'Process only TV shows'],<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'movies':&nbsp;&nbsp; [False,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '',&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'Process only Movies'],<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'sports':&nbsp;&nbsp; [False,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '',&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'Process only Sports'],<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'tvcreate': [False,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '',&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'Create Show/Season X directories'],<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'tvdir':&nbsp;&nbsp;&nbsp; ["c:/sab/tv",&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'PATH',&nbsp;&nbsp; 'Save TV shows here'],<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'faildir':&nbsp; ["c:/sab/fail",&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'PATH',&nbsp;&nbsp; 'Location to save unknown tv videos'],<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'moviedir': ['./movies',&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'PATH',&nbsp;&nbsp; 'Save movies to this directory'],<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'sportsdir':['./sports',&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'PATH',&nbsp;&nbsp; 'Save sports shows to this directory'],<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'tempdir':&nbsp; ["c:/sab/tempdir",&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'PATH',&nbsp;&nbsp; 'Location of temp directory'],<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'existdir': ["c:/sab/exists",&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'PATH',&nbsp;&nbsp; 'Location to move duplicate files'],<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'ffmpeg':&nbsp;&nbsp; ["c:/ffmpeg/bin/ffmpeg.exe",&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'PATH',&nbsp;&nbsp; 'Path to ffmpeg'],<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'handbrake':['./HandBrakeCLI.exe',&nbsp; 'PATH',&nbsp;&nbsp; 'Path to HandBrakeCLI'],<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'ccextract':['./ccextractorwin.exe','PATH',&nbsp;&nbsp; 'Path to ccextractor'],<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'cc':&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [False,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '',&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'Embed Closed Captioning into file'],<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'noescape': [True,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '',&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'Forbid the \\\\ character in paths'],<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'mce':&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [True,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '',&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'Save TV shows in MCEBuddy format'],<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'mp4':&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [False,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '',&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'Use .mp4 (requires ffmpeg)'],<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'mp4tag':&nbsp;&nbsp; [False,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '',&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'Tag with metadata (requires mutagen)'],<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'mkv':&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [False,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '',&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'Use .mkv (requires HandBrakeCLI)'],&nbsp;&nbsp; <br>

@BoomerTheWeim

Thanks.  Mine appear to save with ‘show_originalairdate’ also as I select mce: true, but I’m still getting bogus season # and episode # at output of mcebuddy.  I’ll try turning off mp4tag to see if that makes a difference.  

Can you share why you use .TS?  I’m curious whether I would get better quality or efficiency by doing the same.  On a 720p file from tablo2go as mp4 that was subsequently sent through mcebuddy as mp4 unprocessed, I noticed a sort of water coloring effect of the scene background in low light conditions (campfire, streetlights) where this light fades to black.  Regardless, I’d like to know the benefits of coming in with the .TS file.  Thanks.

@dean5417
Did you set mp4 and mp4tag to False?  No real reason why I save it as a .ts.  The shows that I pull off are for my wife and she’s ok with the quality, so if she is ok, so am I.

@hdmkv or anyone who can help.


I followed your instructions, but I tried using the cmd.exe prompts and its not working for me. 

I need help…

Traceback (most recent call last):
  File "tablo2go.py", line 160, in
    import os,sys,string,time,urllib,re,subprocess,urllib2,shutil
ImportError: No module named 'urllib2'
brian0 and others, as I just figured this out, here's a simple step-by-step under Windows...

  1. Download Python from here. Run installer after download and let it save to default c:\\Python27
  2. Download ffmpeg from here. You'll have something like ffmpeg-20150204-git-77f326d-win64-static.7z. Unzip to a folder, then go into folder and find the folder that has 'bin', 'doc', 'licenses' and other items. Rename this folder from something like ffmpeg-20150204-git-77f326d-win64-static to just ffmpeg
  3. Move the ffmpeg folder into c:\\Python27 folder
  4. Now grab the latest tablo2go.py file from here. As of this writing, it's tablo2go-2.0.56.py. Rename downloaded file to just tablo2go.py and also move it into c:\\Python27 folder
  5. Now you're ready to download shows off your Tablo. Open Windows Command Prompt... click Start > Run and type cmd.
  6. Type cd c:\\, then cd python27, then python tablo2go.py -list
  7. After a little bit, you'll see a list of your recorded shows, with episode # before each
  8. To download a specific show, type something like python tablo2go.py EP012513470137
  9. That's it. You'll end up with that show/episode as a mpeg4 .ts file in the c:\\Python27 folder

Hope that helps.

I tried this and I’m getting nowhere… What am I doing wrong?