Trying to find a proper workaround for seeking in a transcoded stream

For help and support with Universal Media Server
Forum rules
Please make sure you follow the Problem Reporting Guidelines before posting if you want a reply
Nadahar
Posts: 1990
Joined: Tue Jun 09, 2015 5:57 pm

Re: Trying to find a proper workaround for seeking in a transcoded stream

Post by Nadahar »

mik_s wrote: Sun Jun 28, 2020 7:20 pm I think that is how transcoded streams are being played on those devices.
UMS doesn't implement this at all, I don't even think it's possible to do using HTTP (which is the only transport implemented in UMS), and I don't see a way to do it anyway unless you want to implement "a FFmpeg clone" in Java. You would need to control the transcoding process in detail.

The behavior you describe isn't because of "server controlled playback" is being used, but because no length/size is given for the resource. This leads to the renderer only knowing the length/size it has already received, which is usually a few seconds ahead of current playback. The renderer delays the playback a little because it needs to "look ahead" a bit in the stream for many codecs. This has to do with the internal working of the codecs, which is often based on the idea that the renderer keeps buffers that is filled up by the stream, and that the renderer puts things together by using time-codes. That means, that audio and video isn't "perfectly mixed", but instead is received in "buckets". So, the renderer will receive video for a period, then audio for a period, then other things like subtitles etc, and so it goes. The renderer must bufferr this and then sync the different streams using time-codes.
User avatar
mik_s
Moderator
Posts: 1115
Joined: Wed Aug 23, 2017 11:03 pm
Location: UK

Re: Trying to find a proper workaround for seeking in a transcoded stream

Post by mik_s »

SubJunk wrote: Mon Jun 29, 2020 8:04 pm Did it do the same thing as before?
Yup same as before, length shows as 00:00:01 and seek controls disabled. only difference with exclusive is length is shown as 307:29:29.

I did that modification and altered the UpnpDetailsSearch to match any TV in that series and renamed it to Samsung-F Series.conf so will be useful to others.

I must have made this conf based off one of the other Samsung F conf's as they had the mpegps and mpegts lines together too. I've split them up aswell
Attachments
Samsung-F Series.conf
(3.43 KiB) Downloaded 321 times
Samsung-F5100.conf
(1.46 KiB) Downloaded 314 times
Samsung-F5505.conf
(2.61 KiB) Downloaded 315 times
Samsung-F5900.conf
(2.35 KiB) Downloaded 309 times
Logs are important for us to help, Please follow This Link before asking for support. Just a forum cleaner, Will help if I can but no expert.
User avatar
SubJunk
Lead Developer
Posts: 3705
Joined: Sun May 27, 2012 4:12 pm

Re: Trying to find a proper workaround for seeking in a transcoded stream

Post by SubJunk »

Thanks mik, those changes are good. I'm interested in finding a way to get this working on Samsung TVs. It must be so annoying for users and it's a popular brand. I've been searching through old forum threads to see if anyone has solved it before and I'll keep doing that.
Another thing you could try is to force detection of some different renderer configs to see if any of them work for you
User avatar
SubJunk
Lead Developer
Posts: 3705
Joined: Sun May 27, 2012 4:12 pm

Re: Trying to find a proper workaround for seeking in a transcoded stream

Post by SubJunk »

Also this is another longshot but could you try with a couple of previous versions of UMS to see if they allow seeking in transcoded videos? 7.6.2, 7.4.0 and 6.8.0 are a couple of versions I'm aware of that get referenced as being safe from certain bugs.
Nadahar
Posts: 1990
Joined: Tue Jun 09, 2015 5:57 pm

Re: Trying to find a proper workaround for seeking in a transcoded stream

Post by Nadahar »

@mik_s If you are to test earlier versions, there's no reason to uninstall and install any longer now that you have Eclipse installed. Every release has a "tag". Just check out the tag with Git, refresh the project in Eclipse and do a Maven -> Update if necessary, and you can run that version from there. Note that if you need to replace the binaries like FFmpeg, MEncoder etc with the older versions used for that version, you need to run "mvn package" from a console/terminal after checking out the version. Alternatively, you can do a "run as/debug as" -> Maven build (and make sure "package" is specified under "Goals"), but for some reason I find that more of a hazzle. For many tests, there's no reason to replace the binaries though, in which case you don't need to do the Maven-run, which makes this a super-quick way to "switch" versions.
User avatar
mik_s
Moderator
Posts: 1115
Joined: Wed Aug 23, 2017 11:03 pm
Location: UK

Re: Trying to find a proper workaround for seeking in a transcoded stream

Post by mik_s »

I'll try some older versions on laptop to keep things simple.
As far as I can remember I don't think it has ever worked for transcoded videos, even as far back as PS3media server.
Logs are important for us to help, Please follow This Link before asking for support. Just a forum cleaner, Will help if I can but no expert.
Nadahar
Posts: 1990
Joined: Tue Jun 09, 2015 5:57 pm

Re: Trying to find a proper workaround for seeking in a transcoded stream

Post by Nadahar »

The way I described is really simple once you have done it once or twice ;) No installation necessary, just Git check out and F5 (refresh) and F11 (debug run) in Eclipse. It just sounds more complicated when I try to explain :roll:

I don't know if you installed TortoiseGit or not, but if you did, simply go to "Git Browse References" and expand "tags" and find the version you want to check out. When you find the version you want, just right-click it and select "Switch/Checkout to this" and your source code is magically updated to that version.

However, when thinking about it, I don't think UMS places the binaries correctly for Eclipse to find them, I think you have to copy the "win32" folder (or something like that) to the repository root for it to work. I really don't remember the details, since I've been working with DMS for so long - where this isn't necessary.
User avatar
mik_s
Moderator
Posts: 1115
Joined: Wed Aug 23, 2017 11:03 pm
Location: UK

Re: Trying to find a proper workaround for seeking in a transcoded stream

Post by mik_s »

It's probably easy to do but as I'm not familiar with it I just used the laptop to be safe. and was good to do a side by side comparison with 2 versions running on the network.

I tried PMS 1.90.1 first just to see if there were issues back then. The closest match for a conf was SamsungAllshare.conf, but I couldn't get the transcoding to work.
Interestingly when streaming a supported file, FF and RWD were disabled :?

Tried 6.8.0 next and did all the tests again using the f-series conf with the same results as the current version.
Just to be sure I tried playing a supported file too but that had the controls disabled too :? :?

Then tried streaming from current version and same there :? :? :?

My TV is hacked to let me run a few mods and copy the encrypted Freeview programmes from it's hard drive to watch on the computer, so I removed the USB with the exploit on to disable the hack and re-run the tests to be sure. No Change.

Last thing I tried was copying a supported file to USB and playing that directly on the TV. That worked :)

Maybe it's just my model or this series but I don't think Samsung TVs support seeking while streaming. I think we need more people with Samsung TV to do more tests
Maybe there is something missing in the protocol for them to do it. :?:
Logs are important for us to help, Please follow This Link before asking for support. Just a forum cleaner, Will help if I can but no expert.
User avatar
mik_s
Moderator
Posts: 1115
Joined: Wed Aug 23, 2017 11:03 pm
Location: UK

Re: Trying to find a proper workaround for seeking in a transcoded stream

Post by mik_s »

Just had a look at the manual online and saw this under Other Restrictions in video codecs ( p169)

Code: Select all

If the Index Table is wrong, the Seek (Jump) function does not work
Logs are important for us to help, Please follow This Link before asking for support. Just a forum cleaner, Will help if I can but no expert.
Post Reply