Linked Questions
22 questions linked to/from How to output x265 compressed video with cv2.VideoWriter
866
votes
19
answers
1.9m
views
Sleep for milliseconds
I know the POSIX sleep(x) function makes the program sleep for x seconds. Is there a function to make the program sleep for x milliseconds in C++?
16
votes
3
answers
24k
views
Pipe opencv images to ffmpeg using python
How can I pipe openCV images to ffmpeg (running ffmpeg as a subprocess)?
(I am using spyder/anaconda)
I am reading frames from a video file and do some processing on each frame.
import cv2
cap = ...
0
votes
1
answer
4k
views
Create RTSP stream of a webcam using opencv in C++
I am trying to capture video from my webcam and send it to via RTSP stream using open cv in C++.I am not worked much on c++ before so please avoid mistakes their below is my code that writes webcam ...
1
vote
2
answers
3k
views
Is it possible to apply h.264 compression to image?
Currently, I am applying h.264 compression to a single image.
As you can see in the picture below, I want to compress that image based on h.264 with 40 constant quantization.
However, there are no ...
3
votes
0
answers
6k
views
How to write to H264 .mp4 file from Ubuntu with Python OpenCV VideoWriter, FOURCC
I am on Ubuntu 18.04, but the solution has to generalize to Debian Buster because that's what Streamlit.io Sharing websites runs on.
I want to write frames with Python OpenCV to a h.264 encoded mp4 ...
1
vote
1
answer
2k
views
How to stream frames from OpenCV C++ code to Video4Linux or ffmpeg?
I am experimenting with OpenCV to process frames from a video stream. The goal is to fetch a frame from a stream, process it and then put the processed frame to a new / fresh stream.
I have been able ...
2
votes
1
answer
1k
views
How to pass BGR NumPy arrays directly to FFMPEG with CUDA support
I am using cv2 to edit images and create a video from the frames with FFMPEG. See this post for more details.
The images are 3D RGB NumPy arrays (shape is like [h, w, 3]), they are stored in a Python ...
1
vote
0
answers
3k
views
cv2.VideoWriter() file format .mp4 with HEVC codec
I am using cv2.VideoWriter() to record from a single camera and writing the video to a .mp4 file with a HEVC codec. I had this script previously working on a (Windows) laptop with the following code:
...
2
votes
1
answer
2k
views
ffmpeg video slides vertically after 'Invalid buffer size, packet size < expected frame_size' error (vsync screen tearing glitch)?
I have a video which i want to cut and crop using opencv and ffmpeg.
I want the output to be H265, so i am using a ffmpeg subprocess (writing frame bytes to stdin) as explained here. This is a ...
0
votes
2
answers
1k
views
Better Image Quality with Python OpenCV
I use OpenCV to capture webcam video as frames to a list variable, then write that list to disk both as image sequence and as a video file. The image quality is fine. But the video is horribly ...
2
votes
0
answers
970
views
Control bitrate of video generated using opencv VideoWriter
I am generating a video from a set of images using
cv2.VideoWriter(filename,fourcc,fps,size)
I want to use a particular bitrate for my output videos to reduce the file sizes. I am trying to mimic a ...
0
votes
0
answers
869
views
How can I pipe JPEG files into FFMPEG and create an RTSP, H.264 stream?
I have an input RTSP stream that I would like to manipulate on a frame-by-frame basis using openCV. After these changes are applied, I'd like to create a separate RTSP stream from those frames. I'm ...
0
votes
0
answers
722
views
How can I achieve smaller size of a video file from CCTV footage (mainly still image with low motion)?
DISCLAIMER: I am pretty new to video processing and multimedia in general, so I am not really familiar with the terminology, sorry if I use some terms incorrectly.
A few weeks ago I faced a problem ...
1
vote
0
answers
661
views
Unknown input format: 'rawvideo' when trying to save animation
So, I get a strange error trying to save animations created with matplotlib.FuncAnimation using FFMpegWriter.
/home/j/PycharmProjects/venvtest/venv/bin/python /home/j/PycharmProjects/venvtest/main.py
...
0
votes
1
answer
624
views
Merge individual frame to video file using Opencv
I am trying to stack a individual frame to a video file using Opencv. I want to combine two different code together to make the individual frame.
Following code help me extract the individual frame,
...