Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. Domains: forum.doom9.org / forum.doom9.net / forum.doom9.se |
|
|
#1 | Link | |
|
Registered User
Join Date: Feb 2008
Posts: 733
|
ImageWrite for colorspace conversion ?
Hi guys.
I use this script : Quote:
Is this accurate ? Cheers. |
|
|
|
|
|
|
#2 | Link |
|
Retried Guesser
Join Date: Jun 2012
Posts: 1,371
|
Probably not -
1. AVIsource: color model, matrix and luma range unknown. Must be verified for the particular codec in use. 2. ImageWriter: "bmp" is RGB mode, so if AviSource is YUV, an implicit conversion will take place. 3. FFVideoSource: color model, matrix and luma range unknown. Must be verified. 4. ConvertToRGB32: implicit "colormatrix=Rec.601" - which is probably wrong (images are 0-255, not 16-235) You would have to calibrate every stage of the process, starting with an AVI (same codec) with known colors - that is, an AVI with calibrated colors that uses the same codec as the actual video you want to work with (whether H.264, Xvid, Huffyuv etc) (see here maybe) EDIT you could verify the whole signal chain at once instead of breaking it down into steps, but you might get two or more errors that cancel each other out. This would introduce subtle problems like clipping or banding, but as long as you check for those problems you should be OK. Last edited by raffriff42; 26th November 2013 at 22:23. |
|
|
|
|
|
#4 | Link | |
|
Registered User
Join Date: Feb 2008
Posts: 733
|
Quote:
The outputs look almost identical ( the red is not as bright on the encode but i thought that's because of the 4:4:4 > 4:2:0 conversion ) |
|
|
|
|
|
|
#5 | Link |
|
Retried Guesser
Join Date: Jun 2012
Posts: 1,371
|
>Original avi is uncompressed 4:4:4 SD so Rec.601 should be ok no ? If i use PC.601 the image is too dark.
Sounds reasonable. >The outputs look almost identical Check the color on several media players, and don't be shocked if the color is different. |
|
|
|
|
|
#7 | Link |
|
Retried Guesser
Join Date: Jun 2012
Posts: 1,371
|
You're trying to make the two signals as consistent as possible for comparison purposes, and that's good; but I think they can be made just as consistent using Avisynth alone. The main source of uncertainty, in any case, is AviSource & FFVideoSource - and the decoders *they* call. The script below makes the two clips look the same to the media player, which is exactly the benefit of writing bitmaps, I think.
Code:
#avisynth
## Perform an A-B comparison - flip between clip A and clip B
## NOTE examine this frame-by-frame, not in real time.
## Clip filters shown as an example -
## use just enough filtering to allow
## the two videos to be interleaved.
A=AviSource("orig.avi")
\ .AssumeFPS(30)
\ .ConvertToRGB32(matrix="Rec601")
\ .KillAudio
B=FFVideoSource("orig.mp4")
\ .AssumeFPS(30)
\ .ConvertToRGB32(matrix="Rec601")
\ .KillAudio
return Interleave(
\ A.SelectEven.Subtitle("A"),
\ B.SelectEven.Subtitle("B"))
Last edited by raffriff42; 29th November 2013 at 15:11. |
|
|
|
|
|
#8 | Link | |
|
Avisynth language lover
Join Date: Dec 2007
Location: Spain
Posts: 3,442
|
Quote:
All that is necessary is that the the two videos have the same dimensions and colorspace. |
|
|
|
|
|
|
#9 | Link | |
|
Registered User
Join Date: Feb 2008
Posts: 733
|
Will try this.
Quote:
uncompressed > vegas > uncompressed > x264 > youtube > x264 from youtube. |
|
|
|
|
|
|
#10 | Link | |
|
Retried Guesser
Join Date: Jun 2012
Posts: 1,371
|
Quote:
Vegas internal colorbars > uncompressed > x264 > youtube > x264 from youtube ...Assuming "x264 from youtube" means a screen capture, not a downloaded file, since this is what the audience will be seeing. Alternatively you can set your media player to emulate the look of YouTube's player, which IIRC assumes 16-235, BT.701. Last edited by raffriff42; 29th November 2013 at 18:28. |
|
|
|
|
|
|
#11 | Link | ||
|
Registered User
Join Date: Feb 2008
Posts: 733
|
Quote:
Quote:
I meant a downloaded file to see if their reencoded video still looks like the original. |
||
|
|
|
|
|
#12 | Link |
|
Retried Guesser
Join Date: Jun 2012
Posts: 1,371
|
That's a tough one. Yes, I guess, with some settings. I've convinced myself that on *my* system, a screen cap is accurate (displaying test videos and still images with known colors, and testing the screen colors with a probe such as ColorPic, then opening the capture in an image editor and probing the colors again)
|
|
|
|
|
|
#13 | Link |
|
Registered User
Join Date: Feb 2008
Posts: 733
|
Just went to a friends house and he has an old 1600x900 monitor + a hd7750 and the same video is is very dark on his screen ( i think fullrange is on )
So i have to test it for myself, i'll add some screens when done here. Thanks to everyone. |
|
|
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|