Jump to content

AV1 Playback for virtual TV plugin on Emby


Recommended Posts

ryzen5000
Posted

My server is a custom build with its own dedicated rtx4060 for converting files to AV1 and a second gpu rtx 3050 for devices that need transcoding of AV1 files. I saved approximately 50 TB converting all my files to AV1 with no noticeable loss in quality. But now I want to have live tv on Emby, even if it's just my own media but I tried the virtual tv plugin and it just stutters and won't play av1 files.

Can you recommend a software that I can use to integrate into Emby as an M3U or any other way to create channels with AV1 Content?

I tried Ersatz Tv and it doesn't seem to play av1 files either.

I'm looking for a way to accomplish this now that my media library is fully converted.

I have my own AV1 transcoding guide posted here in case anyone is interested in following my guide and saving a tone of space. IT uses Handbrake Cli and Tdarr. 

I even put the presets in the guide so that you can import them straight into handbrake and Tdarr and be set up quicker.

So again my question is how can I create my own channels for live tv now that my library is all AV1?

AV1-Media-Transcode-Guide-main.zip

GrimReaper
Posted
16 minutes ago, ryzen5000 said:

I tried the virtual tv plugin and it just stutters and won't play av1 files

Which playback mode have you selected for VirtualTV channels? Which client app used for playback? 

16 minutes ago, ryzen5000 said:

Can you recommend a software that I can use to integrate into Emby

PseudoTV and MyTV plugins basically accomplish same thing, you could try either (or both). 

 

ryzen5000
Posted

I am using playback mode Playlist (live).

ryzen5000
Posted

I am testing Pseudo TV plugin so far I'm getting this "Playback Error Program not found."

ryzen5000
Posted (edited)

Attached are the server logs from when I attempted to press play. Temp channel is the Pseudo TV channel I created and Tis the season to be Irish is the MyTv plugin. It looks like it should be working but it can't play the video.

embyserver (2).txt

Edited by ryzen5000
ryzen5000
Posted

The MyTv plug is a really cool one, and from my tests it does work on H264 movies that I have not yet converted to AV1. Which doesn't help me unless you could possibly add av1 support? here are the logs and a video, some movies play and some don't by their codecs AV1 and do by H264. Great work on the plugin though its is very easy to set up and I am sure its amazing for those that have not yet converted their library.

embyserver (3).txt

ryzen5000
Posted (edited)

I figured out a way to make it work. The only reason I needed Jellyfin was because i tried both Plex and Emby and it wouldn't connect through sign in or connect to Emby option was not working however it is in Tunarr but appears to still be under development. This way I can watch my own media as live tv on Emby.

1.Install Tunarr 
2.Install Jellyfin Media Server and add all your libraries.
3.Open Tunarr and take the API key from Jellyfin and (you will need this to make Jellyfin into Embys slave or B****)
4.Connect Tunnar to Jellyfin, set to AutoStart if possible on both tunarr and Jellyfin.
5.Create some channels, use logos from here add media and select
  Play alphabetical, I tried random and it wrongly put the same movie on all channels I added.
6.Copy the m3u and xml tv from Tunarr and put it into Emby in Live TV using M3U selection.
   Don't add it as HD home run, it doesn't work properly.
7.Leave hls default in Transcoding Settings
8.Refresh guide.
9.If it is all looking good, your tv guide should be working then create more channels.

WhatsApp Image 2025-03-23 at 07.32.41_ec871c7f.jpg

WhatsApp Image 2025-03-23 at 07.43.14_04066f18.jpg

WhatsApp Image 2025-03-23 at 08.01.13_dde9d7fa.jpg

m3u.png

EMBY option.jpg

Edited by ryzen5000
Uploading another image and correcting capitalization
ryzen5000
Posted

It is going slowly but good, playback is perfect and sound quality is great through Emby on live TV using my own media. I actually feel better about having a separate app like tunarr vs a plugin because I can share it with other apps too and if Emby were to crash, doesn't happen often. All my efforts are backed up by appdata backup on unraid.

Anyways this is my progress so far. I plan on making more channels. The guide works perfectly.

Image 2025-03-23 at 09.58.50_27320eea.jpg

Image 2025-03-23 at 09.59.39_f5a49eb9.jpg

Image 2025-03-23 at 10.00.00_4a72c2e1.jpg

Posted

OK in the future if you use the VirtualTV plugin again, don't use the playlist method option and you should be fine.

pünktchen
Posted
1 hour ago, Luke said:

OK in the future if you use the VirtualTV plugin again, don't use the playlist method option and you should be fine.

Why? The playlist method is nothing else than Emby's own "Play to" command of the SessionsService API.

ryzen5000
Posted

I will test it sometime but right now I have already implemented Tunarr and I have programmed 21 channels and I think there are more features in Tunarr than the Virtual TV plugin.

There is "SORT": random, cyclic shuffle, alphabetical, release date, sort tv shows and block shuffle. Plus so many more choices of how I want it to play. I can even add my own commercials. "TOOLS" timeslots and redirects. This is deluxe! It also explains each choice as I hover my mouse over it to make it easier to choose.

The end result is amazing, and I have only spent a couple hours playing around with this. I think there is more possibilities with it because its external. Full screen movie selection and shows to choose which ones I want on the channels. I can go back in at any time and make changes and set Emby's schedule to recheck every 15 minutes.

App Image 2025-03-23 at 19.51.05_4beb86a8.jpg

App Image 2025-03-23 at 19.51.32_cc4dd1f3.jpg

ryzen5000
Posted (edited)

Correction: I programmed 15 channels, not 21. But by tomorrow there might be more.

Edited by ryzen5000
correction
VicMoore
Posted
21 hours ago, Luke said:

OK in the future if you use the VirtualTV plugin again, don't use the playlist method option and you should be fine.

@LukeAre you implying that by avoiding using a playlist, you have fixed the long-standing issues with Emby clients playing videos from an EPG? For example, the video will start at the proper time. In addition, the next video inline within the EPG will play when the current playing video ends. If so, then the virtualTvExample code should now work properly and I can remove the playlist code in myTV.

Vic

VicMoore
Posted

@ryzen5000thank you for testing myTV. I may be wrong, but I think the problem you are experiencing is an Emby artifact caused by having to mitigate a client shortcoming: for example, Emby clients always start playing media from the beginning of the media. This doesn't work in the context of an EPG, where videos are played starting at the current time within the EPG. To overcome this problem @pünktchencame up with an interesting solution. He sent a playlist to the Emby client, followed by a skip ahead command to play the video at the current EPG time. I use this same concept in myTV.  Unfortunately, this technique bypasses much of the marvelous Emby transcoding and media playing architecture. I think this is true, but if I am wrong this is a good time for someone to correct me. Either way I learn.

Vic

ryzen5000
Posted

Yes, no problem. I tested it and it would have worked perfectly except for my library now has the AV1 codec. But in the future maybe plugins or architecture will adapt as more people are converting their libraries to save space. Here are some examples of my AV1 conversion guide working in case anyone is interested.  I am using a rtx 4060, rtx 4070 super to do the work. Video quality is very good and with my guide you can adjust it tweak it even more or use the presets I already made.

App Image 2025-03-24 at 06.54.59_3d05d71f.jpg

App Image 2025-03-24 at 15.11.03_7b98fdd0.jpg

App Image 2025-03-24 at 15.13.33_a4bd7369.jpg

App Image 2025-03-24 at 15.16.27_09970ed2.jpg

App Image 2025-03-24 at 15.32.51_0da159c1.jpg

pünktchen
Posted
2 hours ago, VicMoore said:

He sent a playlist to the Emby client, followed by a skip ahead command to play the video at the current EPG time. I use this same concept in myT.

Don't you use the "native" playback method of the VirtualTV Example followed by a seek command anymore?

 

2 hours ago, VicMoore said:

Unfortunately, this technique bypasses much of the marvelous Emby transcoding and media playing architecture.

You are totally wrong here. This technique uses all of Emby's transcoding capabilities, because in the end it is the same as playing something regular from the libraries. The only difference is that not the user of the client initiates the playback with a button press of his remote, but the server does this.

VicMoore
Posted

Thanks @pünktchenfor the reply.  I send a playlist to the client, which starts executing the first list item. Then I send a "seek to" command to cause the client to skip ahead to the correct time in the video.  The client continues executing the playlist until all videos are played.  

As I understand your comment, in your architecture, the selected item in the EPG is streamed via the "native" server code to the client and you send a "seek to" command to move the video ahead to the proper time. Is this correct?  If so, then I am wasting time sending a playlist to the client.

Vic

pünktchen
Posted
39 minutes ago, VicMoore said:

As I understand your comment, in your architecture, the selected item in the EPG is streamed via the "native" server code to the client and you send a "seek to" command to move the video ahead to the proper time. Is this correct?

No, that is what you are already doing in case of Emby Web Client or Emby for Android! But you should know that, because it's in your code:

if ((client == "Emby Web") || (client == "Emby for Android"))
{
    this.Logger.Info("======7 myTv [][][][][][][][][][][][] SeekPosition [][][][][][] Emby Web session Id = " + sessionId);
    var command = new PlaystateRequest() { Command = PlaystateCommand.Seek , SeekPositionTicks = catchupTicks, ControllingUserId = userId };
    this.sessionManager.SendPlaystateCommand(sessionId, sessionId, command, playbackCancellationToken);
} else {
    this.Logger.Info("======8 myTv [][][][][][][][][][][][] PlayNow [][][][][][][][][][][][][] session Id = " + sessionId);
    var playRequest = new PlayRequest() { PlayCommand = PlayCommand.PlayNow, ItemIds = playbackMediaIds, StartPositionTicks = catchupTicks, StartIndex = 0 };
    this.sessionManager.SendPlayCommand(sessionId, sessionId, playRequest, playbackCancellationToken);
};

 

VicMoore
Posted

@pünktchenYes I was just looking at that.   I need to check this code again because my Samsung TV is always getting a playlist.  

Vic

pünktchen
Posted

I think you were doing the "else" clause in PseudoTV already, because at that time only the web client and the standard Android app did advance to the next program with native playback. Nowadays all clients except Roku and the Android TV app should do this. At least Luke claims that.

VicMoore
Posted

Thanks @pünktchenfor the help.  I will make the correction.  If you happen to know, what strings are used to identify the Roku and the AndroidTV clients?  

You are working very late tonight. It must be 3 in the morning. I hope everything is OK and that you are doing well.

Vic

pünktchen
Posted
1 hour ago, VicMoore said:

If you happen to know, what strings are used to identify the Roku and the AndroidTV clients?

I have both. I can check that.

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