Questions tagged [fourcc]

FourCC (literally, four-character code) is a sequence of four bytes used to uniquely identify data formats. The concept originated in the OSType scheme used in the Macintosh system software and was adopted for the Amiga/Electronic Arts Interchange File Format and derivatives. The idea was later reused to identify compressed data types in QuickTime and DirectShow.

Overview

FOURCC is short for "four character code" - an identifier for a video codec, compression format, color or pixel format used in media files. A character in this context is a 1 byte/8 bit value, thus a FOURCC always takes up exatly 32 bits/4 bytes in a file. Another way to write FOURCC is 4CC (4 as in "four" character code). The four characters in a FOURCC is generally limited to be within the human readable characters in the ASCII table. Because of this it is easy to convey and communicate what the FOURCCs are within a media file. AVI files is the most widespread, or the first widely used media file format, to use FOURCC identifiers for the codecs used to compress the various video/audio streams within the files. Some of the more well known FOURCCs include "DIVX", "XVID", "H264", "DX50". But these are just a few of the hundreds in use.

46 questions
1
vote
1 answer

How to use FOURCC formats in SlimDX?

Looking through the defined surface formats of SlimDX, some seem to be missing. I'm interested in using the NV12 format. Since the formats are defined as an enum, I can't pass in a FOURCC format as I would be able to using unmanaged code. Is there…
Steven Jeuris
  • 18,274
  • 9
  • 70
  • 161
0
votes
1 answer

Is it safe to concatenate AVI files with video fourcc xvid, mp42, dx50?

I have a bunch of AVI files with the same audio codec, video resolution, but the video codecs are different: they have fourcc xvid, mp42 and dx50. Is it safe to concatenate them, i.e. is there a video decoder which is compatible with all these?…
pts
  • 80,836
  • 20
  • 110
  • 183
0
votes
2 answers

Python OpenCV Video Recording - Fourcc Codec Error

i'm trying to write a script to record camera display. When i tried to run, i got the error: OpenCV: FFMPEG: tag 0x5634504d/'MP4V' is not supported with codec id 12 and format 'mp4 / MP4 (MPEG-4 Part 14)' OpenCV: FFMPEG: fallback to use tag…
anbvy
  • 27
  • 7
0
votes
0 answers

OpenCV VideoWriter Android Issue

I am working on app that converts Images into Video. In Java, I think the Class is Videowriter but unfortunately I can't Initialize that class. VideoWriter video; video = new VideoWriter("/storage/emulated/0/test.avi", forcc, 20.0, new Size(640,…
0
votes
1 answer

writing a video without any loss in data or bitrate - opencv (python)

I am trying to write a video file without any loss in OpenCV, but so far any codec that I have selected from fourcc codec lists somehow results in loss of data. regarding the recording parameters I am using: fps =…
Amirez
  • 1
  • 2
0
votes
0 answers

OpenCV VideoWriter is missing frames on Raspberry pi 4

I'm new to OpenCV and Raspberry. I'm trying to capture a video with cv.VideoWriter_fourcc on a raspberry pi 4. I converted the image to gray, and blurred with cv.bilateralFilter, and searched for circles with cv.HoughCircles. The resulting video is…
0
votes
1 answer

Python New n frame video is heavier than the input video

I managed to write a code to decimate my video and take only 1 frame out of 10, in order to make my neural network more efficient in the future for character recognition. The new video exit_video is well decimated because it's way faster than the…
user14915980
0
votes
0 answers

Python How to get an image family code (YUV, RGB) from a video not using extensions

I would like to know the family code of the video to make a conversion to YUV, without using the extensions. In general, .mp4 and .avi are in RGB and I would like to convert them to YUV and keep the Y (luma) with a .split() and if the video is…
user14915980
0
votes
1 answer

write video in OpenCV FOURCC codec for ogg or webm format

I try to create a video by images in cv2, I succeeded to create a mp4 video: fourcc = cv2.VideoWriter_fourcc(*'mp4v') out = cv2.VideoWriter('video.mp4', fourcc, FRAME_RATE, (img.shape[1], img.shape[0])) How can I create ogg and…
ron kolel
  • 39
  • 1
  • 11
0
votes
0 answers

Unicode_literals (from __future__) does not work with fourcc codec argument in openCV's VideoWriter()

I use: Psychopy Version: 1.90.3 Python 2.7 I am trying to capture videofiles during my experiment using cv2's VideoWriter(). The VideoWriter() function needs the fourcc codec as the second argument but it seems that the encoding via…
carrieOn
  • 1
  • 1
0
votes
0 answers

Conversion of bit pattern to float value in Swift

I am stuck at the conversion of specified bit patterns to the final value. I have the following FourCC: SP78 SP3C SP69 SP4B SP5A The S stands for a signed floating point. The first digit is the integer bit count while the second one stands for the…
inexcitus
  • 2,471
  • 2
  • 26
  • 41
0
votes
2 answers

OpenCV VideoWriter fourCC Android

I am using the OpenCV 3.1 Library for Android in my project to process images and compile a video file on basis of several individual OpenCv::Mat. My problem is to find the correct fourCC code. Using "MJPG" works fine on a Google Nexus 6P (Android…
0
votes
1 answer

FourCC as int C#

I am working with an SDK which requires an AVI codec be passed as an 8 digit int representation of the FourCC value. The FourCC value is WVC1 and I have tried converting the ASCII to the corresponding int values for each character which I figured…
user1934821
  • 727
  • 1
  • 8
  • 10
-1
votes
2 answers

Assertion error when making an MP4 video out of numpy arrays with OpenCV

I have this python code that should make a video: import cv2 import numpy as np out = cv2.VideoWriter("/tmp/test.mp4", cv2.VideoWriter_fourcc(*'MP4V'), 25, (500, 500), …
fakedrake
  • 6,528
  • 8
  • 41
  • 64
-1
votes
1 answer

Cannot find fourCC format of a .DDS texture

I am trying to create a function that will load texture files with .DDS format. The problem seems to occur when my program tries to detect the FourCC format of the file. It does not return true neither with FOURCC_DXT1, neither with FOURCC_DXT3,…