VideoHelp Forum
+ Reply to Thread
Results 1 to 22 of 22
Thread
  1. Hey everyone!

    I just start some test with "Dither_convert_8_to_16" filter, but I got problem when i used Dither_out filter

    here is my code:

    Code:
    ffvideoSource("E:\encoding\test_new\TEST[1080p].mkv") 
    Dither_convert_8_to_16()
    Dither_resize16nr(1280,720, csp =  "YV24") 
    Dither_out()
    the video resolution become 2560x720 .


    any help plz

    thanx.
    Image Attached Thumbnails Click image for larger version

Name:	Untitled.png
Views:	358
Size:	2.37 MB
ID:	44214  

    Last edited by alkoon; 30th Dec 2017 at 10:10.
    Quote Quote  
  2. Member Bernix's Avatar
    Join Date
    Apr 2016
    Location
    Europe
    Search Comp PM
    Can't this be a problem?
    Resizes a 16-bit clip.
    The function can resize interlaced content, but only if presented as separated, interleaved fields. It uses the Avisynth parity information to detect fields and maintain the correct chroma and luma positions. If this behaviour is not desired, add an AssumeFrameBased() before the resizing call.
    Bernix
    Quote Quote  
  3. This is completely normal. AviSynth (not AviSynth+) cannot natively handle >8 bit so if you view the script it will look like this with double width (basically it converts the 16 bits into 8+8 bits - there is also stacked variant). You just have to tell your encoder that input is actually 16 bit.

    E.g.:
    avs2pipemod -rawvideo "script.avs" | x264 - --demuxer raw --input-depth 16 --input-res 1280x720 --fps 24000/1001 -o "output.264"

    You can read about it in the Dither documentation. It's very good. (But not developed anymore AFAIK. People have switched to AviSynth+ or VapourSynth.)
    Quote Quote  
  4. Actually I have AviSynth+ (r1576) in my laptop, and in my server I have AviSynth 2.6
    in both I got same result , even with >>

    avs2pipemod -rawvideo "script.avs" | x264 - --demuxer raw --input-depth 16 --input-res 1280x720 --fps 24000/1001 -o "output.264"
    but everything is okay with I used DitherPost(), but Dither_out() is the right filter to use

    DitherPost = Adds the dither, turning a 16-bit clip generated by Dither1Pre, Dither2Pre or a mod16 denoiser into a regular 8-bit clip.
    Dither_out() =This function allows Avisynth to output 16-bit YUV pixel components
    so I think isn't okay to use DitherPost instead of Dither_out !

    thank you.
    Quote Quote  
  5. Are you encoding 10bit444 ? You have to use a 10bit x264 binary and specify --input-csp i444 --output-csp i444

    (If not 444 then why "YV24" in your script ?)
    Quote Quote  
  6. Two possible problems:

    A. As poisondeathray saw I missed the csp = "YV24". Then the command is a bit different:
    avs2pipemod -rawvideo "script.avs" | x264 - --demuxer raw --input-depth 16 --output-depth 10 --input-csp i444 --output-csp i444 --input-res 1280x720 --fps 24000/1001 -o "output.264"

    B. You are using AviSynth+ with ffms2. If ffms2 is recent and your source is not 8 bit it may be in non-8-bit-AviSynth+ format. But Dither package doesn't understand those and treats input like 8 bit. Then you get problems.

    To properly handle either:
    Code:
    ffvideoSource("E:\encoding\test_new\TEST[1080p].mkv") 
    ConvertBits(16)
    ConvertToStacked()
    Dither_resize16nr(1280,720, csp =  "YV24") 
    Dither_out()
    or simply with native AviSynth+
    Code:
    ffvideoSource("E:\encoding\test_new\TEST[1080p].mkv") 
    ConvertBits(16)
    ConvertToYUV444()
    Spline16Resize(1280, 720)
    For the last the command is a bit simpler:
    avs2pipemod -y4mp "script.avs" | x264 - --demuxer y4m --output-depth 10 --output-csp i444 -o "output.264"

    Originally Posted by poisondeathray View Post
    You have to use a 10bit x264 binary and specify --input-csp i444 --output-csp i444
    Note that for 10 bit output you may now need to specify --output-depth 10. Latest x264 now supports multi-depth builds (like x265).
    Quote Quote  
  7. her is my bat script

    avs2yuv test.avs - | x264.2851kMod.10bit.x86_64 --preset veryslow --crf 16 --input-depth 10 --input-csp i444 --output-csp i444 --deblock 1:-1 --aq-mode 2 --subme 10 --no-fast-pskip --chroma-qp-offset -3 --qcomp 0.65 --aq-strength 0.7 --fps 24000/1001 --output "testPC4.mkv" - --demuxer y4m
    Maybe i should use the Avisynth+ r2xx ver & up!!

    gonna download Avisynth+ r2580 ver and i will try.


    Thanx everyone =).
    Quote Quote  
  8. 1. Use avs2pipemod, not avs2yuv.
    2. Use the commands I used, don't change them however you like.

    If it still does not work show what script and command you are using now. There have been several examples and now I don't know what you are using right now.
    Quote Quote  
  9. where can i download the latest x264 ?

    I download from here http://www.x264.nl/x264_main.php & http://komisar.gin.by/

    both of them gives me an error, unknown --output-depth 10
    isn't --input-depth 10 enough ?!


    So I just tried this (without --output-depth 10 )

    script.avs :


    ffvideoSource("TEST[1080p].mkv")
    ConvertBits(16)
    ConvertToStacked()
    Dither_resize16nr(1280,720, csp = "YV24")
    Dither_out()
    trim(50,100)
    >> Video resolution become 2560x720

    bat:

    avs2pipemod.exe -y4mp "script.avs" | x26410b.exe - --demuxer y4m --input-depth 16 --input-res 1280x720 --output-csp i444 --fps 24000/1001 -o "output.264"

    the encoder couldn't encode the input file only 1 frame
    Image Attached Thumbnails Click image for larger version

Name:	Untitled.png
Views:	185
Size:	1.12 MB
ID:	44220  

    Last edited by alkoon; 30th Dec 2017 at 13:27.
    Quote Quote  
  10. Latest official binary is r2893. It's very recent, komisar doesn't have it yet. (x264.nl has been abandoned for years)
    Quote Quote  
  11. ok
    I used this one here :
    https://download.videolan.org/x264/binaries/win32 (x264-10b-r2851-ba24899.exe - 26-Jun-2017 20:04 )

    same I got an error :

    unknown --output-depth 10
    Quote Quote  
  12. 2851 < 2893
    Download the one at the very bottom.
    Quote Quote  
  13. ok
    bat:

    avs2pipemod.exe -y4mp "script.avs" | x264-r2893-b00bcaf.exe - --demuxer y4m --input-res 1280x720 --output-depth 10 --output-csp i444 -o "output.264"
    result: attachment
    Image Attached Thumbnails Click image for larger version

Name:	output.264_snapshot_00.00_[2017.12.30_23.37.40].png
Views:	213
Size:	4.71 MB
ID:	44222  

    Quote Quote  
  14. Don't mix and match commandlines. Only raw requires specifying parameters, y4m has header information and should convey info like resolution, frame rate

    It works for me with komisar's old 10bit x264 . I tested x86 . Mine is renamed to "x264k32_10.exe"

    Code:
    avs2pipemod -rawvideo input.avs | x264k32_10.exe --demuxer raw --input-depth 16 --input-res 1280x720 --fps 24 --input-csp i444 --output-csp i444 -o output.mp4 -
    input.mp4 was a "regular" 8bit AVC 1920x1080 24fps (not 23.976 like yours, so you would use --fps 24000/1001) . ffms2 would have worked too

    Code:
    LSmashVideoSource("F:\input.mp4")
    Dither_convert_8_to_16()
    Dither_resize16nr(1280,720, csp =  "YV24") 
    Dither_out()
    Quote Quote  
  15. Thank you guys, but the problem still exist with avs script

    this command help now to encode 1280x720 video, but the major problem still a same before & after encoding

    avs2pipemod.exe -rawvideo "script.avs" | x264-r2893-b00bcaf.exe - --demuxer raw --input-res 1280x720 --input-depth 10 --output-depth 10 --output-csp i444 -o "output.264"-

    before

    Click image for larger version

Name:	Untitled.png
Views:	88
Size:	1.23 MB
ID:	44235

    after


    Click image for larger version

Name:	output.264_snapshot_00.02_[2017.12.31_07.47.58].png
Views:	53
Size:	2.31 MB
ID:	44233
    Last edited by alkoon; 30th Dec 2017 at 22:01.
    Quote Quote  
  16. For what you do Vapoursynth instead of Avisynth might be a better choice, 64bit Vapoursynth, starting to forget about 32bit apps,
    I noticed that guys working with anime videos are jumping that direction.
    Quote Quote  
  17. How are you decoding the output file ?

    Cut a piece of your mkv with mkvtoolnix and upload the sample here
    Quote Quote  
  18. here it's :
    https://files.fm/f/pngrnbgn

    For what you do Vapoursynth instead of Avisynth might be a better choice, 64bit Vapoursynth, starting to forget about 32bit apps,
    I noticed that guys working with anime videos are jumping that direction.
    Actually I used Vapoursynth but still not familiar with it, but i think I'm going use it again.
    thank you guys for help =).
    Quote Quote  
  19. Originally Posted by alkoon View Post
    Thank you guys, but the problem still exist with avs script

    this command help now to encode 1280x720 video, but the major problem still a same before & after encoding

    avs2pipemod.exe -rawvideo "script.avs" | x264-r2893-b00bcaf.exe - --demuxer raw --input-res 1280x720 --input-depth 10 --output-depth 10 --output-csp i444 -o "output.264"-
    --input-csp i444 --input-depth 16 (--fps 24000/1001)
    Quote Quote  
  20. Thank very much guys (poisondeathray & sneaker)
    everything is okay now, I have got exactly what I want, finally =) .

    but I have one more question, this is what the input info should be, right?
    YUV-444-planar-8bit... etc.

    Click image for larger version

Name:	Untitled.png
Views:	65
Size:	4.0 KB
ID:	44247
    Quote Quote  
  21. That is the native AviSynth format as seen by avs2pipemod. 2560x720 at 8 bit. But we tricked by actually using it as 1280x720 16 bit and just tell x264 that's what coming. So everything is correct.
    Quote Quote  
  22. I got it, Thanks a lot.
    Last edited by alkoon; 1st Jan 2018 at 05:41.
    Quote Quote  



Similar Threads

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