This module defines the FFMpeg job that transforms a video file into a sequence of thumbnail images.
Those thumbnails are more suitable for analysis.
FFMpegThumbnailsJob(*args, **kwargs) |
Job for extracting thumbnails from a video. |
NumberOfFilesJob(*args, **kwargs) |
Indicates how many thumbnails were generated by the FFMpegThumbnailsJob. |
livius.video.processing.jobs.ffmpeg_to_thumbnails.FFMpegThumbnailsJob(*args, **kwargs)¶Job for extracting thumbnails from a video. This job may be the root of a workflow as it does not expect any workflow input.
Runtime parameters
FFMpegThumbnailsJob.__init__() for details.Workflow output
Note
The Job is designed to have relocatable set of files. The input files are governed by the video_location
parameter, which is not cached (but the video filename is). The generated files are also relative to the
__init__(*args, **kwargs)¶The class instanciation accepts the following arguments.
| Parameters: |
|
|---|
attributes_to_serialize = ['video_filename', 'video_fps', 'video_width', 'thumbnails_location']¶Cached inputs:
video_filename base name of the video filevideo_width width of the generated thumbnailsvideo_fps framerate of the thumbnailsthumbnails_location location of the thumbnails relative to the thumbnail root.get_outputs()¶Returns the list of thumbnail files (absolute paths)
get_thumbnail_location()¶Returns the location where the thumbnails will/are stored, relative to the thumbnail root directory.
get_thumbnail_root()¶Indicates the root where files are stored. Currently in the parent folder of the json files
outputs_to_cache = ['thumbnail_files']¶Cached outputs:
thumbnail_files list of generated files, relative to the thumbnail rootlivius.video.processing.jobs.ffmpeg_to_thumbnails.NumberOfFilesJob(*args, **kwargs)¶Indicates how many thumbnails were generated by the FFMpegThumbnailsJob.
This job is dependent on FFMpegThumbnailsJob.
Workflow input
The output of FFMpegThumbnailsJob
Workflow output
One unique number indicating the number of thumbnails.
livius.video.processing.jobs.ffmpeg_to_thumbnails.extract_thumbnails(video_file_name, output_width, output_folder)¶Extract the thumbnails using FFMpeg.
| Parameters: |
|
|---|