SurLaTablo.py - Python program to query and convert Tablo recordings

I tried script 0.7 today and it worked great, saw you updated to 0.8 and tried out the commercial skip feature.  Now the audio on any show I process with the script is out of sync.  Is it just me?

Actually, only on Roku..... on PC it is fine.  Weird.


-- Hobbystuff

Out of sync only with commercial skip, or regardless?

Ok, I should probably explain a bit more thoroughly.  I use Plex media server, and a Plex channel on my Roku.

If I don't use the commercial skip flag, I can watch the video at full 1080p on the Roku with no audio sync issues.  If I DO use the commercial skip flag, I can't use the same setting, I have to reduce the video to 720P on the Roku - and then it works fine.

On a PC client, I can do the full 1080P with no audio problems.

-- Hobbystuff

Commercial skip on the file I tried didn’t work at all. I tried it on the latest blackish episode. Nashville comes on after the show. When the svript processed the show Nashville was on at the beginning of the file for a few minutes and then blackish was on. But only for about half of the show & the audio was out of sync,


I reran the script with out the -z flag & the show was all there & the audio was in perfect sync. Of course the beginning of Nashville was at the end like it was supposed to.

On a positive note I was able to specify where I wanted the temp folder to be for the ts files in the conf file. It worked great. Am happy now as I can get the temp directory off of my ssd.

Phil

Thanks folks, I will take a look… (keep posting though)…

@cjcox - just by way of encouragement - this is awesome, thanks for your hard work.

I have a FreeNAS server running Plex, your script is configured to once a day to pull items off the Tablo and put them on the Plex server automatically.  It works like magic and I look forward to when commercial "delete" gets working.

Thanks.

-- Gosmitty

Minor delays… my primary workstation HD died… it’s just an inconvenience while I work on recovery…  might be another day or two before I can troubleshoot this more.

No problem. Take your time and take care of your HD. We appreciate your work on this script…


Phil

Have not been able to duplicate the problem so far.  I usually record in 720p mode though (the normal one).  I’ve been recording in 1080p just to see… but so far everything has converted fine.

(by problem I mean the audio sync problem… as I mentioned, commercial detection is a black art, it’s a guessing game)

Later in the evening yesterday, I did notice some things.  Audio can go briefly out of sync where the stitch points happen, but it seems to come back into sync. This can happen at either HD resolution.  But it’s definitely more pronounced with 1080p.  Also, where I noticed things out of sync between commercials, there were usually corresponding issues in the original .ts (that is, what was captured).  My professional opinion is that even when signal is excellent, the 1080p capture of the Tablo is a bit marginal.  I would go with Tablo’s recommended 720p captures.

For those that think they will be missing anything, you really need to compare the two.  The 1080p is not the original mpeg-ts, so it’s quality is not perfect and IMHO, you won’t notice anything at 720p visually and you’ll get  better performance and “less out of sync” at 720p. The word “recommended” used by Tablo is warranted.

I’ll keep looking at this, but not sure if there’s much I can do on my end.  I can’t fix the glitches that are present in the captured data, and it’s hard to correct the problems at the stitch points (though I do have some things to try).

Hmm… more on this issue.  So… playback of all my test work near perfectly directly through mplayer on my computer.  However, through plex to Roku… not so much.  As others have mentioned the sound is way off… so at least now I know I can replicate the problem.  Likely means tweaking my Mp4 options (for all).

Hmm. Interesting. I wonder if Media Browser would have the same issue as Plex? (Do you have any other media servers installed already to compare against?)


Anyway, thanks for keeping us updated.

Not sure if it’s plex… I mean, we’re talking Direct Play… so could be more of a bitrate thing and Roku.

Actually Plex fixes the problem.  If you transcode via Plex, it works well.   Bitrate, bitrate, bitrate…

I'm getting this error when the script runs, any thoughts??


Traceback (most recent call last):
  File "surlatablo.py", line 2570, in
    doConvert(sl, options, basedirs, filename_pats, transcoder_names)
  File "surlatablo.py", line 1310, in doConvert
    if (os.path.isfile(fq_filename + fext)):
  File "/usr/local/lib/python2.7/genericpath.py", line 29, in isfile
    st = os.stat(path)
UnicodeEncodeError: 'ascii' codec can't encode character u'\\u2014' in position 77: ordinal not in range(128)

@Gosmitty, could you post just a query using query output -Q ‘${friendly_title}’ here.

@cjcox, I located the troublesome show.  On the Tablo it has a '-' character in the name, and when I pull down meta data it looks like this....

 "scheduleDuration": 9000.0,
                "seasonNumber": 0,
                "title": "A Very Bloody Affair \\u2014 1862; Forever Free \\u2014 1862",
                "type": "recEpisode",
                "user": {
                    "position": 0.0,
                    "protected": false,
                    "type": "recordingUserInfo",
                    "watched": false

The '-' becomes \\u2014 in the title and the script borks.

Ok… it’s a long hyphen rather than dash… I’ll look into this.  I was really hoping I had identified all of the issues.  Python via black magic is supposed to do “right” things with “files” and thus I try to leave them unicode (otherwise you confuse Windows since it’s pretty clueless about utf-8).  I’ll do some testing.  Thanks!!

I found a show that I tried to use the script on that made it puke… I got the temp file ok but the ffmpeg part failed. The title of the episode was Masterchef: 


Junior Edition: The Crème de la Crème … Brulee

I figure the accents above the e’s are the culprit. But I am just guessing here.

Phil