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

@rmm805 - Follow these steps:

1. Download the following file (Equivalent to clicking on the first download link and going through)
http://ffmpegmac.net/resources/SnowLeopard_Lion_Mountain_Lion_Mavericks_Yosemite_17.12.2014.zip
2. After it downloads, double click on it to extract the files.
3. It will probably create a directory, if so go into it
4. Copy the ffmpeg file to the same location as the tablo script
5. use -ffmpeg:./ffmpeg as the command line switch

This is the binary I use.

@jskenney I was able to do that but now I get this:


[Dec 28 08:24:39 2014] [10.0.1.24] - Converting video to .mp4

Traceback (most recent call last):

  File "/Volumes/HDD/Tablo/tablo2go-2.0b33.py", line 849, in

    filename = get_video(ipaddr, show_id, tmsid, rDict(OPTIONS, ['ffmpeg.exe'], 'ffmpeg')[0], OPTIONS, FLAGS, show_proc)

  File "/Volumes/HDD/Tablo/tablo2go-2.0b33.py", line 699, in get_video

    subprocess.call(cmd)

  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 522, in call

    return Popen(*popenargs, **kwargs).wait()

  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 710, in __init__

    errread, errwrite)

  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1335, in _execute_child

    raise child_exception

OSError: [Errno 2] No such file or directory

@rmm805 the file should not have a .exe extension, did you use the --ffmpeg:./ffmpeg as the path when you ran the script?

@jskenney I forgot to put the full path.  I ran this and it converted to mp4, however, it wasn’t able to move the file:


Python /Volumes/HDD/Tablo/tablo2go-2.0b33.py -tvdir:/Volumes/HDD/Tablo -ffmpeg:/Volumes/HDD/Tablo/ffmpeg -TempDir:/Volumes/HDD/Tablo/Temp

[Dec 28 08:43:36 2014] - Starting TabloToGo Version 2.0b33

[Dec 28 08:43:37 2014] - Loading download history

[Dec 28 08:43:37 2014] - 0 shows and movies have already been downloaded

[Dec 28 08:43:37 2014] [10.0.1.24] - Found Tablo named Tablo

[Dec 28 08:43:37 2014] [10.0.1.24] - Loading meta-data for 1 recordings

[Dec 28 08:43:37 2014] [10.0.1.24] - 1 new TV shows and 0 new movies

[Dec 28 08:43:37 2014] [10.0.1.24] - 1 matching videos have been queued

[Dec 28 08:43:37 2014] [10.0.1.24] - Downloading "Anger Management - S02E41 - Charlie and Sean and the Battle of the Exes"

[Dec 28 08:43:37 2014] [10.0.1.24] - Video has 199 segments

[Dec 28 08:43:37 2014] [10.0.1.24] - Converting video to .mp4

[Dec 28 08:43:52 2014] [10.0.1.24] - Deleteing old .ts file

[Dec 28 08:43:52 2014] [10.0.1.24] - Moving to "/Volumes/HDD/Tablo/Anger Management/Season 2"

[Dec 28 08:43:52 2014] - Unable to move file, keeping it in tempdir

[Dec 28 08:43:53 2014] [10.0.1.24] - Marking EP015084700060 as processed


Any idea why that would be?



@jskenny

I opened it from idle with no flags I get this.

[Dec 28 10:03:26 2014] - Starting TabloToGo Version 2.0b33
[Dec 28 10:03:27 2014] - Loading download history
[Dec 28 10:03:27 2014] - 0 shows and movies have already been downloaded
[Dec 28 10:03:46 2014] [192.168.0.107] - Found Tablo named Tablo
[Dec 28 10:03:46 2014] [192.168.0.107] - Loading meta-data for 924 recordings
[Dec 28 10:03:46 2014] - http://192.168.0.107:18080/pvr/115449/meta.txt
[Dec 28 10:03:55 2014] - http://192.168.0.107:18080/pvr/113988/meta.txt
[Dec 28 10:04:05 2014] - http://192.168.0.107:18080/pvr/113869/meta.txt
[Dec 28 10:04:16 2014] - http://192.168.0.107:18080/pvr/113738/meta.txt
[Dec 28 10:04:27 2014] - http://192.168.0.107:18080/pvr/113422/meta.txt
[Dec 28 10:04:38 2014] - http://192.168.0.107:18080/pvr/113420/meta.txt
[Dec 28 10:04:47 2014] - http://192.168.0.107:18080/pvr/113419/meta.txt
[Dec 28 10:04:58 2014] - http://192.168.0.107:18080/pvr/113417/meta.txt
[Dec 28 10:05:07 2014] - http://192.168.0.107:18080/pvr/113309/meta.txt
[Dec 28 10:05:16 2014] - http://192.168.0.107:18080/pvr/113242/meta.txt
[Dec 28 10:05:27 2014] - http://192.168.0.107:18080/pvr/113121/meta.txt
[Dec 28 10:05:36 2014] - http://192.168.0.107:18080/pvr/112997/meta.txt
[Dec 28 10:05:46 2014] - http://192.168.0.107:18080/pvr/112812/meta.txt
[Dec 28 10:05:55 2014] - http://192.168.0.107:18080/pvr/112413/meta.txt
[Dec 28 10:06:06 2014] - http://192.168.0.107:18080/pvr/112412/meta.txt
[Dec 28 10:06:15 2014] - http://192.168.0.107:18080/pvr/112277/meta.txt
[Dec 28 10:06:25 2014] - http://192.168.0.107:18080/pvr/112275/meta.txt
[Dec 28 10:06:35 2014] - http://192.168.0.107:18080/pvr/112273/meta.txt
[Dec 28 10:06:44 2014] - http://192.168.0.107:18080/pvr/112271/meta.txt
[Dec 28 10:06:54 2014] - http://192.168.0.107:18080/pvr/112269/meta.txt
[Dec 28 10:07:03 2014] - http://192.168.0.107:18080/pvr/112209/meta.txt
[Dec 28 10:07:14 2014] - http://192.168.0.107:18080/pvr/112207/meta.txt
[Dec 28 10:07:23 2014] - http://192.168.0.107:18080/pvr/112197/meta.txt
[Dec 28 10:07:32 2014] - http://192.168.0.107:18080/pvr/112118/meta.txt
[Dec 28 10:07:42 2014] - http://192.168.0.107:18080/pvr/112116/meta.txt
[Dec 28 10:07:53 2014] - http://192.168.0.107:18080/pvr/112107/meta.txt

It’s still going.


@HarryR - your network must be really slow.  It is taking 10 seconds per show to download…  It will take 9000 seconds to download all of the data in your case which is not usable.


Try rebooting the tablo to see if it was having a bad day, beyond that my next recommendation will be updating your network hardware…  I am testing this on my notebook and on my server, the server is probably twice as fast, but the wireless is still more than usable.

@jskenny So that’s over 6 hours. I can do that. What happens when the listing is complete? Do I save the output into a file for future reference or is there a list located on my machine? I suppose it is only practical to save a few shows at a time at that rate.

I am configuring options for windows and I am confused about the \ and / 

Is this correct so far?

OPTIONS  = {‘tablo’:    [‘auto’,               ‘’, ‘Tablo IP address’],
            ‘tv’:       [False,                ‘’,       ‘Process only TV shows’],
            ‘movies’:   [False,                ‘’,       ‘Process only Movies’],
            ‘tvdir’:    [’./tv’,               ‘“k:/tv shows”’,   ‘Save TV shows here’],
            ‘tvcreate’: [True,                 ‘’,       ‘Create Show/Season X directories’],
            ‘moviedir’: [’./movies’,           ‘k:/movies’,   ‘Save movies to this directory’],
            ‘tempdir’:  [’./’,                 ‘PATH’,   ‘Location of temp directory’],
            ‘faildir’:  [’./fail’,             ‘PATH’,   ‘Location to save unknown files’],
            ‘existdir’: [’./exists’,           ‘PATH’,   ‘Location to move duplicate files’],
            ‘ffmpeg’:   [’./ffmpeg.exe’,       ‘C:/ffmpeg/bin/ffmpeg’,   ‘Path to ffmpeg’],


@HarryR - Version 2 doesn’t remember things between runs (other than what it has already downloaded), if it takes hours just to list text files, I doubt it will be able to download a video file in any reasonable way.  Can you watch videos off of the tablo on your network?


For the paths, just change the first value, the one right after the [

So change the ‘./tv’ to ‘k:/tv shows’ the word PATH needs to stay unchanged (it tells the script what type of variable it is.  So for all of the values just change the first one right after the [

But, again, I don’t know if this will work for you based on the speeds you are seeing.

Thanks jskenney, your script is awesome.


Can you update it to pull sports?  If I do a listing of all the tablo recordings, sports are ignored in the listing and even if I enter a specific video id for a sporting event.

Thanks again

@ jskenny  I am able to watch shows without any problems anywhere on my network, mainly on my windows 7 tower (Intel I7 and 16 GB of ram… I use a wireless Roku 3 and even got Plex to work. I upload large files for work all the time, so I was never aware of my network being slower than most. It may be a connectivity issue. I get some delays occasionally.

Thanks again for all the tips.

@krissy - Can you go to the directory on your tablo and PM me the contents of the meta.txt file


On your tablo go to the ip address like http://192.168.2.180:18080/pvr/100717/meta.txt (just change the ip and 100717 to the sports example) I haven’t recorded any sports items so I didn’t realize they were there own category.

@HarryR - if you can watch video on the computer that your are downloading from, I really don’t know what is causing it to go so slow…  Maybe a windows user can help you, but if it is the same computer I don’t know why it is going at that pace.

@jskenney - Sure thing.  I notice that “subType” and “genres” may be useful.  Thanks again


{“recSportEvent”:{“jsonForClient”:{“description”:“From Pittsburgh.”,“eventTitle”:“P&G Championships: Women’s Final Day”,“airDate”:“2014-08-24T00:00Z”,“scheduleDuration”:7200.0,“qualifiers”:[“live”,“cc”],“video”:{“state”:“finished”,“size”:4941361152,“width”:1280,“height”:720,“duration”:7518.0,“scheduleOffsetStart”:-15.0,“scheduleOffsetEnd”:303.0},“user”:{“watched”:false,“position”:0.0},“relationships”:{“recSportOrganization”:49643,“recChannel”:16652},“type”:“recSportEvent”,“objectID”:49642},“imageJson”:{“images”:[{“type”:“image”,“imageID”:51129,“imageType”:“snapshot”,“imageStyle”:“snapshot”}]},“jsonFromTribune”:{“channels”:[“10.1”],“duration”:120,“endTime”:“2014-08-24T02:00Z”,“program”:{“descriptionLang”:“en”,“entityType”:“Sports”,“eventTitle”:“P&G Championships: Women’s Final Day”,“genres”:[“Gymnastics”],“longDescription”:“From Pittsburgh.”,“rootId”:“10854231”,“seriesId”:“397472”,“shortDescription”:“From Pittsburgh.”,“subType”:“Sports event”,“title”:“Gymnastics”,“titleLang”:“en”,“tmsId”:“EP000076050699”},“qualifiers”:[“CC”,“Stereo”,“Live”,“HDTV”,“DD 5.1”,“New”],“startTime”:“2014-08-24T00:00Z”,“station”:{“callSign”:“WISDT”,“stationId”:“36079”},“stationId”:“36079”}},“recSportOrganization”:{“jsonForClient”:{“title”:“Gymnastics”,“type”:“recSportOrganization”,“objectID”:49643,“relationships”:{“genres”:[45256]}},“jsonFromTribune”:{“tmsId”:“EP000076050699”,“rootId”:“10854231”,“seriesId”:“397472”,“title”:“Gymnastics”,“titleLang”:“en”,“shortDescription”:“From Pittsburgh.”,“longDescription”:“From Pittsburgh.”,“descriptionLang”:“en”,“subType”:“Sports event”,“genres”:[“Gymnastics”],“preferredImage”:{“uri”:“tvbanners/generic/generic_tvbanners_v3.png”},“eventTitle”:“P&G Championships: Women’s Final Day”,“entityType”:“Sports”}}}

@jskenny I might try to hook up everything directly to a router with cables some time, once I get my configurations sorted out. It would only need to be temporary while I download everything. I wonder if anyone else has done this with windows. Are you using linux? I can try booting up in linux.

@HarryR - I have tried this with Linux, Windows, and Mac without the issues you have mentioned (but I am a linux person), which is why I was hoping a windows person could help point you in the right direction regarding troubleshooting.


@Krissy - Thanks, Looks like I need to create a sports type…

@jskenny


So I go away for a little while and wow - can’t believe the way this script has grown!


@jskenney 

Thanks for looking into this and your hard work.

@jskenny

Thanks! It looks like a great program. I’ll have to try it another time.

@krissy can you try b34 which I think will work for sports (I don’t have any recorded to test)

b37 has been posted, adding:

- added sports handling (I think) please test this - I don’t have any sports recorded
- results are now sorted when using -list
- videos will not be marked as completed if their was a failure during download

Please test, if there are things I missed please tell me, the holiday and my time to develop this is quickly coming to an end.  I hope to have a final 2.0 finished in the next few days.  Stability is the most important thing to me.