FAQ  •  Register  •  Login

Twitch.tv/Justin.tv

<<

andreyv

Serviio newbie

Posts: 16

Joined: Sun Dec 08, 2013 6:01 pm

Post Tue Jun 28, 2016 6:29 pm

Re: Twitch.tv/Justin.tv

@jules:

Can you please add license information to the script? This would help when packaging this script for Linux.
<<

matey

Serviio newbie

Posts: 1

Joined: Thu Jun 30, 2016 9:18 am

Post Thu Jun 30, 2016 9:21 am

Re: Twitch.tv/Justin.tv

Hello,
I followed everything - updated ffmpeg, installed the plugin, added online source. On my TV everything shows - all qualities. However, when I try to play source it loads a few sec and it says "File was not found". When I try high quality it loads fine. Any ideas why source is not loading ?
<<

FrozenStorm

Serviio newbie

Posts: 3

Joined: Wed Jan 06, 2016 10:52 am

Post Wed Jul 06, 2016 11:54 am

Re: Twitch.tv/Justin.tv

Is this plugin still being supported? Because it used to work properly for me, but for the past few months, I haven't been able to get it to work. All the streams I set up show up normally in the Online folder, but when I try to play one, I get the error "Server could not be reached" (or something similar).

Offline library files play normally, so it's not a serviio problem. I've tried reinstalling serviio and this plugin, and both are updated to their respective latest versions, as is the ffmpeg.exe.

I'm using a Sony Bravia TV (I've selected the profile Sony Bravia 2013/14 for the TV in serviio console).
<<

Mopah

Serviio newbie

Posts: 1

Joined: Thu Jul 07, 2016 2:00 pm

Post Thu Jul 07, 2016 2:01 pm

Re: Twitch.tv/Justin.tv

matey wrote:Hello,
I followed everything - updated ffmpeg, installed the plugin, added online source. On my TV everything shows - all qualities. However, when I try to play source it loads a few sec and it says "File was not found". When I try high quality it loads fine. Any ideas why source is not loading ?


I have the same problem, is there a fix?
<<

omgfrost

Serviio newbie

Posts: 1

Joined: Fri Jul 08, 2016 8:21 pm

Post Fri Jul 08, 2016 8:35 pm

Re: Twitch.tv/Justin.tv

Hello,
i've been testing this plugin the whole day and it has been working since 6pm CEST time. After that it freezes and twitch videos was no longer playable. I don't know but maybe the plugin connects to the twitch.tv/hls/USERNAME that in those hours might be blocked.

I found a workaround tho,
you can setup serviio console as it supposed to be set by adding web sources and twitch channel addresses like normally you do, but whenever it won't anymore playable (i'm using sony bravia media server) you still can access the serviio via smartphone with somekind of DLNA app (i'm using ANDLNA), once you are there you can start playing the channel you want and then connect your smartphone via wifi with some kind of screen mirror app (i got samsung s6 and i can just use embed screen mirroring app) but you can also find any kind of same app in google play. Also install VLC app in your smartphone to playback the source from your smartphone after accessing serviio via ANDlna or something.
I know you can just install twitch app and screen mirror it but the fact is that the phone will consume more battery, instead with vlc playing the stream, the screen will stay kinda black with just VLC logo and the stream will still be playing in your smart TV! That's might be a workaround and also a battery saving power. (For ex: if you charging you battery while twitch app is always displayable this will take lot of time by fully charge your phone, on the other hand, with serviio, ANDlna and VLC and so with the screen mostly black, the phone will charge faster and you still can enjoy the stream in your TV.

Hope this will help in the meantime there will be a proper fix for "those hours" which seems twitch.tv kinda blocking playback directly via smart tv (at least it did today post 6pm when before then it run for 6 hours flawlessly!)
Enjoy!
<<

man1acgamer

Serviio newbie

Posts: 1

Joined: Tue Jul 26, 2016 12:09 pm

Post Tue Jul 26, 2016 12:11 pm

Re: Twitch.tv/Justin.tv

omgfrost wrote:Hello,
i've been testing this plugin the whole day and it has been working since 6pm CEST time. After that it freezes and twitch videos was no longer playable. I don't know but maybe the plugin connects to the twitch.tv/hls/USERNAME that in those hours might be blocked.

I found a workaround tho,
you can setup serviio console as it supposed to be set by adding web sources and twitch channel addresses like normally you do, but whenever it won't anymore playable (i'm using sony bravia media server) you still can access the serviio via smartphone with somekind of DLNA app (i'm using ANDLNA), once you are there you can start playing the channel you want and then connect your smartphone via wifi with some kind of screen mirror app (i got samsung s6 and i can just use embed screen mirroring app) but you can also find any kind of same app in google play. Also install VLC app in your smartphone to playback the source from your smartphone after accessing serviio via ANDlna or something.
I know you can just install twitch app and screen mirror it but the fact is that the phone will consume more battery, instead with vlc playing the stream, the screen will stay kinda black with just VLC logo and the stream will still be playing in your smart TV! That's might be a workaround and also a battery saving power. (For ex: if you charging you battery while twitch app is always displayable this will take lot of time by fully charge your phone, on the other hand, with serviio, ANDlna and VLC and so with the screen mostly black, the phone will charge faster and you still can enjoy the stream in your TV.

Hope this will help in the meantime there will be a proper fix for "those hours" which seems twitch.tv kinda blocking playback directly via smart tv (at least it did today post 6pm when before then it run for 6 hours flawlessly!)
Enjoy!
<<

jules

DLNA master

Posts: 173

Joined: Sat Feb 02, 2013 10:21 am

Post Thu Sep 15, 2016 3:29 pm

Re: Twitch.tv/Justin.tv

hey everyone, long time no see.

szefo09 has pointed out to me that since yesterday, the plugin no longer works. i just uploaded a fix for this, check the original post for the download link, or see the diff here.

@pretty much everyone on this page:
as i've stated numerous times previously, the stream urls this script extracts are only temporarily valid. after a few minutes, they will no longer work when you try to access them via serviio. to get around this, you can go to the serviio console, online sources and select "force refresh" to update the stream urls. give it 30-60s and retry opening the stream.
andreyv wrote:Can you please add license information to the script? This would help when packaging this script for Linux.
i don't much care about what happens to this code since to me, it is strictly a convenience script without much pride or anything involved, so i would consider LGPL as a contender since that probably offers best compatibility with serviio. just out of curiosity, why would this script (which really only works linked against serviio libraries) ever be bundled with a linux install?
<<

play3rjt

Serviio newbie

Posts: 1

Joined: Fri Sep 16, 2016 2:42 am

Post Fri Sep 16, 2016 2:46 am

Re: Twitch.tv/Justin.tv

Hi Jules. So what do I actually have to do to get it working?

Thanks for your work.
<<

jules

DLNA master

Posts: 173

Joined: Sat Feb 02, 2013 10:21 am

Post Fri Sep 16, 2016 11:22 am

Re: Twitch.tv/Justin.tv

there's a section called "INSTRUCTIONS" in the original post.
<<

andreyv

Serviio newbie

Posts: 16

Joined: Sun Dec 08, 2013 6:01 pm

Post Sat Oct 01, 2016 9:19 am

Re: Twitch.tv/Justin.tv

jules wrote:
andreyv wrote:Can you please add license information to the script? This would help when packaging this script for Linux.
i don't much care about what happens to this code since to me, it is strictly a convenience script without much pride or anything involved, so i would consider LGPL as a contender since that probably offers best compatibility with serviio. just out of curiosity, why would this script (which really only works linked against serviio libraries) ever be bundled with a linux install?
This script can be packaged just like any other software. The resulting package would depend on the serviio package to function.
Or did you mean that this script needs patched ffmpeg and will therefore not work on a default install?
<<

jules

DLNA master

Posts: 173

Joined: Sat Feb 02, 2013 10:21 am

Post Sun Oct 02, 2016 1:13 pm

Re: Twitch.tv/Justin.tv

andreyv wrote:This script can be packaged just like any other software. The resulting package would depend on the serviio package to function.
yes, that's what i was saying.
i guess another, somewhat veiled point of my question was confirmation whether LGPL made sense. GPL wouldn't work since serviio is closed source and the plugin needs to be (dynamically) linked against it at runtime. i'm not knowledgable enough on other licenses to have a preference over LGPL, so i've just pushed an update with licensing info to my repository.
andreyv wrote:Or did you mean that this script needs patched ffmpeg and will therefore not work on a default install?
that's another good point. it's possible that ffmpeg doesn't need any modifying anymore (as of a test i just ran with a relatively current release under linux). so i wouldn't worry about that in the licensing context right now (or at all, really...).
<<

andreyv

Serviio newbie

Posts: 16

Joined: Sun Dec 08, 2013 6:01 pm

Post Sat Oct 08, 2016 11:35 am

Re: Twitch.tv/Justin.tv

@jules: Thanks, this makes sense and the license notice looks good now.
<<

bloodilo

Serviio newbie

Posts: 3

Joined: Sun Jan 15, 2017 11:24 am

Post Sun Jan 15, 2017 11:27 am

Re: Twitch.tv/Justin.tv

Hi All! Does this plugin work with Serviio 1.8 installed on Synology DSM 6?
<<

bloodilo

Serviio newbie

Posts: 3

Joined: Sun Jan 15, 2017 11:24 am

Post Sun Jan 15, 2017 12:52 pm

Re: Twitch.tv/Justin.tv

bloodilo wrote:Hi All! Does this plugin work with Serviio 1.8 installed on Synology DSM 6?

I can answer the question myself. It works like a charm! The issue I had was I tried to save plugin under system-root "/volume1/@appstore/Serviio/plugins" path (and actually I get it), but the right one was "/volume1/public/serviio/plugins". After I find it out on https://pcloadletter.co.uk/2012/01/25/s ... o-package/ page and do it, it works immediately!
<<

bloodilo

Serviio newbie

Posts: 3

Joined: Sun Jan 15, 2017 11:24 am

Post Sun Jan 15, 2017 8:49 pm

Re: Twitch.tv/Justin.tv

Now i use this plug in almost a day long and see some strange behavior. It work, but not stable. Sometimes it can work 10-15 min w/o any issues, sometimes it brings "device disconnected" error almost right after i start the stream. But it happens again and again. Always. I am also able to start the same stream again direct after the error ocurs. Does anyone have a clue what going on?

I run this on my DIY NAS XPenology with DSM 6.0 on Intels J3455 SOC. TV is Samsung 2012 late model. All things has wired connection. I have no issues by watching some heavy videos from NAS or during data transfer to it, so it is hard to believe i have some problems with my network.
<<

gayaz

Serviio newbie

Posts: 1

Joined: Wed Mar 14, 2018 10:31 pm

Post Wed Mar 14, 2018 10:46 pm

Re: Twitch.tv/Justin.tv

Hi, everybody. Have a question about the plugin, when i view the stream from 720p there are friezes, not buffering, and it freezes, although the TV quietly pulls video 1080p/60 fps. For example, when viewing ace stream broadcasts through Serviio, is it possible to somehow remove friezes when viewing Twitch broadcasts?
<<

mildik-dik

Serviio newbie

Posts: 4

Joined: Sun May 28, 2017 6:59 pm

Post Sat Sep 22, 2018 3:54 pm

Re: Twitch.tv/Justin.tv

Hello,
Lately I have a problem with Twitch.tv source. Does it work for you? How to fix it?

In Serviio Log file is: "Server returned HTTP response code: 400 for URL"

Thanks
<<

slatanic

User avatar

Serviio newbie

Posts: 1

Joined: Tue Sep 25, 2018 3:15 pm

Location: Poland

Post Tue Sep 25, 2018 3:23 pm

Re: Twitch.tv/Justin.tv

Hi

Same problem here :(

  Code:
2018-09-25 15:53:41,939 WARN  [FeedUpdaterWorker] An error occured while parsing the online resource https://go.twitch.tv/cohhcarnage, will try again soon: Unexpected error while invoking plugin (twitch.tv): Server returned HTTP response code: 400 for URL: http://usher.twitch.tv/api/channel/hls/cohhcarnage.m3u8?sig=5cfc58de7d5c12d820b897455d8344dfcd1ee243&token={"adblock":false,"authorization":{"forbidden":false,"reason":""},"blackout_enabled":false,"channel":"cohhcarnage","channel_id":26610234,"chansub":{"restricted_bitrates":[],"view_until":1924905600},"ci_gb":false,"geoblock_reason":"","device_id":null,"expires":1537884821,"game":"The Bard's Tale IV","hide_ads":false,"https_required":false,"mature":false,"partner":false,"platform":null,"player_type":null,"private":{"allowed_to_view":true},"privileged":false,"server_ads":false,"show_ads":true,"subscriber":false,"turbo":false,"user_id":null,"user_ip":"XX.70.243.XXX","version":2}&allow_source=true
org.serviio.library.online.metadata.OnlineResourceParseException: Unexpected error while invoking plugin (twitch.tv): Server returned HTTP response code: 400 for URL: http://usher.twitch.tv/api/channel/hls/cohhcarnage.m3u8?sig=5cfc58de7d5c12d820b897455d8344dfcd1ee243&token={"adblock":false,"authorization":{"forbidden":false,"reason":""},"blackout_enabled":false,"channel":"cohhcarnage","channel_id":26610234,"chansub":{"restricted_bitrates":[],"view_until":1924905600},"ci_gb":false,"geoblock_reason":"","device_id":null,"expires":1537884821,"game":"The Bard's Tale IV","hide_ads":false,"https_required":false,"mature":false,"partner":false,"platform":null,"player_type":null,"private":{"allowed_to_view":true},"privileged":false,"server_ads":false,"show_ads":true,"subscriber":false,"turbo":false,"user_id":null,"user_ip":"XX.70.243.XXX","version":2}&allow_source=true
   at org.serviio.library.online.WebResourceParser.parse(WebResourceParser.java:79)
   at org.serviio.library.online.OnlineLibraryManager.findResource(OnlineLibraryManager.java:187)
   at org.serviio.library.online.OnlineLibraryManager.findResourceInCacheOrParse(OnlineLibraryManager.java:207)
   at org.serviio.library.online.metadata.FeedUpdaterWorker.getOnlineItems(FeedUpdaterWorker.java:194)
   at org.serviio.library.online.metadata.FeedUpdaterWorker.run(FeedUpdaterWorker.java:100)
   at java.lang.Thread.run(Thread.java:748)
Caused by: java.io.IOException: Server returned HTTP response code: 400 for URL: http://usher.twitch.tv/api/channel/hls/cohhcarnage.m3u8?sig=5cfc58de7d5c12d820b897455d8344dfcd1ee243&token={"adblock":false,"authorization":{"forbidden":false,"reason":""},"blackout_enabled":false,"channel":"cohhcarnage","channel_id":26610234,"chansub":{"restricted_bitrates":[],"view_until":1924905600},"ci_gb":false,"geoblock_reason":"","device_id":null,"expires":1537884821,"game":"The Bard's Tale IV","hide_ads":false,"https_required":false,"mature":false,"partner":false,"platform":null,"player_type":null,"private":{"allowed_to_view":true},"privileged":false,"server_ads":false,"show_ads":true,"subscriber":false,"turbo":false,"user_id":null,"user_ip":"XX.70.243.XXX","version":2}&allow_source=true
   at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1894)
   at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1492)
   at org.codehaus.groovy.runtime.DefaultGroovyMethods.configuredInputStream(DefaultGroovyMethods.java:16692)
   at org.codehaus.groovy.runtime.DefaultGroovyMethods.newReader(DefaultGroovyMethods.java:16760)
   at org.codehaus.groovy.runtime.DefaultGroovyMethods.getText(DefaultGroovyMethods.java:15130)
   at org.codehaus.groovy.runtime.DefaultGroovyMethods.getText(DefaultGroovyMethods.java:15102)
   at org.codehaus.groovy.runtime.dgm$375.doMethodInvoke(Unknown Source)
   at org.codehaus.groovy.reflection.GeneratedMetaMethod$Proxy.doMethodInvoke(GeneratedMetaMethod.java:70)
   at groovy.lang.MetaClassImpl$GetBeanMethodMetaProperty.getProperty(MetaClassImpl.java:3465)
   at org.codehaus.groovy.runtime.callsite.GetEffectivePojoPropertySite.getProperty(GetEffectivePojoPropertySite.java:61)
   at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGetProperty(AbstractCallSite.java:227)
   at Twitch.extractHlsStream(twitch.groovy:172)
   at Twitch$extractHlsStream.callCurrent(Unknown Source)
   at Twitch.extractItems(twitch.groovy:91)
   at org.serviio.library.online.WebResourceUrlExtractor.extractItems(WebResourceUrlExtractor.java:72)
   at org.serviio.library.online.WebResourceUrlExtractor$1.executePluginMethod(WebResourceUrlExtractor.java:34)
   at org.serviio.library.online.WebResourceUrlExtractor$1.executePluginMethod(WebResourceUrlExtractor.java:31)
   at org.serviio.library.online.PluginExecutionProcessor$1.call(PluginExecutionProcessor.java:50)
   at java.util.concurrent.FutureTask.run(FutureTask.java:266)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
   ... 1 more


EDIT:
I think i have found a solution:

Try to change line 172 in twitch.groovy from:
  Code:
def playlist = new URL(String.format(TWITCH_HLS_API_PLAYLIST_URL, channelName.toLowerCase(), auth.sig, auth.token)).text

to
  Code:
def playlist = new URL(String.format(TWITCH_HLS_API_PLAYLIST_URL, channelName.toLowerCase(), URLEncoder.encode(auth.sig), URLEncoder.encode(auth.token))).text
<<

mildik-dik

Serviio newbie

Posts: 4

Joined: Sun May 28, 2017 6:59 pm

Post Tue Oct 02, 2018 6:21 pm

Re: Twitch.tv/Justin.tv

Excellent, it works! Thank you so much for your help!


slatanic wrote:Hi
Same problem here :(

EDIT:
I think i have found a solution:
Try to change line 172 in twitch.groovy from:
  Code:
def playlist = new URL(String.format(TWITCH_HLS_API_PLAYLIST_URL, channelName.toLowerCase(), auth.sig, auth.token)).text

to
  Code:
def playlist = new URL(String.format(TWITCH_HLS_API_PLAYLIST_URL, channelName.toLowerCase(), URLEncoder.encode(auth.sig), URLEncoder.encode(auth.token))).text
<<

Leo007

Serviio newbie

Posts: 1

Joined: Sat Jul 03, 2021 12:38 pm

Post Sat Jul 03, 2021 12:41 pm

Re: Twitch.tv/Justin.tv

Hi everyone,

Version 18 doesn't work for me for some reason, I checked the logs and this is what I got:

2021-07-03 15:26:01,748 WARN [ContentDirectory] Object with id Invalid doesn't exist
2021-07-03 15:26:04,277 WARN [ContentDirectory] Object with id Invalid doesn't exist
2021-07-03 15:26:05,208 WARN [FeedUpdaterWorker] An error occured while parsing the online resource http://www.twitch.tv/trainwreckstv, will try again soon: Unexpected error while invoking plugin (twitch.tv): Server returned HTTP response code: 401 for URL: https://api.twitch.tv/helix/streams?use ... inwreckstv
org.serviio.library.online.metadata.OnlineResourceParseException: Unexpected error while invoking plugin (twitch.tv): Server returned HTTP response code: 401 for URL: https://api.twitch.tv/helix/streams?use ... inwreckstv
at org.serviio.library.online.WebResourceParser.parse(WebResourceParser.java:79)
at org.serviio.library.online.OnlineLibraryManager.findResource(OnlineLibraryManager.java:187)
at org.serviio.library.online.OnlineLibraryManager.findResourceInCacheOrParse(OnlineLibraryManager.java:207)
at org.serviio.library.online.metadata.FeedUpdaterWorker.getOnlineItems(FeedUpdaterWorker.java:194)
at org.serviio.library.online.metadata.FeedUpdaterWorker.run(FeedUpdaterWorker.java:100)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.io.IOException: Server returned HTTP response code: 401 for URL: https://api.twitch.tv/helix/streams?use ... inwreckstv
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1900)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1498)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:268)
at org.codehaus.groovy.runtime.ResourceGroovyMethods.configuredInputStream(ResourceGroovyMethods.java:2021)
at org.codehaus.groovy.runtime.ResourceGroovyMethods.newReader(ResourceGroovyMethods.java:2122)
at org.codehaus.groovy.runtime.ResourceGroovyMethods.getText(ResourceGroovyMethods.java:666)
at org.codehaus.groovy.runtime.ResourceGroovyMethods.getText(ResourceGroovyMethods.java:634)
at org.codehaus.groovy.runtime.dgm$967.invoke(Unknown Source)
at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:274)
at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:56)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
at Twitch.extractHlsStream(twitch.groovy:208)
at Twitch$extractHlsStream.callCurrent(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:52)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:154)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:166)
at Twitch.extractItems(twitch.groovy:111)
at org.serviio.library.online.WebResourceUrlExtractor.extractItems(WebResourceUrlExtractor.java:72)
at org.serviio.library.online.WebResourceUrlExtractor$1.executePluginMethod(WebResourceUrlExtractor.java:34)
at org.serviio.library.online.WebResourceUrlExtractor$1.executePluginMethod(WebResourceUrlExtractor.java:1)
at org.serviio.library.online.PluginExecutionProcessor$1.call(PluginExecutionProcessor.java:50)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
... 1 more
2021-07-03 15:26:08,916 WARN [ContentDirectory] Object with id Invalid doesn't exist

Any ideas what I did wrong?
PreviousNext

Return to Available plugins

Who is online

Users browsing this forum: No registered users and 11 guests

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.