Jumpy Plugin (26 October 2016)

For help and support with Universal Media Server
Forum rules
Please make sure you follow the Problem Reporting Guidelines before posting if you want a reply
mrkrabs
Posts: 9
Joined: Tue Nov 27, 2012 5:24 am

Re: Jumpy Plugin (19 Nov 2012)

Post by mrkrabs »

infidel, thank you very much for pointing me into the right direction! I've added needed lines to the config file and its working now! however, i seem to have another problem.

if my stream from XBMC is not a rtmp stream (example : http://95.188.102.231:1234/udp/233.7.70.133:5000) the UMS is behaving weird.

When i try to start streaming this stream to my Philips TV, that's what the pms encoder log says :

Code: Select all

2012-11-28 13:48:43 [INFO|PMSEncoder|launchTranscode|New I/O server worker #1-2]: invoking matcher for: http://95.188.102.231:1234/udp/233.7.70.133:5000
2012-11-28 13:48:44 [INFO|PMSEncoder|launchTranscode|New I/O server worker #1-2]: 0 matches for: http://95.188.102.231:1234/udp/233.7.70.133:5000
2012-11-28 13:48:44 [INFO|ProcessManager|handleTranscode|New I/O server worker #1-2]: transcoder command: [/Applications/Universal Media Server.app/Contents/Resources/Java/osx/ffmpeg, -v, 0, -y, -threads, 2, -i, http://95.188.102.231:1234/udp/233.7.70.133:5000, -threads, 2, -target, ntsc-dvd, /private/var/folders/p1/zkn1q6n53kqbwtkrj4l1mcvm0000gn/T/universalmediaserver/pmsencoder_transcoder_out_1354106923770_121]
and here's the result from UMS debug.log :

Code: Select all

INFO  2012-11-28 13:48:43.766 [New I/O server worker #1-2] Starting transcode/remux of Nat Geo Wild HD RU
DEBUG 2012-11-28 13:48:43.771 [mkfifo-1] Starting mkfifo -m 777 /var/folders/p1/zkn1q6n53kqbwtkrj4l1mcvm0000gn/T/universalmediaserver/pmsencoder_transcoder_out_1354106923770_121
DEBUG 2012-11-28 13:48:43.785 [mkfifo-1] Unix process ID (mkfifo): 2253
DEBUG 2012-11-28 13:48:44.097 [osx/ffmpeg] Starting /Applications/Universal Media Server.app/Contents/Resources/Java/osx/ffmpeg -v 0 -y -threads 2 -i http://95.188.102.231:1234/udp/233.7.70.133:5000 -threads 2 -target ntsc-dvd /private/var/folders/p1/zkn1q6n53kqbwtkrj4l1mcvm0000gn/T/universalmediaserver/pmsencoder_transcoder_out_1354106923770_121
DEBUG 2012-11-28 13:48:44.108 [osx/ffmpeg] Reading pipe: /var/folders/p1/zkn1q6n53kqbwtkrj4l1mcvm0000gn/T/universalmediaserver/pmsencoder_transcoder_out_1354106923770_121
DEBUG 2012-11-28 13:48:54.374 [Hanging External Process Stopper] Stopping process: osx/ffmpeg
DEBUG 2012-11-28 13:48:54.375 [Hanging External Process Stopper] Stopping Unix process 2253: mkfifo-1
ERROR 2012-11-28 13:48:54.374 [New I/O server worker #1-3] There is no inputstream to return for Nat Geo Wild HD RU [PMSEncoder]
ERROR 2012-11-28 13:48:55.308 [New I/O server worker #1-2] There is no inputstream to return for Nat Geo Wild HD RU [PMSEncoder]

and on TV i get the "File unsupported" error. The thing is that if i try turning on this stream like 4 or 5 times, randomly it would start playing. sometimes it takes 10 times to start/restart stream for it to work. Also, i'm attaching full log files so you can see the full picture.

As always, any help would be highly appreciated!
Attachments
logs.zip
(9.18 KiB) Downloaded 1179 times
mrkrabs
Posts: 9
Joined: Tue Nov 27, 2012 5:24 am

Re: Jumpy Plugin (19 Nov 2012)

Post by mrkrabs »

and a small follow up to my previous post :

after some testing I've noticed that this issue mostly (if not only) happening with HD channels like National Geographic HD or Animal Planet HD (both streaming in 1080i/p). Also, when the channels finally starting playing, in around 10-20 minutes the playback just hangs and ffmpeg quit and my TV hangs as well :( It happens with HD and SD channels so this might be the buffering issue? is there any setting that i can tweak in this line to fix the issue? :

Code: Select all

/Applications/Universal Media Server.app/Contents/Resources/Java/osx/ffmpeg, -v, 0, -y, -threads, 2, -i, http://95.188.102.231:1234/udp/233.7.70.133:5000, -threads, 2, -target, ntsc-dvd, /private/var/folders/p1/zkn1q6n53kqbwtkrj4l1mcvm0000gn/T/universalmediaserver/pmsencoder_transcoder_out_1354106923770_121
UPDATE : adding the debug.log to show what's happening when the stream just hangs (exact time : 16:27:41) and hanging my TV as well (have to power off and back on the TV) :

Code: Select all

INFO  2012-11-28 15:36:44.505 [New I/O server worker #2-4] Checking shared folder: /Users/me/Movies
INFO  2012-11-28 15:36:44.506 [New I/O server worker #2-4] Checking shared folder: /Volumes/Elements/Video
INFO  2012-11-28 15:36:44.510 [New I/O server worker #2-4] Checking shared folder: /Volumes/Elements/Photos
DEBUG 2012-11-28 15:36:44.525 [New I/O server worker #2-4] Node(net.pms.external.infidel.jumpy.scriptFolder) already has an ID=0$5, which is overridden now. The previous parent node was:RootFolder[[MapFile [name=Movies, id=0$1, format=null, children=[]], MapFile [name=Video, id=0$2, format=null, children=[]], MapFile [name=Photos, id=0$3, format=null, children=[]], VirtualFolder [id=4, name=Web, full path=0$4, ext=null, discovered=false]]]
INFO  2012-11-28 15:36:53.328 [New I/O server worker #2-2] Starting transcode/remux of THT
DEBUG 2012-11-28 15:36:53.339 [mkfifo-7] Starting mkfifo -m 777 /var/folders/p1/zkn1q6n53kqbwtkrj4l1mcvm0000gn/T/universalmediaserver/pmsencoder_transcoder_out_1354113413329_487
DEBUG 2012-11-28 15:36:53.371 [mkfifo-7] Unix process ID (mkfifo): 3008
DEBUG 2012-11-28 15:36:53.576 [osx/ffmpeg] Starting /Applications/Universal Media Server.app/Contents/Resources/Java/osx/ffmpeg -v 0 -y -threads 2 -i http://77.106.112.11:8001/tnt_2 -threads 2 -target ntsc-dvd /private/var/folders/p1/zkn1q6n53kqbwtkrj4l1mcvm0000gn/T/universalmediaserver/pmsencoder_transcoder_out_1354113413329_487
DEBUG 2012-11-28 15:36:53.602 [osx/ffmpeg] Reading pipe: /var/folders/p1/zkn1q6n53kqbwtkrj4l1mcvm0000gn/T/universalmediaserver/pmsencoder_transcoder_out_1354113413329_487
DEBUG 2012-11-28 15:37:01.626 [osx/ffmpeg] Attaching thread: osx/ffmpeg
INFO  2012-11-28 15:37:01.783 [StartPlaying Event] Started playing THT on your Philips 3xx7
DEBUG 2012-11-28 15:37:01.784 [StartPlaying Event] The full filename of which is: http://77.106.112.11:8001/tnt_2and the address of the renderer is: 10.0.10.3
DEBUG 2012-11-28 15:37:03.035 [New I/O server worker #2-1] Setting InputStream new position to: 99,999,485,952
INFO  2012-11-28 15:37:10.549 [New I/O server worker #2-1] Buffer read ArrayIndexOutOfBoundsException error:
INFO  2012-11-28 15:37:10.550 [New I/O server worker #2-1] readCount: "99999485952"
INFO  2012-11-28 15:37:10.551 [New I/O server worker #2-1] maxMemorySize: "419430400"
INFO  2012-11-28 15:37:18.066 [New I/O server worker #2-1] Buffer read ArrayIndexOutOfBoundsException error:
INFO  2012-11-28 15:37:18.070 [New I/O server worker #2-1] readCount: "99999485952"
INFO  2012-11-28 15:37:18.076 [New I/O server worker #2-1] maxMemorySize: "419430400"
DEBUG 2012-11-28 15:37:18.642 [New I/O server worker #2-2] Setting InputStream new position to: 99,999,485,952
INFO  2012-11-28 15:37:26.157 [New I/O server worker #2-2] Buffer read ArrayIndexOutOfBoundsException error:
INFO  2012-11-28 15:37:26.158 [New I/O server worker #2-2] readCount: "99999485952"
INFO  2012-11-28 15:37:26.159 [New I/O server worker #2-2] maxMemorySize: "419430400"
INFO  2012-11-28 15:37:33.672 [New I/O server worker #2-2] Buffer read ArrayIndexOutOfBoundsException error:
INFO  2012-11-28 15:37:33.674 [New I/O server worker #2-2] readCount: "99999485952"
INFO  2012-11-28 15:37:33.674 [New I/O server worker #2-2] maxMemorySize: "419430400"
DEBUG 2012-11-28 15:37:59.602 [UPNP-AliveMessageSender] Sending ALIVE...
DEBUG 2012-11-28 15:38:59.176 [New I/O server worker #2-1] Setting margin to 2Mb
DEBUG 2012-11-28 15:41:03.845 [UPNP-AliveMessageSender] Sending ALIVE...
DEBUG 2012-11-28 15:44:08.140 [UPNP-AliveMessageSender] Sending ALIVE...
DEBUG 2012-11-28 15:47:12.525 [UPNP-AliveMessageSender] Sending ALIVE...
DEBUG 2012-11-28 15:50:17.175 [UPNP-AliveMessageSender] Sending ALIVE...
DEBUG 2012-11-28 15:53:21.407 [UPNP-AliveMessageSender] Sending ALIVE...
DEBUG 2012-11-28 15:56:26.485 [UPNP-AliveMessageSender] Sending ALIVE...
DEBUG 2012-11-28 15:59:31.430 [UPNP-AliveMessageSender] Sending ALIVE...
DEBUG 2012-11-28 16:02:34.432 [UPNP-AliveMessageSender] Sending ALIVE...
DEBUG 2012-11-28 16:04:56.280 [New I/O server worker #2-2] Caught exception
java.lang.NullPointerException: null
	at net.pms.network.RequestV2.answer(RequestV2.java:736) ~[ums-2.1.1.jar:na]
	at net.pms.network.RequestHandlerV2.writeResponse(RequestHandlerV2.java:312) ~[ums-2.1.1.jar:na]
	at net.pms.network.RequestHandlerV2.messageReceived(RequestHandlerV2.java:269) ~[ums-2.1.1.jar:na]
	at org.jboss.netty.handler.stream.ChunkedWriteHandler.handleUpstream(ChunkedWriteHandler.java:149) ~[netty-3.2.7.Final.jar:na]
	at org.jboss.netty.handler.codec.http.HttpChunkAggregator.messageReceived(HttpChunkAggregator.java:116) ~[netty-3.2.7.Final.jar:na]
	at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:302) ~[netty-3.2.7.Final.jar:na]
	at org.jboss.netty.handler.codec.replay.ReplayingDecoder.unfoldAndFireMessageReceived(ReplayingDecoder.java:527) ~[netty-3.2.7.Final.jar:na]
	at org.jboss.netty.handler.codec.replay.ReplayingDecoder.callDecode(ReplayingDecoder.java:506) ~[netty-3.2.7.Final.jar:na]
	at org.jboss.netty.handler.codec.replay.ReplayingDecoder.messageReceived(ReplayingDecoder.java:443) ~[netty-3.2.7.Final.jar:na]
	at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:274) ~[netty-3.2.7.Final.jar:na]
	at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:261) ~[netty-3.2.7.Final.jar:na]
	at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:351) ~[netty-3.2.7.Final.jar:na]
	at org.jboss.netty.channel.socket.nio.NioWorker.processSelectedKeys(NioWorker.java:282) ~[netty-3.2.7.Final.jar:na]
	at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:202) ~[netty-3.2.7.Final.jar:na]
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [na:1.6.0_37]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [na:1.6.0_37]
	at java.lang.Thread.run(Thread.java:680) [na:1.6.0_37]
DEBUG 2012-11-28 16:04:56.280 [New I/O server worker #2-3] Caught exception
java.lang.NullPointerException: null
	at net.pms.network.RequestV2.answer(RequestV2.java:736) ~[ums-2.1.1.jar:na]
	at net.pms.network.RequestHandlerV2.writeResponse(RequestHandlerV2.java:312) ~[ums-2.1.1.jar:na]
	at net.pms.network.RequestHandlerV2.messageReceived(RequestHandlerV2.java:269) ~[ums-2.1.1.jar:na]
	at org.jboss.netty.handler.stream.ChunkedWriteHandler.handleUpstream(ChunkedWriteHandler.java:149) ~[netty-3.2.7.Final.jar:na]
	at org.jboss.netty.handler.codec.http.HttpChunkAggregator.messageReceived(HttpChunkAggregator.java:116) ~[netty-3.2.7.Final.jar:na]
	at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:302) ~[netty-3.2.7.Final.jar:na]
	at org.jboss.netty.handler.codec.replay.ReplayingDecoder.unfoldAndFireMessageReceived(ReplayingDecoder.java:527) ~[netty-3.2.7.Final.jar:na]
	at org.jboss.netty.handler.codec.replay.ReplayingDecoder.callDecode(ReplayingDecoder.java:506) ~[netty-3.2.7.Final.jar:na]
	at org.jboss.netty.handler.codec.replay.ReplayingDecoder.messageReceived(ReplayingDecoder.java:443) ~[netty-3.2.7.Final.jar:na]
	at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:274) ~[netty-3.2.7.Final.jar:na]
	at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:261) ~[netty-3.2.7.Final.jar:na]
	at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:351) ~[netty-3.2.7.Final.jar:na]
	at org.jboss.netty.channel.socket.nio.NioWorker.processSelectedKeys(NioWorker.java:282) ~[netty-3.2.7.Final.jar:na]
	at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:202) ~[netty-3.2.7.Final.jar:na]
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [na:1.6.0_37]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [na:1.6.0_37]
	at java.lang.Thread.run(Thread.java:680) [na:1.6.0_37]
DEBUG 2012-11-28 16:05:39.104 [UPNP-AliveMessageSender] Sending ALIVE...
DEBUG 2012-11-28 16:08:42.062 [UPNP-AliveMessageSender] Sending ALIVE...
DEBUG 2012-11-28 16:11:47.278 [UPNP-AliveMessageSender] Sending ALIVE...
DEBUG 2012-11-28 16:14:52.945 [UPNP-AliveMessageSender] Sending ALIVE...
DEBUG 2012-11-28 16:17:56.203 [UPNP-AliveMessageSender] Sending ALIVE...
DEBUG 2012-11-28 16:21:01.121 [UPNP-AliveMessageSender] Sending ALIVE...
DEBUG 2012-11-28 16:24:03.732 [UPNP-AliveMessageSender] Sending ALIVE...
DEBUG 2012-11-28 16:27:08.941 [UPNP-AliveMessageSender] Sending ALIVE...
DEBUG 2012-11-28 16:27:41.352 [osx/ffmpeg] Stopping Unix process 3008: mkfifo-7
DEBUG 2012-11-28 16:27:41.770 [New I/O server worker #2-4] Setting InputStream new position to: 1,557,662,720
DEBUG 2012-11-28 16:27:42.437 [New I/O server worker #2-1] Setting InputStream new position to: 1,557,662,720
DEBUG 2012-11-28 16:27:42.598 [New I/O server worker #2-2] Setting InputStream new position to: 1,557,903,360
DEBUG 2012-11-28 16:27:44.185 [Buffered IO End Checker] Stopping process: osx/ffmpeg
INFO  2012-11-28 16:27:46.602 [StopPlaying Event] Stopped playing THT on your Philips 3xx7
DEBUG 2012-11-28 16:27:46.603 [StopPlaying Event] The full filename of which is: http://77.106.112.11:8001/tnt_2and the address of the renderer is: 10.0.10.3
and here's the pmsencoder.log :

Code: Select all

2012-11-28 15:36:53 [INFO|PMSEncoder|launchTranscode|New I/O server worker #2-2]: invoking matcher for: http://77.106.112.11:8001/tnt_2
2012-11-28 15:36:53 [INFO|PMSEncoder|launchTranscode|New I/O server worker #2-2]: 0 matches for: http://77.106.112.11:8001/tnt_2
2012-11-28 15:36:53 [INFO|ProcessManager|handleTranscode|New I/O server worker #2-2]: transcoder command: [/Applications/Universal Media Server.app/Contents/Resources/Java/osx/ffmpeg, -v, 0, -y, -threads, 2, -i, http://77.106.112.11:8001/tnt_2, -threads, 2, -target, ntsc-dvd, /private/var/folders/p1/zkn1q6n53kqbwtkrj4l1mcvm0000gn/T/universalmediaserver/pmsencoder_transcoder_out_1354113413329_487]
Another update (sorry for making it that long)

Ive figured it out why it stop and the reason is pretty simple: the buffer just runs out. As soon as the buffer gets 0mb (usually its about 10-20mb) the playback stops as seen above in the logs :( now the question is, why does it stops the steam and hangs the tv instead of just buffering a bit more of the stream? ( thats what xbmc does when it runs out of buffer)
infidel
Developer
Posts: 571
Joined: Thu Jul 12, 2012 5:37 am

Re: Jumpy Plugin (19 Nov 2012)

Post by infidel »

mrkrabs wrote: the reason is pretty simple: the buffer just runs out.
Sorry, it's not specifically related to jumpy and I don't have anything particularly useful to suggest here.

General playback issues like this are best followed up in one of the General Support forums.
mrkrabs
Posts: 9
Joined: Tue Nov 27, 2012 5:24 am

Re: Jumpy Plugin (19 Nov 2012)

Post by mrkrabs »

Yep, i should have figured it out myself. Anyway thank you for your help!
righteousbs
Posts: 8
Joined: Wed Sep 12, 2012 2:51 pm

Re: Jumpy Plugin (19 Nov 2012)

Post by righteousbs »

@ infidel
I am currently trying to expose the full Plex library using the Jumpy API. On occasion I can meander down a path and reach the PS3 folder limit when I want to scrobble an item back to Plex and Trakt. Presently Scrobbling occurs when a user enters into a folder using the addItem(PMS_FOLDER ,callback) API, see below:

Code: Select all

- XMB Video
  - Jumpy (folder)
    - Interfaced (folder)
      - Tv Shows (folder)
        - Unwatched (folder)
          - Show (folder)
            - Season (folder)
              - Scrobble (folder)
                 - Episode X to Scrobble (folder) -> Hit the Folder Limit, unable to enter to command a scrobble
               * Episode X to Watch (video)
Any way to use the API in an alternative manner so that I don't have to drill down another folder level to command a scrobble, maybe to display a video item that when selected executes a callback and a video message, or add the capability of placing Scripts at the UMS's root rather than having to enter into the Jumpy folder?

Code: Select all

- XMB Video
  - Jumpy (folder)
    - Interfaced (folder)
      - Tv Shows (folder)
        - Unwatched (folder)
          - Show (folder)
            - Season (folder)
              - Scrobble (folder)
                 * Episode X to Scrobble (video)  -> message + callback to command a scrobble
               * Episode X to Watch (video) 
OR

Code: Select all

- XMB Video
  - Interfaced (folder)
    - Tv Shows (folder)
      - Unwatched (folder)
        - Show (folder)
          - Season (folder)
            - Scrobble (folder)
               - Episode X to Scrobble (folder) -> command a scrobble when entered
             * Episode X to Watch (video) 
infidel
Developer
Posts: 571
Joined: Thu Jul 12, 2012 5:37 am

Re: Jumpy Plugin (19 Nov 2012)

Post by infidel »

righteousbs wrote: maybe to display a video item that when selected executes a callback and a video message
You could do it like this:

Code: Select all

elif sys.argv[1] == 'display videos':
	# ...
		pms.addVideo(fileName, fullFileName)
		pms.addAction('scrobble %s' % source, [sys.argv[0], 'scrobble', ratingKey, source])
elif sys.argv[1] == 'scrobble':
	# ...
	pms.ok('%s\\nhas been scrobbled' % source)
One way around the folder depth problem would be to use an absolute path:

Code: Select all

pms.addFolder('/Scrobble/%s' % fileName, [sys.argv[0], 'scrobble', ratingKey, source])
It would still be under Jumpy (Allowing root paths would be good too, I'll look into it)

Another strategy is to use addAction() or addFolder() to add more items to the current folder using its absolute path, but the problem here is that the renderer's view of the folder doesn't update automatically, and whether it updates if you re-enter the folder isn't consistent across renderers either.

I'm currently reworking the addAction() stuff a bit, so please feel free to point out anything that needs fixing or tweaking :).
righteousbs
Posts: 8
Joined: Wed Sep 12, 2012 2:51 pm

Re: Jumpy Plugin (19 Nov 2012)

Post by righteousbs »

I really like the addAction() suggestion, it seems to fit best with the how I am implementing the Scrobbling feature. I'll give that a shot tonight.

An absolute path would work as well but as a quick band aid in respect to how I've mech'ed the scrobble feature, as one would have to drill down to a list of videos for the Scrobble folder to know which videos to display and then back all the way out and find the Scrobble folder. If the addAction() doesnt pan out I'll explore this suggestion too.
infidel wrote:...but the problem here is that the renderer's view of the folder doesn't update automatically, and whether it updates if you re-enter the folder isn't consistent across renderers either.
I have not seen/tested this on my system, however on a similar note I have observed that on my PS3 if I navigate too quickly through folders pushed by Jumpy that the display of folders are right in step but if a folder contains media items the media never gets displayed, I tend to have to wait a few seconds before entering into a folder housing media items in order them them to register and display on the PS3. I don't see this problem when performing the same actions using jumpstart.

By the way you deserve lots of credit for developing Jumpy plugin, many props to you and thanks for your suggestions. You da man!
mrkrabs
Posts: 9
Joined: Tue Nov 27, 2012 5:24 am

Re: Jumpy Plugin (19 Nov 2012)

Post by mrkrabs »

hi, i have a quick question. in my xbmc i have a webstream with 2 languages and i can easily switch between audio tracks. However, when i'm using the same stream in UMS the first audio track is playing by default and i cannot select the other one on my tv. also tried transcode folder - there's no signs of second audiotrack as well. is there something could be done to pickup the second audio track from xbmc?
infidel
Developer
Posts: 571
Joined: Thu Jul 12, 2012 5:37 am

Re: Jumpy Plugin (19 Nov 2012)

Post by infidel »

mrkrabs wrote:also tried transcode folder - there's no signs of second audiotrack as well.
I don't have any actual experience with it but this setting in your renderer conf may help you see if the second track is actually in the transcode folder:

Code: Select all

ShowAudioMetadata = true
I searched the PMS forums for "audio track" which brought up all your recent posts, so obviously you're way ahead of me there :).
mrkrabs
Posts: 9
Joined: Tue Nov 27, 2012 5:24 am

Re: Jumpy Plugin (19 Nov 2012)

Post by mrkrabs »

great, thanks infidel :) will give it a try a bit later.
Post Reply