ffmpeg_wrapper¶
Overview¶
|
Concatenate all the videos in the list using a concatenation file |
|
Save the incoming audio file to a regular mp3 file with a standardized filename |
|
Extract a slice of the audio file using ffmpeg |
|
Get the first frame of the video |
|
Get the last frame of the video |
|
Get the duration of a media file. |
|
Get the frames per second of a media file. |
|
Check if the video has an audio track |
|
Merge audio with the video |
|
Reencode the video, doing this for imported video that might not concatenate well |
Functions¶
- async ffmpeg_wrapper.concatenate_videos(input_file: str, target_file_name=None, ratioToMultiplyAnimations=1, bias=0.33, fps=16, max_fps=16)¶
Concatenate all the videos in the list using a concatenation file
- Parameters:
- Returns:
The path to the concatenated video file
- Return type:
- async ffmpeg_wrapper.convert_as_mp3_file(fileName, target_file_name: str)¶
Save the incoming audio file to a regular mp3 file with a standardized filename
- async ffmpeg_wrapper.extract_audio_slice(audiofile_path: str, start: float = 0, end: float = 1, target_file_name: str = None)¶
Extract a slice of the audio file using ffmpeg
- async ffmpeg_wrapper.get_first_frame_as_image_ffmpeg(media_url, target_path=None)¶
Get the first frame of the video
- async ffmpeg_wrapper.get_last_frame_as_image_ffmpeg(media_url, target_path=None)¶
Get the last frame of the video
- ffmpeg_wrapper.get_media_duration(input_video_path)¶
Get the duration of a media file.
- ffmpeg_wrapper.get_media_fps(input_video_path)¶
Get the frames per second of a media file.
- ffmpeg_wrapper.has_audio_track(video_path)¶
Check if the video has an audio track
- async ffmpeg_wrapper.merge_audio(media_url: str, audio_file_path: str, audio_file_relative_volume: float = None, target_file_name=None)¶
Merge audio with the video
- async ffmpeg_wrapper.reencode_video(video_url, target_video_name=None)¶
Reencode the video, doing this for imported video that might not concatenate well with generated ones or among themselves