VideoHelp Forum

Our website is made possible by displaying online advertisements to our visitors. Consider supporting us by disable your adblocker or Try ConvertXtoDVD and convert all your movies to DVD. Free trial ! :)
+ Reply to Thread
Results 1 to 8 of 8
Thread
  1. Hi cats,

    kindly I need help to do this operation:

    My attached input.avi is recognized by ffmpeg as 1920X1088 instead of 1080, so to "normalize" this input avi file is necessary to crop the source with a line of this kind:

    Code:
    -vf crop=1920:1080:0:0
    after this I need to scale it (jet 1920x1080) from hd to sd using a thing similar to this line

    Code:
    -vf yadif=1:tff,scale=720:576,unsharp=luma_msize_x=3:luma_msize_y=3:luma_amount=0.8,colormatrix=bt709:bt601,interlace -sws_flags lanczos+accurate_rnd
    but the input have to be treated with pc level using a thing similar to this line

    Code:
    -vf scale=interl=1:in_range=pc:out_range=pc
    I try various commandline but I get some error, please can anyone help me to do this 3 operation? I get alwais a HD output and/or not the tv-->pc levels

    Is there a way to do this 3 operation in a unique commandline? thanks
    Image Attached Files
    Quote Quote  
  2. Try -vf yadif=mode=1:parity=0,crop=h=1080:y=0,scale=w=720: h=576:in_range=pc:out_range=tv,interlace,setsar=16/11
    Also remember to enable proper interlaced encoding, parity and range in the encoder.
    Quote Quote  
  3. Code:
    IF "%FullHD%"=="1" v:\automazioneclip\core\ffmpeg.exe -y -i %4 -i "%audiosource%" -vf yadif=1:tff,crop=h=1080:y=0,scale=w=720:h=576:in_range=%inRange2%:out_range=%outRange2%,unsharp=luma_msize_x=3:luma_msize_y=3:luma_amount=0.8,colormatrix=bt709:bt601,interlace -pix_fmt yuv420p -c:v libx264 -profile:v main -level:v 3 -g 33 -bf 2 -crf 15 -flags +ildct+ilme -top 1 %AudioSettings% %anFlag% -aspect 16:9 "%~n1_Mp4_SDdownscale_420PortaAPorta_%panState%.mov"
    thanks, it works!
    Quote Quote  
  4. Originally Posted by marcorocchini View Post
    Code:
    IF "%FullHD%"=="1" v:\automazioneclip\core\ffmpeg.exe -y -i %4 -i "%audiosource%" -vf yadif=1:tff,crop=h=1080:y=0,scale=w=720:h=576:in_range=%inRange2%:out_range=%outRange2%,unsharp=luma_msize_x=3:luma_msize_y=3:luma_amount=0.8,colormatrix=bt709:bt601,interlace -pix_fmt yuv420p -c:v libx264 -profile:v main -level:v 3 -g 33 -bf 2 -crf 15 -flags +ildct+ilme -top 1 %AudioSettings% %anFlag% -aspect 16:9 "%~n1_Mp4_SDdownscale_420PortaAPorta_%panState%.mov"
    thanks, it works!
    Code:
    IF "%FullHD%"=="1" v:\automazioneclip\core\ffmpeg.exe -y -i %4 -color_range 2 -i "%audiosource%" -vf yadif=1:tff,crop=h=1080:y=0,scale=w=720:h=576:in_range=%inRange2%:out_range=%outRange2%,unsharp=luma_msize_x=3:luma_msize_y=3:luma_amount=0.8,colormatrix=bt709:bt601,interlace -color_range 1 -pix_fmt yuv420p -c:v libx264 -profile:v main -level:v 3 -g 33 -bf 2 -crf 15 -flags +ildct+ilme -top 1 %AudioSettings% %anFlag% -aspect 16:9 "%~n1_Mp4_SDdownscale_420PortaAPorta_%panState%.mov"
    May work better, i would also unsharp before resize and i would specify for scaler flags too for example:
    Code:
    scale=w=720:h=576:sws_flags=spline+accurate_rnd+full_chroma_int+full_chroma_inp:sws_dither=0:in_range=1:out_range=1
    Quote Quote  
  5. Hi c*t, please consider this isput source: C0007.MXF

    https://dl.dropboxusercontent.com/u/39871584/C0007.MXF

    this is an interlace 1440x1080 25fps video file

    I need to downscale it, at the best quality, to SD 720x576 and upscale to HD 1920X1080

    target file should be MP4 H.264 (x264) 4:2:2 for both

    Code:
    ffmpeg.exe -y -i c0007.mxf -color_range 2 -vf yadif=1:tff,scale=w=720:h=576:sws_flags=spline+accurate_rnd+full_chroma_int+full_chroma_inp:sws_dither=0:in_range=tv:out_range=tv,unsharp=luma_msize_x=3:luma_msize_y=3:luma_amount=0.8,colormatrix=bt709:bt601,interlace -color_range 1 -pix_fmt yuv422p -c:v libx264 -profile:v high422 -level:v 3 -g 33 -bf 2 -crf 15 -flags +ildct+ilme -top 1 -an -aspect 16:9 outSD.mp4
    Code:
    ffmpeg.exe -y -i c0007.mxf -color_range 2 -vf yadif=1:tff,scale=w=1920:h=1080:sws_flags=spline+accurate_rnd+full_chroma_int+full_chroma_inp:sws_dither=0:in_range=tv:out_range=tv,unsharp=luma_msize_x=3:luma_msize_y=3:luma_amount=0.8,interlace -color_range 1 -pix_fmt yuv422p -c:v libx264 -profile:v high422 -level:v 3 -g 33 -bf 2 -crf 15 -flags +ildct+ilme -top 1 -an -aspect 16:9 outFullHD.mp4
    is this correct?
    Last edited by marcorocchini; 26th Feb 2017 at 05:23.
    Quote Quote  
  6. Originally Posted by marcorocchini View Post
    is this correct?
    Seem to be OK - however you may consider to use zscale https://ffmpeg.org/ffmpeg-filters.html#zscale instead sws_scale - accordingly to some people it should provide better resize quality.

    Code:
    zscale=d=ordered:f=spline36:r=full:w=iw/2:h=-2
    Quote Quote  
  7. ah ok but my commandline how should be become?
    Quote Quote  
  8. HD
    Code:
    -vf yadif=1:tff,zscale=w=1920:h=1080:f=spline36:r=full,unsharp=luma_msize_x=3:luma_msize_y=3:luma_amount=0.8,interlace
    SD
    Code:
    -vf yadif=1:tff,zscale=w=720:h=576:f=spline36:r=full,unsharp=luma_msize_x=3:luma_msize_y=3:luma_amount=0.8,colormatrix=bt709:bt601,interlace
    Quote Quote  



Similar Threads