zig_zag
9 years agoVisitor
Using BIF files
Hello! How can i use my ".bif" file, to show the fast forward/backward list of thumbnails, if i disabled trick play? e.g.: "m.video.enableTrickPlay = false" Thank you! - Gabriel
Hi RokuTomC ,
reopening this old ticket, is there any plan to enable BIF thumbnails for a custom player on SceneGraph?
Or atleast API to parse a sprite image for the player?
regards
GM
I have the same concern. I want to implement a custom seek bar, to match the visual theme of the rest of my channel, but I would hate to lose the thumbnail pictures (and keeping them is a requirement for channel certification.)
Ideally, the Video node would provide a way to obtain the thumbnail images, irrespective of whether they come from BIF or from "standard" HLS/DASH.
In the absence of any better solution, I tried destruk's parsing code above, and it works for finding the offsets of each jpg image inside the bif file. It is a shame that roUrlTransfer has only GetToString and GetToFile, and does not have a GetToByteArray, instead destruk uses the workaround of downloading to a file on tmp: and then loading that file into a byte array.
destruk's code does not show how to display the images. Again, I found no way that a Poster could accept JPG data from a byte array, so again we need to go though a file on "tmp:", cutting out a "section" of the byte array, like below.
m.dataset.WriteFile("tmp:/frame.png", m.OffsetTable[index], m.OffsetTable[index + 1] - m.OffsetTable[index]) poster.uri = "tmp:/frame.png"
None of this is pretty, but it does work.
I have found that downloading a couple of megabytes of BIF file can take 2-3 seconds, and I am wondering if it could be faster to initially download only say the first 10kB of the BIF file, to grab the index table, and then load maybe 100kB "chunks" of the file as needed.
It probably would be too inefficient to download a single image per HTTP transaction, though that could save some byte array juggling.
By the way, the way to download parts of a file (provided that the HTTP server supports it), is to add a header like this:
urlXfer.AddHeader("Range", "bytes=0-10240")