If you have not already, we suggest setting your Plex username to something else rather than email which is displayed on your posts in forum. You can change the username at https://app.plex.tv/desktop#!/account
Welcome to our forums! Please take a few moments to read through our Community Guidelines (also conveniently linked in the header at the top of each page). There, you'll find guidelines on conduct, tips on getting the help you may be searching for, and more!

# [REL] MythTV plug-in

• Posts: 12Members, Plex Pass Plex Pass

Thanks for this great plugin! But allow me one question: What is 'Whats new days' for in the settings?

Thx

Peter

• Posts: 136Members, Plex Pass Plex Pass

@pmcy

It's a leftover from the plugin that I used as a starting point.

• Posts: 12Members, Plex Pass Plex Pass

So why not remove it then

• Posts: 12Members, Plex Pass Plex Pass

removed

• Posts: 10Members, Plex Pass Plex Pass

So happy to see a channel being developed for MythTV.  Finally I can watch MythTV recordings on my un-jailbroken ATV2.  This plugin works really well with plexconnect.  It is not able to stream recordings in progress unfortunately.

Thanks!

• Posts: 136Members, Plex Pass Plex Pass

@pmcy

Indeed, why not?

@greend139

Well, a problem with streaming in-progress recordings is that Plex needs to know the length of the clip when it starts playing it - meaning that if you start playing a recording 3 minutes after recording started, Plex will stop playback after 3 minutes, thinking that was the end of it.

Is that the issue you're seeing?

• Posts: 68Members, Plex Pass Plex Pass
schaumburg wrote on February 5 2014, 3:20 PM: »

@greend139

Well, a problem with streaming in-progress recordings is that Plex needs to know the length of the clip when it starts playing it - meaning that if you start playing a recording 3 minutes after recording started, Plex will stop playback after 3 minutes, thinking that was the end of it.

Is that the issue you're seeing?

That's the issue I'm seeing with it. Add me to the list of people grateful for this channel, and hopeful that we will see support for LiveTV some day. That's the only thing keeping me using XBMC in addition to Plex

• Posts: 5Members, Plex Pass Plex Pass

Firstly, I'd like to say how awesome this is.  Been looking for something to integrate Plex and MythTV for quite a while now.  Combining this on my server which is running myth and plex and with a Now TV box in the living room I have a pretty cool set up.

Secondly, I wonder if anyone can help me with a problem I'm seeing with audio stream selection on play back.  I have some recordings which have two English Audio tracks, track 1 is the narrative track and track 2 is the one you would normally listen to.  Frustratingly, Plex always picks the first audio track regardless of what I do with its audio track selection options.  I read somewhere that pressing "A" would allow me to switch audio tracks and that Plex would remember my preference but this is not working for me when I play back via the Plex web interface on my server.

Is the myth plugin responsible for selecting the audio stream and is there anything I can do to get it to pick a different one?  I'm not adverse to a little code hacking if pointed in the right direction.

Thanks,

Paul.

• Posts: 1Members, Plex Pass

hi there,

tried this on my ubuntu mythtv box with roku as my front end but couldnt get it to work. does it have something to do with dir ? my mythtv dir is in a different location from default mythtv dir. i noticed that your script has

/video/mythrecordings

as the folder. Do i need to change the dir in the script to get this working ?

Any help would be appreciated.

• Posts: 136Members, Plex Pass Plex Pass
edited February 2014

@kaio123

Welcome onboard - sorry to have kept you waiting.

The mythrecordings plug-in assumes that the Plex server is running on the same machine as your MythTV backend.

If that is not the case, you need to tell the plug-in where to find the MythTV backend: enter the mythrecordings plugin from your Roku, go to the settings and set the IP address (and port number, if your MythTV setup is very customized - otherwise just leave it at the default value)

If this doesn't help, let me know, and we'll do a bit more diagnostics work :-)

/Th

Edit: to answer your specific question: the video/mythrecordings is not a filesystem path so you shouldn't change that

• Posts: 136Members, Plex Pass Plex Pass

Sorry to keep you waiting.

I have no experience with multi-track audio (no multitrack broadcasts where I live), but let's see if I can get you some help anyway. To do that I need you to run the mediainfo program on the recoding, to see how it is structured.

The mythrecordings plug-in plays back the recording by accessing a special URL on the MythTV backend, so to be sure we need to access the recording in the same way

Finding the URL for the recording

In a browser, list the newest 100 recordings made by opening the following URL in a browser (replace BackendServerIP with the IP address of your MythTV backend):

This will give you a very long list of XML data with a lot of program descriptions like this:

...
<Program>
<StartTime>2011-09-12T19:00:00</StartTime>
<EndTime>2011-09-12T20:01:00</EndTime>
<Title>Alphas</Title>
<SubTitle>Blind Spot</SubTitle>
...
<Channel>
<ChanId>34736</ChanId>
...
</Channel>
</Program>
...

From this long list, find a recording that you know contains multiple audio tracks.

To test that it's the recording you think, try streaming it by opening the corresponding URL (insert the start time and channel ID from the list you got earlier):

Running mediainfo

If your browser supports saving the recording as an .mpg file, do that, and then run

mediainfo.exe \path\to\recording.mpg

Then post the output here.

Then I'll see if I can figure something out :-)
• Posts: 28Members, Plex Pass Plex Pass

Just installed the plugin on my Mythbuntu box that I have had Plex running on for the last year. It works like a charm. I am glad to see this as I was using a MythTV app on my samsung that is not being developed anymore and it is impossible to find the code for it anymore. Luckily I downloaded the code and can load it on my sammy myself, but with this plugin for Plex I won't have to worry about the Samsung MythTV app.

My only question/wish is the ability to stop a recording and then come back to it later and start where I left off. I know that this might be difficutl with needing a database to track it but I can always wish. If any of you have found a way to do this please reply and let me know so I can make this plugin complete for my needs.

• Posts: 136Members, Plex Pass Plex Pass

@hardverk

Glad to hear that you find the plugin useful!

Wrt. remembering where you got to in a recording: I believe the biggest obstacle is that there's no way for the python code to find out where you got to when you stop playback (the python code tells the Plex client "start playing this URL", and never gets a "the user stopped playback after 38:14" message back.

If you (or anyone else reading this) have any ideas for this, let me know!

• Posts: 5Members, Plex Pass Plex Pass

Thanks for the reply.  I'm not on Windows so I used ffmpeg to dump the recording information and have included it below.

There are two audio streams and the first one is always selected (NAR) which is the narrative version.  What we would normally want to hear is the second one.  I have verified this by playing the file directly in vlc and selecting the two tracks manually.

I think the problem comes down to how the audio track is selected.  Presumably it just selects the first one at the moment?  Perhaps it can get a language region short code or something along those lines from Plex or the underlying OS and search for that?  Forgive me if I'm talking nonsense here.  I haven't the first idea of the Plex API.

Regards,

Paul.

Input #0, mpegts, from '/var/lib/mythtv/store0/13130_20140113223400.mpg':

Duration: 02:08:59.60, start: 10573.443044, bitrate: 11185 kb/s
Program 1
Stream #0:0[0x93a]: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 50 tbr, 90k tbn, 50 tbc
Stream #0:1[0x93c](NAR): Audio: mp2 ([4][0][0][0] / 0x0004), 48000 Hz, stereo, s16p, 192 kb/s
Stream #0:2[0x93d](eng): Subtitle: dvb_teletext ([6][0][0][0] / 0x0006)
Stream #0:3[0xf00]: Unknown: none ([5][0][0][0] / 0x0005)
Stream #0:4[0xf01]: Unknown: none ([5][0][0][0] / 0x0005)
Stream #0:5[0xf02]: Unknown: none ([5][0][0][0] / 0x0005)
Stream #0:6[0xf03]: Unknown: none ([5][0][0][0] / 0x0005)
Stream #0:7[0xf04]: Unknown: none ([5][0][0][0] / 0x0005)
Stream #0:8[0xf05]: Unknown: none ([11][0][0][0] / 0x000B)
Stream #0:9[0xf06]: Unknown: none ([11][0][0][0] / 0x000B)
Stream #0:10[0x93e](eng): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)
Stream #0:11[0x93b](eng): Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, fltp, 384 kb/s

• Posts: 136Members, Plex Pass Plex Pass

Hi Paul,

I will dig into this (and probably ask someone more knowledgeable:-) as soon as RL permits.

/Thomas

PS: I am assuming that the second audio track you're looking for is

Stream #0:11[0x93b](eng): Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, fltp, 384 kb/s

not the highlighted subtitle track

Stream #0:2[0x93d](eng): Subtitle: dvb_teletext ([6][0][0][0] / 0x0006)

• Posts: 5Members, Plex Pass Plex Pass

AH, I think you're right.  I don't know much about video encoding.  When I loaded it in VLC I only saw two streams.  The first was definitely called "NAR" but it defaulted to the second which I believe was labelled "English" I'm not certain of that though and I'm not at home so can't check.

If you want to point me at the rough area of source I could take a look at how the selection is done.  It's in python isn't it?  I'm a bit rusty on that but I've done some in the past.

Regards,

Paul.

• Posts: 136Members, Plex Pass Plex Pass

If you look in MythRecordings.bundle/Contents/Code/__init__.py, line 195, you'll see

	return VideoClipObject(
summary = str(warning) + str(descr),
originally_available_at = airdate,
thumb = thumb,
duration = int(duration),
key = Callback(RecordingInfo, chanId=chanId, startTime=recordingStart),
rating_key= str(int(airdate.strftime('%Y%m%d%H%M'))),
items = [
MediaObject(
parts = [
PartObject(key=testURL, duration=int(duration))
],
duration = int(duration),
container = 'mp2ts',
#video_codec = VideoCodec.H264,
#audio_channels = 2,
optimized_for_streaming = True
)
]


If there's a fix for your issue, it's probably in there (maybe increasing audio_channels will let both audio channels through, so the client has something to choose between? To test, just remove the # in front of audio_channels).

As an alternative (or while you wait), have you considered letting MythTV auto-transcode your recordings in a way that removes the unwanted audio channel? Obviously not elegant, I admit, but if it works...

:-)

• Posts: 18Members, Plex Pass Plex Pass

I noticed that on Plex/Web, under the settings, you can specify a preference for audio track language (under the Server > Language option).  Might be worth checking???

• Posts: 5Members, Plex Pass Plex Pass
djwhyte wrote on March 13 2014, 12:55 PM: »

I noticed that on Plex/Web, under the settings, you can specify a preference for audio track language (under the Server > Language option).  Might be worth checking???

I tried that initially but I believe the problem is because Plex doesn't know about the multiple audio streams. If I try the suggested code fix I think I might then be able to use this setting.

• Posts: 24Members, Plex Pass Plex Pass

As others have said - great plugin.  I've had this installed on a mac server since Jan (myth is also on the mac) and streaming Myth recordings has been working without any problems.

However, I've not been able to get PlexSync working with my iPad or iPhone.  When I first installed the Myth plugin, selecting a recording from myth to sync would kick off the transcoding job on the backend and that would complete.  However, the system didn't them seem to be able to find the generated file to sync it with the iOS device - that would fail, although they file did exist on the server.  There seemed to be some sort of URL or path problem.  Didn't look too deeply into it at the time, and just came back to it to see if I could work out what was going wrong and post here about that problem if it was still there.

Since then though, both the Plex app on iOS and the Plex server on the Mac have been upgraded to a newer version, and now it doesn't get as far as it used to - I have a new problem.  Selecting a Myth recording to sync just gives a 'Unable to sync - There is no UUID available for this library section.' error message. Nothing gets generated in the Plex server log, and no transcoding job is started.  It's appears the app is expecting a UUID to be generated/transferred by the server to the device when you view the program info prior to syncing and the iOS app is not receiving that.

Syncing tv shows and movies from My Library work as expected - it's just the MythTV Recordings where I have an issue.