video

Video created with OpenCV python cannot be uploaded to Social Media Platforms

Video created with OpenCV python cannot be uploaded to Social Media Platforms Question: I use OpenCV in a python script to convert images in PIL format to MP4 videos. Even though I can play back the videos normally after creating them, I cannot upload them on Twitter or Instagram afterwards. If after creating the video, …

Total answers: 1

How to create a clip from an mp4-file quickly?

How to create a clip from an mp4-file quickly? Question: I have a web app that lets users download a clip from a mp4-file specified before. Currently I use ffmpeg via python like this: os.system(‘ffmpeg -i original_video -ss {start} -t {duration} result_video’) Processing 10 minutes of 720p video with this method also takes a few …

Total answers: 2

Playing a video with captions in Jupyter notebook

Playing a video with captions in Jupyter notebook Question: How to play a video with captions in Jupyter notebook? With code snippets from these post, I’ve tried to play a video inside jupyter notebook: How can I play a local video in my IPython notebook? how play mp4 video in google colab from IPython.display import …

Total answers: 2

Why does Moviepy stretch my output after cutting and putting back together a video?

Why does Moviepy stretch my output after cutting and putting back together a video? Question: I am using moviepy to cut up a video, put all the clips back together, and then export it. When I export it, the aspect ratio is changed, vertically stretching the image. I was using the ‘.mkv’ container, which I …

Total answers: 1

Creating video from images using PyAV

Creating video from images using PyAV Question: I am trying to write a function that creates a new MP4 video from a set of frames taken from another video. The frames will be given in PIL.Image format and is often cropped to include only a part of the input video, but all images will have …

Total answers: 1

Read video from base64 in python

Read video from base64 in python Question: I would like to process a video that I receive through an upload component in plotly dash. Currently I am creating a tempfile and then reading the video with opencv. However, I would like to avoid writing the file to disk. Is there a way to process the …

Total answers: 1

How to scale up video with Python moviepy?

How to scale up video with Python moviepy? Question: I am using Python 3.10 and moviepy library to process videos. I need to scale up (zoom) video without changing its resolution. There are a lot of example of using moviepy resize method, but it changes only the resolution. Are there any options of scaling video …

Total answers: 1

How to deactivate a QVideoProbe?

How to deactivate a QVideoProbe? Question: According to the docs "If source is zero, this probe will be deactivated" But calling setSource(0) gives the following exception: Exception has occurred: TypeError ‘PySide2.QtMultimedia.QVideoProbe.setSource’ called with wrong argument types: PySide2.QtMultimedia.QVideoProbe.setSource(int) Supported signatures: PySide2.QtMultimedia.QVideoProbe.setSource(PySide2.QtMultimedia.QMediaObject) PySide2.QtMultimedia.QVideoProbe.setSource(PySide2.QtMultimedia.QMediaRecorder) Im running my code on raspberry pi 4 with Rpi Os Bullseye 64bit and …

Total answers: 1

Crop a video in Python, centered on a 16×9 video, cropped to 9×16, moviepy?

Crop a video in Python, centered on a 16×9 video, cropped to 9×16, moviepy? Question: I want to crop a video that is 16×9 resolution to 9×16. This can be done by cropping a centered 607px wide rectangle on the 16×9 video. Can this be done? EDIT: I do not care to stay within moviepy. …

Total answers: 2