Personal computing discussed

Moderators: renee, SecretSquirrel, notfred

 
notfred
Maximum Gerbil
Topic Author
Posts: 4610
Joined: Tue Aug 10, 2004 10:10 am
Location: Ottawa, Canada

Ubuntu 16.04 MythTV DLNA

Sun Aug 14, 2016 6:39 pm

I finally upgraded my server to Ubuntu 16.04 after having no problems with my desktops. Unfortunately it seems that the upgrade to MythTV has broken the DLNA server built in to it and hence my smart TV no longer shows the MythTV server.

I've tried debugging and:
1) DLNA / UPnP tools for Linux / Android are horribly broken. VLC on my Android phone locks up, I found a Python UPnP-Inspector and that sits there throwing exceptions.

2) From what I can make out from the wireshark traces, it looks like the TV sends the multicast query and MythTV does a unicast reply. This means that the multicasting looks like it is all working, it could be the TV doesn't like the response from MythTV or the MythTV contains garbage. I know they rewrote the DLNA server top be fully compliant in 0.28 which is what Ubuntu 16.04 contains.

3) My Google-fu is failing me, there are so many threads about getting the older versions of MythTV DLNA up and running and nothing about it being broken in 0.28 that I can find beyond just totally not running. Mine is looking like it is running but the reply is garbage or misunderstood.

Any hints?
 
Glorious
Gerbilus Supremus
Posts: 12343
Joined: Tue Aug 27, 2002 6:35 pm

Re: Ubuntu 16.04 MythTV DLNA

Mon Aug 15, 2016 7:28 am

What model/brand of TV?

That's probably more where the issue resides, as odds are the mythTV 0.28 DLNA or UPNP server isn't so much "broken" as it simply stricter in a way that certain clients cannot handle.
 
notfred
Maximum Gerbil
Topic Author
Posts: 4610
Joined: Tue Aug 10, 2004 10:10 am
Location: Ottawa, Canada

Re: Ubuntu 16.04 MythTV DLNA

Mon Aug 15, 2016 7:47 am

It's an LGE TV that's about 3 years old. That was my thought as well, but I'd like to confirm by actually running a DLNA client on my Ubuntu 16.04 desktop or my Android phone. The problem is that I can't find one that works, do you have any recommendations?
 
cheesyking
Minister of Gerbil Affairs
Posts: 2756
Joined: Sun Jan 25, 2004 7:52 am
Location: That London (or so I'm told)
Contact:

Re: Ubuntu 16.04 MythTV DLNA

Mon Aug 15, 2016 8:28 am

Are you using the right VLC on android? I'm on 2.0.6 at the moment but was stuck on 0.something for ages because I didn't realise they discontinued the first version they released and started doing their new versions under a new app.
Fernando!
Your mother ate my dog!
 
Glorious
Gerbilus Supremus
Posts: 12343
Joined: Tue Aug 27, 2002 6:35 pm

Re: Ubuntu 16.04 MythTV DLNA

Mon Aug 15, 2016 8:30 am

To be honest, I gave up on it completely two years ago. I just got utterly fed up with the weird compatibility/idiopathic problems.

I just use Plex now, and I've always avoided smart TVs as well. Never used any sort of front-end for myth either, I've only ever used it for recording, never for playback.

If you read the myth issue tracker for DLNA, you'll see them pretty much saying that everything else is broken. That is, virtually nothing else supports UPnP/DLNA appropriately(am I'm not just talking smart TVs which are basically written off, I mean open-source efforts like Kodi/VLC!), whereas mythTV claims to.

That's ...not a good sign.

Sorry I don't have anything more useful to add. :(
 
Darthutos
Gerbil First Class
Posts: 173
Joined: Sun Sep 07, 2014 7:39 am

Re: Ubuntu 16.04 MythTV DLNA

Mon Aug 15, 2016 9:05 am

I don't know about MythTV version of Ubuntu. But Have you tried just install something called Tangerine onto regular Ubuntu? You may have to figure out where to put the tangerine.cfg and what to put into it, but it should be straight forward.
 
notfred
Maximum Gerbil
Topic Author
Posts: 4610
Joined: Tue Aug 10, 2004 10:10 am
Location: Ottawa, Canada

Re: Ubuntu 16.04 MythTV DLNA

Mon Aug 15, 2016 11:43 am

minidlna works and shows up on the TV. The problem is that the MythTV recorded shows don't have a nice name, it is based off of channel id and recording time and needs a database lookup to map to the proper name.
 
Glorious
Gerbilus Supremus
Posts: 12343
Joined: Tue Aug 27, 2002 6:35 pm

Re: Ubuntu 16.04 MythTV DLNA

Tue Aug 16, 2016 11:10 am

If you just have a single backend with a single recording location, I could show you a quick script that'll create symlinks with the appropriate information to the recordings in a place you specify.
 
notfred
Maximum Gerbil
Topic Author
Posts: 4610
Joined: Tue Aug 10, 2004 10:10 am
Location: Ottawa, Canada

Re: Ubuntu 16.04 MythTV DLNA

Tue Aug 16, 2016 12:26 pm

Yes please! It's just a single backend server, so if I had something that created a bunch of symlinks in a directory then I could minidlna it.
 
Glorious
Gerbilus Supremus
Posts: 12343
Joined: Tue Aug 27, 2002 6:35 pm

Re: Ubuntu 16.04 MythTV DLNA

Tue Aug 16, 2016 12:53 pm

!/usr/bin/perl
                                                                                                                                           
use warnings;
use strict;
use DBI;
                                                                                                                                           
my $storage_path = '/mnt/hdd/mythtv/'; # Or whatever
my $dlna_path = '/home/user/dlna/'; #Or whatever
                                                                                                                                           
my $dbh = DBI->connect(
        "dbi:mysql:dbname=mythconverg",
        "mythtv",       # Or whatever you installed it as
        "mythtv",     # Or whatever you installed it as
        { RaiseError => 1 },                                                                                                               
) or die $DBI::errstr;
                                                                                                                                           
my $sth = $dbh->prepare("SELECT title, season, episode, originalairdate, basename FROM recorded;");
        $sth->execute();
        while (my @data = $sth->fetchrow_array()) {
                my $title = $data[0];
                my $season = $data[1];
                my $episode = $data[2];
                my $airdate = $data[3];
                my $basename = $data[4];
                symlink("$storage_path$basename","$dlna_path$title-S${season}E${episode}_$airdate");
        }                                                                                                                                   
        $sth->finish();
$dbh->disconnect();
exit();


I appended the originalairdate at the back of the symlink because sometimes schedulesdirect is hilariously wrong about what season/episode a show is. If you don't use them or haven't encountered that problem you can just remove that and use the line:

symlink("$storage_path$basename","$dlna_path$title-S${season}E${episode}");


Also I didn't provide an extension for the symlink, I don't know if that'll cause you trouble with minidlna or not.

I can't remember if you'll need to apt-get install libdbd-mysql-perl or not.
 
notfred
Maximum Gerbil
Topic Author
Posts: 4610
Joined: Tue Aug 10, 2004 10:10 am
Location: Ottawa, Canada

Re: Ubuntu 16.04 MythTV DLNA

Tue Aug 16, 2016 5:01 pm

Eww Perl ;-)
No worries, I'll probably just do that as a shell script or code it up in some C. Many thanks, the SQL was what I was looking for as a pointer.
 
just brew it!
Administrator
Posts: 54500
Joined: Tue Aug 20, 2002 10:51 pm
Location: Somewhere, having a beer

Re: Ubuntu 16.04 MythTV DLNA

Tue Aug 16, 2016 5:05 pm

I have resisted the prodding of fellow devs to learn Perl. I can find my way through Perl code well enough to mod others' existing scripts, but I certainly wouldn't choose it for new development. I'm mostly a C/C++ and Python guy... but will pick up other languages if sufficiently interesting (or advantageous from a career standpoint). Perl has not qualified, so far. :lol:
Nostalgia isn't what it used to be.
 
Glorious
Gerbilus Supremus
Posts: 12343
Joined: Tue Aug 27, 2002 6:35 pm

Re: Ubuntu 16.04 MythTV DLNA

Tue Aug 16, 2016 5:12 pm

Man, if I knew language-snobbery was going to be an issue here I would done it in python. This barely even counts as "using" a language. :P

Shell scripting into the mysql CLI client is even more fiddly and C just seems crazy overkill, but sure.
 
just brew it!
Administrator
Posts: 54500
Joined: Tue Aug 20, 2002 10:51 pm
Location: Somewhere, having a beer

Re: Ubuntu 16.04 MythTV DLNA

Tue Aug 16, 2016 5:23 pm

At least it's not Fortran. :wink:
Nostalgia isn't what it used to be.
 
Captain Ned
Global Moderator
Posts: 28704
Joined: Wed Jan 16, 2002 7:00 pm
Location: Vermont, USA

Re: Ubuntu 16.04 MythTV DLNA

Tue Aug 16, 2016 5:28 pm

just brew it! wrote:
At least it's not Fortran. :wink:

FORTRAN and SQL can co-habitate? Damn, time to whip out my circa-1978 buggy-whip BASIC leet skills. :wink:
What we have today is way too much pluribus and not enough unum.
 
just brew it!
Administrator
Posts: 54500
Joined: Tue Aug 20, 2002 10:51 pm
Location: Somewhere, having a beer

Re: Ubuntu 16.04 MythTV DLNA

Tue Aug 16, 2016 5:31 pm

Captain Ned wrote:
just brew it! wrote:
At least it's not Fortran. :wink:

FORTRAN and SQL can co-habitate? Damn, time to whip out my circa-1978 buggy-whip BASIC leet skills. :wink:

Get with the times. It's been "Fortran" (not "FORTRAN") since the 1990 standard was released. :wink:

I'd be willing to bet there's a (rather tortuous, but workable nonetheless) way to write web applications in Fortran...
Nostalgia isn't what it used to be.
 
Glorious
Gerbilus Supremus
Posts: 12343
Joined: Tue Aug 27, 2002 6:35 pm

Re: Ubuntu 16.04 MythTV DLNA

Tue Aug 16, 2016 5:35 pm

Captain Ned wrote:
FORTRAN and SQL can co-habitate?


I almost took JBI's joke as a request.

DEC Fortran against RDB with SFO and SQLMOD is part of my dayjob.

Next time I'll just use python, good grief.
 
Glorious
Gerbilus Supremus
Posts: 12343
Joined: Tue Aug 27, 2002 6:35 pm

Re: Ubuntu 16.04 MythTV DLNA

Tue Aug 16, 2016 5:37 pm

JBI wrote:
I'd be willing to bet there's a (rather tortuous, but workable nonetheless) way to write web applications in Fortran...


I'm open for wagers if you are ready to lose.
 
just brew it!
Administrator
Posts: 54500
Joined: Tue Aug 20, 2002 10:51 pm
Location: Somewhere, having a beer

Re: Ubuntu 16.04 MythTV DLNA

Tue Aug 16, 2016 5:44 pm

Glorious wrote:
JBI wrote:
I'd be willing to bet there's a (rather tortuous, but workable nonetheless) way to write web applications in Fortran...

I'm open for wagers if you are ready to lose.

Wait, what? You're saying you think it is impossible to write a web application in Fortran? If so, I'm sure I could prove you wrong, but there might be some glue logic written in something else. Or you're claiming it isn't tortuous? I'd believe that (but would be somewhat surprised).
Nostalgia isn't what it used to be.
 
Glorious
Gerbilus Supremus
Posts: 12343
Joined: Tue Aug 27, 2002 6:35 pm

Re: Ubuntu 16.04 MythTV DLNA

Tue Aug 16, 2016 5:53 pm

JBI wrote:
Wait, what? You're saying you think it is impossible to write a web application in Fortran? If so, I'm sure I could prove you wrong, but there might be some glue logic written in something else. Or you're claiming it isn't tortuous? I'd believe that (but would be somewhat surprised).


:oops: :oops: :oops:

I garbled what you were saying so badly I basically inverted it.

You wouldn't have to prove me wrong, because what I was trying to say is that I've already done it. :lol:

OpenVMS, GNV with Apache. CGI Fortran.

Don't ask. I don't want even want to know what I did myself.
 
just brew it!
Administrator
Posts: 54500
Joined: Tue Aug 20, 2002 10:51 pm
Location: Somewhere, having a beer

Re: Ubuntu 16.04 MythTV DLNA

Tue Aug 16, 2016 5:56 pm

Yeah, actually CGI is kind of the universal connector/equalizer. There are a lot of (and I've even written a couple of) simple web apps in shell script. Just don't expect it to scale decently if you've got a high-traffic site! :lol:
Nostalgia isn't what it used to be.

Who is online

Users browsing this forum: No registered users and 1 guest
GZIP: On