Jump to content


Photo

VirtualTV plugin

PseudoTV Custom TV

  • Please log in to reply
372 replies to this topic

#1 pünktchen OFFLINE  

pünktchen

    Advanced Member

  • Members
  • 2473 posts
  • Local time: 06:12 PM

Posted 27 December 2019 - 05:33 PM

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 10 channels

What's coming next:

  • Bug fixing, if you find some. And i'm sure you will
  • Implement sorting options other than random
  • Remove channel count limitation
  • Optimize configuration screen with pre-filled cloud selection dialogs for genre, tags and some other things

Known problems:

  • (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 playback modes: "single" and "continous" playback.

In single mode the plugin requests one stream copy of the actual movie from Emby's VideoService and forwards the URL to the live tv engine. At the end of the stream live tv stops. This mode has to be your preferable choice.

In continous mode up to ten movies are queued and concatenated to one big file. To make this happen every video in the queu has to have some common features (video and audio codec, framerate). That's why it often happens that the video 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.

Both playback modes only deliver a maximum of one audio and subtitle track, dependant of the Emby user playback settings.

 

If you like my plugin but want a better playback experience, just ping @Luke and as for ReadAtNativeFramerate, CopyAllCodecs and Auto RestartLiveTV

 

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 you api key and paste it in the general setting of the VirtualTV plugin configuration screen.

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, reading watched states and selecting the video 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 movie is still playing, hit the record button on the video osd to mark the movie as "Watched".

 

Version History:

  • 0.5.0 First release
  • 0.5.1 Ignore external subtitles for stream requests
  • 0.5.2 Added some extra logging for the Export task
  • 0.5.3 Do not throw an exception for items without runtime, instead just skip them
  • 0.6.0 Support for TVShows, option to automatically mark items as watched
  • 0.6.2 Increased channels to twenty; Fixes for "AutoMarkWatched", Fixes for playback start
  • 0.6.4 Fixed "Watched Only" condition for tv shows; Fixed http response header for the export web api; Fixed Emby crash by "AutoMarkWatched"; Added option to force ts container in single playback mode
  • 0.6.5 Added custom ffmpeg option for single playback mode
  • 0.6.6 Fixed a bug for TVShows that could lead to an infinite guide refresh; Added some hidden settings for "FFmpegDirectStream" mode
  • 0.6.7 Added option to wait some time for the intermediate transcoding file to get filled
  • 0.7.0 Added support for music videos; Added program sort options to each channel; Optimized some database queries; Changed method of recognizing local ip adress for the Export method

After a plugin update, always clear your browser cache. If your setting 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.

Attached Files


Edited by pünktchen, 11 February 2020 - 02:36 PM.


#2 Spaceboy OFFLINE  

Spaceboy

    Advanced Member

  • Members
  • 4576 posts
  • Local time: 05:12 PM

Posted 27 December 2019 - 05:35 PM

Excellent! Great work @punktchen

#3 kanipek OFFLINE  

kanipek

    U.S. Navy Retired

  • Members
  • 1201 posts
  • Local time: 12:12 PM
  • LocationMassillon, Ohio

Posted 27 December 2019 - 05:37 PM

Very cool. Pseudo TV for Emby! Thanks very much!



#4 Jdiesel OFFLINE  

Jdiesel

    Advanced Member

  • Members
  • 2843 posts
  • Local time: 10:12 AM
  • LocationRegina, SK

Posted 27 December 2019 - 05:43 PM

Niiice! I've been dying for something like this for ages



#5 shorty1483 OFFLINE  

shorty1483

    Advanced Member

  • Members
  • 1429 posts
  • Local time: 05:12 PM
  • LocationGermany

Posted 27 December 2019 - 07:00 PM

This is simply awesome. Just tried it out and I love it! Well done!

#6 shorty1483 OFFLINE  

shorty1483

    Advanced Member

  • Members
  • 1429 posts
  • Local time: 05:12 PM
  • LocationGermany

Posted 27 December 2019 - 08:08 PM

@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...

Attached Files


Edited by shorty1483, 27 December 2019 - 09:01 PM.


#7 pünktchen OFFLINE  

pünktchen

    Advanced Member

  • Members
  • 2473 posts
  • Local time: 06:12 PM

Posted 27 December 2019 - 08:33 PM

@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.
  • chef and shorty1483 like this

#8 pünktchen OFFLINE  

pünktchen

    Advanced Member

  • Members
  • 2473 posts
  • Local time: 06:12 PM

Posted 27 December 2019 - 08:58 PM

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?

#9 shorty1483 OFFLINE  

shorty1483

    Advanced Member

  • Members
  • 1429 posts
  • Local time: 05:12 PM
  • LocationGermany

Posted 27 December 2019 - 08:58 PM

@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. Attached File  Screenshot_20191228-015613_Emby.jpg   63.09KB   21 downloads

Edited by shorty1483, 27 December 2019 - 09:01 PM.


#10 arrbee99 OFFLINE  

arrbee99

    Advanced Member

  • Members
  • 3416 posts
  • Local time: 04:12 AM
  • LocationNew Zealand

Posted 27 December 2019 - 09:07 PM

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, 27 December 2019 - 09:10 PM.


#11 pünktchen OFFLINE  

pünktchen

    Advanced Member

  • Members
  • 2473 posts
  • Local time: 06:12 PM

Posted 27 December 2019 - 09:12 PM

@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.


  • shorty1483 likes this

#12 shorty1483 OFFLINE  

shorty1483

    Advanced Member

  • Members
  • 1429 posts
  • Local time: 05:12 PM
  • LocationGermany

Posted 27 December 2019 - 09:13 PM

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

@Luke

#13 pünktchen OFFLINE  

pünktchen

    Advanced Member

  • Members
  • 2473 posts
  • Local time: 06:12 PM

Posted 27 December 2019 - 10:15 PM

@shorty1483 new version 0.5.1 in the starting post that should ignore external subtitles.


  • chef likes this

#14 hstamas OFFLINE  

hstamas

    Advanced Member

  • Members
  • 615 posts
  • Local time: 12:12 PM

Posted 28 December 2019 - 12:17 AM

Sweet! Once TV shows are added I’m going to be all over this!

 

Thanks SO much!



#15 shorty1483 OFFLINE  

shorty1483

    Advanced Member

  • Members
  • 1429 posts
  • Local time: 05:12 PM
  • LocationGermany

Posted 28 December 2019 - 03:43 AM

Thanks @pünktchen Subtitle files now working! Thanks! Awesome plugin.

 

Another error log attached. File is playing fine standalone.

Attached Files



#16 pünktchen OFFLINE  

pünktchen

    Advanced Member

  • Members
  • 2473 posts
  • Local time: 06:12 PM

Posted 28 December 2019 - 10:44 AM

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?..."
  • chef likes this

#17 Spaceboy OFFLINE  

Spaceboy

    Advanced Member

  • Members
  • 4576 posts
  • Local time: 05:12 PM

Posted 28 December 2019 - 05:13 PM

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



#18 pünktchen OFFLINE  

pünktchen

    Advanced Member

  • Members
  • 2473 posts
  • Local time: 06:12 PM

Posted 28 December 2019 - 05:57 PM

What do you mean by "it doesn't work"?
I'm still on Emby 4.2.1.0

#19 Spaceboy OFFLINE  

Spaceboy

    Advanced Member

  • Members
  • 4576 posts
  • Local time: 05:12 PM

Posted 28 December 2019 - 06:00 PM

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



#20 pünktchen OFFLINE  

pünktchen

    Advanced Member

  • Members
  • 2473 posts
  • Local time: 06:12 PM

Posted 28 December 2019 - 06:07 PM

Any errors in the logs?
If not enable debug logging in Emby, do a guide refresh and pm the log.





Also tagged with one or more of these keywords: PseudoTV, Custom TV

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users