Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
TV Tubes Talkin’ ‘bout my automation… (Complete with crappy PowerPoint theme) Neil Crosby
The Problem <ul><li>You:  </li></ul><ul><li>Like watching TV Shows. </li></ul><ul><li>Can’t watch when they’re on TV norma...
The Solution <ul><li>Timeshift by downloading episodes. </li></ul><ul><li>Put episodes into iTunes. </li></ul><ul><li>Sync...
What You Need <ul><li>A Mac </li></ul><ul><li>TVShows.app </li></ul><ul><li>BitTorrent Client </li></ul><ul><li>VisualHub ...
TVShows .app <ul><li>Lets you download new episodes of shows whenever they appear, automatically. </li></ul><ul><li>Whenev...
BitTorrent <ul><li>Any client will do, as long as fully downloaded items are able to be moved to a “downloaded” folder aut...
The First FolderAction <ul><li>Invoked  when files appear in “downloaded” folder. </li></ul><ul><li>Starts VisualHub using...
VisualHub <ul><li>Costs $23.32 </li></ul><ul><li>Uses ffmpeg for encoding. </li></ul><ul><li>So, it could (and should) be ...
ffmpeg commandline ffmpeg -y -threads 4  -i some.show.03x05.some.episode.name.avi  -s 640x480 -r 29.98  -vcodec h264  -g 3...
VisualHub <ul><li>Costs $23.32 </li></ul><ul><li>Uses ffmpeg for encoding. </li></ul><ul><li>So, it could (and should) be ...
The Second FolderAction <ul><li>Invoked when files appear in “encoded” folder. </li></ul><ul><li>Adds files to iTunes </li...
The Perl  if (/^(.*)[s.-]+s?([0-9][0-9]?)[ex]?([0-9][0-9])/i) { $show=$1; $season=$2; $episode=$3; $show=~s/s*-s*$//;  // ...
The Second FolderAction <ul><li>Invoked when files appear in “encoded” folder. </li></ul><ul><li>Adds files to iTunes </li...
iTunes <ul><li>Does any syncing that you’ve told it to do with your TV Shows! </li></ul><ul><li>You get to watch the shows...
The Overall Process
But wait, there’s more!
Current Gotchas <ul><li>Deletion process still to be written. </li></ul><ul><li>VisualHub can’t cope with videos inside fo...
Write-up / Instructions <ul><li>Full instructions for setting up your own “TV Tubes” process will be available at  working...
Upcoming SlideShare
Loading in …5
×

TV Tubes - Talkin' 'bout my automation...

2,194 views

Published on

  • Be the first to comment

  • Be the first to like this

TV Tubes - Talkin' 'bout my automation...

  1. 1. TV Tubes Talkin’ ‘bout my automation… (Complete with crappy PowerPoint theme) Neil Crosby
  2. 2. The Problem <ul><li>You: </li></ul><ul><li>Like watching TV Shows. </li></ul><ul><li>Can’t watch when they’re on TV normally. </li></ul><ul><li>Don’t have a VCR. </li></ul>
  3. 3. The Solution <ul><li>Timeshift by downloading episodes. </li></ul><ul><li>Put episodes into iTunes. </li></ul><ul><li>Sync to iPod, iPhone,  TV etc. </li></ul><ul><li>Delete them once they’ve been watched. </li></ul><ul><li>But, do this completely automatically. </li></ul>
  4. 4. What You Need <ul><li>A Mac </li></ul><ul><li>TVShows.app </li></ul><ul><li>BitTorrent Client </li></ul><ul><li>VisualHub </li></ul><ul><li>iTunes </li></ul><ul><li>Two FolderActions </li></ul><ul><li>One Standalone AppleScript </li></ul><ul><li>A Small Aubergine </li></ul>
  5. 5. TVShows .app <ul><li>Lets you download new episodes of shows whenever they appear, automatically. </li></ul><ul><li>Whenever new episodes appear, they get downloaded by your favourite BitTorrent client. </li></ul><ul><li>It’s a kind of magic </li></ul>
  6. 6. BitTorrent <ul><li>Any client will do, as long as fully downloaded items are able to be moved to a “downloaded” folder automatically. </li></ul><ul><li>Azureus does this quite happily. </li></ul>
  7. 7. The First FolderAction <ul><li>Invoked when files appear in “downloaded” folder. </li></ul><ul><li>Starts VisualHub using a config file. </li></ul><ul><li>Pipes files into VisualHub. </li></ul><ul><li>Starts VisualHub re-encoding the files. </li></ul>
  8. 8. VisualHub <ul><li>Costs $23.32 </li></ul><ul><li>Uses ffmpeg for encoding. </li></ul><ul><li>So, it could (and should) be refactored out as an exercise for the reader </li></ul>
  9. 9. ffmpeg commandline ffmpeg -y -threads 4 -i some.show.03x05.some.episode.name.avi -s 640x480 -r 29.98 -vcodec h264 -g 300 -aspect 640:480 -qmin 27 -b 900 -level 30 -loop 1 -sc_threshold 40 -partp4x4 1 -rc_eq 'blurCplx^(1-qComp)' -refs 2 -qmax 51 -maxrate 1400 -async 50 -acodec aac -ar 44100 -ac 2 -ab 128 some.show.03x05.some.episode.name.mp4
  10. 10. VisualHub <ul><li>Costs $23.32 </li></ul><ul><li>Uses ffmpeg for encoding. </li></ul><ul><li>So, it could (and should) be refactored out as an exercise for the reader </li></ul><ul><li>Set up to save re-encoded to episodes to “encoded” folder. </li></ul>
  11. 11. The Second FolderAction <ul><li>Invoked when files appear in “encoded” folder. </li></ul><ul><li>Adds files to iTunes </li></ul><ul><li>Works out Show Name, Season Number and Episode Number (Perl) </li></ul>
  12. 12. The Perl if (/^(.*)[s.-]+s?([0-9][0-9]?)[ex]?([0-9][0-9])/i) { $show=$1; $season=$2; $episode=$3; $show=~s/s*-s*$//; // Remove dash from end of show name $show=~s/./ /g; // Convert dots to spaces $show=~s/((^w)|(sw))/U$1/g; // Capitalise each word print &quot;$show $season $episode &quot;; } Show Season Episode
  13. 13. The Second FolderAction <ul><li>Invoked when files appear in “encoded” folder. </li></ul><ul><li>Adds files to iTunes </li></ul><ul><li>Works out Show Name, Season Number and Episode Number (Perl) </li></ul><ul><li>Sets info in iTunes </li></ul>
  14. 14. iTunes <ul><li>Does any syncing that you’ve told it to do with your TV Shows! </li></ul><ul><li>You get to watch the shows you want without having to be around when they’re on TV. </li></ul><ul><li>Awesome. </li></ul>
  15. 15. The Overall Process
  16. 16. But wait, there’s more!
  17. 17. Current Gotchas <ul><li>Deletion process still to be written. </li></ul><ul><li>VisualHub can’t cope with videos inside folders. </li></ul><ul><li>VisualHub doesn’t like things to be added to its “to encode” list - shows get encoded twice. </li></ul>
  18. 18. Write-up / Instructions <ul><li>Full instructions for setting up your own “TV Tubes” process will be available at workingwith .me. uk very soon. </li></ul>

×