Capto for Tablo (CLI Grabber)

Capto is a cli program for exporting your recordings from the Tablo.
This app is compiled perl.

All information including downloads can be found on the website:

http://www.twg.org/capto/

Current Version: 0.4
There is a version for Linux (64bit), Linux (32bit) and macOS.
Only MP4 is supported at this time.

I am also working on a GUI version for MacOS but that is still quite a ways out.

Please report bugs, let me know what you think and keep in mind this is very beta.

2 Likes

Iā€™m guessing UI release by Tuesday is out. :wink: Thatā€™s when I would get into the Beta testing. Iā€™m a little Terminal challenged. But really nice to see your efforts in this regard.

Keep up the work.

I ran this 1 time, but forgot, and closed my laptop lid, sending it to sleep.
When I resumed, the program seemed to stall, so I shut down that command window.
When I try running it again, I get :

Not an ARRAY reference at script/capto.pl line 104.

Also, I see that it stuffs files into /tmp. Is there a way to change this ?
Thanks, Kurt

Do you have any series recorded or just sports and or movies?

I have figured out a way to eliminate tmp files all together. will be in next version.

Also you can try clearing your cache:

rm ~/.capto.db

And rerunning the update:

./capto -u

Sorry - I think my Tablo was down - other apps couldnā€™t see it either. I rebooted it, and it seems OK now, but itā€™s still churningā€¦

1 Like

That error you reported would definitely had been caused by your Tablo being down. I added some reporting there to say that in the future.

Version 0.2 is now available.

Changelog:

  • removed the need for tmp files
  • added a settings file for future use
  • delete for movies and sports now work
  • bit better error reporting if cant receive data from tablo
  • added -ffmpeg switch to specify an alternative path for ffmpeg

Youā€™ll need to set your Tablo ip again: ./capto -ip address

@tgwaste - Iā€™ll pin this to the top so folks can easily see/access it.

1 Like

updated to v0.3

Changelog:

  • fixed encoding problem where we dont know the recordings duration
  • added error reporting for weak signal

Hey @tgwaste, seriously slick tool, thanks. Question for you on a Mac OS install: I originally went through the install process in my downloads folder, now that Iā€™ve moved Capto to itā€™s final home on my hard drive I can still interact via the CLI but every time I do an export command (every variation of ./capto -e *) it generates a full set of export data but instantly closes out with 0 of 0% completed.

I tried to update the location of ffmpeg via ./capto -ffmpeg ~/Dropbox/Project\ Name/Media/Tablo/ffmeg but I donā€™t get any sort of confirmation. I reconfirm the IP and that does show a conf. I think the issue is that I donā€™t know how to properly update the ffmpeg location, but something else might be screwing up the export. I moved capto/ffmpeg back to the originally-named download folder (capto.v0.3.macos) and the export process worked perfectly again.

Anyway, Iā€™ve got a couple beers coming your way regardless, but some help would be appreciated.

My last edit was wrongā€¦ You have to specify a diff path every time. You should really keep ffmpeg and capto in the same place.

however this may work:

./capto -ffmpeg ā€œ/Users/YOU/Dropbox/Project Name/Media/Tablo/ffmegā€ -e ID -f -

I do have capto/ffmpeg in the same folder: tested in the original download folder and export worked, moved the download folder and renamed to ā€˜Captoā€™, then tried a new batch of exports, no longer ran successfully.

I could go through the install process again in the new location, otherwise Iā€™ll test specifying the ffmpeg location.

Really, really, well done. Love how you have a plex naming option.

A few questions:

  • Do you plan on open sourcing this?
  • If not, would you consider providing builds for different architectures, such as 32bit Intel or ARM?

Iā€™ve got an old Pentium 4 in my network closet thatā€™s running Plex on Ubuntu, and Iā€™d rather download on that machine. Eventually I may replace it with a Raspberry Pi.

Thanks, keep up the good work.

I am not able to open source the project. I signed an NDA with Tablo agreeing to not release source that exposes the API elements. I realize there are others who may be doing this but I am unsure of their situation. My guess is they figured out the API without signing an NDA. Not sure why Tablo is allowing the distribution on their forums. I could be wrong though

I have updated to version 0.4 which includes a version for 32bit linux. You will have to test this. I do not plan on doing a Raspberry Pi release at the moment as I would have to dig mine out of a box in storage to even start.

This version also changes the behavior of the -ffmpeg switch. Now that switch is used to designate a custom path to ffmpeg once and store that setting so you donā€™t need to do it everytime. This is for @atllta.

Completely understand.

Done! It works great. Thank you so much.

Thank you @tgwaste for making that feature edit!

Unfortunately, Iā€™m still finding a way to screw things up. I downloaded capto 0.4, unzipped into ~/Dropbox/RevProj/Capto/, then updated the IP and set the new ffmpeg location. Iā€™m able to update the listings, see episode info, etc., but when I run an export it instantly finishes with 0% complete.

Question, should the ffmpeg path be specified as the folder or the direct path when run in terminal? E.g., /Dropbox/RevProj/Capto/ or /Dropbox/RevProj/Capto/ffmpeg?

After a couple of ffmpeg attempts, I deleted everything and ran through the install process fresh, still no luck. Lastly, tested in my original install location /Downloads/ and the export works perfectly. So, not sure what I can do to get Capto away from my original download & test location.

Definitely hit a dead end, thought the ffmpeg adjustment was the trick.

It should be the full path to ffmpeg. Try the literal path, donā€™t use ~.

Thanks for this tool! Just started using Capto to transfer stuff over into my Plex Media Server folders, and for the most part itā€™s working great although thereā€™s one small glitch Iā€™ve run into with episodes names that have an apostrophe in them. If I issue ā€œ-f plexā€ of course it tries to use the episode name in the file name, and if thereā€™s an apostrophe in the episode name, the script will die with an error like the following:

sh: -c: line 0: unexpected EOF while looking for matching `''
sh: -c: line 1: syntax error: unexpected end of file

Which of course makes perfect sense, since the apostrophe isnā€™t escaped properly, the shell script is going to expect there to be a terminating apostrophe surround the string.

Of course it works fine if I manually specify a file name, but that defeats the purpose of having Capto automatically name the files for me :slight_smile:

Same here:

~/capto/capto.v0.4.linux$ ./capto -e 1035648 -f plex
[capto] datetime => Sun Nov 26 07:00:00 2017
[capto] duration => 2114
[capto] epid => 1035648
[capto] episode => 04
[capto] epoch => 1511701200
[capto] eptitle => Tunnels, Beakmania & Trains
[capto] recid => 914411
[capto] season => 02
[capto] series => Beakmanā€™s World
[capto] title => Beakmanā€™s World - s02e04 - Tunnels, Beakmania & Trains
[capto] type => series
[capto] watchid => 1035648
[capto]
[capto] [Control-C to Abort]
[capto]
[capto] Beakmanā€™s World - s02e04 - Tunnels, Beakmania & Trains.mp4
sh: 1: Syntax error: Unterminated quoted string
[capto]
[capto] Export Completed in: 0h 0m 1s

Itā€™s just not handling the single quote and interpreting it instead. I would imagine it simply needs to sanitize it with an escape.