VideoHelp Forum
+ Reply to Thread
Results 1 to 20 of 20
Thread
  1. Hello, guys!

    Recently I got Bref. Blu-ray.
    BDInfo (whole series):
    Code:
    Codec                   Bitrate             Description     
    -----                   -------             -----------     
    MPEG-4 AVC Video        18452 kbps          1080i / 25 fps / 16:9 / High Profile 4.1
    MediaInfo (episode 1):
    Code:
    Video
    Format                                   : AVC
    Format/Info                              : Advanced Video Codec
    Format profile                           : High@L4.1
    Format settings                          : CABAC / 4 Ref Frames
    Format settings, CABAC                   : Yes
    Format settings, Reference frames        : 4 frames
    Codec ID                                 : V_MPEG4/ISO/AVC
    Duration                                 : 1 min 49 s
    Bit rate mode                            : Variable
    Bit rate                                 : 18.7 Mb/s
    Maximum bit rate                         : 22.0 Mb/s
    Width                                    : 1 920 pixels
    Height                                   : 1 080 pixels
    Display aspect ratio                     : 16:9
    Frame rate mode                          : Variable
    Frame rate                               : 50.000 FPS
    Original frame rate                      : 25.000 FPS
    Standard                                 : PAL
    Color space                              : YUV
    Chroma subsampling                       : 4:2:0
    Bit depth                                : 8 bits
    Scan type                                : Interlaced
    Scan type, store method                  : Separated fields
    Scan order                               : Top Field First
    Bits/(Pixel*Frame)                       : 0.181
    Stream size                              : 245 MiB (91%)
    Language                                 : French
    Default                                  : Yes
    Forced                                   : No
    Color range                              : Limited
    Color primaries                          : BT.709
    Transfer characteristics                 : BT.709
    Matrix coefficients                      : BT.709
    MeGUI's AVS script creator after analysing says it's progressive.
    ffmpeg, using advice from SO:
    Code:
    ffmpeg -filter:v idet -frames:v 5490 -an -f rawvideo -y NUL -i bref.s01e01.mkv
    ------
    [Parsed_idet_0 @ 000001da3eb27200] Repeated Fields: Neither: 2729 Top: 4 Bottom: 12
    [Parsed_idet_0 @ 000001da3eb27200] Single frame detection: TFF: 49 BFF: 70 Progressive: 2399 Undetermined: 227
    [Parsed_idet_0 @ 000001da3eb27200] Multi frame detection: TFF: 0 BFF: 27 Progressive: 2694 Undetermined: 24
    I want to rip it and store on my hdd. But the problem is that I don't know the right way to deinterlace it.

    Fisrt, I followed the advice from this forum post:
    For the record, if you select "Interlaced" and "Yadif with Bob" as the de-interlacing method in the script creator, that'll give you double frame rate output as QTGMC does by default (50fps for PAL). If you select "yadif with bob" and use the preview, and when you step through the frames one at a time it just looks like every frame is repeated (as it does for your sample) it's a fair indication it's not really interlaced. If each frame is different, then it probably is.
    Of course there's always the possibility that some parts will be interlaced and other parts progressive (hence MeGUI's partially interlaced option), but generally for movies they're either one or the other.
    Yes, every frame looks like it's repeated, but with some small differences in artifacts.

    However on this screenshot there're lines visible, especially noticable on the garland (blue lights):
    Click image for larger version

Name:	sample_18.png
Views:	197
Size:	1.65 MB
ID:	54949

    Here is a sample of the original video (BDRemux):
    sample.mkv

    Can someone help me, please?

    P.S. Thank you for reading
    Last edited by FlyingAces; 18th Sep 2020 at 11:59.
    Quote Quote  
  2. Originally Posted by FlyingAces View Post
    Can someone help me, please?
    You'll have to provide an untouched video sample. 10 seconds or so that shows the problem. All those words and pictures are pretty much useless.
    Quote Quote  
  3. Originally Posted by FlyingAces View Post
    (yadif bob) Yes, every frame looks like it's repeated, but with some small differences in artifacts.
    Then you don't want to deinterlace at all. Try TFM() field matching.

    The crap in your second image has nothing to do with deinterlacing. It's errors decoding the source video -- common with ffvideosource(). Try using LSmash's LWlibavVideoSource() instead.

    And yes, an non-reencoded sample would help the analysis. One with moderate motion and a sharp picture (relatively free of motion blur), like a medium speed panning shot.
    Last edited by jagabo; 17th Sep 2020 at 18:59.
    Quote Quote  
  4. Video Restorer lordsmurf's Avatar
    Join Date
    Jun 2003
    Location
    dFAQ.us/lordsmurf
    Search Comp PM
    Originally Posted by manono View Post
    All those words and pictures are pretty much useless.
    Blunt, yet succinct and accurate. Sample required.
    Want my help? Ask here! (not via PM!)
    FAQs: Best Blank DiscsBest TBCsBest VCRs for captureRestore VHS
    Quote Quote  
  5. Member
    Join Date
    Aug 2013
    Location
    Central Germany
    Search PM
    In general, deinterlacing filters only help if the content is continuously linearly interlaced. But there are so many other possible reasons for combing; NTSC world has telecine, and the results of norm conversions may have blended versions. They need different treatments...
    Quote Quote  
  6. Thank you for all your responses.
    I updated my post and added a sample video.

    Originally Posted by jagabo View Post
    The crap in your second image has nothing to do with deinterlacing. It's errors decoding the source video -- common with ffvideosource(). Try using LSmash's LWlibavVideoSource() instead.
    Yep, thanks for that. I was using ffvideosource only in AvsPmod to make screenshots with overlay text. And LSmash's plugin to index in MeGUI.
    Quote Quote  
  7. Sample.mkv is encoded interlaced but the frames are all progressive. There's no need to deinterlace of field match, just treat it as progressive.
    Quote Quote  
  8. Member
    Join Date
    Aug 2013
    Location
    Central Germany
    Search PM
    Originally Posted by FlyingAces View Post
    However on this screenshot there're lines visible, especially noticable on the garland (blue lights):
    This kind of aliasing is probably not caused by interlacing (this scene doesn't look like heavy horizontal motion), but rather by YUV 4:2:0 chroma subsampling artifacts. Rather highly saturated red and blue has only half the resolution, compared to average brightness.
    Quote Quote  
  9. Alright, it's a progressive video then. Thank you.

    Originally Posted by LigH.de View Post
    This kind of aliasing is probably not caused by interlacing (this scene doesn't look like heavy horizontal motion), but rather by YUV 4:2:0 chroma subsampling artifacts. Rather highly saturated red and blue has only half the resolution, compared to average brightness.
    How can I deal with it? If I encode to 720p it looks good without any of these lines, they just blend in (is it correct terminology?). However in 1080p they look almost like in the source (depending on x264 settings).
    Quote Quote  
  10. The problem around the blue lights is because of the interlaced encoding. You can get rid of it with:

    Code:
    MergeChroma(vInverse())
    Quote Quote  
  11. Originally Posted by jagabo View Post
    Code:
    MergeChroma(vInverse())
    http://avisynth.nl/index.php/Vinverse - this one, right?

    Originally Posted by jagabo View Post
    The problem around the blue lights is because of the interlaced encoding.
    By "interlaced encoding" you mean because video of this BD was just flagged "interlaced" when encoded?
    Quote Quote  
  12. Member
    Join Date
    Aug 2013
    Location
    Central Germany
    Search PM
    Yes, to be Blu-ray compliant, video in specific framerate/resolution combinations need to be encoded in interlaced mode even if the content is progressive. Hardware encoders will use PAFF interlacing which is not most efficient in this case, and the disadvantage is that colors are shared based on fields, skipping a line each. In contrast, x264 has a "fake-interlaced" mode which supports MBAFF; it may use interlaced mode for every macroblock but will always use progressive mode in reality.
    Last edited by LigH.de; 18th Sep 2020 at 14:29.
    Quote Quote  
  13. LigH.de thank you for the explanation. Can you, please, give me a link where I can start learning about that in more detail?
    Code:
    MergeChroma(vInverse())
    Fixed these lines. Does that mean I have to use this function on every BD video that was encoded as interlaced while being progressive?

    And also there're some blocks (sorry, I don't know the proper terminology) on the edges of the blue lights between pink and blue. Should I do something to get rid of them or it's normal with this source?
    Click image for larger version

Name:	rip_18.png
Views:	129
Size:	1.36 MB
ID:	54953
    Click image for larger version

Name:	rip_704.png
Views:	111
Size:	1.26 MB
ID:	54955
    I encoded it with the following params:
    cabac=1 / ref=4 / deblock=1:-2:-2 / analyse=0x3:0x113 / me=umh / subme=10 / psy=1 / psy_rd=1.05:0.00 / mixed_ref=1 / me_range=48 / chroma_me=1 / trellis=2 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=0 / chroma_qp_offset=-3 / threads=12 / lookahead_threads=3 / sliced_threads=0 / nr=0 / decimate=0 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=16 / 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=2pass / mbtree=0 / bitrate=12900 / ratetol=1.0 / qcomp=0.70 / qpmin=0 / qpmax=69 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / ip_ratio=1.40 / pb_ratio=1.30 / aq=2:0.80
    Quote Quote  
  14. Originally Posted by FlyingAces View Post
    Can you, please, give me a link where I can start learning about that
    Note that the comb-like artifacts are a consequence of interlaced encoding of 4:2:0 chroma subsampled video. You can find a very detailed explanation here:

    https://hometheaterhifi.com/technical/technical-reviews/the-chroma-upsampling-error-an...hroma-problem/

    See the section entitled "4:2:0 Interlaced: Fundamentally Broken". The problem here isn't the upsampling error but you need to understand now the chroma subsampling works in order to understand how the problem arises even when done properly. Some more explanation and samples here:

    https://en.wikipedia.org/wiki/Chroma_subsampling#4:2:0

    You can also fix the artifacts with:

    Code:
    MergeChroma(Blur(0,0, 1.0))
    That is essentially what the earlier fix does though vInverse() only does the fix where it sees combing. To restore some of the sharpness you can follow with a little sharpening:

    Code:
    MergeChroma(Blur(0,0, 1.0).Sharpen(0.0, 0.6))
    Originally Posted by FlyingAces View Post
    Does that mean I have to use this function on every BD video that was encoded as interlaced
    If the video has sharp chroma edges and 4:2:0 subsampling it will have those artifacts. It's up to you if you want to "fix" it or not.
    Quote Quote  
  15. Well, it will be very interesting to read that.

    Originally Posted by jagabo View Post
    You can also fix the artifacts with:
    They're the same picture.
    Jokes aside, I was able to see some minor differences only zooming it, but blur+sharpening produced a better picture to my liking.

    Originally Posted by jagabo View Post
    though vInverse() only does the fix where it sees combing
    So it's better to use vInverse() in order not to blur/sharpen other parts of the video?

    Originally Posted by jagabo View Post
    Note that the comb-like artifacts are a consequence of interlaced encoding of 4:2:0 chroma subsampled video.
    And the last question. How do I know if it's 4:2:0 chroma subsampled video?
    Quote Quote  
  16. Originally Posted by FlyingAces View Post
    How do I know if it's 4:2:0 chroma subsampled video?
    Blu-ray is 4:2:0

    99.9999% of commonly distributed video is 4:2:0
    Quote Quote  
  17. Originally Posted by FlyingAces View Post
    Well, it will be very interesting to read that.

    Originally Posted by jagabo View Post
    You can also fix the artifacts with:
    They're the same picture.
    Jokes aside, I was able to see some minor differences only zooming it, but blur+sharpening produced a better picture to my liking.

    Originally Posted by jagabo View Post
    though vInverse() only does the fix where it sees combing
    So it's better to use vInverse() in order not to blur/sharpen other parts of the video?
    It's a judgment call. And may depend on the particular video. vInverse() may be safest. Blur.Sharpen more thorough.

    Originally Posted by FlyingAces View Post
    Originally Posted by jagabo View Post
    Note that the comb-like artifacts are a consequence of interlaced encoding of 4:2:0 chroma subsampled video.
    And the last question. How do I know if it's 4:2:0 chroma subsampled video?
    MediaInfo is pretty reliable for interlaced encoding and 4:2:0 subsampling.
    Quote Quote  
  18. Ok, understood.

    Thank you very much, guys, for your help!
    Quote Quote  
  19. Originally Posted by jagabo View Post
    Sample.mkv is encoded interlaced but the frames are all progressive. There's no need to deinterlace of field match, just treat it as progressive.
    1 - how can I know when the frames are progressive if mediaInfo says that Sample.mkv is interlaced type TFF?

    2 - using mediaInfo how can I know when to use TFF and BFF or none in MeGUI "interlaced mode"?

    3 - besides mediaInfo is there any other software I should use?

    I am new and I have learned many things about encoding in this forum such as that it is progressive or interlaced and how interlaced FTT and BFF work but I cannot understand when I can apply this when encoding a video
    Quote Quote  
  20. Originally Posted by Takashi View Post
    1 - how can I know when the frames are progressive if mediaInfo says that Sample.mkv is interlaced type TFF?
    Open the video in an editor that you know won't automatically deinterlace the preview (many deinterlace because the combing freaks people out). I use VirtualDub2.

    Originally Posted by Takashi View Post
    2 - using mediaInfo how can I know when to use TFF and BFF or none in MeGUI "interlaced mode"?
    In VirtualDub2 apply the Bob Doubler filter (Video -> Filters -> Add -> Bob Doubler). Step frame-by-frame through a section with motion. If you see motion that moves back and forth you have the wrong field order (Bob Doubler defaults to BFF).
    Quote Quote  



Similar Threads

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