Jump to content

PLAYz emby for LG Smart TVs


simonjhogan
Go to solution Solved by ellnic,

Recommended Posts

@@woozle Good feedback!  This is the forum for it!  I'll add a transcoding option to settings.  Most likely, you are missing "Continue Watching"  because your resumable videos were last watched outside of Emby's continue watching window.  Finally, I've seen your "resume not working" issue with the v2.0 emulator.  Interestingly, it works just fine on my WebOS 2.0 TV.  Are you are testing with this emulator?  The problem is that the emulator isn't sending TimeUpdate events for some reason.  Another artifact of this is that the video controls progress bar won't update elapsed time, and the progress bar won't move.

 

Yes, the user login does assume that a password will be entered.  I'll get that fixed.

 

Resume is supposed to look like this:

 

images-vi.png

 

Unfortunately, this icon doesn't exist in the glyph-icon set which screenplay employs for these types of objects.  I need to spend some quality time with photoshop to fix it.  Its on the list but not high on the list...

 

Everybody: I pushed a major change last night.  Working on HLS streaming.  It appears that Emby doesn't stop transcoding when I send it a playback stopped notification so I'm trying to get this resolved.  The problem can manifest itself as a movie that can't be started or resumed again after playback is halted.  The current push posts a active encodings stop message to emby as well.  I don't think I've fully got it yet.  I'm still reviewing the api demo code around this.

  • Like 1
Link to comment
Share on other sites

@@kwilcox right, that would probably be a little bit better. At the moment, the resume icon looks like fast forward - which might be useful because I've got used to watching 50 minute programmes on a 40 minute train journey by speeding them up ;-) obviously though I'm not taking my telly with me...

 

I'm actually testing it direct on my WebOS 2.0 TV.

 

Actually I think I meant I was missing the "next up" feature that exists in the Android app and the web interface - as in this is the next unwatched episode in that series. Maybe you're more focused on movies? :-)

 

I've often noticed that the transcoding seems to continue for quite some time after stopping watching, whichever interface I'm using. That's one of the reasons why I try to avoid transcoding... Will HLS help avoid transcoding then? 

Link to comment
Share on other sites

I'm working on exactly that.  Emby has this API recommendation for HLS:

 

After playback is complete, it is necessary to inform the server to stop any related HLS transcoding. This is accomplished via an HTTP DELETE to: /Videos/ActiveEncodings?DeviceId=xxx

 

I've just implemented this and I've also implemented a change in settings to turn off transcoding by setting videobitrate to zero.  When this is set, I envoke the stream with static=true which is supposed to disable transcoding.  

 

Testing now...  So far, the API delete for ActiveEncodings doesn't appear to have an effect on spawned ffmpeg processes.  Not sure if emby server should kill them after receiving the above or not.

 

edit: but it looks to be working just perfectly on the WebOS 3.0 emulator!  As soon as I stop the video, emby server kills the ffmpeg process.  And, the playback/resume issue is now gone!  I'll test this on my 55EF9500 later today.

Edited by kwilcox
Link to comment
Share on other sites

I'm actually testing it direct on my WebOS 2.0 TV.

 

hmmm... not good.  I'm doing a client side seek that depends on the TV's implementation of HLS.  What version of WebOS 2.0 does your TV run?  

Edited by kwilcox
Link to comment
Share on other sites

Hm, well, that's interesting. Nope, no updates - it last updated in June, and I hadn't looked at it recently...

 

I was pretty sure it was running WebOS 2, but it looks like it's actually 1.4 (software version 05.05.01)

Having googled it to try and work out what happened, it looks like there was a lot of discussion about that set of TVs getting WebOS 2 (or not). LG seemingly backtracked to say that they would do WebOS 2, but it looks like that translated to "bring WebOS 2.0 features", resulting in this version.

 

If that's why, that's frustrating, but not a lot I can do about it *cry*

Link to comment
Share on other sites

kwilcox

Ok, I've got positive control over active encodings working in both WebOS2 and 3 now.  I've also requested that LG stop the QA process on v1.0.2 so I can upload the current code.  They haven't started on it yet anyway.

Link to comment
Share on other sites

kwilcox

Hey, if you have loaded the IDE and are testing screenplay on your LG TV, I need your help.  It looks like timeupdate isn't properly implemented on any of the emulators, but it works fine on my TV.  Can you do this to test?

 

Start with a fresh copy from the repository (I just pushed v1.0.3 which has the videoEncodings control logic)

 

load up the IDE and edit player.js in script/models

 

search for "timeupdate"  you should see the following code:

video.addEventListener("timeupdate", function(event) {
// update the time/duration and slider values
var durhr = Math.floor(video.duration / 3600);
   var durmin = Math.floor((video.duration % 3600) / 60);
durmin = durmin < 10 ? '0' + durmin : durmin;
 
var curhr = Math.floor(video.currentTime / 3600);
   var curmin = Math.floor((video.currentTime % 3600) / 60);
curmin = curmin < 10 ? '0' + curmin : curmin;

now add a notification at the top:

video.addEventListener("timeupdate", function(event) {
 
playerpopup.show({
duration: 500,
text: "timeupdate: " + video.currentTime
}); 
 
// update the time/duration and slider values
var durhr = Math.floor(video.duration / 3600);
   var durmin = Math.floor((video.duration % 3600) / 60);
durmin = durmin < 10 ? '0' + durmin : durmin;
 

now pack screenplay into an ipk, send it to your TV and fire up a movie.

 

How often is the timeupdate notification displayed? (my TV shows it constantly)

Is the timeupdate value changing? (mine shows elapsed seconds)

 

If you try out this code on either the v2.0 or v3.0 emulator, you will see the problem...

 

Thanks!

Edited by kwilcox
Link to comment
Share on other sites

Hate the IDE.... so difficult to get it to connect to the telly reliably :-(

 

On my WebOS 1.4 TV, it's updating pretty much every .5 second roughly, although the numbers are quite weird - it's a very long decimal number and it seems to be slipping off slightly - so at the moment it's flipping between .7599945068 and .279998779

 

(I didn't catch all the digits, and it's changing ever few seconds)

 

I guess that's more or less what you're hoping to see?

  • Like 1
Link to comment
Share on other sites

kwilcox

Thanks for that!  Looks like the timeupdate event itself is functioning normally.  currentTime should be displayed as a large decimal number with seconds to the left of the decimal point.  As the movie progresses, that number should count up.  The whole number value is = elapsed play time in seconds.  Let me know if that's not what you are seeing.

Edited by kwilcox
Link to comment
Share on other sites

Sorry, yeah, that's what I meant, though I wasn't being very clear - I figured you were more interested in the fact that it was about twice a second, roughly and was focused on that. The integer part was indeed counting up in seconds as you'd expect.

Link to comment
Share on other sites

cmarques

I'm working on exactly that.  Emby has this API recommendation for HLS:

 

After playback is complete, it is necessary to inform the server to stop any related HLS transcoding. This is accomplished via an HTTP DELETE to: /Videos/ActiveEncodings?DeviceId=xxx

 

I've just implemented this and I've also implemented a change in settings to turn off transcoding by setting videobitrate to zero.  When this is set, I envoke the stream with static=true which is supposed to disable transcoding.  

 

Testing now...  So far, the API delete for ActiveEncodings doesn't appear to have an effect on spawned ffmpeg processes.  Not sure if emby server should kill them after receiving the above or not.

 

Hi @@kwilcox, this weekend when doing some tests with the latest package from github, I had that strange issue I commented a time ago (plays for 30 sec, then pauses, then plays more 30sec, repeating this over and over) at this time I have checked the emby server, and the status info there was "direct play".
 
I was watching a movie: Independece Day: Resurgence 
 
format: .mp4 1080p 24fps
res: 1920x802 
codec: H264 MPEG-4 AVC
audio: MPEG AAC mp4a 48000Hz
 
Just to check if the media was really good, I goes to Plex app and start the same movie..., the playback was very smooth, and I watched the entire movie without any issue.
At Plex server the status info was also "direct play", so I don't know what's going on.
 
I did some tests after (same movie), playing a bit with the bitrate settings on Screenplay, when I decreases the video bitrate to zero (assuming no transcoding) the problem has gone, but the video quality goes very worse also, setting it back to the default value, the video quality back to normal, and for my surprise the problem also has gone!!?!?!
 
That's confused me a lot, I wonder where the problem resides  :blink:
Link to comment
Share on other sites

I hadn't realised the change for putting zero to disable transcoding was already there!

 

It's not working for me though - although on the server, Emby is saying "Direct Play", it's very definitely still transcoding - ffmpeg is busy working away.

So @@cmarques, "Direct Play" doesn't appear to equate to "no transcoding"

Link to comment
Share on other sites

cmarques
@@woozle, I have not checked the ffmpeg's activity in this specific situation, but I think it always executes when any playing stuff..., maybe I'm wrong.

next time, I'll also check ffmpeg activity and report here.

 

the question is, if "Direct Play" isn't no transcoding, what it is?

when the transcoding is really occurring, like when I watch something in a tablet for example, the server reports "Transcoding" plus some more info.

Link to comment
Share on other sites

Hm, well, I realise ffmpeg can be doing simple things too that wouldn't count as transcoding, but for me it does look like it's transcoding even when it says direct play, given how much CPU it's using. You're right, though, it's certainly surprising and confusing - so perhaps I'm just wrong and something else is going on, but it certainly doesn't seem to be doing what I'd expect....

 

Having said that, I was seeing the Android Emby client doing something similar just now, so maybe there's a bug with the version of Emby server I'm using (7300)

Link to comment
Share on other sites

cmarques

wich version are you using? I mean, dev, official, beta...

 

mine is the official, latest release.

I'm using auto update.

Edited by cmarques
Link to comment
Share on other sites

cmarques

i think there's no proper translation of "docker" in my language  :lol:

you mean a NAS like device?

Link to comment
Share on other sites

cmarques

The disable transcoding option isn't working.  Apparently, HLS streaming doesn't seem to honor "static=true". 

so this mean that the bitrate settings just lower the  video/audio quality to boost the performance, right?!
at least it is working fine  B)
Link to comment
Share on other sites

@@cmarques

 

Obviously I use the latest version possible - if you mean why do I use it as a Docker, that's because at the time it was all that was available for my NAS. There was a manual install, but Emby make an official Docker available.

However, since then, they've produced an official package for my NAS as well, but it's not easy to switch between the two so I've continued using the Docker for now.

 

Producing a Docker makes it easier to make it cross-platform (albeit limited by the platforms you can run Docker on - but certainly the effort required to produce a Docker is easier to justify as you have a larger target audience)

Link to comment
Share on other sites

cmarques
Got it.

but I was thinking in these time of development, perhaps it's hard to find a solution for a certain issue if that issue is ocurring for a specific plataform.

obviously I suppose Emby server act exactly same for all plataforms, but i also suppose @@kwilcox is developing with emby for windows version as base.

 

Anyway, we are two different cases where emby server isn't acting as we supposed it would be, I mean, possibly it is making a transcoding when it should not, even when the server status says "direct play".

 

Of course, I can't affirm anything, I'm just supposing some things, having in mind what you said and what I'm experiencing.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...