Jump to content

VirtualTV plugin


pünktchen

Recommended Posts

pünktchen

5e065eab9d91b_thumb.png

 

You've grown up with watching live tv but on television only runs garbage? You have a big library but don't know what to watch next?

Then this for you: "VirtualTV" - my new live tv plugin that allows you to create custom channels based on conditions of your Emby library content.

 

Right now it's in beta state, so testers are welcome.

Although it's already very feature rich, it has some limitations:

  • Only up to 30 channels

What's missing:

  • Remove channel count limitation
  • Maybe codec conditions
  • Pause guide refresh for independent channels

Known problems:

  • Needs Emby Premier to work
  • (Playback)

Emby's live tv and playback api is very limited, so i've had to make some detours to get things working. The plugin has two general playback modes: "continous" and "playlist" playback. With "continous" mode you can also choose between "live", which bahaves like real live tv or "archive", which plays the videos from the start.

In "continous" mode multiple videos are queued and concatenated to one big file with the help of ffmpeg. To make this happen every video in the queue has to have some common features (video and audio codec). That's why it often happens that the video also has to be transcoded by ffmpeg.

For transcoding the plugin relies on Emby's internal transcoding engine. If there's a problem, not uncommon with hardware acceleration enabled, the plugin also has a problem. Nothing i can do about it.

The availability of subtitle tracks is mostly dependant of the Emby user playback settings. In continous playback mode only one (the default) subtitle track can be used and this one has to be burnded into the video (transcoding takes place).

In "playlist" playback mode the videos are pushed as a playlist to the Emby clients. It's like you would play your videos directly from your libraries. This way you get all the features you are used to. Audio and subtitle selection, pause, skipping around and similar things.

 

To get things started copy the extracted dll from the attachment at the end of this post to Emby' s plugin folder.

Restart you server and follow the instructions:

  • First you have to setup a custom api key. This is needed for most internal requests the plugin is doing.

5e0672d9332fd_1apikey.png

 

  • Copy your api key and paste it in the general settings of the VirtualTV plugin configuration screen and save the config before proceeding.

5e06736d61867_2generalconfig.png

The export folder path is optional. It allows you to use your custom channel line up in other applications like Kodi.

 

  • Now setup your channels with a name and number and choose your playback mode.

5e06748bd304a_3generalchannels.png

 

  • In the channel conditions you'll have to select an Emby account. This account is used to get library access, respect parental rating, reading watched states and selecting the stream language.
  • At least one textual input field of the conditions has to be filled to get some program data. Fields with an asterisk are either evaluated with an "AND" or "OR" condition among each other.

5e0676e988f39_4conditionchannels.png

 

  • Finally, if you've chosen "Continous Playback" for one of you channels, take a look at the transcoding settings.

5e06777135671_5transcoding.png

 

Save your channel line up and manually trigger a "Guide Refresh".

Now have fun!

Hint: if a video is still playing, hit the record button on the video osd to mark the item as "Watched".

 

Version History:

After a plugin update, always clear your browser cache. If your settings still don't load in the config screen,
you have to move the "VirtualTV.xml" out of ...\plugins\configurations and restart Emby. Start from scratch.

VirtualTV.0.9.9.5_Emby.4.5.x.zip

VirtualTV.0.9.9.5_Emby.4.6.x.zip

Edited by pünktchen
  • Like 35
  • Thanks 1
Link to post
Share on other sites
shorty1483

@@pünktchen Is an implementation of parental control as a channel criteria planned, e.g. for a animation channel, but max. FSK-6. Also the integration of playlists and Collections would be really cool to have theme channels like Sky does.

 

Also I got errors on some channels, that the particular stream is not available at the moment. All my affected movies contain the video stream and one audio stream + an external subtitle (srt). Seems ffmpeg is concerned about the external sub, because every movie without it, no matter what resolution, plays without problems.

Stream map '0:2' matches no streams.To ignore this, add a trailing '?' to the map.
Full ffmpeg logs attached.

 

 

@@Luke I hope you guys take a little care of pünktchens mentions, since this is the by far coolest 3rd party plugin so far. This makes the Live TV section usable even for the lots of guys like me who do not use the real live TV feature.

 

 

btw, the PseudoTV logos totally fit in...

post-59764-0-58951200-1577491254_thumb.png

ffmpeg-directstream-c3892d7a-6a6b-4057-8479-8357d7134422_1.txt

ffmpeg-directstream-ebff6414-90a6-4927-a010-f382332c6089_1.txt

Edited by shorty1483
Link to post
Share on other sites
pünktchen

@@pünktchen Is an implementation of parental control as a channel criteria planned, e.g. for a animation channel, but max. FSK-6.

Haha, i knew that question would arise. It's planned, but i wanted to release it around xmas and hadn't the time for this. But if you select a user that has a max. parental rating of FSK-6, it should be respected.
  • Like 2
Link to post
Share on other sites
pünktchen

Also I got errors on some channels, that the particular stream is not available at the moment. All my affected movies contain the video stream and one audio stream + an external subtitle (srt). Seems ffmpeg is concerned about the external subs, because every movie without it, no matter what resolution, plays without problems.

Stream map '0:2' matches no streams.
To ignore this, add a trailing '?' to the map.
Full ffmpeg logs attached.
Interesting!

@@Luke before playback i'm querying for DefaultSubtitleStreamIndex with a PlaybackInfo request. Shouldn't it return nothing in case of external subtitles?

Link to post
Share on other sites
shorty1483

@@pünktchen

 

Additionally to the above reported, I recognized that all the movies in the channels show the same Extras in the Info screen. These are Extras of totally another movie. Also they all show the same Suggestion of one movie under the Extras. post-59764-15774947023649_thumb.jpg

Edited by shorty1483
Link to post
Share on other sites

I had that extras thing above, but without using this plugin at all.

 

Edit - not that I can get it to reproduce itself at the moment...

Edited by arrbee99
Link to post
Share on other sites
pünktchen

@@pünktchen

 

Additionally to the above reported, I recognized that all the movies in the channels show the same Extras in the Info screen. These are Extras of totally another movie. Also they all show the same Suggestion of one movie under the Extras. attachicon.gifScreenshot_20191228-015613_Emby.jpg

:huh:  Extras and suggestions are by Emby not by my plugin.

  • Like 1
Link to post
Share on other sites
pünktchen

There's not much i can do with those ffmpeg errors. Basically i'm telling Emby i need a direct stream, but Emby is telling ffmpeg how to do this.

I can only try to workaround those errors by requesting a container swap for some file extensions. So please try the following in VLC:

Open the url you'll find in your log with "...stream.mkv?..." instead of "...stream.mp4?..."

  • Like 1
Link to post
Share on other sites
Spaceboy

may be useful to note that the plugin doesnt seem to work with the stable server version from my testing. working well on my beta install though. looking forward to series being added and the server being updated so i can use it properly

Link to post
Share on other sites
Spaceboy

What do you mean by "it doesn't work"?

I'm still on Emby 4.2.1.0

:) fair enough. on stable 4.3.1.0 the config all works and the placeholder for the channel is added o the tv guide but no programs appear after running the guide refresh

 

all works as expected on latest beta

Link to post
Share on other sites
shorty1483

:) fair enough. on stable 4.3.1.0 the config all works and the placeholder for the channel is added o the tv guide but no programs appear after running the guide refresh

 

all works as expected on latest beta

Weird, my posted EPG image above is from this stable Version... Edited by shorty1483
Link to post
Share on other sites
pünktchen

Weird, my posted EPG image above is from this stable Version...

Maybe he has a database that was converted from Emby 3.5...

 

Did you have chance to test what i was suggesting with VLC?

Link to post
Share on other sites
Spaceboy

Still testing/looking into it. I don’t remember from which version this library came. Once I found it worked on my beta but not my stable install I immediately assumed that was the issue

Link to post
Share on other sites
shorty1483

There's not much i can do with those ffmpeg errors. Basically i'm telling Emby i need a direct stream, but Emby is telling ffmpeg how to do this.

I can only try to workaround those errors by requesting a container swap for some file extensions. So please try the following in VLC:

Open the url you'll find in your log with "...stream.mkv?..." instead of "...stream.mp4?..."

 

 

Maybe he has a database that was converted from Emby 3.5...

 

Did you have chance to test what i was suggesting with VLC?

 

Sorry mate,was busy updating ,all my APCs :D

 

I checked with stream.mp4? and stream.mkv? and both are working on latest VLC.

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...