index.js: format code

Change-Id: I7ef968402f18c2ac17d42874b59accc5aa3251df
index.js: use Sample class

Change-Id: I3f1525fa46c151409913a78ecf32716563df062a
Rescale videos and minimize frame rate to avoid too cpu usage

Change-Id: I9257a6d74ff91f959a5575ee3eb44fdf2f7bcbb7