Skip to content
This repository has been archived by the owner on Sep 9, 2023. It is now read-only.

funciton/py-ffmpeg-wrapper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

python FFmpeg wrapper based on rVideo

Warning

Don't pass a user input as an ffmpeg execute command since it's executed with subprocess' shell argument set to True. This could lead to bad things (shell injection)

Sample usage (VideoInspector)

from video_inspector import VideoInspector
video = VideoInspector("/path/to/video.mov")
print video.duration()
print video.fps()

Sample usage (VideoEncoder)

from video_encoder import VideoEncoder
video = VideoEncoder("/path/to/video_input.mov")
def print_progress(current_pos, duration):
    print "%s%%" % (current_pos / duration) * 100
def encoding_complete():
    print "encoding complete"
video.execute(
    "%(ffmpeg_bin)s -y -i %(input_file)s %(output_file)s",
    "/path/to/output.mp4",
    print_progress,
    encoding_complete
)

About

FFmpeg wrapper written in python based on rVideo

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages