youtube_icon

Extracting i-frames


We can do more than just download a video.

Here is a command that we can get images from the i-frames of the downloaded video:

$ ffmpeg -i YosemiteHDI.mp4 -f image2 -vf "select='eq(pict_type,PICT_TYPE_I)'" -vsync vfr iframes/yi%03d.png



Capturing scene change


Using the select filter again, the following command selects only frames that have more than 50% of changes compared to previous scene and generates pngs.

$ ffmpeg -i YosemiteHDI.mp4 -vf  "select=gt(scene\,0.5), scale=640:360" -vsync vfr scenechange/yosemiteThumb%03d.png

The command stores the extracted frames into scenechage folder.

By using scene change method, we created fewer number of images (22 compared with 116 i-frame selection) while capturing significant scene changes:

yosemiteThumb001 yosemiteThumb002 yosemiteThumb003 yosemiteThumb004 yosemiteThumb005 yosemiteThumb006 yosemiteThumb007 yosemiteThumb008 yosemiteThumb009 yosemiteThumb010
yosemiteThumb011 yosemiteThumb012 yosemiteThumb013 yosemiteThumb014 yosemiteThumb015 yosemiteThumb016 yosemiteThumb017 yosemiteThumb018 yosemiteThumb019 yosemiteThumb020
yosemiteThumb021 yosemiteThumb022

We can make an image composed of the images like we produced by the extraction.

Please visit YouTube mosaic-tile page


Site Home
YouTube Home
YouTube extract-iframe page
YouTube mosaic-tile page
YouTube another page


Click the app icons listed below to see what PyGoogle can does.


youtube_icon plus_icon search_icon chrome_icon hangouts_icon translate_icon maps_icon gmail_icon drive_icon calendar_icon play_icon projects_icon