15
votes
Accepted
ffmpeg: explicitly tag h.264 as bt.601, rather than leaving unspecified?
PAL and NTSC have different color primaries, so
NTSC = SMPTE 170M = BT 601 525
PAL = BT 470 BG = BT 601 625
See the rows for value 5 & 6 on the table on page 387 of the active H.264 standard.
...
9
votes
Accepted
Apply custom lut via ffmpeg?
You may want to use FFMPEG's lut3d filter. It requires you to provide a look-up table (a *.cube file). For example, if you have an ARRI camera you can generate these files using ARRI Color Tool or ...
9
votes
Accepted
ffmpeg pixel format definitions
If your question was
Where are these pixel formats defined?
Go to http://ffmpeg.org/download.html and download the source of ffmpeg. Then unpack it
tar -xavf FILENAME.tar.*
and descend to the ...
5
votes
What is the colour range of most videos?
Most videos are limited range i.e. luma goes from 16 to 235, and chroma from 16 to 240.
Unless expressly set, FFmpeg does not scale the range from one to another. Whatever the source is, that's the ...
4
votes
Accepted
Do any iOS video apps record in log color space?
This announcement article dated January 11, 2017 indicates that there will be an upgrade to the app FiLMiC Pro which may accommodate what you are looking for. Note that the FiLMic Pro App Store web ...
4
votes
Accepted
Is it safe to use the yuva420 pix_format option with ffmpeg to encode webm videos?
YUV color encoding with 4:2:0 chroma subsampling is the only widely safe pixel format for web playback, although for certain codecs, other pixel formats may be supported.
FFmpeg auto-selects the ...
4
votes
Accepted
Why are there so many color spaces available?
There are a number of reasons why there are so many color spaces:
Color resolution - sRGB and similar color spaces only cover a portion of the visible spectrum. This means that they can be ...
4
votes
Accepted
How can I find out which chroma subsampling (if any) is used in a video file?
Mediainfo is a free, open source, cross-platform solution, available in 37 languages. https://en.m.wikipedia.org/wiki/MediaInfo
When run from the command line it outputs chrome subsampling info by ...
4
votes
How can I find out which chroma subsampling (if any) is used in a video file?
Using the ffprobe command (part of FFmpeg, also a command line tool)
ffprobe -show_entries stream=pix_fmt <VIDEO FILE>
The output will look like this:
...
[STREAM]
pix_fmt=yuv420p
[/STREAM]
[...
3
votes
Accepted
What exactly is D-Cinelike?
“Is D-Cinelike just a flatter colour profile with less contrast (to capture more detail in shadows and highlights)?”
Yes. It's closer to log color rather than linear. The big thing to be aware of ...
3
votes
Accepted
Correct gamma for SMPTE ST-2084 EOTF
The short answer is: You don't pick a color space for your RAW material based on what kind of monitor you're using.
A color pipeline is a very complicated series of mathematical conversions, which is ...
3
votes
Accepted
Is video output in YUY2 color space lossless if the input is sRGB?
It's a bit of a semantics game. The YUY2 video mode is not "compressed," but it won't result in a bit-exact copy of RGB input. The luminance is full resolution in that mode, but the ...
3
votes
How to preserve colorspace in ffmpeg
This command preserved the colorspace and also video didnt get darker after transcoding
ffmpeg -i input.mp4 -color_primaries smpte170m -color_trc smpte170m -colorspace smpte170m -r 25 -crf 18 output....
3
votes
Accepted
Lossless color compression
Without knowing the video properties, my generic answer is
ffmpeg -i in.mp4 -vf geq=lum='p(X,Y)':cb=128:cr=128 out.mp4
This will reset the color information, but pass the luma plane intact. Add -crf ...
3
votes
Accepted
FFmpeg BMP to YUV x264 color shift
Apparently FFmpeg doesn't set input color attributes correctly for BMP input (probably because the file doesn't contain that metadata) and the BMP decoder doesn't check for manually flagged attributes....
3
votes
Accepted
ffmpeg bgr vs rgb and other similiar pixel formats
The order of the components in RGB32 seems to do with endianness:
PIX_FMT_RGB32 is handled in an endian-specific manner. An RGBA color
is put together as: (A << 24) | (R << 16) | (G &...
3
votes
ffmpeg bgr vs rgb and other similiar pixel formats
While I always guessed that the big / little endian was more a matter of patents rather than performance,
Nope little endian was developed as a performance optimization whern moving to multi byte ...
2
votes
Accepted
Record raw video with ffmpeg keeping the full color range
In this case, the problem didn't come from ffmpeg/avconv.
The rawvideo source I use offers different color formats to be used:
argb32
rgb24
bgr24
yuv444
yuv420
[...]
When I extract a png file (...
1
vote
How to manage colour in After Effects to get precisely a desired colour in h264 output
Since I cannot use hyperlinks in comments, here is the gist of my research:
This answer on a reddit post suggests, that the reason for the color-shift is the way illegal and legal colors are handled. ...
1
vote
Which color space to use in camera while shooting video? RGB or YCbCr?
The question is impossible to answer in a general way.
If a camera offers to record in RGB, it is likely using a completely different codec that could be better or worse. Very few cameras will ...
1
vote
"Canon RGB" color space *shift* to broadcast range with FFMPEG
You can use the geq filter to remap the pixel value ranges.
ffmpeg
-i input
-vf "geq=lum='(p(X,Y)-16)/(255-16)*(235-16)+16':cb='(p(X,Y)-16)/(255-16)*(240-16)+16'"
-c:v libx264 -c:a copy out.mp4
...
1
vote
Accepted
ffmpeg prores alpha channel not present when colormatrix and colorspace operations are performed
The colorspace and colormatrix filters don't handle alpha pixel formats, so those get stripped off. The workaround is to extract the alpha and then reattach it.
ffmpeg -f image2 -framerate 24.0 -i ...
1
vote
Accepted
ffmpeg colormatrix operations only for 8bpc?
Yes, as it says a couple of lines above, colormatrix supports only 8bpc (8-bit per component) pixel formats. So, when a 16-bit input is filtered with colormatrix, it will be converted to 8-bits. And ...
1
vote
Accepted
What is the file size difference between 8 bit and 10 bit raw video?
Instead of 8 bits per every channel and per every pixel you need 10 bits, which is 25 % increase of the raw footage.
Since the size of 8-bit raw footage is as such huge enough, 25 % of it is high ...
1
vote
Color shift FFmpeg raw RGBA images to YUV format
In the end I add to use the following options and tell ffmpeg wich colorSpace i am using and how to decode it to display on screen.
ffmpeg -f rawvideo -r 30 -pix_fmt rgba -s 1920x1017 -i - -threads 0 ...
1
vote
Accepted
Doubts about color spaces and chroma subsampling
Are YUV and YCbCr the same thing? → strictly, no. The former is applied to analog signals, and the latter to digital. But media apps (like Mediainfo) use YUV as the designated term.
It doesn't make ...
1
vote
Colors look different after export
I have this issue forever...found a solution thanks to this website
https://isaac-molina.com/downloads/
download his luts aplly the correct lut to an adjustment layer placed on top of you project (in ...
1
vote
Colors look different after export
You may need to perform a “trim pass” to export to Rec709 colour space.
See: https://images.apple.com/final-cut-pro/docs/Wide_Color_Gamut.pdf
Matching colors in Rec. 2020 and Rec. 709 masters
When ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
colorspace × 52ffmpeg × 22
color × 13
encoding × 7
h.264 × 6
color-grading × 5
after-effects × 4
compression × 4
transcoding × 4
color-correction × 4
prores × 4
video × 3
codec × 3
davinci-resolve × 3
premiere × 2
video-quality × 2
video-capture × 2
canon × 2
iphone × 2
h.265 × 2
h265 × 2
hdr × 2
gamma × 2
mp4 × 1
youtube × 1