
#Create a video write before entering the loop In short, I only want to save the latest 30 seconds of the live video.įfmpeg trims the video but creates a new output file, I don't want to keep copies. After 30 seconds I want to remove 1 sec of the video from the start and keep capturing the video stream and so on. Apply the event Trigger on the widgets.I have a webcam that captures video stream. Let us create a Tkinter application Creation of Tkinter applicationĢ. Tkinter is the inbuilt library of Python that allows you to create a GUI Graphical User Interface, a relatively easy and most commonly used application. Here we use glob which is an inbuilt module in the Python standard library, which helps you to find the file pathnames that match a specific pattern. curselection is a predefined function that fetches the values of a selected items.

Here we use Listbox curselection to display the selected items. It's a tkinter widget that can be used for all sorts of things. It is used to convert files, trim video and audio files, reduce the file size and crop the video, etc.Ī list box is a box that holds a list of items.

Using ffmpeg we can manipulate all multimedia files. ffmpeg is a very fast video and audio converter.

