VideoHelp Forum
+ Reply to Thread
Results 1 to 19 of 19
Thread
  1. Hi everyone and thanks in advance to those who will take the time to give me some tips.

    I want to make a good -- well, as good as possible -- quality encode of a movie for my brother, a lousy movie if you ask me but he apparently likes it a lot, it's called "Penitentiary 2" and has Mr. T (yeah, the one with the "Mohawk" haircut) in a small role (he calls him "his idol"). The problem is that, aside from the movie's artistic quality, the technical quality of the french DVD transfer is utter crap : for the audio part, it has a huge amount of hiss, a very low level throughout except near the middle where it's suddenly almost audible for about 10 minutes then gets lower again, and even some weird noises like a loud stuttering buzz at one point and what seems to be a brief excerpt from another movie's dialogue at another (I cringe at the thought that someone or some ones got paid for such a dreadful job) ; for the video part, it has a kind of green “color cast” throughout (if that's the correct term), the reds are too saturated in some places, some sequences are way too dark and others way overlit (and to complicate matters, the filmmaker seems to have experimented with all kinds of color filters to convey the mood of some scenes, for instance the scene where the lead character is fighting against his nemesis who just murdered his girlfriend in their bathroom is filmed in red-purple colors -- how subtle! -- while other scenes have a seemingly intended green-ish or blue-ish tint, so it's hard to say for sure what it's supposed to look like in the first place). I managed to get a good result for the audio part (using Magix Music Editor and Audacity, I could dehiss and normalize the three parts to the same average level, then cover the defects with wise cut-and-paste, it's a huuuge improvement) and have exported it as an AAC stream ready to mux ; but as for the video I'm struggling to get the result I want.
    At worst I could use the english DVDRip file that's available on BitTorrent, mux that with the improved french audio : the colors are definitely better (though it's still not perfect -- quite dull and dim, at least it doesn't have that green sh#t all over, and the dynamic range seems better balanced, again if that's the correct term), but the resolution is quite low (640x384), the bitrate also (700MB for a 1h45min movie), and there might be synchronization issues (25fps vs. 29.970fps). I hope I can get better than that from that DVD, but in case I end up doing that, what would be the best tool and format to mux those streams ? Is MKV fine with an Xvid video stream ? And is there a way to cut an extra credit at the begining and correct the synchronization in one step ?

    So at first I encoded the damn thing using XMediaRecode with one of the integrated deinterlacers (probably Yadif which seemed to yield the sharpest picture) and the very basic "Color correction" function (brightness, contrast, gamma, saturation). Then I used AVIDemux with Yadif and experimented with the eq2 filter : it got better but still not satisfying ; the best results I think were obtained by lowering the green and red gamma at 85%, lowering the brightness at -7 (which revealed hidden details in the overlit areas, but also lost some in very dark scenes), slightly increasing the contrast at 103-105% and boosting the overall gamma around 160-180% – but there was still some green where there shouldn't be (lowering green gamma some more resulted in a red-ish or blue-ish tint overall), overblown reds and burnt whites and lack of contrast in already overlit scenes, and the very dark scenes while globally improved had lost some more detail in the shadows. Then I learned about QTGMC and managed to configure Avisynth (about which I've read much praise for years but I had never actually insisted enough to make it work) and AVIDemux to work together using AVS Proxy, ran an encode with QTGMC + eq2 : it's excruciatingly slow (the whole encode would have taken about 12 hours with the "Slow" preset, about 4fps with a 2009 machine based on a Pentium Dual Core E5200 CPU – oddly I found out it was even significantly slower with the "SelectEven" option which just keeps the original frame rate instead of doubling it, processing at about 2.6fps, why is that ?) but a definitive improvement (much sharper picture, less artefacts, I still had to stop it because I had to go to sleep and the color balance was still off -- next time I'll try a faster preset like "Medium", hoping it'll preserve the overall quality gain over Yadif). Then I tried the ColorYUV filter, which is trickier to use than eq2 and doesn't have a real-time preview window, but seems better suited to fine-tune such a mess of a video. But I still don't know how to get it right.

    I selected some scenes showing the aforementioned issues which I exported as a single M2V file (oddly AVIDemux 2.6 would fail to export it as a MPEG-PS file, anyway the audio isn't relevant here and the resulting file is already quite big). It's a bit less than 200MB, I tried to make it as short as possible but it had to show the various problematic parts which have to be corrected all at once.
    https://www.mediafire.com/?k0d7grgwg62cok5

    So, questions :
    - Can I get a good result using AVIDemux and Avisynth, or is there a better way ? I found out there were many external filters for VirtualDub designed to treat such problems of color balance, but it doesn't support H264 encoding – or can it somehow ?
    - Are ColorYUV and/or eq2 good tools for this task, and if so how should I proceed to choose the right parameters ? Would there be an advantage with using both of them to treat different aspects of the problem ? The problem with ColorYUV is that I have both too much green (about everywhere) and too much red (in some scenes it almost glows, and when I increase the gamma it loses details and contrast in the shadows, but in others it's fine or even kinda dull), yet in ColorYUV if I increase the "chroma U" value I get less green but more red, and then I'm a bit lost when it comes to understanding and predicting what the "contrast", "brightness", "gamma" & "gain" for Y, U & V do to the picture and how those settings interact together. Settings with which I seem to get the best result : Luma Y Contrast +10, Luma Y Gamma +40, Luma Y Gain -20 (like the brightness lowering in eq2 it reveals hidden details in overlit areas), Chroma U Contrast -20 (seems to keep details in reds while increasing gamma) Chroma U Brightness +1 Chroma V Brightness +5 (everything else kept at 0). "Auto Gain" and "Centre Color Offset" (which I guess is another name for "Auto White") both produce a poor result.
    - Side question : does anyone know why in AVIDemux 2.6+ there are no longer numerical values provided within the eq2 filter, only horizontal bars with no index whatsoever ? It makes the correction very imprecise, each attempt being a wild guess in the dark. (Apparently other people noticed that this version had lost useful functionalities and stayed with 2.5.6, but I found nothing on this particular issue.)
    - Am I correct in assuming that the display aspect ratio on this movie is a little off (faces look slightly squashed horizontally) and that a good resize (after cropping 16,74,-8,-64 so 720x576 => 696x438 which if I'm not mistaken gives a display resolution of 742x438 for the actual movie picture) would be 688x384 (which is close to 16:9), with a 1:1 PAR and a "mod16" frame size ? Or 768x432 ? Does it even matter for H264 encoding to respect that "mod16" condition ? As in, 1) is it a requirement, 2) if not, does it still improve the encoding efficiency ? (I just found out, wondering about this, that the standard so-called "Full HD" 1920x1080 resolution wasn't a multiple of 16, so I guess it's a moot point...) Is a CRF=20 setting enough to obtain a mostly indistinguishable level of detail, and -- all else being equal -- is it worth the increased final file size to slightly increase the frame size ? In other words, can I get a better looking image with 768x432 (or maybe even more) as opposed to 688x384 ? (I don't have particular size constraints here but it'd be kinda ridiculous to obtain a file bigger than the source DVD, even though the main goal is to improve the perceived quality.)

    I found this discussion which seems to be about the same kind of issues I have :
    http://forum.doom9.org/showthread.php?t=167027
    But I don't have Adobe Premiere or Photoshop, and the proposed solutions seem quite complicated (I don't mind learning something that's a little tricky, but I'd prefer not to install huge commercial softwares and have to learn their basic usage just to perform this one task on which I feel like I already spent too much time for what it is...).
    This too looks very promising, but it's for VirtualDub :
    http://fdump.narod.ru/rgb.htm

    Thanks again (and sorry if that's a bit long for a new thread's first post, I wanted to be thorough).
    Quote Quote  
  2. It's field-blended from a film source. So you bob it first (with QTGMC if you wish) followed by using SRestore at default settings. That will give you a 23.976fps progressive video. You don't just blindly deinterlace it. Another major problem is that the blacks are badly crushed and the whites badly blown out. And the DVD's DAR is 4:3 rather than 16:9. Me, I wouldn't waste more time than I just did on this POS.

    Buy the bad but still better NTSC version if you absolutely have to work on it.
    Quote Quote  
  3. Member
    Join Date
    Aug 2013
    Location
    Central Germany
    Search PM
    Thank you for the elaborate description; unfortunately I don't have much time right now, therefore just a few brief remarks...

    Pessimistic approach: Lost quality is lost.

    Optimistic approach: Manual adjustment, scene by scene.

    Lazy approach: Merge(Merge(ColorYUV(autogain=true), ColorYUV(autowhite=true)))

    The optimal compromise between efforts and results may be somewhere in that triangle... finding that will take a little more analysis than just skimming through your post, as I did.

    Regarding aspect ratio: Remember that material on DVD is always distorted. Deskewing will always happen. Only a few ratios are allowed by the specs, so if the production did not completely fail, you may just have to know the correct values out of a small table.
    Quote Quote  
  4. Member
    Join Date
    May 2014
    Location
    Memphis TN, US
    Search PM
    Originally Posted by abolibibelot View Post
    - Can I get a good result using AVIDemux and Avisynth, or is there a better way ? I found out there were many external filters for VirtualDub designed to treat such problems of color balance, but it doesn't support H264 encoding – or can it somehow ?
    That's odd to say. Avisynth doesn't support h264 encoding, either. VirtualDub isn't an encoder. Maybe you have the concepts of editing, restoration, and encoding mixed up. Yes, there's a way but it's complicated and has nothing to do with the other bad problems in your video. As far as encoding, you'd get better 3:2 pulldown or interlaced playback encoded to SD BluRay with high bitrate MPEG2. But that's another story, and this vid is so wrecked that no one would know the difference. Anyway, you need Avisynth and VirtualDub (or similar) together -- get basic levels and color shift corrected in YUV first, then RGB work on heavy-duty saturation, gamma, and other fixes.

    Originally Posted by abolibibelot View Post
    I found this discussion which seems to be about the same kind of issues I have :
    http://forum.doom9.org/showthread.php?t=167027
    But I don't have Adobe Premiere or Photoshop, and the proposed solutions seem quite complicated
    Yep, I saw that thread a while back. What turned me off was how off-color the "corrections" look. Some of them look like very basic mistakes, others are just goofy. Thank yourself for not spending big bucks on Premiere or Photoshop Pro, which uses many of the same color tools you saw in VirtualDub, and a whole lot more besides. Ditto for Vegas Pro and other big guys. You still have to know about gamma, offsets (or pedestal), white balance, gray balance, black balance, etc, how to work with histograms, vectorscopes, waveforms, and all that stuff.

    No wonder you had problems with the aspect ratio. It's not a 16:9 movie. 16:9 is for TV. Not many big-screen movies are shot in 16:9, and certainly not in the early 80's. The movie was shot at 1.85:1, which is wider than 16:9 (1.77778:1).

    I second manono's idea: if you're obsessed about working with bad video, at least get the NTSC DVD.
    - My sister Ann's brother
    Quote Quote  
  5. Member
    Join Date
    Aug 2013
    Location
    Central Germany
    Search PM
    AviSynth is just a frame server with filtering features. But it can be used to feed the filtered video into a H.264 encoder (e.g. x264).

    VirtualDub is also able to do frame serving of edited video into an external encoder, since version 1.10.
    _

    When detecting the aspect ratio, never measure the dimensions of the interesting "netto" part (after cropping possible black borders). The "brutto" area including the borders is the reference, and this can only have a few distinct deskewing factors. In any case, the whole video (including borders) would have to be deskewed so that it will have a display aspect ratio of either 4:3 or 16:9 ... except for production mistakes; this may include quasi-religious opinions about ITU vs. Generic AR.
    Quote Quote  
  6. Member
    Join Date
    May 2014
    Location
    Memphis TN, US
    Search PM
    The image in the 4:3 m2v isn't sized correctly anyway. Displayed at 4:3, it's a 1.67:1 (too narrow) letterboxed image inside a 4:3 frame. It's just too much of a mess to work with.
    - My sister Ann's brother
    Quote Quote  
  7. 1) @manono

    It's field-blended from a film source. So you bob it first (with QTGMC if you wish) followed by using SRestore at default settings. That will give you a 23.976fps progressive video. You don't just blindly deinterlace it.
    Interesting. This applies to any movie source I'm assuming ? "Bob" means doubling the framerate, correct ? Is SRestore an Avisynth filter, and if so is it included in the default install ?

    Another major problem is that the blacks are badly crushed and the whites badly blown out.
    That, I mentioned in my description. Just out of curiosity, how did that happen ? Do you think there's nothing to do about it ? As I explained, I could manage to recover some lost details in the seemingly blown out whites by lowering the brightness while increasing the gamma, so it's not completely burnt.

    And the DVD's DAR is 4:3 rather than 16:9. Me, I wouldn't waste more time than I just did on this POS.
    The DAR seems almost correct to me, considering it's letterboxed the actual picture is close to 16:9 (it looks off but not by a whole lot). Maybe you mean it should be 16:9 non-letterboxed so as to use the whole frame for the actual picture ? Anyway, that's the easy part I'd say !

    Buy the bad but still better NTSC version if you absolutely have to work on it.
    I sure won't buy another version, and it would probably be expensive to get the NTSC DVD from France. (I paid 3€ for a used DVD. Actually I had to buy two used ones, the first one had a damaged cover which I hadn't seen when buying it in a busy street, I kept that one and bought another I gave to my brother.) I wish there was a full NTSC DVD torrent somewhere, but I only found this 700MB Xvid version. Either I use that as is and mux it with the improved AAC audio, or I try to improve the PAL DVD picture the best I can.

    Here is a thumbnails picture from that AVI file :
    http://share.pho.to/9RlCB



    2) @LigH.de

    Thank you for the elaborate description; unfortunately I don't have much time right now, therefore just a few brief remarks...
    Pessimistic approach: Lost quality is lost.
    Optimistic approach: Manual adjustment, scene by scene.
    That I sure won't do. I know I can't get a perfect picture, but I'd like to find the best overall settings to globally improve the picture's subjective quality. I already saw improvements with the treatments I tried, I'm hoping someone more knowledgeable can help me refine them, or tell me about better suited tools and tricks. I want to : remove that ugly green, reduce the overblown reds and get a reasonably satisfying color balance, enhance the dark areas while recovering detail in overblown white areas (which I already did, but not all at the same time).

    Lazy approach: Merge(Merge(ColorYUV(autogain=true), ColorYUV(autowhite=true)))
    What does "Merge" do ? As I wrote in the decription, "autogain" and "autowhite" produce very poor result, and it varies wildly from scene to scene. Maybe I did it wrong ? (I tried it within Avidemux's ColorYUV port, not in the Avisynth script itself, but it's supposed to be the same.)

    The optimal compromise between efforts and results may be somewhere in that triangle... finding that will take a little more analysis than just skimming through your post, as I did. Regarding aspect ratio: Remember that material on DVD is always distorted. Deskewing will always happen. Only a few ratios are allowed by the specs, so if the production did not completely fail, you may just have to know the correct values out of a small table.
    A ratio of 16:9 (for the actual picture) seems correct, which is pretty standard.


    3) @LMotlow

    That's odd to say. Avisynth doesn't support h264 encoding, either. VirtualDub isn't an encoder. Maybe you have the concepts of editing, restoration, and encoding mixed up.
    I'm working with the tools I know, and it somehow worked, to a point. VirtualDub isn't an encoder but it can use different encoders when exporting, just like Avidemux, Avidemux natively supports and includes the x264 encoder, last time I checked VirtualDub doesn't.

    Yes, there's a way but it's complicated and has nothing to do with the other bad problems in your video.
    What other bad problems ? The worst thing to me is the color balance, if I can fix this (at least better than I did so far), I'm "reasonably happy", as Huell from Breaking Bad would say.
    http://www.youtube.com/watch?v=T7rXeDArhg0

    As far as encoding, you'd get better 3:2 pulldown or interlaced playback encoded to SD BluRay with high bitrate MPEG2. But that's another story, and this vid is so wrecked that no one would know the difference.
    As I understand it, "3:2 pulldown" is the process of converting a 24 fps movie to 29.997 NTSC video. This is a 25 fps PAL DVD. And does it really matter to try and recover the original 24fps frame rate ? As for the high bitrate MPEG2, like you say, it's hugely overkill considering the quality of the source material. Even then, what is the advantage of MPEG2 over H264 when it comes to re-encoding ? Isn't the latter supposed to be a much more efficient codec ?

    Anyway, you need Avisynth and VirtualDub (or similar) together -- get basic levels and color shift corrected in YUV first, then RGB work on heavy-duty saturation, gamma, and other fixes.
    That's the kind of answer I was expecting -- only more detailed than a throwaway sentence at the end of a paragraph I could sum up as "if you don't know what you don't know, it won't do you any good to know more than you do". What would be the best way to correct the color shift ? Why do that in YUV and why convert then to RGB to do the rest, considering the final encode is in YUV, if I'm not mistaken ? (I'll admit I have only very basic knowledge of what color spaces are.)

    Yep, I saw that thread a while back. What turned me off was how off-color the "corrections" look. Some of them look like very basic mistakes, others are just goofy.
    Could you elaborate ? It seemed to me a significant improvement over the original, even if not perfect.

    Thank yourself for not spending big bucks on Premiere or Photoshop Pro, which uses many of the same color tools you saw in VirtualDub, and a whole lot more besides. Ditto for Vegas Pro and other big guys. You still have to know about gamma, offsets (or pedestal), white balance, gray balance, black balance, etc, how to work with histograms, vectorscopes, waveforms, and all that stuff.
    That's basically why I posted here in the first place -- to learn about things I don't know yet, and try a few practical methods I didn't think of.

    No wonder you had problems with the aspect ratio. It's not a 16:9 movie. 16:9 is for TV. Not many big-screen movies are shot in 16:9, and certainly not in the early 80's. The movie was shot at 1.85:1, which is wider than 16:9 (1.77778:1).
    So the resolution of the cropped-resized picture should be 1.85:1 as well ? It seems off to me, 16:9 looks correct (unless you count 1.85:1 while keeping the left and right black borders, as I wrote below).

    I second manono's idea: if you're obsessed about working with bad video, at least get the NTSC DVD.
    As I wrote above that's not a possibility. Is it a common issue that PAL DVDs look like crap compared to their NTSC couterparts ? Is there a (technical) reason for that ?

    The image in the 4:3 m2v isn't sized correctly anyway. Displayed at 4:3, it's a 1.67:1 (too narrow) letterboxed image inside a 4:3 frame. It's just too much of a mess to work with.
    It seems to me it's the easiest issue to fix... As I wrote in the original post, 688x384 or 768x432 look right to me, aspect-ratio-wise. How did you find the exact value of 1.67:1, is there a special tool for that sort of calculation ?


    4) @LigH.de

    AviSynth is just a frame server with filtering features. But it can be used to feed the filtered video into a H.264 encoder (e.g. x264).
    That I do know. So far I used Avisynth frameserving to Avidemux (which I know quite well) through AvsProxy, so as to benefit from the superior QTGMC deinterlacing filter : that part is working.

    VirtualDub is also able to do frame serving of edited video into an external encoder, since version 1.10.
    That, I didn't know. But would there be an advantage with using VirtualDub for this, as opposed to the aforementioned configuration ? Are there filters designed for VirtualDub with no Avisynth and/or Avidemux equivalent that would be better suited for the kind of correction I'd like ?

    When detecting the aspect ratio, never measure the dimensions of the interesting "netto" part (after cropping possible black borders). The "brutto" area including the borders is the reference, and this can only have a few distinct deskewing factors. In any case, the whole video (including borders) would have to be deskewed so that it will have a display aspect ratio of either 4:3 or 16:9 ... except for production mistakes; this may include quasi-religious opinions about ITU vs. Generic AR.
    OK, but here it's more complicated as it's a widescreen movie encoded as a 4:3 picture ("letterboxed"), so at least I have to remove the up and down black borders to calculate the ratio, right ? In this case, indeed, keeping the left and right black borders, a 1.85:1 ratio as "LMotlow" mentioned looks about right.
    Quote Quote  
  8. Originally Posted by abolibibelot View Post
    Interesting. This applies to any movie source I'm assuming ?
    No, just the field-blended ones. The usual method of converting film to PAL 25fps is by speeding everything up.
    "Bob" means doubling the framerate, correct ?
    Yes.
    Is SRestore an Avisynth filter...
    Yes.
    ...is it included in the default install ?
    No. Like QTGMC it's a third-party add-on. You can find more information and get it here:
    http://avisynth.nl/index.php/Srestore
    Just out of curiosity, how did that happen ?
    Don't know, don't care. At some point the luma values were stretched out to full range.
    Do you think there's nothing to do about it ?
    It can be greatly improved, if not entirely fixed.
    The DAR seems almost correct to me,
    I wasn't writing about the aspect ratio. LMotlow seems to think that because it's 1.67:1, it's off because it should be 1.85:1. I didn't see anything obviously wrong with the aspect ratio (no oval-shaped balls, for example), and it could just have been cropped from the sides in the absence of any definitive proof. No, what I meant was you lose resolution when encoding widescreen films as 4:3 rather than as 16:9. Any decent DVD of the film would be 16:9. Of course, this isn't a decent DVD and even the NTSC version is widescreen 4:3.
    Maybe you mean it should be 16:9 non-letterboxed so as to use the whole frame for the actual picture ?
    I meant exactly what I said. Even a 16:9 version of a 1.85:1 film will have slight black bars (letterboxing) above and below.
    Quote Quote  
  9. Banned
    Join Date
    Oct 2014
    Location
    Northern California
    Search PM
    Originally Posted by abolibibelot View Post
    Do you think there's nothing to do about it ? As I explained, I could manage to recover some lost details in the seemingly blown out whites by lowering the brightness while increasing the gamma, so it's not completely burnt.
    There is nothing you can do to make this come back.

    If you lower the brightness you will make things far worse as the whites will simply become grey.

    Quote Quote  
  10. Certainly you can improve specific shots. But different shots require different adjustments. An adjustment that makes some shots look better will make others look worse. For example this rough adjustment

    Code:
    ColorYUV(off_y=-20)
    darks=ColorYUV(off_u=8, off_v=8, cont_u=-50, cont_v=-50)
    brights=ColorYUV(off_u=14, off_v=6, cont_u=-50, cont_v=-50)
    Overlay(darks, brights, mask=ColorYUV(cont_y=100))
    MergeChroma(aWarpSharp(depth=20))
    ChromaShift(c=-2, l=-2)
    makes this shot better (before on left, after on right):

    Click image for larger version

Name:	pic1.jpg
Views:	481
Size:	171.0 KB
ID:	32052

    but makes this one worse:

    Click image for larger version

Name:	pic2.jpg
Views:	378
Size:	145.5 KB
ID:	32054

    It will take you weeks of hard work to adjust the entire movie shot by shot.
    Quote Quote  
  11. Member
    Join Date
    Aug 2013
    Location
    Central Germany
    Search PM
    Merge(a, b) calculates an average between clip a and clip b. Without a third parameter, the default weight of the second clip is 0.5, so you can give either side more weight. The idea of this construct was to have an attenuated auto correction, because the result of a full correction is often poor, as you already experienced. In my experience, the result of the nested merge is usually a bit more convenient, but still far from optimal. Just a "lazy" filter to go half a step into the desired direction. Comparing with the original may support a decision how far to go for an optimum.
    Quote Quote  
  12. @manono

    No, just the field-blended ones. The usual method of converting film to PAL 25fps is by speeding everything up.
    So in this case to get the original 24fps frame rate it should be slowed down by 1fps ?

    Don't know, don't care. At some point the luma values were stretched out to full range.
    Aren't they supposed to be distributed along the full range, if not why ?

    It can be greatly improved, if not entirely fixed.
    This is where it's becoming interesting... How would you proceed, if you had to get it done ? Was I going in the right direction with the methods I described ? Is there a way to accurately determine by how much such and such parameter have to be corrected, instead of proceeding by wild guess, trial & error ? I tried a few histogram plugins for Avisynth or VirtualDub I saw recommanded here and there, but apart from the obvious green shift and red spike I didn't know what to look for, and more importantly how to use those informations to choose the right settings in the color correction filters.

    I wasn't writing about the aspect ratio. LMotlow seems to think that because it's 1.67:1, it's off because it should be 1.85:1. I didn't see anything obviously wrong with the aspect ratio (no oval-shaped balls, for example), and it could just have been cropped from the sides in the absence of any definitive proof. No, what I meant was you lose resolution when encoding widescreen films as 4:3 rather than as 16:9. Any decent DVD of the film would be 16:9. Of course, this isn't a decent DVD and even the NTSC version is widescreen 4:3.
    Yes, I get that, the movie should have a 16:9 display aspect ratio (I'm still a little confused with DAR/PAR/SAR) with little to no horizontal black bars, so the actual picture would occupy a much bigger portion of the frame. How do you know the NTSC DVD is just the same in that regard ? As for the PAR, or the DAR of the actual movie picture if that makes sense, I think the faces look a little elongated vertically, or crushed horizontally, it feels more natural with a slightly wider resize (« oval-shaped balls » -- did you see any ball at all ? It's called “Penitentiary”, not “The Prisoner” ;^p).



    @newpball

    There is nothing you can do to make this come back.
    If you lower the brightness you will make things far worse as the whites will simply become grey.
    Yet doing just that I managed to reveal details that were lost in seemingly pure white on the original DVD picture.
    http://share.pho.to/9S0k7
    Is there a way I can recover those details while leaving "true white" untouched ?
    Last edited by abolibibelot; 6th Jun 2015 at 00:44.
    Quote Quote  
  13. Originally Posted by abolibibelot View Post
    So in this case to get the original 24fps frame rate it should be slowed down by 1fps ?
    The field-blending kept it at the original 'base' framerate in the process of converting it to PAL. So, no. The bobber (QTGMC or whatever) followed by SRestore removes most of the blends and restores it to 23.976fps. I already said that. The length remains the same. The audio can be used without stretching.
    Aren't they supposed to be distributed along the full range, if not why ?
    Very little is supposed to go outside of 16-235. Not like in your source where the full range of 0-255 is used. Why not? You'll lose dark greys and near whites. A head of black hair will look like a helmet. A black coat will be uniformly black without the wrinkles and folds and light reflecting off of it to creates all shades of dark grey to black. Similar things happen to bright whites. Clouds become a single undifferentiated mass of white. A white shirt loses its wrinkles and folds and creases and all three-dimensionality.
    How would you proceed, if you had to get it done ?
    You increase the brightness (not lower it as you wrote) and lower the contrast, for starters, something like:

    Tweak(Bright=5,Cont=0.85,Coring=False)

    But that only helps part of it. The opening scene/credits of your sample need higher brightness values. And the black on all four sides should be removed and replaced with 'fresh black', if you're keeping it the way it is now, as a DVD. If you're cropping all the black away and resizing then you don't have to do that.
    Is there a way to accurately determine by how much such and such parameter have to be corrected, instead of proceeding by wild guess, trial & error ?
    A histogram is helpful. And I use this a lot:

    ColorYUV(Analyze=True).Limiter(Show="Luma")

    Put that line at the bottom of your script and see what a mess your DVD is.

    How do you know the NTSC DVD is just the same in that regard ?
    http://www.digitallyobsessed.com/displaylegacy.php?ID=297
    ... it feels more natural with a slightly wider resize...
    Okay, then go with something closer to a 1.85:1 aspect ratio.
    Last edited by manono; 6th Jun 2015 at 02:51.
    Quote Quote  
  14. @jagabo
    Certainly you can improve specific shots. But different shots require different adjustments. An adjustment that makes some shots look better will make others look worse. For example this rough adjustment

    Code:

    ColorYUV(off_y=-20)
    darks=ColorYUV(off_u=8, off_v=8, cont_u=-50, cont_v=-50)
    brights=ColorYUV(off_u=14, off_v=6, cont_u=-50, cont_v=-50)
    Overlay(darks, brights, mask=ColorYUV(cont_y=100))
    MergeChroma(aWarpSharp(depth=20))
    ChromaShift(c=-2, l=-2)

    makes this shot better (before on left, after on right):
    [pic]
    but makes this one worse:
    [pic]
    It will take you weeks of hard work to adjust the entire movie shot by shot.
    Thank you very much for this concrete and clear example. It may be “rough” yet is more sophisticated than anything I did before. But it confirms what I already experienced : there might be no “one size fits all” set of parameters that would produce a thoroughly satisfying result for the whole movie. I'm not aiming at perfection though, and sure don't want to spend weeks adjusting this scene by scene. Wouldn't it still be possible to find a good enough compromise, a single set of filters and parameters that would correct the most obvious issues and make the whole thing watchable ? (Like the audio, which was a mess, yet I'm pretty satisfied with what I did -- I spent a whole evening on it though... *sigh*)
    And how is that even possible in the first place ? I mean, if the color balance and other characteristics were altered at some point, shouldn't it affect the whole movie in the same way ? That plus the sound issues, how could they screw up to such an extent and still be paid for it, and how come Mr. T didn't pity those foo's for making him look like Green Giant ? Can ageing tapes or movie reels explain part of it, like the green cast, as I read in some other thread ?

    As I wrote in the first message, the colors in this movie are weird to begin with, see those thumbnails from the AVI file converted from the NTSC DVD, which seems closer to the intended look :
    http://share.pho.to/9RlCB
    And this screen cap from the same shot as your first test picture, again from the english language AVI file :
    http://share.pho.to/9S13f
    Your treatment made it look more realistic, but apparently this particular scene in the park was intended to have an overall green/yellow tone (less than on the PAL DVD but more than it should normally look like). So maybe removing a tad less green would prevent other scenes -- for instance the one by the pool (your second set of pictures) -- from looking too dark/dull (but still more realistic I'd say -- it has a slight purple tone but it's still better than green all over).

    Could you please explain briefly what you did and why, i.e., what does each parameter do and how did you decide which ones to apply ? Are these all native Avisynth filters ? For other scenes (like the one by the pool), would you use the same filters with different parameters, or do something else entirely ? Is the order important, and where should QTGMC be placed in the list ? (First I suppose.) What is this histogram below each picture and how does it help to know what amount of which filter has to be applied ? From what I understand you applied different parameters for “dark” and “bright” areas, which doesn't seem possible in the ColorYUV port in Avidemux. I guess “eq2” is too rudimentary for such a tricky task, to answer one of my own questions.

    And do you think I can get a better quality from this DVD in one global treatment or that I'm better off using that 700MB AVI/Xvid file I already mentioned ? I'm not even sure the DVD has an advantage in terms of sharpness, see those caps from the Star-Wars-like scrolling text at the begining, PAL DVD with QTGMC “medium” preset and nothing else applied, then 700MB AVI file with no treatment applied :
    http://share.pho.to/9S3NF
    Would it be foolish to apply color correction (probably easier) on this file (Xvid at 755kb/s so already highly compressed) and reencode it in H264 ?


    “The sky is blue and so is the sea
    What is the color, when black is burnt?
    What is the color?”

    Neil Young
    Quote Quote  
  15. @manono

    The field-blending kept it at the original 'base' framerate in the process of converting it to PAL. So, no. The bobber (QTGMC or whatever) followed by SRestore removes most of the blends and restores it to 23.976fps. I already said that. The length remains the same. The audio can be used without stretching.
    OK, sorry, I guess I was confused by what “LMotlow” wrote about “3:2 pulldown”.

    Very little is supposed to go outside of 16-235. Not like in your source where the full range of 0-255 is used. Why not? You'll lose dark greys and near whites. A head of black hair will look like a helmet. A black coat will be uniformly black without the wrinkles and folds and light reflecting off of it to creates all shades of dark grey to black. Similar things happen to bright whites. Clouds become a single undifferentiated mass of white. A white shirt loses its wrinkles and folds and creases and all three-dimensionality.
    I get it, “very little”, but there still can be some true black and some true white, right ?

    You increase the brightness (not lower it as you wrote) and lower the contrast, for starters, something like:
    Tweak(Bright=5,Cont=0.85,Coring=False)
    But that only helps part of it. The opening scene/credits of your sample need higher brightness values. And the black on all four sides should be removed and replaced with 'fresh black', if you're keeping it the way it is now, as a DVD. If you're cropping all the black away and resizing then you don't have to do that.
    Yet from what I experienced increasing the brightness loses more details in the whites and makes the blacks paler, while lowering the contrast makes the whole picture duller to my eyes. At first I didn't touch brightness at all, later I discovered that lowering it a little (around -5) seemed to improve the details in very bright scenes and allowed me to increase the gamma some more without getting a washed-out picture. I may have it all wrong though...
    I don't want to re-create a DVD from this as I said (intended result being an MKV file), but if I did wouldn't it be good to make it a 16:9 one as it should have been in the first place ? Or would it be pointless as the extra vertical resolution has been lost anyway ?

    A histogram is helpful. And I use this a lot:
    ColorYUV(Analyze=True).Limiter(Show="Luma")
    Put that line at the bottom of your script and see what a mess your DVD is.
    I see red and green about everywhere... Is red indicating crushed blacks, and green indicating burnt whites ? What do values for Luma Y / Chroma U / Chroma V and others tell me about the picture and how to treat it ? As I understand it, Luma 0 is “true” black and Luma 255 is “true” white, and those values should be almost never reached in the actual movie picture. How do chroma values interact and are there “correct” average values, no matter what the content of the movie is ?
    The tweak you proposed above seems to remove some green-highlighted areas (quite surprisingly, I'd have expected more of those, apparently the lowering of the contrast more than counterbalances the increase of brightness), but it's hard to say as I have to reload the script each time so I can't compare immediately the effect of one parameter change. (That's one thing very convenient when using Avidemux's internal filters : it's possible to display the preview and immediately see the effect of each added filter. And that's another thing that no longer works in Avidemux 2.6...)

    Very thorough indeed. But doesn't it say “original 1.85:1” ? Or is it the “non anamorphic” part that matters and tells you it's in 4:3 ?



    @LigH.de

    Merge(a, b) calculates an average between clip a and clip b. Without a third parameter, the default weight of the second clip is 0.5, so you can give either side more weight. The idea of this construct was to have an attenuated auto correction, because the result of a full correction is often poor, as you already experienced. In my experience, the result of the nested merge is usually a bit more convenient, but still far from optimal. Just a "lazy" filter to go half a step into the desired direction. Comparing with the original may support a decision how far to go for an optimum.
    Merge(Merge(ColorYUV(autogain=true), ColorYUV(autowhite=true)))
    Indeed it's much better with this “Merge” setting. But what do you call a “clip” here ? In that script, does “Merge” do a sort of average between the two automatic settings “autogain” and “autowhite”, or an average between adjacent shots ? And how is it supposed to behave when nested like this, as opposed to a single “Merge” command ?
    Found this, still confused (and by the way it says default weight is 1.0) :
    http://avisynth.org.ru/docs/english/corefilters/merge.htm
    Quote Quote  
  16. Originally Posted by abolibibelot View Post
    I get it, “very little”, but there still can be some true black and some true white, right ?
    Most of the blacks and whites can be recovered, yes.
    ...but if I did wouldn't it be good to make it a 16:9 one as it should have been in the first place ? Or would it be pointless as the extra vertical resolution has been lost anyway ?
    There are differences of opinion on that. Me, I've done that sort of thing enough that I think it is sometimes worth it, although maybe not with your crappy source. Anyway, you need a good upscaler (NNEDI3_rpow2 if using AviSynth) followed by some sharpening.
    I see red and green about everywhere... Is red indicating crushed blacks, and green indicating burnt whites ?
    Yes, red is all black values below 16 and green all white values above 235. It's not supposed to look like that. Put that same line on a 'real' DVD and note the differences. All I've done is write about the problems with the brightness and contrast, and nothing about the colors. They are a whole other can of worms and jagabo already mentioned some of the problems with the colors.
    ... but it's hard to say as I have to reload the script each time so I can't compare immediately the effect of one parameter change.
    After making and saving a change with the script open in VDub, hit 'F2' to reload the script at the same frame. Then it's easier to see the change immediately. Others use AvsPmod for that sort of thing.
    But doesn't it say “original 1.85:1” ? Or is it the “non anamorphic” part that matters and tells you it's in 4:3 ?
    Non-anamorphic in this context means a 4:3 DAR.
    Quote Quote  
  17. Originally Posted by abolibibelot View Post
    As I understand it, Luma 0 is “true” black and Luma 255 is “true” white
    No. True black in video is Y=16. True white is Y=235. On a properly set up system you should not see any difference between Y=0 and Y=16. They both should show the same black. The same is true at the bright end.

    If full range luma was the only problem you could fix that with a simple ColorYUV(levels="PC->TV"). But there are many scenes where the black level is too high -- they will end up looking even more washed out.
    Last edited by jagabo; 6th Jun 2015 at 08:21.
    Quote Quote  
  18. Member
    Join Date
    May 2014
    Location
    Memphis TN, US
    Search PM
    Originally Posted by abolibibelot View Post
    @manono

    The field-blending kept it at the original 'base' framerate in the process of converting it to PAL. So, no. The bobber (QTGMC or whatever) followed by SRestore removes most of the blends and restores it to 23.976fps. I already said that. The length remains the same. The audio can be used without stretching.
    OK, sorry, I guess I was confused by what “LMotlow” wrote about “3:2 pulldown”.
    You certainly are. 3:2 pulldown is used to play 23.976 film speed at 29.97 NTSC. 24fps PAL is a different story. As manono says, field blending was used here to get 25fps PAL from the original movie.

    Here are links to two free tutorials on how to get info from histograms, in this case RGB histograms. The tutorial deals with histograms for still cameras, but the same principles apply for still photo, movie images, and similar "parade" type histograms.
    Part 1: Tones & Contrast: http://www.cambridgeincolour.com/tutorials/histograms1.htm
    Part 2: Luminosity & Color: http://www.cambridgeincolour.com/tutorials/histograms2.htm

    Lot of discussion here about "pure white" and "pure black". Accurate comments as far as it goes, but you should understand that "white" and "black" can be treated as colors or hues, not just as video levels. As a color, bright Y235 white is RGB 235-235-235. That is, white is equal proportions of Red, Green, and Blue.
    Y16 Black as an RGB color is RGB 16-16-16.
    A Y128 middle gray object would have RGB values of RGB 128-128-128.
    All colors of video gray (which covers everything from black thru shades of gray to pure white) each have equal proportions of Red, Green, and Blue.

    If you have white, grayish, or black objects in an image, and you can adjust color balance so that they look pretty close to their natural hues, the other colors will fall into place because all three colors would be in normal balance. It doesn't have to be perfect, but close enough for the eye or a pixel reader to say "this is now close to white, not pale green". How this works in detailed scenes depends on lighting, the creator's desired effects, and so on. This video has problems other than color cast -- it has serious color corruption with nonlinear results, meaning darks might have one color cast, midtones another, and whites something else. A "clipped" bright that's supposed to be white might not be a clean color because one or the other elements of Red, Blue, or Green has been cutoff at the bright end. If Blue is clipped off before the other colors, then the bright blue channel data has been destroyed at a certain point and the white will look yellowy (mostly green + red). If black has been crushed at the other end and one or more of the basic colors has been destroyed in that area, the black will have a color based on data still there from the other colors. You can retrieve some detail out of crushed/clipped areas, but getting the color right is a chore.

    It's tough as hell to fix color problems like this, not to mention getting correct levels at each shot. VHS isn't consistent. Color balance in analog video isn't based on "pixels" or "digital numbers". It's based on voltage fluctuations, and those fluctations can look pretty nutty from minute to minute -- badly calibrated transfer gear and sloppy processing don't help, either. This problem with VHS is so typical, most of us expect it. And, no, there's no one-shot filter that solves the problem. As jagabo shows, what works with one shot won't work with other shots. That's just the way it is. There's no easy way out. This is crap video, and everyone here has had to work to get non-crap out of crap. Even then, you often don't get much to show for the effort.
    - My sister Ann's brother
    Quote Quote  
  19. Originally Posted by LMotlow View Post
    As a color, bright Y235 white is RGB 235-235-235. That is, white is equal proportions of Red, Green, and Blue.
    Y16 Black as an RGB color is RGB 16-16-16.
    After a standard rec.601 or rec.709 YUV to RGB conversion (what you see on the screen) pure black, YUV=16,128,128 is RGB=0,0,0. White, YUV=235,128,128, is RGB=255,255,255.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!