#2698 closed enhancement (invalid)
colorbalance filter should also work without YUV to RGB conversion
| Reported by: | feelart | Owned by: | |
|---|---|---|---|
| Priority: | wish | Component: | avfilter |
| Version: | git-master | Keywords: | colorbalance |
| Cc: | Blocked By: | ||
| Blocking: | Reproduced by developer: | no | |
| Analyzed by developer: | no |
Description
Current colorbalance filter only works in RGB space.
This can have significant visual differences in the piping filters order.
For instance, on a
Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080, 17008 kb/s, 30.01 fps
- vf lut=y=gammaval(0.65),colorbalance=bh=-.1:bm=-.1:bs=-.1
Is very different in quality result from
- vf colorbalance=bh=-.1:bm=-.1:bs=-.1,lut=y=gammaval(0.65)
FYI: http://ffmpeg.org/pipermail/ffmpeg-user/2013-May/015311.html
Change History (6)
comment:1 by , 13 years ago
| Priority: | normal → wish |
|---|
comment:2 by , 13 years ago
I don't see why you want an console output, but here it is
F:\danses\Kizomba\2013-06 Leuven>ffmpeg -y -t 2 -i "Helio.mp4" -vf "crop=in_w-24*32:in_h-5*32:17*32:3*32,hqdn3d,lut=y=val*0.
65,colorbalance=bh=-.1:bm=-.1:bs=-.1" -c:a copy -c:v libx264 -crf 28 -preset slower -async 1 _test_colorBalanceLast.mp4
ffmpeg version N-54143-gb6ce50a Copyright (c) 2000-2013 the FFmpeg developers
built on Jun 22 2013 15:32:43 with gcc 4.7.3 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --
enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetype --enab
le-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --e
nable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-lib
theora --enable-libtwolame --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264
--enable-libxavs --enable-libxvid --enable-zlib
libavutil 52. 37.101 / 52. 37.101
libavcodec 55. 16.100 / 55. 16.100
libavformat 55. 9.100 / 55. 9.100
libavdevice 55. 2.100 / 55. 2.100
libavfilter 3. 77.101 / 3. 77.101
libswscale 2. 3.100 / 2. 3.100
libswresample 0. 17.102 / 0. 17.102
libpostproc 52. 3.100 / 52. 3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Helio.mp4':
Metadata:
major_brand : isom
minor_version : 0
compatible_brands: isom3gp4
creation_time : 2013-06-02 14:52:23
genre : Danse Kizomba
album : 2013-06 Leuven
Duration: 00:02:01.24, start: 0.000000, bitrate: 17140 kb/s
Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080, 17007 kb/s, 30.01 fps, 30 tbr, 90k tbn, 18
0k tbc
Metadata:
rotate : 90
creation_time : 2013-06-02 14:52:23
handler_name : VideoHandle
Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 128 kb/s
Metadata:
creation_time : 2013-06-02 14:52:23
handler_name : SoundHandle
-t is not an input option, keeping it for the next output; consider fixing your command line.
No pixel format specified, yuv444p for H.264 encoding chosen.
Use -pix_fmt yuv420p for compatibility with outdated media players.
[libx264 @ 0000000002577b00] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
[libx264 @ 0000000002577b00] profile High 4:4:4 Predictive, level 4.2, 4:4:4 8-bit
[libx264 @ 0000000002577b00] 264 - core 133 r2334 a3ac64b - H.264/MPEG-4 AVC codec - Copyleft 2003-2013 - http://www.videola
n.org/x264.html - options: cabac=1 ref=8 deblock=1:0:0 analyse=0x3:0x133 me=umh subme=9 psy=1 psy_rd=1.00:0.00 mixed_ref=1 m
e_range=16 chroma_me=1 trellis=2 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=4 threads=6 lookahead_threads=1
sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=2 b_bias=0
direct=3 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=60 rc=crf mbtree=1
crf=28.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to '_test_colorBalanceLast.mp4':
Metadata:
major_brand : isom
minor_version : 0
compatible_brands: isom3gp4
album : 2013-06 Leuven
genre : Danse Kizomba
encoder : Lavf55.9.100
Stream #0:0(eng): Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv444p, 1152x920, q=-1--1, 15360 tbn, 30 tbc
Metadata:
rotate : 90
creation_time : 2013-06-02 14:52:23
handler_name : VideoHandle
Stream #0:1(eng): Audio: aac ([64][0][0][0] / 0x0040), 48000 Hz, stereo, 128 kb/s
Metadata:
creation_time : 2013-06-02 14:52:23
handler_name : SoundHandle
Stream mapping:
Stream #0:0 -> #0:0 (h264 -> libx264)
Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
frame= 60 fps=3.6 q=-1.0 Lsize= 300kB time=00:00:02.00 bitrate=1226.9kbits/s
video:272kB audio:25kB subtitle:0 global headers:0kB muxing overhead 1.072403%
[libx264 @ 0000000002577b00] frame I:1 Avg QP:27.92 size: 14692
[libx264 @ 0000000002577b00] frame P:16 Avg QP:29.18 size: 8580
[libx264 @ 0000000002577b00] frame B:43 Avg QP:33.85 size: 2920
[libx264 @ 0000000002577b00] consecutive B-frames: 1.7% 0.0% 25.0% 73.3%
[libx264 @ 0000000002577b00] mb I I16..4: 52.5% 45.0% 2.5%
[libx264 @ 0000000002577b00] mb P I16..4: 11.2% 10.3% 0.6% P16..4: 31.0% 3.5% 3.3% 0.0% 0.0% skip:40.0%
[libx264 @ 0000000002577b00] mb B I16..4: 0.4% 0.6% 0.0% B16..8: 34.1% 2.6% 0.4% direct: 0.7% skip:61.0% L0:42.1%
L1:56.1% BI: 1.8%
[libx264 @ 0000000002577b00] 8x8 transform intra:47.4% inter:76.1%
[libx264 @ 0000000002577b00] direct mvs spatial:90.7% temporal:9.3%
[libx264 @ 0000000002577b00] coded y,u,v intra: 18.9% 5.4% 4.4% inter: 2.8% 0.5% 0.5%
[libx264 @ 0000000002577b00] i16 v,h,dc,p: 37% 28% 13% 21%
[libx264 @ 0000000002577b00] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 12% 12% 27% 5% 8% 7% 11% 7% 10%
[libx264 @ 0000000002577b00] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 12% 21% 17% 6% 8% 6% 10% 7% 14%
[libx264 @ 0000000002577b00] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0000000002577b00] ref P L0: 53.6% 8.4% 19.0% 6.3% 4.2% 3.7% 2.6% 1.8% 0.4%
[libx264 @ 0000000002577b00] ref B L0: 78.3% 10.0% 6.8% 2.0% 1.4% 1.0% 0.5%
[libx264 @ 0000000002577b00] ref B L1: 92.7% 7.3%
[libx264 @ 0000000002577b00] kb/s:1110.19
F:\danses\Kizomba\2013-06 Leuven>
comment:3 by , 13 years ago
Is the problem also reproducible when using -vcodec mpeg4 or only with external libraries?
comment:4 by , 13 years ago
| Resolution: | → invalid |
|---|---|
| Status: | new → closed |
colorbalance filter works in RGB only for the obvious reason. Adding YUV support would mean doing internal conversion from YUV to RGB which is slow and pointless.
Its not clear at all what is your real problem you want to solve.
follow-up: 6 comment:5 by , 13 years ago
Initialy, I've just post for the sake of reference results of personal exchange between me and the developer of filter, who himself said it should be done, but has other priorities.
If source is YUV everything should stay YUV...
But, as always, you have an no answer for everything...
comment:6 by , 13 years ago
Replying to feelart:
Initialy, I've just post for the sake of reference results of personal exchange between me and the developer of filter, who himself said it should be done, but has other priorities.
Could you elaborate?



Please add a command line that shows the issue together with the complete, uncut console output, if possible without using an external library.