Capto for Tablo (CLI Grabber)


#42

Downloading of titles that contain single quotes still functions.

I tested a bulk deletion from a generated search list:

jmenke@emily:~/tablodump$ echo $(capto -s TV 2>/dev/null | grep Dinosaur\ Train | awk '{print $4}' | sed s/[\(\)]//g | grep -v input) | sed s/\ /,/g
1338497,1338511,1338505,1338520,1341174,1342787,1344452,1344453,1345930,1351833,1353197,1357648,1362054,1372753,1374301,1376048,1376049,1377614,1377626

It appears to have worked just fine:

jmenke@emily:~/tablodump$  capto -d $(echo $(capto -s TV 2>/dev/null | grep Dinosaur\ Train | awk '{print $4}' | sed s/[\(\)]//g | grep -v input) | sed s/\ /,/g)
[capto] updating database, this may take a while...
[capto] DELETED: Dinosaur Train - s01e26 - Confuciusornis Says; Tiny's Tiny Doll
[capto] DELETED: Dinosaur Train - s03e10 - Tiny's Fishing Friend; Butterflies
[capto] DELETED: Dinosaur Train - s04e02 - Rollin' on the Riverboat: Part One; Rollin' on the Riverboat: Part Two
[capto] DELETED: Dinosaur Train - s01e18 - The Burrowers; Shiny's Sea Shells
[capto] DELETED: Dinosaur Train - s01e04 - I'm a T. Rex!; Ned the Quadruped
[capto] DELETED: Dinosaur Train - s01e30 - New Neighbors; Don's Collection
[capto] DELETED: Dinosaur Train - s01e00 - Hootin' Hadrosaurs!; Hatching Party
[capto] DELETED: Dinosaur Train - s04e10 - What's at the Center of the Earth? Troglobites! Minerals!
[capto] DELETED: Dinosaur Train - s01e11 - Derek the Deinonychus; Don's Dragonfly
[capto] DELETED: Dinosaur Train - s01e27 - Iggy Iguanodon; Shiny Can't Sleep
[capto] DELETED: Dinosaur Train - s01e33 - Buck-Tooth Bucky; Tiny's Tiny Place
[capto] DELETED: Dinosaur Train - s02e20 - The Egg Stealer?; To Grandparents' Nest We Go!
[capto] DELETED: Dinosaur Train - s01e23 - Triassic Turtle; Tank's Baby Brother
[capto] DELETED: Dinosaur Train - s01e29 - Long Claws; Tank's Sleep Over
[capto] DELETED: Dinosaur Train - s04e04 - Stop and Smell the Flowers; Moms' Campout
[capto] DELETED: Dinosaur Train - s01e37 - The Amazing Michelinoceras Brothers; Dad's Day Out
[capto] DELETED: Dinosaur Train - s04e09 - What's at the Center of the Earth? Layers!; What's at the Center of the Earth: Fossils!
[capto] DELETED: Dinosaur Train - s04e05 - Where Have All the Lizards Gone?; Conductor's Sleepover
[capto] DELETED: Dinosaur Train - s02e07 - That's Not a Dinosaur; Tiny's Garden
[capto] [1587624] CACHED: Monster Energy Cup Series: Can-Am 500

Much better, thanks for the feature add!


#43

Updated all versions to 0.6. I was having some issues with the mac one so cant promise that will work. I cant seem to update my original post which sucks.

changelog

v0.6

  • built with Package Unicode support
  • more attempts to fix bad characters crashing the program
  • added version switch (-v)
  • updated ffmpeg for all platforms
  • added link to gnu license for ffmpeg (to keep djk44883’s head from exploding)
  • will auto add .mp4 to files that do not contain it
  • added this changelog to the packages
  • now ignoring and stripping out the following characters: ’ ’ ! “ ? ; : , "
  • can now delete multiple ids before update with: -d id1,id2,id3,etc

#44

Can’t run on Mac OS Mojave:

Manta:capto.v0.6.macos jkeenan$ ./capto -u 192.168.111.25
Can't locate JSON.pm in @INC (you may need to install the JSON module) (@INC contains: CODE(0x7fc1a0da1458) /var/folders/j5/hp16sj9j077g4c8cszk56pv80000gq/T/par-6a6b65656e616e/cache-614779a50441313fe3639a87e1dcffeb89149e6f/inc/lib /var/folders/j5/hp16sj9j077g4c8cszk56pv80000gq/T/par-6a6b65656e616e/cache-614779a50441313fe3639a87e1dcffeb89149e6f/inc CODE(0x7fc1a0c8e5b0) CODE(0x7fc1a0c8eb00)) at script/capto.pl line 7.
BEGIN failed--compilation aborted at script/capto.pl line 7.

All the steps on the linked web page were followed.

Manta:capto.v0.6.macos jkeenan$ sudo cpanm install JSON
Password:
install is up to date. (0.01)
JSON is up to date. (2.97001)

#45

Which I warned about in my previous post. I haven’t been able to find a fix. Apple loves to break their very expensive crap.


#46

capto seems to be working fine, other than actually downloading:

% capto -e 829605 -f out.mp4

[capto] datetime => Sun Nov 25 19:00:00 2018
[capto] duration => 3682
[capto] epid => 829605
[capto] episode => 02
[capto] epoch => 1543190400
[capto] eptitle => Surviving the Holocaust
[capto] recid => 627041
[capto] season => 02
[capto] series => We'll Meet Again
[capto] title => We'll Meet Again - s02e02 - Surviving the Holocaust
[capto] type => series
[capto] watchid => 829605
[capto]
[capto] [Control-C to Abort]
[capto]
[capto] out.mp4
[capto] Progress:  /  (speed ) (size 0.00MB) [0%]
[capto] Export Completed in: 0h 0m 1s

Ubuntu 18.04 (KDE Neon actually), Perl 5.26, ffmpeg 3.4.4, capto versions 0.5 and 0.6, Tablo 2.2.22.

Any ideas?


#47

try another show? same results? try with the included ffmpeg?


#48

OK, tried several shows and with the included ffmpeg. No change.


#49

redownload v0.6 and try again, this time adding: -debug to your syntax.
that should give you the full ffmpeg command its using. try running that whole command to see what happens.


#50

OK, tried that (very helpful).

The included ffmpeg gives an error for missing libva.so.1. I could find no package to supply it. As a hack, I symlinked libva.so.2 to it. That got me to another error:

failed: Connection refused
http://tablo.local:21200/stream/pl.m3u8?A8-h1xwlW-BVFJY25GtA-g: Connection refused

Tried the system ffmpeg also, which gave that same error.

Tried ‘telnet tablo.local 21200’ which also gave connection refused.
(telnet to the default port gave the “Welcome to Slipstream” login)


#51

cant help ya on this. its a system thing. you did an apt-get on ffmpeg ?


#52

connection refused is a tablo problem btw. check firewall and all of that.


#53

I get Unknown option: debug
Of course I don’t know thing about this, I’ve know the port to be 18080. When I use http://[tabloIP]:21200/ I get unable to connect as well
Even so, wouldn’t his URI need to specify episodeID
Just wondering, I don’t have any specs on this… Admitting, I primarily use capto to get show names and use ffmpeg directly to save files. Now I’m also using it to delete them from the tablotv device.


#54

-debug only works on latest 0.6 (latest as in today) for 64bit linux.
we dont know what ffmpeg command hes using. he didnt supply it.


#55

I couldn’t see how this would be firewall related (the connection reaches the tablo and it is refused there), but removed all the iptables rules anyway. No difference.

djk44883 nailed it. It works swell on port 18080. Both with the supplied ffmpeg and with the system ffmpeg (got identical results).

I have no idea which ports the tablo uses and for what, but for now I can write a wrapper to change this.

Thanks tgwaste for all your work and help on this. Thanks djk44883 for the lead.


#56

Your’re killing me dude! How many version 0.6 are there? how can I track them?!?
Could you consider 0.6.1, 0.6.2, 0.6.3 similar? …just a suggestion.

Otherwise, again, your work is greatly appreciated!


#57

@djk44883 in my message I said “redownload v0.6 and try again”

@rebel no idea why there are port issues but the ports for the url stream are supplied by the Tablo. capto doesn’t do anything with ports.


#58

OK… I did, it says I can use -c to get channel data. It actually prints out code with data from /guide/series/XXX and /recordings/series/episodes/XXXX ?
Not http://[tabloIP]:8885/guide/channels[XX]

I don’t mean to be difficult, or give you a hassle.:neutral_face:


#59

Thats part of some new features that I haven’t said a word about.
Dont use that :slight_smile: Its not supported yet.


#60

:see_no_evil: :hear_no_evil: :speak_no_evil:


#61

Interesting. I’m ok with my little wrapper hack:

exec /usr/bin/ffmpeg "${@//:21200/:18080}"

and know where to look, what to tweak if problems recur. Keep it in mind for any similar reports.

Thanks for all your help and for your work on this project.