This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

[BUG] FFmpeg 'color adjustment' messes up 4:2:2 colors
#1
Rainbow 
Enabling FFmpeg 'color adjustment' messes up the colors when encoding 4:2:2 video to x264 with color space 'i442'. To reproduce using 2021.04.12.1 :
  • input 4:2:2 video
  • enable FFmpeg 'color adjustment' (no need to adjust parameters)
  • x264
    • color space: i422 => wrong colors
    • color space: i420 => right colors
Interestingly the filter preview works fine and shows the effect of adjusted color parameters. Attached is a frame from the original 4:2:2 video and the corresponding frame in the encoded x264 in i422 (no other filtering is applied, only cropping + letterbox).


Attached Files Thumbnail(s)
       
Reply
#2
Thanks for reporting the problem.
Will look at it this evening after work. (wild guess atm. is that ffmpeg isn't used but mencoder and the U and V channels get mixed up)

Since you didn't read the sticky and didn't share the version or OS you are using, I assume you are not interested in getting a fixed dev version once I fixed the issue.


Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Reply
#3
Just to mention :

I have similar visual issue like above,but not so heavy.
Input is a dvd movie ,output is x265 mkv.
Due to lack of free time,no further info is available....
Reply
#4
(08.07.2021, 05:13)Selur Wrote: Thanks for reporting the problem.
Will look at it this evening after work. (wild guess atm. is that ffmpeg isn't used but mencoder and the U and V channels get mixed up)

Since you didn't read the sticky and didn't share the version or OS you are using, I assume you are not interested in getting a fixed dev version once I fixed the issue.


Cu Selur

Thanks for the quick reply. Sorry I did read the sticky, but assumed debug logs were only necessary when export failed or program crashed. I'm on Win10.
I wanted to attach a short video sample, but mp4 and avi files apparently can't be attached here?

Karel
Reply
#5
Quote:I wanted to attach a short video sample, but mp4 and avi files apparently can't be attached here?
correct

---
I can reproduce the issue.
Happens since the color adjustment is implemented through mencoder (not ffmpeg), no clue how to fix it atm. but I'll look into it.

Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Reply
#6
Will add an ugly workaround by adding 'swapuv' when this is used.
As a side note: using FFmpeg/MPlayer/Mencoder based filters instead of Avisynth and Vapoursynth is a bad idea, so it is not recommended.

Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Reply
#7
Send you a link to a dev version for testing via pm.

Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Reply
#8
Thanks for the dev version fix!
Can I ask why correcting basic brightness/contrast with FFmpeg/Mencoder is not recommended? Is it really bad, or is it just not as good as Avisynth/Vapoursynth?
I use it because it so much faster than the latter: generating the preview files from lossless FFV1 videos (from an external harddrive) takes a lot of time, while FFmpeg filtering has instant preview.

Karel
Reply
#9
Quote:Can I ask why correcting basic brightness/contrast with FFmpeg/Mencoder is not recommended? Is it really bad, or is it just not as good as Avisynth/Vapoursynth?
Simply not as versatile and good as Vapoursynth/Avisynth.

Quote:I use it because it so much faster than the latter: generating the preview files from lossless FFV1 videos (from an external harddrive) takes a lot of time, while FFmpeg filtering has instant preview.
That depends on the source filter that is used.
FFVideoSource will create an index on the hdd which is slower than, LWLibavSource which creates the index in memory.
Indexing is important for most filters since it allow accurate access to frames.
Also note that Hybrid only creates the index during the time opening the file, later it will reuse the index.

Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Reply
#10
Exclamation 
**update: with the 'swapuv' fix in release 2021.07.18.1 (also in the dev version you pm'd me) the video exports OK, but the filter preview has the UV components reversed now! Before the fix it was the other way around...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)