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.

 

What's missing:

  • Maybe codec conditions

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 "Continuous" 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.

"Native" playback method was created by the Emby Devs. Similar to Playlist playback it will play the real library videos, but with the big difference that playback is purely initiated by the client app, without any remote command execution. This is why it also works for Roku devices on a WAN network. And although the real videos are played, the whole thing is treated like live TV. This means that channel zapping is possible and no dialogs for playing the next episode are displayed. Unfortunately, the new playback method does not yet support all features. As the name "Archive" suggests, it will currently always start all videos from the beginning. In addition, only very few Emby apps automatically advance to the next video. If you want it to be improved even further, each of you should raise your voice in this thread.

 

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:

  • 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!

 

Version History:

Spoiler

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.1.1.2_Emby.4.5.x.zipVirtualTV.1.1.2_Emby.4.6.x.zipVirtualTV.1.1.3.2_Emby.4.7.x.zip

For Emby 4.8.x, you'll find the plugin in the catalog.

Edited by pünktchen
  • Like 41
  • Thanks 6
Link to comment
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
  • Like 1
Link to comment
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 comment
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 comment
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 comment
Share on other sites

arrbee99

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 comment
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 comment
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 comment
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 comment
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 comment
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 comment
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 comment
Share on other sites

jachin99

I'm having the same issue as above, I get the channel to show but no program information or movies show up for it.  I didn't convert from 3.5

Link to comment
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 comment
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 comment
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...