SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV Clients Development
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

SageTV Clients Development This forum is for discussions relating to SageTV Open Source Clients Development.

Reply
 
Thread Tools Search this Thread Display Modes
  #521  
Old 11-12-2015, 02:35 PM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by Gustovier View Post
Yup probably about time to set the indiegogo up.

Stuckless, also what was the issues you had with using exoplayer. I'm a little worried that with it being made by Google and other Devs (such as plex) contributing to it that it might support more features than the ijk player. Such as supporting native hardware decoding / frame rate switching / hardware deinterlace that some players have. For instance the plex devs not to long ago submitted support of trueHD sound to exoplayer. Looking at the github repo exoplayer it seems the devs are very active and respond pretty quickly to possible issues. It also supports some types of drm which might be helpful if dtcp-ip is ever added in so we can get premium channels from silicon dust prime tuners (of course this would require a lot of work , $$, and for the source to go closed)

I just want to make sure that the best player possible is chosen early upfront before a ton more work goes into it.
Ok, so, with ExoPlayer (and I don't doubt it's great), it has issues parsing the .ts files that I was sending it. ExoPlayer relies on MediaCodec for decoding the video, which is what ijkplayer uses as well. The difference is that ijkplayer uses ffmpeg to decode the containers and it delegates to ffplay to actually play the video on an Android Surface. ExoPlayer, appears to do all their own container parsing (they have a .mp4 and .ts parser) but the .ts parser did not work with the .ts files that I gave it.

I'm not opposed to using other players, and the code is architected in a way would supports that notion, which is why I could provide both ijkplayer and vlc players, and I had a exoplayer in there at once as well... the issue for me, is that when I modify the API, I have to update 3 players, which is tedious, which is why I'd like to focus on 1 player that works, and then possibly, add another player later, if time permits, or if there is something severely limiting in ijkplayer.
Reply With Quote
  #522  
Old 11-12-2015, 09:42 PM
Fuzzy's Avatar
Fuzzy Fuzzy is offline
SageTVaholic
 
Join Date: Sep 2005
Location: Jurupa Valley, CA
Posts: 9,957
So is the problem the container, or the decoding? Have you tried remuxing the problem file into a different container and see if the same stream plays better? Might makes sense to simply disable that container's capability in miniclient, and force the server to 'transcode' it to the different, supported, container. This would take some improvements on the server end as well, because I don't believe selective conversion is actually implemented fully - it may not do a stream copy in the current state.
__________________
Buy Fuzzy a beer! (Fuzzy likes beer)

unRAID Server: i7-6700, 32GB RAM, Dual 128GB SSD cache and 13TB pool, with SageTVv9, openDCT, Logitech Media Server and Plex Media Server each in Dockers.
Sources: HRHR Prime with Charter CableCard. HDHR-US for OTA.
Primary Client: HD-300 through XBoxOne in Living Room, Samsung HLT-6189S
Other Clients: Mi Box in Master Bedroom, HD-200 in kids room
Reply With Quote
  #523  
Old 11-13-2015, 05:10 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by Fuzzy View Post
So is the problem the container, or the decoding? Have you tried remuxing the problem file into a different container and see if the same stream plays better? Might makes sense to simply disable that container's capability in miniclient, and force the server to 'transcode' it to the different, supported, container. This would take some improvements on the server end as well, because I don't believe selective conversion is actually implemented fully - it may not do a stream copy in the current state.
I am not a video developer... videos either play, or they don't Unless you are placesifting, you probably don't want videos to be transcoded on the fly, since if they are, then seeking will be potentially slow. For example right now, when you seek in a file it actually seeks 4-5 times (the player does this)... That means each of those seek requests would cause the server stop/start a transcode code.

I might take some time this weekend and add in exoplayer again... people can enable it, and if it works great, and if doesn't, then, not sure what we can do.

ijkplayer actually has an exoplayer wrapper, where I think it will use exoplayer instead of ffplay. Not sure how this works, and I've really looked at it, but I did see ExoPlayer parts in the source.
Reply With Quote
  #524  
Old 11-13-2015, 07:27 AM
nyplayer nyplayer is offline
SageTVaholic
 
Join Date: Sep 2005
Posts: 4,997
I agree I really do not want the Sever to transcode the files ... if I am using a lan connection. The only problem I have is with 720P recordings.
Reply With Quote
  #525  
Old 11-13-2015, 11:09 AM
Fuzzy's Avatar
Fuzzy Fuzzy is offline
SageTVaholic
 
Join Date: Sep 2005
Location: Jurupa Valley, CA
Posts: 9,957
Quote:
Originally Posted by nyplayer View Post
I agree I really do not want the Sever to transcode the files ... if I am using a lan connection. The only problem I have is with 720P recordings.
I did not mean for the server to actually transcode the files, but if the container is an issue for the end player, it would make sense to repackage it into a different container for transport.
__________________
Buy Fuzzy a beer! (Fuzzy likes beer)

unRAID Server: i7-6700, 32GB RAM, Dual 128GB SSD cache and 13TB pool, with SageTVv9, openDCT, Logitech Media Server and Plex Media Server each in Dockers.
Sources: HRHR Prime with Charter CableCard. HDHR-US for OTA.
Primary Client: HD-300 through XBoxOne in Living Room, Samsung HLT-6189S
Other Clients: Mi Box in Master Bedroom, HD-200 in kids room
Reply With Quote
  #526  
Old 11-13-2015, 12:10 PM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by Fuzzy View Post
I did not mean for the server to actually transcode the files, but if the container is an issue for the end player, it would make sense to repackage it into a different container for transport.
I'll give ExoPlayer another shot. It was the first player that I used, and I ran in lots of issues. Next I tried VLC and then finally ijkPlayer. To be honest the underlying streaming code has changed a lot since I first started playing with this, so it wouldn't hurt to re-introduce Exo and see what happens.

Exo is more work to get setup... Whereas IJK and VLC are pretty much just give it a URL, with Exo, you need to actually configure it for which containers will support and register them, etc, so, it isn't quite a plug and play like VLC and IJK.

One of the reasons that I'm keen to re-try Exo is that IJK has a flush buffer issue that I can't seem to solve. I'm hoping that IF Exo works, I can sucessfully have it flush it's buffers during a seek.
Reply With Quote
  #527  
Old 11-13-2015, 04:41 PM
jm9843 jm9843 is offline
Sage Aficionado
 
Join Date: Oct 2003
Posts: 288
Quote:
Originally Posted by stuckless View Post
I'll give ExoPlayer another shot.
Having been the first one to suggest ExoPlayer, I hope it works out!

That said, those who need MPEG2 should tamper their expectations until someone submits a pull request for ExoPlayer issue #793. One of the maintainers of the project gives a pretty good explanation of what that work would entail here. Maybe someone from the SageTV community can step up?
Reply With Quote
  #528  
Old 11-14-2015, 07:24 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
So, I took a couple of hours this morning to add in support for ExoPlayer (Google's homegrown media player framework). I better results than when I first tried, mainly because the streaming framework that I had to create is more stable/mature than when I started, but overall, the player is completely unusable.

TS Files (HD-PVR h264 encoded files 720p) won't play at all... The "TsExtractor" just bombs parsing the stream. (push or pull, doesn't matter).

MKV Files - I got video, but no audio...

MP4 Files - I got video and audio, files play fine.

At this point I don't intend on doing a release with this, because it's not usable, and I don't have the time (right now) to open tickets, troubleshooting, etc. It's quite easy to swap out players, but I don't see the point in even enabling this one, if it only plays one of the sample files that I'm using.

My understanding of ExoPlayer is that it is a player framework that people can use, if they need/want to extend the player and swap out components, etc. This is great if the person consuming it is a "video" developer, but, as I've said in the past, that's not me. I'm sure we can write a TS extractor that works with my sample HDPVR files... but I'm not doing that.

I think if a group of people are really keen on using ExoPlayer, then my suggestion would be to fork this project, then build out the player, and the submit a pull request. I do see value in having greater control over the lower level player... but it's not something that I can dedicate time to, when I know nothing about video playback from a development point of view.
Reply With Quote
  #529  
Old 11-14-2015, 03:34 PM
dinki's Avatar
dinki dinki is offline
Sage Expert
 
Join Date: Mar 2006
Posts: 682
I'll try not to sound too dumb with this as I know zero about mmost things, but are you using a video buffer ? I'm asking this due to what may be loss frames with the MPEG2 720p video issues I'm seeing. Perhaps adding this or even allowing a larger buffer might help with the drop frames?

Would it be possible to measure the network throughput somehow in the logs? I took a closer look at the 720p videos and they report that they are at 60 fps while the 1080i videos that play well are at 29.97 fps. Is it possible that this doubling of frames is causing the issues? Could the app still be starved for data even via a wired connection?
__________________
Intel Core i5-2500, 16GB RAM, OMV Linux 4.17, 3 TB of Data
SageTV 9 Docker, Open DCT Docker
Silicondust HDHomeRun Duo + Quatro
Sage Mini Client on Amazon Fire Sticks and Android TVs
Reply With Quote
  #530  
Old 11-15-2015, 06:51 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by dinki View Post
I'll try not to sound too dumb with this as I know zero about mmost things, but are you using a video buffer ? I'm asking this due to what may be loss frames with the MPEG2 720p video issues I'm seeing. Perhaps adding this or even allowing a larger buffer might help with the drop frames?

Would it be possible to measure the network throughput somehow in the logs? I took a closer look at the 720p videos and they report that they are at 60 fps while the 1080i videos that play well are at 29.97 fps. Is it possible that this doubling of frames is causing the issues? Could the app still be starved for data even via a wired connection?
The app does use a 16mb memory buffer (which on an android device is quite significant). The video process basically consists of a player thread that reads the buffer and a server thread that fills the buffer. For PUSH files (ie, .ts files) this is all true. For PULL files (mp4, mkv, etc) the process is slight different and there is a buffer, but, it doesn't work quite the same way.

PUSH and PULL are not terms that I would expect people to be familar with, and I think for troubleshooting these framedrop issues, I'll likely need to add some extra logging. For example, I can detect when frames are dropped, and potentially log it. I can also tell the player to NOT drop frames, but, not sure what the effects of that would be, since in most places it see people enabling that (and it's enabled in this app as well).

Unfortunately other than playing with exo player yesterday, I haven't had much time to play with this, this weekend
Reply With Quote
  #531  
Old 11-15-2015, 08:43 AM
dinki's Avatar
dinki dinki is offline
Sage Expert
 
Join Date: Mar 2006
Posts: 682
Ah great info. Thanks for sharing. Yes, it would be great to try and figure out what's really happening with certain recordings/streams. Additional logging options will hopefully help with this. Many thanks
__________________
Intel Core i5-2500, 16GB RAM, OMV Linux 4.17, 3 TB of Data
SageTV 9 Docker, Open DCT Docker
Silicondust HDHomeRun Duo + Quatro
Sage Mini Client on Amazon Fire Sticks and Android TVs
Reply With Quote
  #532  
Old 11-15-2015, 05:08 PM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
Sean - Is the microphone button on the default nexus player remote mapped to anything? If it isn't, can it be? I was thinking that one way to make the miniclient more usable with the default nexus remote would be to display a "virtual" remote when the microphone buttonwas pressed. (It could be another button but they are at a premium and I'd hate to waste one on this.)

I am thinking you might attract more users if there was a way to navigate the UI without getting a new remote for the (cheap) nexus.
__________________

Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders.
Reply With Quote
  #533  
Old 11-15-2015, 07:48 PM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by tmiranda View Post
Sean - Is the microphone button on the default nexus player remote mapped to anything? If it isn't, can it be? I was thinking that one way to make the miniclient more usable with the default nexus remote would be to display a "virtual" remote when the microphone buttonwas pressed. (It could be another button but they are at a premium and I'd hate to waste one on this.)

I am thinking you might attract more users if there was a way to navigate the UI without getting a new remote for the (cheap) nexus.
I'm sure I can map the microphone button, but I don't have nexus remote, so it'll be hard for me to test it But, I think the idea could work. One the phone, I've been playing around with using a slide out drawer, but there is a problem with how it is rendered.. ie, it renders under the SageTV ui, which is odd. I think the idea could be extended to show an on-screen remote when running in TV mode. I'm working on a "remote" app which could be used here as well for an onscreen remote... hopefully it'll all come together

I'm also been working on the code to send all the standard keys to sagetv to so that external keyboards can work. There are few kinks, but it's almost done.
Reply With Quote
  #534  
Old 11-16-2015, 05:23 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
New Version 0.10-ALPHA



This version fixes the long press on enter/options not bringing up the OPTIONS.
Adds external keyboard support (usb, bluetooth).

I was able to test the client as a placeshifter, and the entier UI is blank when placeshifting, so I'm still investigating why that is.
Reply With Quote
  #535  
Old 11-16-2015, 06:55 AM
dranockcir dranockcir is offline
Sage Advanced User
 
Join Date: Jul 2004
Location: Jupiter, FL
Posts: 137
Quote:
Originally Posted by stuckless View Post


This version fixes the long press on enter/options not bringing up the OPTIONS.
Adds external keyboard support (usb, bluetooth).

I was able to test the client as a placeshifter, and the entier UI is blank when placeshifting, so I'm still investigating why that is.
Yep, can log in now. Although I can't see the UI I can navigate and get to Live TV which is Down Arrow once and then Enter. It seems to play although I don't get any audio or video. In the SageTVWeb Interface I can see that I am connected, what I am watching and that I am changing channels. In your Alpha 9 I did see the video and hear the audio.
Reply With Quote
  #536  
Old 11-16-2015, 07:02 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by dranockcir View Post
Yep, can log in now. Although I can't see the UI I can navigate and get to Live TV which is Down Arrow once and then Enter. It seems to play although I don't get any audio or video. In the SageTVWeb Interface I can see that I am connected, what I am watching and that I am changing channels. In your Alpha 9 I did see the video and hear the audio.
I'll recheck, but I don't anything changed in terms of the player... This release was all about the keyboard handling.
Reply With Quote
  #537  
Old 11-16-2015, 07:03 AM
brewston brewston is offline
Sage Expert
 
Join Date: Apr 2006
Location: Surrey
Posts: 719
Alpha10 broke video (live & recorded) playback for me too. I tried clearing cache but it made no difference. I uninstalled and installed Alpha8 and it's OK now
__________________
Tecra M5, 2 x HD200, 2 x HD300
2 x PCTV 290e
Win 7, Sage 7.1.9, Phoenix 2 STV
Stephane's XMLTV Importer, Digiguide,
Reply With Quote
  #538  
Old 11-16-2015, 08:18 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by brewston View Post
Alpha10 broke video (live & recorded) playback for me too. I tried clearing cache but it made no difference. I uninstalled and installed Alpha8 and it's OK now
I did some checking... I was making some changes to the project to the make player easier to rebuild, and I accidentally set the codec support to minimal I'll try to do another build tonight with the updated codecs.
Reply With Quote
  #539  
Old 11-16-2015, 07:16 PM
panteragstk's Avatar
panteragstk panteragstk is offline
SageTVaholic
 
Join Date: Oct 2008
Location: New Braunfels, TX
Posts: 3,312
Just tried .9 alpha and one thing that happened in .6 was that when I press play the nexus player will start playing Google music if I have anything paused. I also don't know how is how to right click or press ESC.
__________________
SageTV Server: unRAID Docker v9, S2600CPJ, Norco 24 hot swap bay case, 2x Xeon 2670, 64 GB DDR3, 3x Colossus for DirecTV, HDHR for OTA
Living room: nVidia Shield TV, Sage Mini Client, 65" Panasonic VT60
Bedroom: Xiomi Mi Box, Sage Mini Client, 42" Panasonic PZ800u
Theater: nVidia Shield TV, mini client, Plex for movies, 120" screen. Mitsubishi HC4000. Denon X4300H. 7.4.4 speaker setup.
Reply With Quote
  #540  
Old 11-17-2015, 04:43 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
New Version 0.11-ALPHA



ALPHA-10 accidentally contained a player build with limited codec support. This build restores the codec support.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Finally, a fully functional SageTV client on android and iphone! mkanet SageTV v7 Customizations 12 01-12-2013 12:22 AM
SageTV Placeshifter for Android nyle SageTV Placeshifter 5 12-31-2011 10:40 AM
Sage should get an android client running on this Deacon Crusher Hardware Support 1 09-29-2010 11:30 AM
Android client? equalize SageTV Placeshifter 1 07-22-2010 09:37 AM


All times are GMT -6. The time now is 02:21 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.