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
reven
Offline

Posting Freak

Posts: 5,782
Threads: 396
Joined: Sep 2004
#81
2013-09-22, 09:01 AM
fixed the issue of first jump being incorrect by removing the clearing of "SeekToPosition"
Code:
System.Web.HttpContext.Current.Application["SeekToPosition"] = 0;
basically the samsung player, closes the connection and creates a new one, but before a new one is created the seektoposition is set on the old connection and then clearing it. Then when the new connection is made, their is no SeekToPosition so it does the first incorrect jump.


the problem that stops you from jumping past the incorrect endtime, I believe is due to the fact the player thinks it really at xxx position, but in reality it is stream yyy bytes (which can be way off), so the player says, I can't jump any further.

Going to experiment with different byte ranges, or perhaps moving the end byte range in the response to see if that helps. Basically trial and error at the moment. But if this can be fixed, then we definitely have a workable solution, which is fantastic Smile

took me a little while to get around that it was only making on request with the byte range and then the bytes were just constantly written to the response. Was thinking it was making lots of small requests (that why I was trying to correct the response headers at first), now I get why you just ignore those and send what you want to send.
reven
Offline

Posting Freak

Posts: 5,782
Threads: 396
Joined: Sep 2004
#82
2013-09-22, 10:02 AM
not having any joy changing the content-range or content-length.

tried getting the "fixed" byte range, getting the difference between the fixed + actual one requested then increasing the content-length + range end so it could jump past the end bytes (once the request came back in, it would correct the bytes by lowering them and should of worked).

however it just stops at the end point. removed the validation of the range in "CheckRangesRequested", but still nope.

Fred hopefully you have more luck than me. Just this one little thing to go Smile
fred250
Offline

Senior Member

Posts: 457
Threads: 10
Joined: Jul 2006
#83
2013-09-22, 10:43 AM
reven Wrote:fixed the issue of first jump being incorrect by removing the clearing of "SeekToPosition"
Code:
System.Web.HttpContext.Current.Application["SeekToPosition"] = 0;
basically the samsung player, closes the connection and creates a new one, but before a new one is created the seektoposition is set on the old connection and then clearing it. Then when the new connection is made, their is no SeekToPosition so it does the first incorrect jump.

Yes, I put it there as a quick and dirty solution to that there might be a value set when you first request a stream causing an unintentional jump.
Before this can be used in real life we need to separate each clients SeekToPosition and probably add an expire time to minimize the risk of unintentional jumps.

reven Wrote:the problem that stops you from jumping past the incorrect endtime, I believe is due to the fact the player thinks it really at xxx position, but in reality it is stream yyy bytes (which can be way off), so the player says, I can't jump any further.

I haven’t noticed this with the LG TV. I'll pay attention to this in the future.

reven Wrote:Going to experiment with different byte ranges, or perhaps moving the end byte range in the response to see if that helps. Basically trial and error at the moment. But if this can be fixed, then we definitely have a workable solution, which is fantastic Smile

Please do experiment. I haven’t had the need to experiment with headers yet. I also thought I'd confuse the player by putting a different range header than requested in the response. I guess this can work differently on different players.


reven Wrote:took me a little while to get around that it was only making on request with the byte range and then the bytes were just constantly written to the response. Was thinking it was making lots of small requests (that why I was trying to correct the response headers at first), now I get why you just ignore those and send what you want to send.

I'm a newbie to this streaming too but thanks to the Internet any one can find bits and pieces here and there and put it together to make something useful.

/Fred
fred250
Offline

Senior Member

Posts: 457
Threads: 10
Joined: Jul 2006
#84
2013-09-22, 11:28 AM
reven Wrote:not having any joy changing the content-range or content-length.

tried getting the "fixed" byte range, getting the difference between the fixed + actual one requested then increasing the content-length + range end so it could jump past the end bytes (once the request came back in, it would correct the bytes by lowering them and should of worked).

however it just stops at the end point. removed the validation of the range in "CheckRangesRequested", but still nope.

Fred hopefully you have more luck than me. Just this one little thing to go Smile

Not being an expert on ts-Streams and calculation of duration time I went to the Internet for answers.
I've found that your Samsung player probably uses one of these to methods of calculating duration time.

off the net Wrote:Parse the beginning and the end of the file looking for the PTS in the program's PES packets, and compute the difference.
http://social.msdn.microsoft.com/Forums/...ort-stream

An other way to calculate duration is by considering bitrate and filesize.
I guess constant bitrate is a must for this one.

You earlier mentioned that there were a lot of “About to stream..” in the log. Maybe this is the player trying to figure out duration time using method #1.
I would suggest you take a look at the headers of these requests to see if there are any trace of an initial byte range request for the end of the file.

If this is the case the reported duration comes from ts-timeline and changing the response headers won't be much help.

In the streamer, you may be able to recognize these requests, ignore them, and maybe this would cause the player to calculate duration based on bitrate and filesize instead.

I haven’t had the time to set up a development environment for Samung yet so I can't really help you out on this one for now.

/Fred
BrettB
Offline

Posting Freak

Saint Paul, MN, USA
Posts: 2,667
Threads: 170
Joined: Jun 2007
#85
2013-09-22, 03:42 PM
fred250 Wrote:In the streamer, you may be able to recognize these requests, ignore them, and maybe this would cause the player to calculate duration based on bitrate and filesize instead.

If broadcast .ts streams (at least here in the US) aren't constant bitrate (even if the change is only the commercials inserted), then to really work best, I think the streamer would need to be able to recognize these requests, and NOT ignore them, but rather modify the PTS values in the returned bytes to indicate the "true" length from the timing.info data.
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 52,972
Threads: 956
Joined: May 2006
#86
2013-09-22, 04:06 PM
I've found the changes aren't typically commercials, although with on demand broadcast it could go that way. I think the broadcast decoders reset the PTS to zero a lot. It's a 64 bit number and at 90khz it is a necessity from time to time.

Martin
reven
Offline

Posting Freak

Posts: 5,782
Threads: 396
Joined: Sep 2004
#87
2013-09-22, 07:22 PM
The streamer isnt processing the video its merely sending the raw bytes. The request comes in asking for a byte range and currently if it has a value sent to it saying secondswanted it ignores the byte range and just responds with the bytes from the actual seconds l.

So the player thinks its really say 500mb into a 1000mb file when really its 200mb. So when it gets to what it thinks is 1000mb, it wont skip ahead anymore even though its really at 700mb
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,729
Threads: 767
Joined: Nov 2003
#88
2013-09-22, 07:45 PM
Yeah, unfortunately that sounds like a bit of fatal flaw to this approach. Bummer. Not entirely surprising though.
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 52,972
Threads: 956
Joined: May 2006
#89
2013-09-22, 08:18 PM
Yes, that is the problem with the player having its own smarts that I was trying to explain. Unless you can dumb it down, you will have problems. Since so many chip and firmware version are used by LG and Samsung I still think that building a smart streamer for them is challenging.

A complicated smart TSWriter during capture is really the best solution. Recording via the dvr-ms can potential because players would be able to use its built in accuracy, but it is proprietary and not supported by all players.

Martin
reven
Offline

Posting Freak

Posts: 5,782
Threads: 396
Joined: Sep 2004
#90
2013-09-22, 09:00 PM
I was trying to make it so the content-length end byte range would "grow" whenever it seeks, so the 1000MB file would become 1300MB (well reported to the player that size, not really that size), so it could continue to seek, but so far haven't had any success with this (I'm completely new to this stuff so might be doing it wrong).

Sub, what does nextpvr do when one plays a in progress recording? does it change those values as the file size changes?
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (11): « Previous 1 … 7 8 9 10 11 Next »
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 7,061 2022-04-11, 04:30 PM
Last Post: mandai
  Extending end time. mvallevand 5 4,100 2018-10-17, 01:21 PM
Last Post: jcole998
  NextPVR "Service" Backend? jcole998 5 4,822 2018-05-24, 01:17 PM
Last Post: jcole998
  Transcoding service mvallevand 27 12,373 2016-08-26, 07:43 PM
Last Post: sub
  Extending recording time mvallevand 2 2,466 2014-09-14, 01:04 AM
Last Post: sub
  Touch and http audio url's mvallevand 0 1,424 2013-11-03, 07:05 PM
Last Post: mvallevand
  <StartTime> and <EndTime> time formats? spinnaker 3 2,496 2013-10-25, 01:48 AM
Last Post: spinnaker
  New web service clarification needed bgowland 6 3,256 2013-10-19, 02:36 AM
Last Post: bgowland
  [REQ] Additional web service API calls reven 26 8,288 2013-08-31, 10:08 PM
Last Post: mvallevand
  getting recurring recordings from service?method API? reven 2 1,964 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