VideoHelp Forum
+ Reply to Thread
Page 2 of 2
FirstFirst 1 2
Results 31 to 59 of 59
Thread
  1. You would have to disable the low pass (no way to do that), or use -vf tinterlace instead which allows you to enable/disable low pass

    https://www.ffmpeg.org/ffmpeg-filters.html#tinterlace

    Or avisynth
    Quote Quote  
  2. or have the laczos filter a "treshold" or is it regulable?
    Quote Quote  
  3. -vf tinterlace

    mean you in ffmpeg or ffmbc?
    Quote Quote  
  4. ops I did it again: I'try, addin Tinterlace, with

    Code:
    ffmpeg.exe -y -i v:\test\c0027.mxf -c:v libx264 -profile:v high422 -level:v 4.1 -g 33 -bf 1 -crf 18 -flags +ildct+ilme -top 1 -x264opts tff=1 -filter_complex yadif=1:0,scale=w=720:h=576:flags=lanczos,colormatrix=bt709:bt601,Tinterlace -pix_fmt yuv422p -aspect 16:9 v:\out5.mp4


    but this is wrog: produce image of 720x1152 ^^
    Quote Quote  
  5. You need mode 4 for tff . tinterlace=4

    Code:
    -filter_complex yadif=1:0,scale=w=720:h=576:flags=lanczos,colormatrix=bt709:bt601,tinterlace=4
    Non low passed. Yes it's sharper, but "aliasing and buzzing" lines
    Quote Quote  
  6. mmm, my cats says, "maybe it's necessary to double framerate"?
    Quote Quote  
  7. Originally Posted by marcorocchini View Post
    mmm, my cats says, "maybe it's necessary to double framerate"?
    you mean forget about interlace ? 50p ?

    that's one of the many problem with interlace, you generally need to lowpass it , farther reducing already low effective vertical resolution in motion

    output from yadif=1:0 is double framerate (you convert frames to fields when you re-interlace) . Note the yadif syntax is different for ffmpeg than avisynth
    https://www.ffmpeg.org/ffmpeg-filters.html#yadif-1
    Quote Quote  
  8. Code:
    ffmpeg.exe -y -i v:\test\c0027.mxf -c:v libx264 -profile:v high422 -level:v4.1 -g 33 -bf 1 -crf 18 -flags +ildct+ilme -top 1 -x264opts tff=1 -filter_complex yadif=1:0,scale=w=720:h=576:flags=lanczos,colormatrix=bt709:bt601,tinterlace=4 -pix_fmt yuv422p -aspect 16:9 v:\out5.mp4
    aliasing and buzzing but I see also 50fps, hase double rated, or I mistake?
    Quote Quote  
  9. Originally Posted by marcorocchini View Post
    Code:
    ffmpeg.exe -y -i v:\test\c0027.mxf -c:v libx264 -profile:v high422 -level:v4.1 -g 33 -bf 1 -crf 18 -flags +ildct+ilme -top 1 -x264opts tff=1 -filter_complex yadif=1:0,scale=w=720:h=576:flags=lanczos,colormatrix=bt709:bt601,tinterlace=4 -pix_fmt yuv422p -aspect 16:9 v:\out5.mp4
    aliasing and buzzing but I see also 50fps, hase double rated, or I mistake?


    Yes, it results in double fps, but only in the header. Looks like filter is broken. Supposed to give you 1/2 frame rate from 50p . You might be able to force the fps using -r . But I wouldn't use it like that, you need to lowpass interlaced content

    ‘interleave_top, 4’

    Interleave the upper field from odd frames with the lower field from even frames, generating a frame with unchanged height at half frame rate.
    https://www.ffmpeg.org/ffmpeg-filters.html#tinterlace
    Quote Quote  
  10. azz ok, but I think have some problem with a .mp4 of 50fps

    is there a way to have a "normal" 25fps?
    Quote Quote  
  11. Code:
    ffmpeg.exe -y -i v:\test\c0027.mxf -c:v libx264 -profile:v high422 -level:v 4.1 -g 33 -bf 1 -crf 18 -flags +ildct+ilme -top 1 -x264opts tff=1 -filter_complex yadif=1:0,scale=w=720:h=576,colormatrix=bt709:bt601,tinterlace=4 -sws_flags lanczos -pix_fmt yuv422p -aspect 16:9 -r 25 v:\out6.mp4
    I know the -r 25 is not fully "regular", tomorrow I try to well understa: seeing this commandline on the monitor seems the "best" of all, hoewver thanks poison now i go to bed but I try other way if you let me know

    (p.s for confronting I use the C0027.mxf is that a HD same image of a C0027_b.mxf SD that I use to see a pure SD image)
    Last edited by marcorocchini; 15th Jul 2014 at 03:07.
    Quote Quote  
  12. It's terrible job of interlace - It won't pass QC at broadcast. You need to lowpass . This animated gif has been bob deinterlaced. Look at the aliasing and buzzing lines on the branches

    Click image for larger version

Name:	lowpass.gif
Views:	208
Size:	1.47 MB
ID:	26408
    Quote Quote  
  13. yes I know

    I have upload:

    https://www.dropbox.com/s/niihkqnntjh2els/IMX169.mxf

    and this:

    https://www.dropbox.com/s/7nx4i1dcql02wmv/HD169.MXF

    They are one HD and one SD (IMX-608x576 to crop 32 lines upper) of the same image in the same time

    The IMX169.MXF if for "reference"

    I try to understand what is the correct method to have a decent SD from HD
    Quote Quote  
  14. I have apply (sorry I past the batch encoding line) this:

    Code:
    v:\automazioneclip\core\ffmpeg.exe -y -i "%CD%\%~n1.mxf" -map_channel 0.1.0 -map_channel 0.2.0 -c:v libx264 -profile:v high422 -level:v 4.1 -g 33 -bf 1 -crf 18 -flags +ildct+ilme -top 1 -x264opts tff=1 -filter_complex yadif=1:0,scale=w=720:h=576:flags=lanczos,colormatrix=bt709:bt601,tinterlace=4 -pix_fmt yuv422p -aspect 16:9 -r 25 -c:a libvo_aacenc -b 256k %WorkFolder%\%~n1EncodingDaFileMXF_HD_originale_A_MP4SD.mp4
    to the HD original mxf file https://www.dropbox.com/s/7nx4i1dcql02wmv/HD169.MXF

    obaiting the "wrong" HD-->SD conversion HD169EncodingDaFileMXF_HD_originale_A_MP4SD.mp4






    and, as reference, the standard SD (IMX50) file https://www.dropbox.com/s/niihkqnntjh2els/IMX169.mxf

    Code:
    v:\automazioneclip\core\ffmpeg.exe -y -i "%CD%\%~n1.mxf" -map_channel 0.1.0 -map_channel 0.1.1 -vf crop=720:576:0:32,scale=interl=1:in_range=tv:out_range=tv -pix_fmt yuv422p -c:v libx264 -profile:v high422 -level:v 3 -g 33 -bf 1 -crf 18 -flags +ilme+ildct -top 1 -x264opts tff=1 -c:a libvo_aacenc -b 256k -aspect 16:9 %WorkFolder%\%~n1EncodingDaFileMXForiginale.mp4
    obtaining: IMX169EncodingDaFileMXForiginale.mp4



    in effects resultant HD-->SD file have a lot of aliasing
    Image Attached Files
    Last edited by marcorocchini; 15th Jul 2014 at 03:42.
    Quote Quote  
  15. I already explained tinterlace is bad without low passing. See the animated gif. (The left was -vf interlace, right was -vf tinterlace) . Remember, sharp=bad for interlaced content. It's a tradeoff. If you want to retain details, sharpness , then you have to live with the aliasing and twittering lines

    For ffmpeg, I would use -vf interlace instead of -vf tinterlace, because it low passes by default. In motion there is a lot less aliasing and buzzing lines. tinterlace does have a low pass mode, but then image is softer. Recall you wanted to use different resizer (lanczos), because image was soft, blurry ? That's because of the low passing and soft resize. You need it slightly blurry for interlaced SD.

    And for your "test" shots, you need motion, like a camera pan. A static shot won't reveal as many problems
    Last edited by poisondeathray; 15th Jul 2014 at 08:32.
    Quote Quote  
  16. thanks poison, so that I have remove the Tinterlace=4 and replace with interlace:

    Code:
    v:\automazioneclip\core\ffmpeg.exe -y -i "%CD%\%~n1.mxf" -map_channel 0.1.0 -map_channel 0.2.0 -c:v libx264 -profile:v high422 -level:v 4.1 -g 33 -bf 1 -crf 18 -flags +ildct+ilme -top 1 -x264opts tff=1 -filter_complex yadif=1:0,scale=w=720:h=576:flags=lanczos,colormatrix=bt709:bt601,interlace -pix_fmt yuv422p -aspect 16:9 -r 25 -c:a libvo_aacenc -b 256k %WorkFolder%\%~n1EncodingDaFileMXF_HD_originale_A_MP4SD.mp4
    I wonder: image is a little softer, is there a way to detail a little more? have the lanczos a "regulation"?
    Quote Quote  
  17. I don't think ffmpeg does for lanczos. You can use avisynth if you want more parameters, taps

    Or you can try tinterlace with lowpass

    You're not going to get sharp fine details without aliasing and "line twittering" if you use interlace. It's impossible. Sure, you can use QTGMC or heavy postprocessing for playback, but nobody has that for their TV set
    Quote Quote  
  18. Code:
    ffmpeg.exe -y -i hd169.mxf -c:v libx264 -profile:v high422 -level:v 4.1 -g 33 -bf 1 -crf 18 -flags +ildct+ilme -top 1 -x264opts tff=1 -filter_complex yadif=1:0,scale=w=720:h=576:flags=lanczos,colormatrix=bt709:bt601,interlace -r 25 -pix_fmt yuv422p -aspect 16:9 z:\out.mp4


    for kindness how can I modify it to encode Tinterlace with low pass?
    Quote Quote  
  19. It's in the link above for Tinterlace

    Code:
    tinterlace=4:flags=low_pass_filter

    It will give almost identical results as -vf interlace.

    You can't have the best of everything with interlace. Interlace is a compromise. Either choose aliasing/twittering artifacts, or soft.
    Quote Quote  
  20. mmm honestly seems a little softer, can I try with avisynth? but I don't know how to do
    I have download and install all the pack of QTGMC but I don't know what is the script :=(

    maybe: ?

    FFVideoSource("v:\mxf\hd169.mxf")
    QTGMC( Preset="Slow" )
    AddBorders(0,0,0,1)
    GaussResize(720,576,-1,-1,-1,0,P=41)
    ColorMatrix(mode="Rec.709->Rec.601")

    #AssumeTFF().SeparateFields().SelectEvery(4, 0, 3).Weave()
    SelectEven()
    Quote Quote  
  21. QTGMC is for deinterlacing. Even with aliased video, it will look better for playback. That doesn't really help you produce a video because when you downscale and re-interlace, you re-introduce the problems. The main problem is interlace. If you used QTGMC and kept it progressive - yes it would look fantastic

    Choose either sharp details with aliasing, or soft , or something in between. It's up to you. There is no way around it for interlace. Most broadcasters choose soft with lowpass
    Quote Quote  
  22. I'm understand it's necessary a compromise, so I assume that commandline is almost appropriate

    ffmpeg.exe -y -i hd169.mxf -c:v libx264 -profile:v high422 -level:v 4.1 -g 33 -bf 1 -crf 18 -flags +ildct+ilme -top 1 -x264opts tff=1 -filter_complex yadif=1:0,scale=w=720:h=576:flags=lanczos,colormat rix=bt709:bt601,tinterlace=4:flags=low_pass_filter -r 25 -pix_fmt yuv422p -aspect 16:9 z:\out.mp4

    can I add a little little of sharp?
    Quote Quote  
  23. you can try adding a sharpening filter

    https://www.ffmpeg.org/ffmpeg-filters.html

    maybe smartblur with negatve luma value, or unsharp with positive value

    https://www.ffmpeg.org/ffmpeg-filters.html#unsharp
    https://www.ffmpeg.org/ffmpeg-filters.html#smartblur-1


    The more sharpening you add, the more halos and risk of moire/twittering affects for interlaced video

    Or instead of the default low pass, maybe try your own vertical blur, so you can modulate it . e.g. maybe 0.4 or 0.3 px vertical blur


    Another good compromise is avisynth's Iresize. It retains more detail than ffmpeg's low pass, but only minimal aliasing

    Code:
    FFVideoSource()
    Colormatrix(mode="rec.709->rec.601", interlaced=true)
    IResize(720,576)
    
    function IResize(clip Clip, int NewWidth, int NewHeight) {
      Clip
      SeparateFields() 
      Shift=(GetParity() ? -0.25 : 0.25) * (Height()/Float(NewHeight/2)-1.0)
      E  = SelectEven().Spline36resize(NewWidth, NewHeight/2, 0,    Shift)
      O  = SelectOdd( ).Spline36resize(NewWidth, NewHeight/2, 0,   -Shift)
      Ec = SelectEven().Spline36Resize(NewWidth, NewHeight/2, 0,  2*Shift)
      Oc = SelectOdd( ).Spline36Resize(NewWidth, NewHeight/2, 0, -2*shift)
      Interleave(E, O)
      IsYV12() ? MergeChroma(Interleave(Ec, Oc)) : Last
      Weave()
    }
    Quote Quote  
  24. where I can download IResize for avisynth?
    Quote Quote  
  25. Originally Posted by marcorocchini View Post
    where I can download IResize for avisynth?

    It's just a function. Copy & paste it from post #53 (the bottom part of the script)

    If you still want to sharpen it, you can add a bit more, but I would be conservative. Your IMX file is oversharpened in camera (halos)

    You have to separate the fields before you apply any sharpening (you can't sharpen interlaced video directly). The ffmpeg sharpen might not be doing it correctly (needs interlaced flag)
    Quote Quote  
  26. Originally Posted by poisondeathray View Post
    Originally Posted by marcorocchini View Post
    where i can download iresize for avisynth?

    it's just a function. Copy & paste it from post #53 (the bottom part of the script)

    if you still want to sharpen it, you can add a bit more, but i would be conservative. Your imx file is oversharpened in camera (halos)

    you have to separate the fields before you apply any sharpening (you can't sharpen interlaced video directly). The ffmpeg sharpen might not be doing it correctly (needs interlaced flag)

    oh my five cats!
    Quote Quote  
  27. seems a beautiful conversion!

    Click image for larger version

Name:	ccatb.jpg
Views:	296
Size:	34.1 KB
ID:	26427
    Quote Quote  
  28. If you still wanted to sharpen it a little bit, you have to separate the fields. Most sharpen filters are not temporal (work only on current frame), but you might as well get into the habit of grouping odd/even fields.

    Just change both entries of sharpen(0.1) , but I wouldn't go above 0.2 for interlaced video . You can replace sharpen() ith more exotic "smarter" sharpening algorithms, but not all work in 422 (most only work in YV12, 420)

    Code:
    FFVideoSource()
    Colormatrix(mode="rec.709->rec.601", interlaced=true)
    IResize(720,576)
    
    AssumeTFF()
    SeparateFields() 
    Ev=SelectEven().sharpen(0.1)
    Od=SelectOdd().sharpen(0.1)
    Interleave(Ev,Od) 
    Weave()
    Last edited by poisondeathray; 15th Jul 2014 at 14:48.
    Quote Quote  
  29. Code:
    FFVideoSource("v:\C0034.mxf")
    
    ColorMatrix(mode="Rec.709->Rec.601")
    IResize(720,576)
    
    function IResize(clip Clip, int NewWidth, int NewHeight) {
      Clip
      SeparateFields() 
      Shift=(GetParity() ? -0.25 : 0.25) * (Height()/Float(NewHeight/2)-1.0)
      E  = SelectEven().Spline36resize(NewWidth, NewHeight/2, 0,    Shift)
      O  = SelectOdd( ).Spline36resize(NewWidth, NewHeight/2, 0,   -Shift)
      Ec = SelectEven().Spline36Resize(NewWidth, NewHeight/2, 0,  2*Shift)
      Oc = SelectOdd( ).Spline36Resize(NewWidth, NewHeight/2, 0, -2*shift)
      Interleave(E, O)
      IsYV12() ? MergeChroma(Interleave(Ec, Oc)) : Last
      Weave()
    }
    
    AssumeTFF()
    SeparateFields() 
    Ev=SelectEven().sharpen(0.20)
    Od=SelectOdd().sharpen(0.20)
    Interleave(Ev,Od) 
    Weave()
    Quote Quote  
Visit our sponsor! Try DVDFab and backup Blu-rays!