INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Seeking in transcoded videos (DLNA) - Another approach  (Read 1280 times)

masterjoe

  • World Citizen
  • ***
  • Posts: 214
Seeking in transcoded videos (DLNA) - Another approach
« on: April 19, 2015, 05:52:55 am »

As it is currently not possible to seek (change playback position) in transcoded video streams using DLNA I was thinking of another variant that MIGHT be easier to be implemented.

MC does not provide a Content Length header and therefore the renderer has no clue how to perform byte seeks. You say that it's impossible to determine the correct size of the transcoded video as the transcoder produces variable (unpredictable) frame sizes.

What if you would pretend that byte seeks and content length of the transcoded stream are the same as for the original file? Internally you would know that the video is in fact transcoded and interpret the byte offsets coming from a renderer as offsets into the original file and not the transcoded stream. Then you could easily calculate the time offset based on the byte offset and the length of the original file and use this time offset to seek the transcoded stream.

So in short:
- provide the Content Length from the original file
- interpret byte seeks as offsets based on the size of the original file
- calculate time offsets using the byte offset and the original content length and use the resulting time offset to do the seek in the transcoder

Would that be posible? If it doesn't matter that the renderer does not really know the correct length but just gets something to play with then it should work.
Logged

AndrewFG

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3392
Re: Seeking in transcoded videos (DLNA) - Another approach
« Reply #1 on: April 19, 2015, 11:05:29 am »

Something like that. Yes.
Logged
Author of Whitebear Digital Media Renderer Analyser - http://www.whitebear.ch/dmra.htm
Author of Whitebear - http://www.whitebear.ch/mediaserver.htm

masterjoe

  • World Citizen
  • ***
  • Posts: 214
Re: Seeking in transcoded videos (DLNA) - Another approach
« Reply #2 on: April 19, 2015, 12:02:41 pm »

Could the content length also be the frame count the original video is made of? Then the "byte offset" could me abused as frame number!
If the renderer does not need to know the REAL content length then this would also work and might even be better for the transcoder engine because it might internally work with frames?

The transcoder would then get the exact frame to which it shall seek.
Logged

Hendrik

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10791
Re: Seeking in transcoded videos (DLNA) - Another approach
« Reply #3 on: April 19, 2015, 02:15:27 pm »

This is no different to calculating the estimated final size, and the same applies as in the other thread, not soon. I'm going to close this as its really just the same discussion over and over again.
Logged
~ nevcairiel
~ Author of LAV Filters
Pages: [1]   Go Up