TPESystem/Media/VideoThumbnail: Difference between revisions

Line 1: Line 1:
This page is intended to have an overall summary of discussions in Bug#942078[https://bugzilla.mozilla.org/show_bug.cgi?id=942078] and webapi mailing list[https://groups.google.com/forum/#!topic/mozilla.dev.webapi/N9BW0V7MUHA].
== Background ==
== Background ==
Currently video thumbnail generation is not a good way and there are some room to improve as described as below.  
Currently video thumbnail generation is not a good method and there are some room to improve as described below.  
#Seek to 1/10th of the duration
<OL>
*1/10th may not be a good choice
<LI><b>Seek to 1/10th of the duration</b>
*Sometimes seeking takes time
<OL>
#Use Canvas to draw image and save it as a file
<LI>1/10th may not be a good choice <br>
A better way is to pick the biggest frame of the first 10 key frames as Android does. That frame should contain much information.
<LI>Sometimes seeking takes time <br>
Current seeking is a precise way which means it decodes from the closest key-frame to the requested seek frame. If the frame at 1/10 duration is far from key frame, it takes longer.
</OL>
<LI><b>Use Canvas to draw image and save it as a jpeg file </b><br>
There is a full-size memory allocation used in Canvas to hold a decoded frame.
</OL>
 
== Possible Solutions ==
20

edits