Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
krackers123
Visitor

base64 pngs for poster

Does the roku support using a base64 encoded png for the poster in video?
0 Kudos
8 REPLIES 8
tim_beynart
Channel Surfer

Re: base64 pngs for poster

bump... can the Roku translate base64 encoded PNGs into an image for display? I need to explore a custom trick play implementation. The image sequence I have available is a bunch of pngs stored as b64 strings in a text file.
0 Kudos
renojim
Community Streaming Expert

Re: base64 pngs for poster

I suppose you could use roByteArray's FromBase64String and save them as PNGs in tmp:/, but it seems like a lot of work and may be slow.

-JT
Roku Community Streaming Expert

Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.

I am not a Roku employee.
0 Kudos
RokuKC
Roku Employee
Roku Employee

Re: base64 pngs for poster

"tim_beynart" wrote:
bump... can the Roku translate base64 encoded PNGs into an image for display? I need to explore a custom trick play implementation. The image sequence I have available is a bunch of pngs stored as b64 strings in a text file.


If they are fixed assets, perhaps you could pre-convert them to .png files on your PC, then just include the .png files in the channel or on your server?
0 Kudos
EnTerr
Roku Guru

Re: base64 pngs for poster

Ha, "base64 encoded PNGs"? This is so bizarre, i had to look it up!
So this is likely about "data URI" data:image/png;base64, used to embed small images in HTML/CSS as in:
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUA
AAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO
9TXL0Y4OHwAAAABJRU5ErkJggg==" alt="Red dot" />

It beggars belief someone would actually store single images in base64 (since either the entire composed CSS would be kept on CDN for speed or base64-being-so-fast would be done on the fly). Worst case (extracting from a composite file), renojim's applies - otherwise RokuKC's.
0 Kudos
tim_beynart
Channel Surfer

Re: base64 pngs for poster

There is some merit in storing all the trick play images for a piece of content in a single text file. Especially at scale. This technique is used on our desktop players (Flash and HTML5), where the encoded images are unpacked for display.
But in the context of a Roku player, it's not helpful. Smiley LOL
0 Kudos
EnTerr
Roku Guru

Re: base64 pngs for poster

trick play, you say... can a BIF file address your beef?
0 Kudos
tim_beynart
Channel Surfer

Re: base64 pngs for poster

Unfortunately, bif only works with roVideoScreen. Our implementation uses roVideoPlayer, so all the UI is custom using roImageCanvas. Right now my approach is to download jpegs in sequence during seek, and draw them to screen using roImageCanvas with a url property. One suggestion was to use roTextureManager to load the images, but that only works with roScreen as the base layer, which doesn't quite fit my design but I'll see if there is any performance difference.
You can see an example of what I am trying to accomplish in the Nickelodeon and Comedy Central channels.
0 Kudos
ajitg_4557
Channel Surfer

Re: base64 pngs for poster

"renojim" wrote:
I suppose you could use roByteArray's FromBase64String and save them as PNGs in tmp:/, but it seems like a lot of work and may be slow.

-JT

hi,renojim 
           did you resolve  the this issue.if did, so please let me know.
          I am facing with same problem.
         thanks in advance.
0 Kudos