FAQ  •  Register  •  Login

Live Streams without testing

<<

beinaendi

Serviio newbie

Posts: 12

Joined: Wed Apr 30, 2014 3:09 pm

Post Mon Jan 04, 2016 1:25 pm

Live Streams without testing

Hi everybody,

my problem seems to be very simple, thus I couldn't find a solution by now. I am using serviio to stream TV channels to different devices. So far, so good. Some channels aren't always online and when serviio proofs the content, they are offline, so they are not added to the list. As far as I could find out, only online sources are added. Is there any workaround to create a static list. For me, serviio doesn't have to test the streams at all. If they are not working, I'd recognize it anyways ;)

Thanks for your help,
beinaendi
<<

jhb50

DLNA master

Posts: 2843

Joined: Thu Jun 30, 2011 9:32 pm

Post Mon Jan 04, 2016 2:49 pm

Re: Live Streams without testing

You can only show those that are live. Why would you want to show those that are unavailable anyway. If you want Serviio to check and get them as soon as they go live, just refresh more frequently by setting a short expiry, and cache the feeds with a cachekey so existing live channels do not get refreshed.
<<

beinaendi

Serviio newbie

Posts: 12

Joined: Wed Apr 30, 2014 3:09 pm

Post Mon Jan 04, 2016 4:11 pm

Re: Live Streams without testing

Hi jhb50,

thanks for your reply. Because Serviio streams don't have EPG information I choose what I want to watch before starting a stream anyway. So it's not a problem to see offline streams. That's why for me a static list would be the best thing to have.
Thus your solution would be an acceptable workaround. I didn't know how to refresh frequently, so what happend is that some channels were not available although they were online because they haven't been refreshed that time. The conflict with this still is that either the TV adapter is occupied very often or I have to live with delays till these channels are available. Can you tell me how to set these settings?

All the best,
beinaendi
<<

jhb50

DLNA master

Posts: 2843

Joined: Thu Jun 30, 2011 9:32 pm

Post Mon Jan 04, 2016 5:42 pm

Re: Live Streams without testing

Select the feed in the console, right click and click Refresh, or if you wrote your own plugin, set the expiry date to the current time plus the interval you want.
<<

beinaendi

Serviio newbie

Posts: 12

Joined: Wed Apr 30, 2014 3:09 pm

Post Tue Jan 05, 2016 8:36 pm

Re: Live Streams without testing

I didn't write a plugin and I don't know how to what means it would take me lots of time to do. The other solution is manually, the last thing I want because I don't want to sit in front of a computer before I can watch TV.

Is it really that complicated? I think this need is standard. When you install your channels on a regular TV you see all of them all the time, no matter if somethings live or the channel is offline. That's exactly what I'd like to have, just with serviio. Maybe you have another idea for a workaround... I read something about RSS feeds which include various streams. Would it be the same or could it work out?
<<

jhb50

DLNA master

Posts: 2843

Joined: Thu Jun 30, 2011 9:32 pm

Post Tue Jan 05, 2016 9:26 pm

Re: Live Streams without testing

If you have the stream urls you can set them up in an rss using the technique I posted in the wiki. http://wiki.serviio.org/doku.php?id=live_stream_folders
Otherwise if they need to be deduced from web pages the only way is to set the expiry in the plug in. Problem with stream urls from most sources is that they frequently change so the rss technique requires too much maintenance and they become obsolete as have the examples in the wiki.
<<

beinaendi

Serviio newbie

Posts: 12

Joined: Wed Apr 30, 2014 3:09 pm

Post Tue Jan 05, 2016 9:51 pm

Re: Live Streams without testing

Maybe I can give you more information that will help you to give me further advice.

I am running a Synology server with an USB TV Stick. All the channels are hosted by Tvheadend. So the stream urls are static, they don't change as long as I don't change any settings. With this I can watch TV on any PC, Mac or mobile device using Tvheadend. Besides I'd like to Watch the channels with Network UPNP Media Players or TV sets that don't have an antenna connection. That's why I started using serviio.

Now the problem is that some channels disappear because serviio doesn't test them the time they are online. And the next thing is that testing more often will occupy the TV tuner to many times (it takes about 10 seconds per channel and about 1 minute for a not available channel).

I read through your wiki article before, but the following questions are unclear for me:
1) Would it work out using RSS with local Tvheadend streams?
2) Would serviio test the streams the same way they are tested as online sources (live streams)? That would make it quite useless to do so.
3) Do you see any problem with maintenance in this constellation?
<<

jhb50

DLNA master

Posts: 2843

Joined: Thu Jun 30, 2011 9:32 pm

Post Wed Jan 06, 2016 3:50 am

Re: Live Streams without testing

Easy for you totest with one stream but I think yes/no/no.
<<

beinaendi

Serviio newbie

Posts: 12

Joined: Wed Apr 30, 2014 3:09 pm

Post Wed Jan 06, 2016 8:41 pm

Re: Live Streams without testing

It's not as easy as it seems. I tried to test it, the new source appears after installing your groovy. Unfortunately no items are visible, although I am 100% sure the stream urls work in a web browser and in vlc.

Here is my code for one item:
<item>
<title>TV channel 1</title>
<link>http://link2</link>
<media:stream url="http://sub.domain.com:9981/play/stream/channel/939097eccef1c3c " type="video" />
<media:thumbnail url="https://upload.wikimedia.org/wikipedia/commons/thumb/e/e7/ORF2_logo_n.svg/250px-ORF2_logo_n.svg.png" />
</item>

Any idea what could be the reason? Besides, I don't get an error in the log file.
<<

beinaendi

Serviio newbie

Posts: 12

Joined: Wed Apr 30, 2014 3:09 pm

Post Wed Jan 06, 2016 10:24 pm

Re: Live Streams without testing

Additional information: if I copy the stream url from my rss file and paste it as an online source it works out fine in serviio.
<<

jhb50

DLNA master

Posts: 2843

Joined: Thu Jun 30, 2011 9:32 pm

Post Thu Jan 07, 2016 4:18 am

Re: Live Streams without testing

You can try this one. It works fine for me. Make sure your whole rss looks like this. You only posted the item. Also maybe the trailing blank in your media:stream url caused a problem...remove it.

Based on my testing it looks like the streams are tested the first time the feed is parsed and cached if valid. But I think they stay in the list even if they go offline after that and you will get an error on the TV if you try and play them, as described in the wiki.

  Code:
<?xml version="1.0" encoding="UTF-8" ?>

<rss version="2.0" xmlns:media="http://search.yahoo.com/mrss/">

<channel>
   <title>Russia Today</title>
   <link>https://sites.google.com/site/serviiorss/LiveFeeds_Russia_Today.rss</link>
   <description>Russia Today</description>


   <item>
      <title>Russia Today</title>
      <link>http://link2</link>
      <media:stream url="http://rt-lh.akamaihd.net/i/ch_06@325610/index_720p_av-p.m3u8" type="video" />
      <media:thumbnail url="https://sites.google.com/site/serviiorss/RT News.jpg?attredirects=0" />
   </item>

   </channel>

</rss>

<<

beinaendi

Serviio newbie

Posts: 12

Joined: Wed Apr 30, 2014 3:09 pm

Post Thu Jan 07, 2016 4:25 pm

Re: Live Streams without testing

I am sorry, my fault. The only thing that ever was wrong was the filename. I didn't recognize that it has to be like "LiveFeeds*". Now everything is perfect.

Thus, a small hint for you, the trailing blanks are from the wiki. Check out "an example rss":
  Code:
<media:stream url="mmsh://85.14.12.34" />
<media:thumbnail url="http://site.google.com/user/animatedmovies.jpg" />


I'm gonna get back to this topic with additional information if my initial problem is solved. Needs a little more time for testing with the TV channels not always available.

Thank you!
<<

beinaendi

Serviio newbie

Posts: 12

Joined: Wed Apr 30, 2014 3:09 pm

Post Thu Jan 07, 2016 5:26 pm

Re: Live Streams without testing

Hey jhb50,

i tested the plugin with multiple channels. The result is that your plugin lists the folder and all items till the first stream that is offline. Although I don't know anything about groovy plugins I do know a bit about programming. Your code
  Code:
def live = true
return new ContentURLContainer(fileType: fileType, contentUrl: contentUrl, thumbnailUrl: thumbnailUrl, live: live)

should tell servio the stream is online, right? Thus serviio seems to stop the plugin because it seems to have a problem with this stream.

The log file gives me the following information:
2016-01-07 18:20:55,383 WARN [FeedUpdaterWorker] Failed to retrieve online item information for http://sub.domain:9981/stream/channel/c9221442fe39a5e2. It might not play.
java.io.IOException: org.serviio.library.local.metadata.extractor.InvalidMediaFormatException: Unknown video file type.
at org.serviio.library.online.metadata.FeedUpdaterWorker.retrieveMetadata(FeedUpdaterWorker.java:324)
at org.serviio.library.online.metadata.FeedUpdaterWorker.retrieveTechnicalMetadata(FeedUpdaterWorker.java:243)
at org.serviio.library.online.metadata.FeedUpdaterWorker.run(FeedUpdaterWorker.java:122)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.serviio.library.local.metadata.extractor.InvalidMediaFormatException: Unknown video file type.
at org.serviio.library.metadata.FFmpegMetadataRetriever.validateMandatoryMetadata(FFmpegMetadataRetriever.java:467)
at org.serviio.library.metadata.FFmpegMetadataRetriever.retrieveMetadata(FFmpegMetadataRetriever.java:100)
at org.serviio.library.metadata.FFmpegMetadataRetriever.retrieveOnlineMetadata(FFmpegMetadataRetriever.java:138)
at org.serviio.library.online.metadata.FeedUpdaterWorker.retrieveMetadata(FeedUpdaterWorker.java:303)
... 3 more

I guess the only solution would be to tell serviio with your plugin the video file type so that serviio doesn't have to check it. Is there a possibility to do this?
<<

jhb50

DLNA master

Posts: 2843

Joined: Thu Jun 30, 2011 9:32 pm

Post Thu Jan 07, 2016 9:10 pm

Re: Live Streams without testing

No all that shows that stream was unavailable and so its values could not be cached. It will not stop the next stream from being tested, and the rest of the rss from being processed. The streams must be tested and found so Serviio can get its attributes and play it when requested. Unlike the TV where all channels have one set of fixed specs eg:ATSC, streams can be of many different formats which must be determined before they can be played.
<<

beinaendi

Serviio newbie

Posts: 12

Joined: Wed Apr 30, 2014 3:09 pm

Post Fri Jan 08, 2016 12:03 pm

Re: Live Streams without testing

Stream testing makes sense usually, unfortunately not in my case. My TV channels don't change at all...

I am testing a RSS file with 3 items, one of them not online. If the offline item is at first place, I don't get any items at all, if it's at third place, the first and second show up and work fine. So I think for whatever reason it doesn't work the way it should here.
<<

jhb50

DLNA master

Posts: 2843

Joined: Thu Jun 30, 2011 9:32 pm

Post Sat Jan 09, 2016 4:16 am

Re: Live Streams without testing

Here is the same one as above with an invalid stream preceeding the valid one. It works fine for me. If yours does not work then try this one, to verify something is broken in yours. It has nothing to do with the tv since the stream setup is all in Serviio. My guess is you are not making the links different ie: http://link1, http://link2 etc.

  Code:
<?xml version="1.0" encoding="UTF-8" ?>

<rss version="2.0" xmlns:media="http://search.yahoo.com/mrss/">

<channel>
   <title>Russia Today</title>
   <link>https://sites.google.com/site/serviiorss/LiveFeeds_Russia_Today.rss</link>
   <description>Russia Today</description>


   <item>
      <title>Russia Today</title>
      <link>http://link1</link>
      <media:stream url="http://rt-lh.akamaihd.net/i/ch_06@325611/index_720p_av-p.m3u8" type="video" />
      <media:thumbnail url="https://sites.google.com/site/serviiorss/RT_News.jpg?attredirects=0" />
   </item>

   <item>
      <title>Russia Today</title>
      <link>http://link2</link>
      <media:stream url="http://rt-lh.akamaihd.net/i/ch_06@325610/index_720p_av-p.m3u8" type="video" />
      <media:thumbnail url="https://sites.google.com/site/serviiorss/RT_News.jpg?attredirects=0" />
   </item>

   </channel>

</rss>
<<

beinaendi

Serviio newbie

Posts: 12

Joined: Wed Apr 30, 2014 3:09 pm

Post Sat Jan 09, 2016 11:03 am

Re: Live Streams without testing

Your guess is wrong. I read through your Plugin topic and learned from the mistakes there ;)

I'll test your code later this afternoon. Thank you meanwhile

Return to Serviio Support & Help

Who is online

Users browsing this forum: No registered users and 87 guests

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