mp4

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

Combining 100's of mp4s without running out of ram. In order

Combining 100's of mp4s without running out of ram. In order Question: I have some code that is great for doing small numbers of mp4s, but at the 100th one I start to run out of ram. I know you can sequentially write CSV files, I am just not sure how to do that for …

Total answers: 1

Progress bar not working properly in Python

Progress bar not working properly in Python Question: I have created a program that downloads mp4 videos from a link. I’ve added the code below chunk_size = 256 URL = ‘https://gogodownload.net/download.php?url=aHR0cHM6LyAdrefsdsdfwerFrefdsfrersfdsrfer363435349URASDGHUSRFSJGYfdsffsderFStewthsfSFtrftesdfseWVpYnU0bmM3LmdvY2RuYW5pLmNvbS91c2VyMTM0Mi9lYzBiNzk3NmM1M2Q4YmY5MDU2YTYwNjdmMGY3ZTA3Ny9FUC4xLnYwLjM2MHAubXA0P3Rva2VuPW8wVnNiR3J6ZXNWaVA0UkljRXBvc2cmZXhwaXJlcz0xNjcxOTkzNzg4JmlkPTE5MzU1Nw==’ x = requests.head(URL) y = requests.head(x.headers[‘Location’]) file_size = int(y.headers[‘content-length’]) response = requests.get(URL, stream=True) with open(‘video.mp4’, ‘wb’) as f: for chunk in response.iter_content(chunk_size=chunk_size): f.write(chunk) This …

Total answers: 2

Programmatically accessing PTS times in MP4 container

Programmatically accessing PTS times in MP4 container Question: Background For a research project, we are recording video data from two cameras and feed a synchronization pulse directly into the microphone ADC every second. Problem We want to derive a frame time stamp in the clock of the pulse source for each camera frame to relate …

Total answers: 1

Convert mp4/avi to gif but the gif is very slow

Convert mp4/avi to gif but the gif is very slow Question: I use the below to convert my mp4 file to gif file. It worked fine but when I load the gif with browser or local tool, the gif is moving very slow. E.g. It was an animal moving from point A to point B, …

Total answers: 1

Python OpenCV video.get(cv2.CAP_PROP_FPS) returns 0.0 FPS

Python OpenCV video.get(cv2.CAP_PROP_FPS) returns 0.0 FPS Question: This is my video This is the script to find fps: import cv2 if __name__ == ‘__main__’ : video = cv2.VideoCapture(“test.mp4”); # Find OpenCV version (major_ver, minor_ver, subminor_ver) = (cv2.__version__).split(‘.’) if int(major_ver) < 3 : fps = video.get(cv2.cv.CV_CAP_PROP_FPS) print “Frames per second using video.get(cv2.cv.CV_CAP_PROP_FPS): {0}”.format(fps) else : fps …

Total answers: 2

Previous frames not cleared when saving matplotlib animation

Previous frames not cleared when saving matplotlib animation Question: I am making a matplotlib animation in which a quiver arrow moves across the page. This cannot be achieved in the usual way (creating one Quiver object and updating it with each frame of the animation) because although there is a set_UVC method for updating the …

Total answers: 2