Module ImportFrom alias Import alias Import alias Import alias Import alias ImportFrom alias ImportFrom alias alias ImportFrom alias alias ImportFrom alias alias ClassDef bases NameLoad body Pass decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad TryExcept body Assign TupleStore NameStore NameStore NameStore Call NameLoad NameLoad handlers ExceptHandler type NameLoad body Expr Call AttributeLoad NameLoad attr Str NameLoad If Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Raise If NameLoad body Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad If Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Raise Call NameLoad BinOpAdd Str NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign TupleStore NameStore NameStore NameStore Call NameLoad ListLoad Str Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad If NameLoad body Assign TupleStore NameStore NameStore TupleLoad Call NameLoad SubscriptLoad Call AttributeLoad NameLoad attr Index Num Call NameLoad SubscriptLoad Call AttributeLoad NameLoad attr Index Num orelse Assign NameStore NameStore Num Return TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign TupleStore NameStore NameStore Call NameLoad NameLoad Assign TupleStore NameStore NameStore SubscriptLoad NameLoad Index Str Expr Call AttributeLoad NameLoad attr Str NameLoad NameLoad NameLoad NameLoad Assign TupleStore NameStore NameStore Call NameLoad NameLoad Assign TupleStore NameStore NameStore Call NameLoad NameLoad If BoolOpAnd CompareEq NameLoad NameLoad CompareLtE NameLoad NameLoad CompareLtE NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Return If CompareLt BinOpMult NameLoad NameLoad BinOpMult NameLoad NameLoad body Assign NameStore ListLoad Str BinOpMod Str NameLoad orelse Assign NameStore ListLoad Str BinOpMod Str NameLoad If BoolOpAnd CompareLtE NameLoad NameLoad CompareLtE NameLoad NameLoad body Assign NameStore ListLoad Assign NameStore ListLoad Str Str NameLoad Str If CompareIsNot NameLoad NameLoad body AugAssignAdd NameStore NameLoad AugAssignAdd NameStore BinOpAdd NameLoad ListLoad NameLoad Expr Call AttributeLoad NameLoad attr Str Call AttributeLoad Str attr NameLoad Expr Call NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore BinOpAdd NameLoad Str Assign NameStore ListLoad Str Str NameLoad Str Str Str Str NameLoad Str Str Str NameLoad Expr Call AttributeLoad NameLoad attr Str Call AttributeLoad Str attr NameLoad Expr Call NameLoad NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore SubscriptLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Index Num Assign TupleStore NameStore NameStore Call NameLoad NameLoad TryExcept body If BoolOpAnd SubscriptLoad NameLoad Index Str Call NameLoad NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad keyword SubscriptLoad NameLoad Index Str orelse Assign NameStore ListLoad Str Str Assign NameStore SubscriptLoad NameLoad Index Str If CompareNotIn NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Str NameLoad Raise NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad BinOpAdd BinOpAdd NameLoad Str NameLoad Expr Call NameLoad NameLoad NameLoad NameLoad keyword Call AttributeLoad NameLoad attr BinOpAdd NameLoad Str handlers ExceptHandler type NameLoad body If CompareEq Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Raise orelse Return AttributeLoad NameLoad attr If SubscriptLoad NameLoad Index Str body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Call NameLoad NameLoad NameLoad TryExcept body Expr Call NameLoad NameLoad NameLoad SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str keyword SubscriptLoad NameLoad Index Str keyword SubscriptLoad NameLoad Index Str handlers ExceptHandler type NameLoad body If CompareEq Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Raise orelse Return AttributeLoad NameLoad attr Return AttributeLoad NameLoad attr decorator_list
N/A __future__ with_statement N/A logging N/A os N/A re N/A shutil os.path splitext N/A image utils settings get_thumb Status utils call_subprocess is_valid_html5_video SubprocessException N/A Exception N/A N/A N/A check_subprocess N/A N/A cmd source outname N/A N/A N/A Run the command to resize the video and remove the output file if the
    processing fails.

     N/A logger N/A N/A logging getLogger __name__ N/A N/A N/A N/A returncode stdout stderr N/A call_subprocess cmd N/A N/A N/A KeyboardInterrupt N/A N/A N/A N/A logger debug Process terminated, removing file %s outname N/A N/A N/A N/A os path isfile outname N/A N/A N/A N/A os remove outname N/A N/A returncode N/A N/A N/A N/A logger debug STDOUT:
 %s stdout N/A N/A N/A logger debug STDERR:
 %s stderr N/A N/A N/A N/A os path isfile outname N/A N/A N/A N/A logger debug Removing file %s outname N/A N/A N/A os remove outname N/A N/A SubprocessException N/A Failed to process  source N/A video_size N/A N/A source N/A N/A N/A Returns the dimensions of the video. N/A N/A ret stdout stderr N/A call_subprocess N/A ffmpeg -i source N/A pattern N/A N/A re compile Stream.*Video.* ([0-9]+)x([0-9]+) N/A match N/A N/A pattern search stderr N/A match N/A N/A N/A x y N/A N/A int N/A N/A N/A match groups N/A 0 N/A int N/A N/A N/A match groups N/A 1 N/A N/A x y 0 N/A N/A x y N/A generate_video N/A N/A source outname settings options N/A None N/A N/A Video processor.

    :param source: path to a video
    :param outname: path to the generated video
    :param settings: settings dict
    :param options: array of options passed to ffmpeg

     N/A logger N/A N/A logging getLogger __name__ N/A N/A w_src h_src N/A video_size source N/A N/A w_dst h_dst N/A settings N/A video_size N/A N/A N/A logger debug Video size: %i, %i -> %i, %i w_src h_src w_dst h_dst N/A N/A base src_ext N/A splitext source N/A N/A base dst_ext N/A splitext outname N/A N/A N/A dst_ext src_ext N/A w_src w_dst N/A h_src h_dst N/A N/A N/A N/A logger debug Video is smaller than the max size, copying it instead N/A N/A N/A shutil copy source outname N/A N/A N/A N/A h_dst w_src N/A h_src w_dst N/A N/A resize_opt N/A -vf N/A scale=trunc(oh*a/2)*2:%i h_dst N/A N/A resize_opt N/A -vf N/A scale=%i:trunc(ow/a/2)*2 w_dst N/A N/A N/A w_src w_dst N/A h_src h_dst N/A N/A resize_opt N/A N/A cmd N/A ffmpeg -i source -y N/A N/A options None N/A N/A cmd options N/A cmd N/A resize_opt N/A outname N/A N/A N/A logger debug Processing video: %s N/A N/A join cmd N/A N/A check_subprocess cmd source outname N/A generate_thumbnail N/A N/A source outname box delay fit options N/A True None N/A N/A Create a thumbnail image for the video source, based on ffmpeg. N/A logger N/A N/A logging getLogger __name__ N/A tmpfile N/A outname .tmp.jpg N/A cmd N/A ffmpeg -i source -an -r 1 -ss delay -vframes 1 -y tmpfile N/A N/A N/A logger debug Create thumbnail for video: %s N/A N/A join cmd N/A N/A check_subprocess cmd source outname N/A N/A N/A image generate_thumbnail tmpfile outname box fit options N/A N/A N/A os unlink tmpfile N/A process_video N/A N/A filepath outpath settings N/A N/A N/A Process a video: resize, create thumbnail. N/A logger N/A N/A logging getLogger __name__ N/A filename N/A N/A N/A N/A os path split filepath N/A 1 N/A N/A basename ext N/A splitext filename N/A N/A N/A N/A N/A settings N/A use_orig N/A is_valid_html5_video ext N/A N/A outname N/A N/A N/A os path join outpath filename N/A N/A N/A utils copy filepath outname symlink N/A settings N/A orig_link N/A N/A valid_formats N/A mp4 webm N/A video_format N/A settings N/A video_format N/A N/A video_format valid_formats N/A N/A N/A N/A logger error Invalid video_format. Please choose one of: %s valid_formats N/A ValueError N/A outname N/A N/A N/A os path join outpath N/A N/A basename . video_format N/A N/A generate_video filepath outname settings options N/A N/A settings get N/A video_format _options N/A N/A N/A Exception N/A N/A N/A N/A N/A logger getEffectiveLevel N/A logging DEBUG N/A N/A N/A N/A N/A Status FAILURE N/A N/A settings N/A make_thumbs N/A N/A thumb_name N/A N/A N/A os path join outpath N/A get_thumb settings filename N/A N/A N/A N/A generate_thumbnail outname thumb_name N/A settings N/A thumb_size N/A settings N/A thumb_video_delay fit N/A settings N/A thumb_fit options N/A settings N/A jpg_options N/A N/A N/A Exception N/A N/A N/A N/A N/A logger getEffectiveLevel N/A logging DEBUG N/A N/A N/A N/A N/A Status FAILURE N/A N/A Status SUCCESS N/A