1

I am currently using MediaMetadataRetriever.getFrameAtTime on Android to get thumbnails of videos and it is working great except for live streams (m3u8). Using the m3u8 directly doesn't seem to work and I have managed to get a bitmap back for a .ts segment file using that same method but it is always just a black bitmap. So how can I get a thumbnail of a live stream?

Thanks.

casolorz
  • 8,486
  • 19
  • 93
  • 200
  • Just curious, since the `m3u8` is a live stream, what is the motivation to create a thumbnail? Do you plan to store the same into the disk? – Ganesh Jun 09 '15 at 13:21
  • Just to show it on the list. I already show thumbnails for other videos and that is just the easiest way to make it look consistent. I also saw an iptv app that did that and it didn't look half bad. – casolorz Jun 09 '15 at 13:52
  • Ok. Have you considered storing the incoming data into a temporary file and then running `MediaMetadataRetriever` on the same? – Ganesh Jun 09 '15 at 14:03
  • Yeah but if that is the only way then I don't really want to go down the thumbnail route. Those playlists of live stream channels can be huge. – casolorz Jun 09 '15 at 14:49
  • Well.. You don't have to download the entire stream. Maybe the first one or five seconds should be sufficient right, which shouldn't be too large – Ganesh Jun 09 '15 at 15:48
  • I'll try it out but I'm not sure why it would make a difference. I already tried using one of the .ts segments and MediaMetadataRetriever works fine with network streams. – casolorz Jun 09 '15 at 20:06

0 Answers0