Programming Project 3: Extract still images from video
DATE DUE: Monday, May 15, 2017
Points possible: 10 points
CS-160: Software Engineering
Instructor: Robert Bruce

OVERVIEW

For this assignment you will create a CGI (common gateway interface) web-based application that processes an uploaded video via an HTML form. Your program should extract metadata from the video to determine the number of frames in the video, the frame rate (frames per second), and the horizontal and vertical resolution of the video. After extracting this metadata, your program should use FFMPEG to extract and store the still images from the video in either a database (as a binary blob) or as a flat-file system in a special read-only directory. Note: the program should only accept uploaded video from authenticated users who have logged into the web-based interface first.

SPECIFICATIONS

Authentication

Your program should check that the user has logged into the system. Only valid, currently registered users are allowed to upload videos for processing.

Video upload

A web-based form should appear which prompts the user to upload a video. You may choose the video format(s) you wish to support. It is a good idea to inform the user what video formats are accepted.

Your program should notify the user if the uploaded file is one of the following:

  • Not a valid video file format (i.e. a random, junk file)
  • Not a supported video format.

Video metadata

Your program should extract and store metadata about the video in your database. The metadata that should be stored:

  • The number of frames in the video.
  • The frames per second (fps) or frame rate the video was encoded at.
  • The horizontal (X) and vertical (Y) pixel resolution of the video.
  • A unique ID (primary key) for this video
  • The login username (i.e. registered user) of the person who uploaded this video.

Note: your metadata table should also store a unique video ID (auto incrementing primary key).

Extracting still images from video

Your program will need to convert the video into a series of still images. You can store these images in one of two ways:

  • Store each still image as a binary blob row in your database in the PNG still image file format
  • Store each still image online in a flat-file directory on a server in the PNG still image file format

If you store the images online in a flat-file directory on a server (i.e. image repository), please use the following filename convention:

  • Each still image begins with the video ID number followed by a period, a frame number, a period, and the extension png.
  • For example, still images from a video with video ID 100 saved in the png file format would be named as:
  • 100.1.png
  • 100.2.png
  • 100.3.png

Implementation

You may implement your application in most programming languages such as Perl, Python, PHP, Java, Ruby on Rails, C, or C++, etc. If your programming language doesn't appear here, ask me for approval.

SUBMITTING YOUR ASSIGNMENT

1. Please include the full names of all members of your team as a comment at the top of your application.

2. Please name your assignment programming_project_3 followed by a period and an appropriate extension depending on the programming language used. For example, use .pl for Perl, .php for PHP, .py for Python, .cpp for C++, .c for C, etc.

LATE ASSIGNMENTS

Assignments submitted after the due date will be worth, at most, 5 points. Additional points will be deducted for programs not meeting the specification as outlined above.