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 23 of 23
Thread
  1. extreme newbie and would appreciate all the help. I think I am overcomplicating things.

    preface: would like to continue to use vapoursynth as i use it for resizing and its filters, and prefer it that way. i use photoshop because it's nothing extensive but the differences in outputs are personally bothersome. thank you

    text from .bat that file is dragged into to encode when using avisynth

    del C:\video\temp\avs.avs
    C:\video\ffmpeg -ss %timestamp% -i %1 -y -c:v libx264 -preset ultrafast -qp 0 -t 00:00:12.000 C:\video\temp\bat_cut.mkv
    "C:\Program Files\AviSynth 2.5\plugins\ffmsindex" -f C:\video\temp\bat_cut.mkv
    echo FFmpegSource2("C:\video\temp\bat_cut.mkv") >> C:\video\temp\avs.avs
    echo #timestamp entered:%timestamp% >> C:\video\temp\avs.avs
    echo #video: %1 >> C:\video\temp\avs.avs
    type C:\video\template.txt >> C:\video\temp\avs.avs
    C:\video\AvsPmod\AvsPmod.exe C:\video\temp\avs.avs
    C:\video\vdub\VirtualDub.exe /i C:\video\save_as_avi.vcf C:\video\temp\avs.avs C:\video\temp\video.avi

    argument in vapoursynth editor i use

    -f yuv4mpegpipe -colorspace bt709 -i - -vcodec rawvideo -pix_fmt rgb24 -sws_flags full_chroma_int+accurate_rnd -y /Users/vvbb/vapoursynth/output/output.mov

    my workflow is .mp4 (in this case) or .mkv source > vapoursynth > import frames into photoshop (.avi no longer supported and I no longer have pc). there's a difference in outputs though, andiím not sure if it comes down to the container or the compression or the colorspace, but hereís the script from avspmod
    resamplehq(srcmatrix="TV.709",dstcolorspace="RGB32 ")
    in vapoursynth editor: 

    video = core.fmtc.resample(video, css="444"))
    the editor then lists the output video info, and the format is always YUV444P8. and then the header for the encoding is y4m, and the executable is ffmpeg. the arguments are
    -f yuv4mpegpipe -colorspace bt709 -i - -vcodec rawvideo -pix_fmt rgb24 -sws_flags full_chroma_int+accurate_rnd -y /Users/vvbb/vapoursynth/output/output.mov
    I tried changing .mov in the argument to .mp4 (maybe .mp4 would be better I thought? but the .avi file that quicktime converted into .mov looks closer to what i want than .mp4) but the file showed 0 bytes and cannot be imported into photoshop. then I tried changing the file name directly to .mp4 but it's still as bad as .mov.

    Then I thought since the .bat used x264, container wasnít the problem and tried:
    -f yuv4mpegpipe -colorspace bt709 -i - -vcodec libx264 -pix_fmt yuv420p -sws_flags full_chroma_int+accurate_rnd -y /Users/vbb/vapoursynth/output/output.mov
    but the quality ends up being worse and still not close to the original .avi output. the codec info also still reads yuv so iím doing something useless

    quicktime converted the .avi files I had saved into .mov, and i imported them into photoshop that way to compare again. it's closer to what i want compared to vapoursynth's .mov output. i darkened the images attached (same settings applied to each image) to show the difference. noticeable when zoomed in also.

    original source was .mp4 and its codec was 4:2:0 yuv

    its vs output is .mov and its codec rgb (rv24)

    the avisynth output i have saved is .avi and its codec is also rgb (rv24). I'm just getting those details from vlc unless that's wrong.
    Last edited by vvbb; 5th Oct 2019 at 20:58.
    Quote Quote  
  2. You're probably overcomplicating things

    What are you using avisynth or vapoursynth for ?

    original source was .mp4 and its codec was 4:2:0 yuv
    PS can open most types of AVC in MP4 natively . If it's a MKV , remux it to MP4
    Quote Quote  
  3. is it okay if I message you?
    Quote Quote  
  4. Originally Posted by vvbb View Post
    is it okay if I message you?
    Yes

    -----

    The BG info is some resizing and filters being applied;


    I'm going to answer here in case someone else has the same problem:

    If you are sending something to photoshop , it works in RGB . It doesn't make sense to convert to YUV444 then back to YUV420 . You minimize the loss if you convert once to some RGB format for import

    RGB doesn't compress very well. If you want lossless 8bit RGB, the filesizes are going to be large.

    The common formats for RGB in MOV container that PS supports are PNG in MOV, and QTRLE in MOV. PNG offers lossless compression, so the filesizes will be smaller than QTRLE

    So the output node of the vpy script should be RGB24 (assuming you don't want alpha channel, piping is slightly different if you need to pipe alpha channel)

    You would pipe rawvideo with vspipe. RGB24 planar in ffmpeg is "gbrp"

    It would look like this. Enter the values for width, height, framerate
    Code:
    vspipe input.vpy - | ffmpeg -f rawvideo -pix_fmt gbrp -s <widthxheight> -r <framerate> -i - -c:v png -an output.mov
    Quote Quote  
  5. I don't know if this works on the Mac version of PS , but you can try using AVFS to mount a "virtual" AVI , using the VPY script.

    It works on PS windows; but because this "looks" like uncompressed RGB24 AVI, I think it might work on a Mac as well . The benefit would be no large intermediate files. Worth a try.
    Quote Quote  
  6. My commandline
    Code:
    vspipe test.vpy - | ffmpeg -f rawvideo -pix_fmt gbrp -s 800x500 -r 30 -i - -c:v png -an -y /Users/vvbb/vapoursynth/output/output.mov
    but then the encoding is aborted and shows the following:

    Input #0, rawvideo, from 'pipe:':
    Duration: N/A, start: 0.000000, bitrate: 67536 kb/s
    Stream #0:0: Video: rawvideo (G3[0][8] / 0x8003347), gbrp, 268x350, 67536 kb/s, 30 tbr, 30 tbn, 30 tbc
    [NULL @ 0x7fa8ef800000] Unable to find a suitable output format for 'vspipe'
    vspipe: Invalid argument

    How else are you piping? -f yuv4mpegpipe ?
    the command I had originally
    Code:
    -f yuv4mpegpipe -colorspace bt709 -i - -vcodec rawvideo -pix_fmt rgb24 -sws_flags full_chroma_int+accurate_rnd -y /Users/vvbb/vapoursynth/output/output.mov
    Image Attached Thumbnails Click image for larger version

Name:	header.png
Views:	5
Size:	22.5 KB
ID:	50242  

    Quote Quote  
  7. Select "no header" instead of Y4M . Because you are piping "rawvideo"

    Since you are using vsedit ( the editor GUI) to encode, the arguments box would look like

    Code:
    -f rawvideo -pix_fmt gbrp -s 800x500 -r 30 -i - -c:v png -an -y /Users/vvbb/vapoursynth/output/output.mov

    In windows, it looks like vsedit is swapping the R,G,B channels in different order when it's piping

    If the colors look "wrong" in the output file, almost like a "negative", you might have to add to your script

    clip = core.std.ShufflePlanes(clip, planes=[1,2,0], colorfamily=vs.RGB)

    Using vspipe directly does not have the problem
    Quote Quote  
  8. Post your full script . The output node should be RGB24 before pipe

    What does this report about your script

    Code:
    vspipe --info test.vpy -
    Quote Quote  
  9. my script (quickly testing without filters and all that)

    Code:
    video = core.fmtc.resample(video, css="444")
    video = descale.Debilinear(video, 896,504)
    
    video = core.std.ShufflePlanes(video, planes=[1,2,0], colorfamily=vs.RGB)
    video = core.resize.Bicubic(video, format=vs.RGB24, matrix_in_s="709")
    Script was successfully evaluated. Output video info:
    Frames: 120 | Time: 0:00:04.009 | Size: 800x500 | FPS: 59925/2002 = 29.9326 | Format: RGB24
    Command line:
    2019-09-21 22:56:41.038
    Command line:
    "/usr/local/bin/ffmpeg" vspipe --info test.vpy -
    Checking the encoder sanity.
    ffmpeg version 4.1.3 Copyright (c) 2000-2019 the FFmpeg developers
    built with Apple LLVM version 10.0.1 (clang-1001.0.46.4)
    configuration: --prefix=/usr/local/Cellar/ffmpeg/4.1.3_1 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags='-I/Library/Java/JavaVirtualMachines/adoptopenjdk-11.0.2.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/adoptopenjdk-11.0.2.jdk/Contents/Home/include/darwin' --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libmp3lame --enable-libopus --enable-librubberband --enable-libsnappy --enable-libtesseract --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp --enable-libspeex --enable-videotoolbox --disable-libjack --disable-indev=jack --enable-libaom --enable-libsoxr
    libavutil 56. 22.100 / 56. 22.100
    libavcodec 58. 35.100 / 58. 35.100
    libavformat 58. 20.100 / 58. 20.100
    libavdevice 58. 5.100 / 58. 5.100
    libavfilter 7. 40.101 / 7. 40.101
    libavresample 4. 0. 0 / 4. 0. 0
    libswscale 5. 3.100 / 5. 3.100
    libswresample 3. 3.100 / 3. 3.100
    libpostproc 55. 3.100 / 55. 3.100
    Unrecognized option '-info'.
    Error splitting the argument list: Option not found
    Encoder seems sane. Starting.
    Encoder started. Beginning encoding.
    ffmpeg version 4.1.3 Copyright (c) 2000-2019 the FFmpeg developers
    built with Apple LLVM version 10.0.1 (clang-1001.0.46.4)
    configuration: --prefix=/usr/local/Cellar/ffmpeg/4.1.3_1 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags='-I/Library/Java/JavaVirtualMachines/adoptopenjdk-11.0.2.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/adoptopenjdk-11.0.2.jdk/Contents/Home/include/darwin' --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libmp3lame --enable-libopus --enable-librubberband --enable-libsnappy --enable-libtesseract --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp --enable-libspeex --enable-videotoolbox --disable-libjack --disable-indev=jack --enable-libaom --enable-libsoxr
    libavutil 56. 22.100 / 56. 22.100
    libavcodec 58. 35.100 / 58. 35.100
    libavformat 58. 20.100 / 58. 20.100
    libavdevice 58. 5.100 / 58. 5.100
    libavfilter 7. 40.101 / 7. 40.101
    libavresample 4. 0. 0 / 4. 0. 0
    libswscale 5. 3.100 / 5. 3.100
    libswresample 3. 3.100 / 3. 3.100
    libpostproc 55. 3.100 / 55. 3.100
    Unrecognized option '-info'.
    Error splitting the argument list: Option not found
    2019-09-21 22:56:42.343
    Encoder has suddenly stopped accepting data. Aborting.
    2019-09-21 22:56:42.492
    Error on frame 1 request:
    Resize error 1026: RGB color family cannot have YUV matrix coefficients
    Error on frame 2 request:
    Resize error 1026: RGB color family cannot have YUV matrix coefficients
    Error on frame 0 request:
    Resize error 1026: RGB color family cannot have YUV matrix coefficients
    Error on frame 3 request:
    Resize error 1026: RGB color family cannot have YUV matrix coefficients
    I only put the matrix 709 because avisynth script also had. I removed that line, and output is still rgb24 but it looks like this in the preview.

    Command line:
    "/usr/local/bin/ffmpeg" vspipe --info test.vpy -

    Unrecognized option '-info'.
    Error splitting the argument list: Option not found

    Thank you for the continued help
    Image Attached Thumbnails Click image for larger version

Name:	preview.png
Views:	6
Size:	273.0 KB
ID:	50243  

    Quote Quote  
  10. With the following:

    video = core.fmtc.resample(video, css="444")
    video = descale.Debilinear(video, 896,504)
    video = core.std.ShufflePlanes(video, planes=[1,2,0], colorfamily=vs.RGB)

    Size: 800x500 | FPS: 59925/2002 = 29.9326 | Format: RGB24

    no header and arguments:

    -f rawvideo -pix_fmt gbrp -s 800x500 -r 30 -i - -c:v png -an -y /Users/vvbb/vapoursynth/output/output.mov

    Input #0, rawvideo, from 'pipe:':
    Duration: N/A, start: 0.000000, bitrate: 288000 kb/s
    Stream #0:0: Video: rawvideo (G3[0][8] / 0x8003347), gbrp, 800x500, 288000 kb/s, 30 tbr, 30 tbn, 30 tbc
    Stream mapping:
    Stream #0:0 -> #0:0 (rawvideo (native) -> png (native))
    Output #0, mov, to '/Users/vvbb/vapoursynth/output/output.mov':
    Metadata:
    encoder : Lavf58.20.100
    Stream #0:0: Video: png (png / 0x20676E70), rgb24, 800x500, q=2-31, 200 kb/s, 30 fps, 15360 tbn, 30 tbc
    Metadata:
    encoder : Lavc58.35.100 png

    but then I get this
    Image Attached Thumbnails Click image for larger version

Name:	lakega.png
Views:	6
Size:	88.6 KB
ID:	50244  

    Quote Quote  
  11. When using command lines directly, you would do it from terminal, not vsedit

    I think vsedit is adding the ffmpeg .
    Command line:
    "/usr/local/bin/ffmpeg" vspipe --info test.vpy -

    Frames: 120 | Time: 0:00:04.009 | Size: 800x500 | FPS: 59925/2002 = 29.9326 | Format: RGB24
    But the script, and this info from vsedit is enough

    Note the framerate is "non standard" 29.9326 ; might be a source filter issues, or what is the source video ? VFR ? . This might indicate other issues



    The shuffleplanes would have to come after converting to RGB24, because you're changing the order of R,G,B

    Code:
    video = core.fmtc.resample(video, css="444")
    video = descale.Debilinear(video, 896,504)
    
    video = core.resize.Bicubic(video, format=vs.RGB24, matrix_in_s="709")
    video = core.std.ShufflePlanes(video, planes=[1,2,0], colorfamily=vs.RGB)
    And your dimensions are 896 x 504 after debilinear , why does it report Size: 800x500 ? Doesn't add up

    If the color is "off" try taking out the ShufflePlanes
    Quote Quote  
  12. this works for me, encoding directly in vapoursynth:
    Code:
    import vapoursynth as vs
    from vapoursynth import core
    import subprocess
    
    ffmpeg = r'C:\path\ffmpeg.exe'
    destination = r'F:\output.mov'
    clip = core.ffms2.Source(r'C:/video.mp4')
    
    #frames
    start = 0
    end   = 30
    
    clip=clip[start:end]
    
    def progress(current, total):
        print(f'{current},{total}  ', end = '\r')
    
    cmd = [
            ffmpeg,
            '-i', '-',
            '-y',
            '-f', 'rawvideo', 
            '-pix_fmt',  'gbrp',
            '-s', f'{clip.width}x{clip.height}',
            '-r', f'{clip.fps}',
            '-c:v', 'png',
            '-an',
            destination
          ]
    process = subprocess.Popen(cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE)
    clip.output(process.stdin, y4m=True, progress_update=progress) 
    process.communicate()
    Quote Quote  
  13. the source video is 1280x720 .mp4

    the 896x504 is what i resized it to (i'm not sure how to explain) but the dimensions of the file are still 800x500

    when I take out the shuffleplanes line, the output video info says the Format: YUV444P8. I kept the same arguments but the color is still off

    in terminal, it says vspipe: command not found
    Quote Quote  
  14. Originally Posted by vvbb View Post
    the source video is 1280x720 .mp4

    the 896x504 is what i resized it to (i'm not sure how to explain) but the dimensions of the file are still 800x500
    Is the preview 896x504 in vsedit ?

    Did you change the commandline to reflect the actual dimensions (not 800x500)


    Code:
    -f rawvideo -pix_fmt gbrp -s 896x504 -r 30 -i - -c:v png -an -y /Users/vvbb/vapoursynth/output/output.mov

    when I take out the shuffleplanes line, the output video info says the Format: YUV444P8. I kept the same arguments but the color is still off
    Not possible; this line converts to RGB

    video = core.resize.Bicubic(video, format=vs.RGB24, matrix_in_s="709")

    I think you have mixed up the order somewhere
    in terminal, it says vspipe: command not found
    You need the correct path, from wherever vspipe is on your system
    Quote Quote  
  15. in preview in vs edit, the size is 800x500

    script > arguments: -f rawvideo -pix_fmt gbrp -s 800x500 -r 29.9326 -i - -c:v png -an -y /Users/vvbb/vapoursynth/output/output.mov > open terminal to vspipe
    am i correct?

    I believe the vapoursynth installation script I used removed vspipe. I can't find it in my system.

    with these lines

    video = core.std.ShufflePlanes(video, planes=[1,2,0], colorfamily=vs.RGB)
    video = core.resize.Bicubic(video, format=vs.RGB24, matrix_in_s="709")

    I get Resize error 1026: RGB color family cannot have YUV matrix coefficients

    and

    video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
    Output file is empty, nothing was encoded (check -ss / -t / -frames parameters if used)
    Quote Quote  
  16. Originally Posted by vvbb View Post
    in preview in vs edit, the size is 800x500
    Post your FULL script. Everything. Source filter. Everything



    with these lines

    video = core.std.ShufflePlanes(video, planes=[1,2,0], colorfamily=vs.RGB)
    video = core.resize.Bicubic(video, format=vs.RGB24, matrix_in_s="709")

    I get Resize error 1026: RGB color family cannot have YUV matrix coefficients

    and

    video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
    Output file is empty, nothing was encoded (check -ss / -t / -frames parameters if used)

    Wrong order . Again, ShufflePlanes has to come AFTER you 've converted to RGB . See post #11

    Code:
    video = core.resize.Bicubic(video, format=vs.RGB24, matrix_in_s="709")
    video = core.std.ShufflePlanes(video, planes=[1,2,0], colorfamily=vs.RGB)
    Quote Quote  
  17. thank you. it encoded properly, but there's still a noticeable difference between this output versus an .avi one

    but at this point (clearly in over my head), I suppose I just want to know what the reason for that is

    much appreciated
    Quote Quote  
  18. Originally Posted by vvbb View Post
    thank you. it encoded properly, but there's still a noticeable difference between this output versus an .avi one

    but at this point (clearly in over my head), I suppose I just want to know what the reason for that is

    much appreciated

    In what way? Describe the difference

    That MOV should look identical to what you see in vsedit preview




    Was the script for the AVI different using avisynth ? There is a lot of missing information you have not provided . For example, the avs script

    And the dimension discrepancy and framerate issue in vapoursynth - there's more going on here than you're describing. Things are not adding up, or you haven't provided enough info
    Quote Quote  
  19. Originally Posted by vvbb View Post
    video = descale.Debilinear(video, 896,504)
    Note that "debilinear" has a specific purpose - to "undo" a bilinear upscale . If this is not your case, you will probably not get the desired outcome



    Originally Posted by vvbb View Post
    resamplehq(srcmatrix="TV.709",dstcolorspace="RGB32 ")

    If it was "resamplehq" (gamma aware scaling) in the AVS , there is a resamplehq for vapoursynth too.
    http://vsdb.top/plugins/resamplehq


    Enter the output width , output height in the 2nd line

    import resamplehq
    .
    .
    video = resamplehq.resample_hq(video, width=width, height=height)
    .
    .
    #You might have to change to RGB24 if piping RGB out. I think resample_hq changes back to the input pixel format automatically
    .
    .
    video = core.resize.Bicubic(video, format=vs.RGB24, matrix_in_s="709")
    #if the colors are "wrong" add the ShufflePlanes





    Or you can do it with the default Resize by using srgb to linear for the transfer, apply the resize, Then linear back to srgb for the final RGB24 format

    Enter the output width , output height in the 2nd line

    video = core.resize.Bicubic(video, format=vs.RGBS, matrix_in_s="709", transfer_in_s="srgb", transfer_s="linear")
    video = core.resize.Bicubic(video, format=vs.RGBS, width=width, height=height)
    video = core.resize.Bicubic(video, format=vs.RGB24, transfer_in_s="linear", transfer_s="srgb")



    If you want more help post the full AVS and VPY scripts
    Quote Quote  
  20. edit: nevermind; it still bothering me. will just lay it out all here. appreciative of the help

    this was the avs script I had saved:

    Code:
    FFmpegSource2("C:\video\temp\bat_cut.mkv") 
    #timestamp entered: 00:03:50 
    #video: "Z:\filename.mp4" 
    
    #trim(
    #separatefields()
    #complementparity()
    
    size=20 
    
    resamplehq(srcmatrix="TV.709",dstcolorspace="RGB32").debilinear(#,#)
    
    #crop(#,#,#,#)
    
    last
    and then virtualdub started. I don't know what the output was in virtualdub but the codec info for the .avi file read 24 bits rgb (rv24)

    this is my current .vpy script
    Code:
    import os
    import vapoursynth as vs
    import havsfunc as haf
    import mvsfunc as mvs
    import descale as descale
    import muvsfunc as muvs
    import resamplehq as rhq
    import csmod as cs
    import hnwvsfunc as hnw
    import dither as dither
    core = vs.get_core()
    
    path = os.path.join(os.path.expanduser('~'), 'vapoursynth', 'video_cut', 'cut.mkv')
    
    video = core.lsmas.LWLibavSource(source=path)
    
    video = core.std.Trim(video, #, #)
    
    video = core.fmtc.resample(video, css="444")
    video = descale.Debilinear(video, #, #)
    video = core.resize.Bicubic(video, format=vs.RGB24, matrix_in_s="709")
    video = core.std.ShufflePlanes(video, planes=[1,2,0], colorfamily=vs.RGB)
    video = core.std.CropRel(video, left=#, top=#, right=#, bottom=#)
    
    video.set_output()
    new arguments:
    Code:
    -f rawvideo -pix_fmt gbrp -s wxh -r # -i - -c:v png -an -y /Users/vvbb/vapoursynth/output/output.mov
    previously it was this:

    Code:
    (the lines above this were still the same)
    
    video = core.fmtc.resample(video, css="444")
    video = descale.Debilinear(video, #, #)
    
    video = core.std.CropRel(video, left=#, top=#, right=#, bottom=#)
    
    video = core.fmtc.bitdepth(video, bits=8)
    video.set_output()
    ouptut for that was YUV444P8 and arguments were
    Code:
    -f yuv4mpegpipe -colorspace bt709 -i - -vcodec rawvideo -pix_fmt rgb24 -sws_flags full_chroma_int+accurate_rnd -y /Users/vvbb/vapoursynth/output/output.mov
    source for both scripts was .mp4.

    I tried the following also but the output was same.

    Code:
    video = rhq.resample_hq(video, #, #)
    video = descale.Debilinear(video, #, #) 
    video = core.resize.Bicubic(video, format=vs.RGB24, matrix_in_s="709")
    video = core.std.ShufflePlanes(video, planes=[1,2,0], colorfamily=vs.RGB)
    
    video = core.std.CropRel(video, left=#, top=#, right=#, bottom=#)
    
    video = core.fmtc.bitdepth(video, bits=8)
    Last edited by vvbb; 3rd Oct 2019 at 21:08.
    Quote Quote  
  21. That screenshot difference cannot be explained from resamplehq. It might be differences in debilinear algorithm; the avs version is closed source, vpy version open . That would be the most likely explanation

    http://avisynth.nl/index.php/Debilinear
    https://github.com/Irrational-Encoding-Wizardry/vapoursynth-descale

    Those are your only 2 filters . The other possibility is some decoding issue or difference from source filter (unlikely)

    If you upload a source sample, with your exact script (dimensions, not just variables), I can check to see why there is a difference and what you can do about it


    or...

    quicktime converted the .avi files I had saved into .mov, and i imported them into photoshop that way to compare again. it's closer to what i want compared
    If you still have the AVI files - Why not just convert those?

    What does mediainfo(view=>text) or ffmpeg say about the AVI files?

    If they are already RGB , it might be as simple as

    ffmpeg -i input.avi -c:v png output.mov

    And ffmpeg is easily batchable

    But rv24 is uncommon, there might be other issues. If you are having problems with that, upload a cut sample of that AVI
    Quote Quote  
  22. mediainfo says:

    Format : AVI
    Format/Info : Audio Video Interleave
    File size : 110 MiB
    Duration : 5 s 40 ms
    Overall bit rate : 184 Mb/s
    Writing library : VirtualDub build 35491/release

    Video
    ID : 0
    Format : RGB
    Codec ID : 0x00000000
    Codec ID/Info : Basic Windows bitmap format. 1, 4 and 8 bpp versions are palettised. 16, 24 and 32bpp contain raw RGB samples
    Duration : 5 s 40 ms
    Bit rate : 184 Mb/s
    Width : 612 pixels
    Height : 500 pixels
    Display aspect ratio : 1.224
    Frame rate : 25.000 FPS
    Bit depth : 8 bits
    Bits/(Pixel*Frame) : 24.000
    Stream size : 110 MiB (100%)
    I no longer have windows to output .avi with avisynth, and I do prefer vapoursynth overall.

    Here's another test (borrowed PC; sorry for late reply). The original video is this, and I downloaded it as .mp4

    And I compared both in VLC. The difference in quality is more noticeable in photoshop.

    avisynth script was simply:

    resamplehq(srcmatrix="TV.709",dstcolorspace="RGB32 ").debilinear(1008,504)
    crop(4,3,-392,-1)

    vapoursynth script (what I originally use and all the same "import" lines I commented before):

    core = vs.get_core()
    path = os.path.join(os.path.expanduser('~'), 'vapoursynth', 'video_cut', 'cut.mkv')
    video = core.lsmas.LWLibavSource(source=path)

    video = core.fmtc.resample(video, css="444")
    video = descale.Debilinear(video, 1008, 504)
    video = core.std.CropRel(video, left=4, top=3, right=392, bottom=1)
    video = core.fmtc.bitdepth(video, bits=8)
    video.set_output()

    thanks!
    Image Attached Files
    Quote Quote  
  23. I can see the difference. But I'm not sure why you would want the avs version - it has more line artifacts, for example in the water . The main difference is due to the debilinear version differences

    If you just compare just the first step - the RGB conversion using resamplehq in avs vs. Using different types, different settings, they are pretty close.

    By default, avs resamplehq uses spline36 for Y, and bilinear for CbCr resizing. You are not resampling the Y in that script with resamplehq. But you can specify the same kernals and chroma locations in vapoursynth too. (Avs resizers use different chroma interpolation by default, preserving the center) . But those differences are minor compared to the debilinear differences.

    Those characteristic artifacts only appear when avs debilinear is applied. As mentioned earlier, the avs version is closed source, so I don't know how to emulate it exactly . You can import avs scripts and load avs .dll's in vapoursynth, but you might have problems on a mac with that (not sure)
    Quote Quote  



Similar Threads