VideoHelp Forum




+ Reply to Thread
Results 1 to 9 of 9
  1. I am trying to convert some old anime from the 90's and early 00's.

    I use this argument to convert to x265:

    -c:v libx265 -crf:v 24 -tune:v animation -x265-params "aq-mode=3:aq-strength=0.65:bframes=4:keyint=240:min-keyint=24"

    But the result ends with these lines:



    I was told i have to deinterlace it, so i added -vf yadif=1 to the argument, but the result were blurry lines and low quality. Like, the video is watchable and those lines disappear, but the drawings are sightly more blurry compared to the sharp drawings of the originals.

    See:



    Right is original, left encode.
    Notice how you can clearly see the line between the shoe and the black socks on the right, but on the left is so blurry it's not visible!
    It's just not as sharp.

    I tried a much lower crf but the result never looked as detailed/sharp as the original, so -vf yadif=1 is somehow ruining the quality of the outputs.

    How can i fix this?
    Quote Quote  
  2. Usually anime will be progressive content, just telecined for DVD

    You would need to inverse telecine to recover the original progressive film frames. Deinterlacing with yadif just reduces resolution in 1/2 because it's interpolating from 1 field, that's why it looks blurry . Field matching combines both partner fields, for full resolution

    For NTSC DVD (assuming that's what it is), sometimes ffmpeg can mess up reading the timecodes, so you should set the FPS . Yadif is only used for combed frames after the field matching, such as orphaned fields

    Code:
    -vf "fps=30000/1001,fieldmatch,yadif=deint=interlaced,decimate"
    Quote Quote  
  3. Try a field match and decimate: -vf "fieldmatch=order=tff,decimate=cycle=5:"
    Quote Quote  
  4. Thank you both for your answers.

    Originally Posted by poisondeathray View Post
    Usually anime will be progressive content, just telecined for DVD

    You would need to inverse telecine to recover the original progressive film frames. Deinterlacing with yadif just reduces resolution in 1/2 because it's interpolating from 1 field, that's why it looks blurry . Field matching combines both partner fields, for full resolution

    For NTSC DVD (assuming that's what it is), sometimes ffmpeg can mess up reading the timecodes, so you should set the FPS . Yadif is only used for combed frames after the field matching, such as orphaned fields

    Code:
    -vf "fps=30000/1001,fieldmatch,yadif=deint=interlaced,decimate"
    This improved somewhat, but there are still some differences.



    Original on the right.
    Your vf on the left.

    This works, the quality improved, but there are still liiiitle differences in the bone line being longer on the right and shoe definition being more noticeable. How can i make these settings stronger, so i get a better result that is almost 100% like the original?

    I think that if make these settings stronger it will completely work.

    Originally Posted by jagabo View Post
    Try a field match and decimate: -vf "fieldmatch=order=tff,decimate=cycle=5:"
    I tried this, but the video i got as result was 6 seconds shorter and the audio was obviously displaced.
    I do not know why.



    Also, in both method i got this too:

    Quote Quote  
  5. I think the filter sequence I used only works for 100 percent hard telecined video. For a mix of hard/soft telecine you'll need to specify the fps parameter. In fact, it wouldn't hurt to always specify the fps parameter for NTSC DVD sources.

    As for the "still interlaced" frames, PDR's addition of the yadif filter may take care of any frames still interlaced after fieldmatch (generally from orphaned fields or field blending).

    For the loss of detail/sharpness you might be able to fine tune so of the fieldmatch parameters:
    https://ffmpeg.org/ffmpeg-filters.html#fieldmatch

    The post fieldmatch yadif may be causing some of that too:
    https://ffmpeg.org/ffmpeg-filters.html#yadif-1

    For more complex cases you may need to use AviSynth.

    Upload a short sample of your source that shows the problems (don't re-encode). For more detailed help...
    Quote Quote  
  6. In your last screenshot, the loss in shoe definition in the shadow area looks more like lossy encoding problem, not a filtering problem such as deinterlacing vs. field matching.

    Use better encoding settings and/or higher bitrate , lower crf
    Quote Quote  
  7. Yes, he should try a lossless setting (crf=0) and compare that result to the source to be sure where the losses are coming from.
    Quote Quote  
  8. Note for libx265, crf=0 is not lossless. You need to enable lossless encoding with the lossless switch

    Code:
     -x265-params lossless=1
    Quote Quote  
  9. Thanks, I didn't know that (I don't use use x265 much).
    Quote Quote  



Similar Threads

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