Use picasso to render the video thumbnail into the thumbnail widget using a temporal
placeholder.

@param video to get the rendered thumbnail.
556364
private void renderThumbnail(Video video) {
    Picasso.with(getContext()).cancelRequest(thumbnail);
    Picasso.with(getContext())
        .load(video.getThumbnail())
        .placeholder(R.drawable.placeholder)
        .into(thumbnail);
  }
162053
def get_thumbnail(self, video_path, at_time=0.5):
        
        filename = os.path.basename(video_path)
        filename, __ = os.path.splitext(filename)
        _, image_path = tempfile.mkstemp(suffix='_{}.jpg'.format(filename))

        video_duration = self.get_media_info(video_path)['duration']
        if at_time > video_duration:
            raise exceptions.InvalidTimeError()
        thumbnail_time = at_time

        cmds = [self.ffmpeg_path, '-i', video_path, '-vframes', '1']
        cmds.extend(['-ss', str(thumbnail_time), '-y', image_path])

        process = self._spawn(cmds)
        self._check_returncode(process)

        if not os.path.getsize(image_path):
            # we somehow failed to generate thumbnail
            os.unlink(image_path)
            raise exceptions.InvalidTimeError()

        return image_path
751147
public static Observable<Bitmap> getThumbnail(Context context, Uri uri) {
    return getThumbnailFromUri(context, uri);
  }
612904
def play(self):
		
		# Signal player to start video playback
		self.paused = False

		# Start listening for incoming audio frames
		if self.decoder.audioformat:
			self.audio.start()

		self.decoder.play()

		# While video is playing, render frames
		while self.decoder.status in [mediadecoder.PLAYING, mediadecoder.PAUSED]:
			texture_update_time = 0
			if self.texUpdated:
				t1 = time.time()
				# Update texture
				self.texture_locked = True
				glTexSubImage2D( GL_TEXTURE_2D, 0, 0, 0, self.vidsize[0], 
					self.vidsize[1], GL_RGB, GL_UNSIGNED_BYTE, self.buffer)
				self.texture_locked = False
				texture_update_time = int((time.time()-t1)*1000)
				self.texUpdated = False
			
			# Draw the texture to the back buffer
			t1 = time.time()
			self.__drawFrame()
			draw_time = (time.time()-t1)*1000
			# Flip the buffer to show frame to screen
			t1 = time.time()
			pygame.display.flip()
			flip_time = (time.time()-t1)*1000

			logger.debug("================== Frame {} ========================"
				"".format(self.decoder.current_frame_no))
			if texture_update_time:
				logger.debug("Texture updated in {0} ms".format(texture_update_time))
			logger.debug("Texture drawn in {0} ms".format(draw_time))
			logger.debug("Screen flipped in {0} ms".format(flip_time))
			logger.debug("-----------------------------------------------------")
			logger.debug("Total: {} ms".format(texture_update_time+draw_time+flip_time))

			for e in pygame.event.get():
				if e.type == pygame.QUIT:
					self.stop()
				if e.type == pygame.KEYDOWN:
					# Quitting
					if e.key == pygame.K_ESCAPE:
						self.stop()
					# Pausing
					elif e.key == pygame.K_SPACE:
						self.pause()
					# Seeking
					elif e.key == pygame.K_RIGHT:
						new_time = min(
							self.decoder.current_playtime + 10,
							self.decoder.duration)
						self.decoder.seek(new_time)
					elif e.key == pygame.K_LEFT:
						new_time = max(
							self.decoder.current_playtime - 10,
							0)
						self.decoder.seek(new_time)

			pygame.event.pump()   # Prevent freezing of screen while dragging 

			# Without this sleep, the video rendering threard goes haywire...
			time.sleep(0.005)
		
		if self.decoder.audioformat:
			self.audio.close_stream()
				
		pygame.quit()
1242135
function(action) {
			//UR
			if (!window.URL || !window.URL.createObjectURL) {
				window.URL = window.URL || {};
				window.URL.createObjectURL = function(obj) {
					return obj;
				};
			}
			if (_browser.supported) {
				var newVideo = false;
				navigator.getUserMedia = navigator.getUserMedia || navigator.oGetUserMedia || navigator.msGetUserMedia || navigator.mozGetUserMedia || navigator.webkitGetUserMedia;
				_readyCb = function() {
					try {
						if (action === 'stop') {
							_stop = true;
							icon.reset();
							_stop = false;
							return;
						}
						newVideo = document.createElement('video');
						newVideo.width = _w;
						newVideo.height = _h;
						navigator.getUserMedia({
							video : true,
							audio : false
						}, function(stream) {
							newVideo.src = URL.createObjectURL(stream);
							newVideo.play();
							drawVideo(newVideo);
						}, function() {
						});
					} catch(e) {
						throw 'Error setting webcam. Message: ' + e.message;
					}
				};
				if (_ready) {
					_readyCb();
				}
			}

		}
344605
final void recycleVideoBuffer(BaseVideoFrame frame) {
		// Make sure we are in started state
		if (state.isStarted())
		{
			enqueueBuffer(object, frame.getBufferInex());

			synchronized(availableVideoFrames){
				availableVideoFrames.add(frame);
				availableVideoFrames.notify();
			}
		}
	}
683029
function _buildVideo(videoDescriptor) {
		this.url = videoDescriptor.url;
		this.appData = videoDescriptor.appData;
		descriptor = videoDescriptor;
	}
186251
protected Video getVideoPlayerElement(@NotNull Media media) {
    Dimension dimension = MediaMarkupBuilderUtil.getMediaformatDimension(media);

    Video video = new Video();
    video.setWidth((int)dimension.getWidth());
    video.setHeight((int)dimension.getHeight());
    video.setControls(true);

    // add video sources for each video profile
    addSources(video, media);

    // add flash player as fallback
    video.addContent(getFlashPlayerElement(media, dimension));

    return video;
  }
50992
public static Bitmap getVideoThumbnail(String videoPath){
        MediaMetadataRetriever mmr = new MediaMetadataRetriever();
        mmr.setDataSource(videoPath);
        return mmr.getFrameAtTime();
    }
680675
public ExtViewQuery image(String url, Callback callback) {
        if (!TextUtils.isEmpty(url) && view instanceof ImageView) {
            Picasso.with(context).load(url).into((ImageView) view, callback);
        }
        return self();
    }
447006
private void initializePoster() {
    Picasso.with(this)
        .load(VIDEO_POSTER)
        .placeholder(R.drawable.spiderman_placeholder)
        .into(posterImageView);
    Picasso.with(this)
        .load(VIDEO_THUMBNAIL)
        .placeholder(R.drawable.spiderman_placeholder)
        .into(thumbnailImageView);
  }
545441
@Override
	public void encodeBegin(FacesContext context, UIComponent component) throws IOException {
	    if (!component.isRendered()) {
	        return;
	    }
		Video video = (Video) component;
		ResponseWriter rw = context.getResponseWriter();
		String clientId = video.getClientId();
		boolean idHasBeenRendered=false;
		rw.startElement("div", video);
		String responsiveStyle = Responsive.getResponsiveStyleClass(video, false);
		if (null != responsiveStyle && responsiveStyle.trim().length()>0) {
			rw.writeAttribute("class", responsiveStyle, null);
			rw.writeAttribute("id", clientId, null);
			idHasBeenRendered=true;
		}
	
		rw.startElement("video", video);
		Tooltip.generateTooltip(context, video, rw);
		rw.writeAttribute("src", video.getSrc(), null);
		rw.writeAttribute("autoplay", video.isAutoplay(), null);
		rw.writeAttribute("controls", video.isControls(), null);
		rw.writeAttribute("loop", video.isLoop(), null);
		String videoId = clientId;
		if (idHasBeenRendered) {
			videoId = clientId + "_video";
		}
		rw.writeAttribute("id", videoId, null);
		String style = video.getStyle();
		if (null != style) {
			rw.writeAttribute("style", style, null);
		}
		String styleClass = video.getStyleClass();
		if (null == styleClass)
			styleClass = "";
		else
			styleClass = " " + styleClass;
		
		Tooltip.generateTooltip(context, video, rw);

		rw.writeAttribute("class", styleClass, "class");
		
		// Render Ajax Capabilities
		AJAXRenderer.generateBootsFacesAJAXAndJavaScript(FacesContext.getCurrentInstance(), video, rw, false);
	
		rw.endElement("video");
		if (null != responsiveStyle && responsiveStyle.trim().length()>0) {
			rw.endElement("div");
		}		
		Tooltip.activateTooltips(context, video, videoId);	
	}
572286
public void open(int width, int height, double frameRate) throws JavaAVException {
		if (!open.get()) {
			String input = "video=" + device;

			demuxer = new Demuxer();
			demuxer.setInputFormat(format);
			demuxer.setImageWidth(width);
			demuxer.setImageHeight(height);
			demuxer.setFramerate(frameRate);
			demuxer.open(input);

			open.set(true);
		}
	}
751441
public static Bitmap getThumbnail(Context context, Uri uri) {
        return getThumbnail(context, uri, getMimeType(context, uri));
    }
373983
public void setVideoPosition(com.google.api.ads.admanager.axis.v201808.VideoPosition videoPosition) {
        this.videoPosition = videoPosition;
    }
1268722
def new_video_pic(cls, shape_id, shape_name, video_rId, media_rId,
                      poster_frame_rId, x, y, cx, cy):
        """"""
        return parse_xml(
            cls._pic_video_tmpl() % (
                shape_id, shape_name, video_rId, media_rId, poster_frame_rId,
                x, y, cx, cy
            )
        )
1047965
function VideoFeature() {
      var _this;

      var ua = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
      var flags = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
      var cssFlagsPrefix = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'video';

      _classCallCheck(this, VideoFeature);

      _this = _possibleConstructorReturn(this, _getPrototypeOf(VideoFeature).call(this, ua, flags, cssFlagsPrefix));

      _this._createTestElements();

      _this.formats = {
        mp4: _this.getMp4(),
        ogv: _this.getOgv(),
        webm: _this.getWebm()
      };
      return _this;
    }