NextPVR Forums
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 5 6 7 8 9 … 93 Next »
Time to make Touch web Service less experimental

 
  • 0 Vote(s) - 0 Average
Time to make Touch web Service less experimental
fred250
Offline

Senior Member

Posts: 457
Threads: 10
Joined: Jul 2006
#101
2013-09-23, 12:49 PM
reven Wrote:well i found the problem
Code:
long bytesToReadRemaining = (this.EndRangeBytes[i] - this.StartRangeBytes[i]) + 1;
was using the requested, unaltered start/end bytes which would give a negative value for bytes remaining and the tsstreamer would close the connection (not the samsung player)

changing it to
Code:
long bytesToReadRemaining = this.InternalRequestedFileInfo.Length - startpos + 1;

I can now jump to about minute 31 out of 34, im sure there is another tiny bug I can fix to jump the entire way. Also I don't have to handle the timeline myself or anything, and it mostly just now works (all that is required on my player is im passing in an additional &guid parameter to the video player and I call a seek request before jumping)

So, what I'm doing is.
# For a file with 1000 bytes (just an example Smile)
# For the initial stream request i respond with Content-Range: bytes 0-1000/1000 and Content-Length: 1000
# When a request comes in, I alter the requested start byte with the adjusted byte eg, change 500 to 300
# I respond with Content-Range: bytes 500-1200/1200 and Content-Length: 1200
# I then just adjust the start range to and respond with bytes 300 to 1000, the player thinks its bytes 500 to 1200

And I can now successfully watch the entire faulty videos provided by stustunz and smacrae.

so Fred, well done you have solved the problem I've been having with the samsung player, just need to polish it up and hopefully get sub to add it or to get it into NEWA.

This will make smacrae very happy Smile

Great work!

I was posting my answer while you fixed it - just ignore!
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 102,401
Threads: 741
Joined: Nov 2003
#102
2013-09-23, 04:40 PM
Reven, if you were playing say a half hour recording, and the timeline made your Samsung player report the length as only 5 minutes, does the player let you attempt to seek past 5 minutes?
reven
Offline

Posting Freak

Posts: 5,782
Threads: 396
Joined: Sep 2004
#103
2013-09-23, 07:58 PM
I know if the player reported it as 5mins, but that file grew over time then it lets me play beyond 5mins (in progress recordings can go past the end time, bug I need to fix to extended the timeline).

Ill try tonight to see what happens if i force the byte end range to be lower than the actual one. But the 2 sample files I have are reported with the correct length using freds tsstreamer (using nextpvr ?f=[filename] makes the player report a 34mins file as 10ish minutes).

Sub, I'll polish up the code and send it to you later this week (fred250 are you ok with me sending sub the code? I assume yes Smile)
fred250
Offline

Senior Member

Posts: 457
Threads: 10
Joined: Jul 2006
#104
2013-09-23, 09:47 PM
reven Wrote:Sub, I'll polish up the code and send it to you later this week (fred250 are you ok with me sending sub the code? I assume yes Smile)

Of course you can send sub the code, but be sure you polish well Smile
Actually I don't think sub will need the code though. If you got a proper streamer to start with adding this seek-preset-thing is fairly simple.

/Fred
nitram
Offline

Junior Member

Posts: 26
Threads: 8
Joined: Jan 2012
#105
2014-06-15, 11:20 AM
Has anyone ever completed a PC client with Touch that also plays video from your npvr service? It's very useful to be able to manage recordings from any remote machine, playing the recordings would be a great bonus.
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 45,343
Threads: 867
Joined: May 2006
#106
2014-06-15, 06:08 PM
nitram Wrote:Has anyone ever completed a PC client with Touch that also plays video from your npvr service? It's very useful to be able to manage recordings from any remote machine, playing the recordings would be a great bonus.

If you mean into a PC browser, basic HTML5 support in general isn't good for standard mpeg-ts playback. I added Touch support (X-NEWA web client) into XBMC so that it would run on any PC that XBMC supports.

Martin
fred250
Offline

Senior Member

Posts: 457
Threads: 10
Joined: Jul 2006
#107
2014-06-15, 09:13 PM
nitram Wrote:Has anyone ever completed a PC client with Touch that also plays video from your npvr service? It's very useful to be able to manage recordings from any remote machine, playing the recordings would be a great bonus.

Hi,

Since my Smart TV app for Samsung and LG is HTML5/ Javascript I actually use Chrome while developing and debugging. That said, you can easily use it on a PC for managing recordings. I do it myself from time to time.

Playing .ts-files is not that easy. I have experimented using the VLC-web-plugin and it kind of works but seeking in files does not and aspect ratio is wrong.
Hopefully the VLC plugin gets better in the future.

I'm not ready to release my source code to the public just yet, not because is secret or anything just that it's not ready. But if you're interested and not afraid of Javascript I'll give you a copy to play with – just PM me.

/Fred
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (11): « Previous 1 … 7 8 9 10 11
Jump to page 


Possibly Related Threads…
Thread Author Replies Views Last Post
  is there a service?method which returns listings for multiple channels? reven 16 4,430 2022-04-11, 04:30 PM
Last Post: mandai
  Extending end time. mvallevand 5 3,306 2018-10-17, 01:21 PM
Last Post: jcole998
  NextPVR "Service" Backend? jcole998 5 3,888 2018-05-24, 01:17 PM
Last Post: jcole998
  Transcoding service mvallevand 27 9,931 2016-08-26, 07:43 PM
Last Post: sub
  Extending recording time mvallevand 2 1,855 2014-09-14, 01:04 AM
Last Post: sub
  Touch and http audio url's mvallevand 0 1,062 2013-11-03, 07:05 PM
Last Post: mvallevand
  <StartTime> and <EndTime> time formats? spinnaker 3 1,905 2013-10-25, 01:48 AM
Last Post: spinnaker
  New web service clarification needed bgowland 6 2,338 2013-10-19, 02:36 AM
Last Post: bgowland
  [REQ] Additional web service API calls reven 26 5,884 2013-08-31, 10:08 PM
Last Post: mvallevand
  getting recurring recordings from service?method API? reven 2 1,436 2013-08-03, 10:50 PM
Last Post: reven

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode