VideoHelp Forum
+ Reply to Thread
Page 76 of 76
FirstFirst ... 26 66 74 75 76
Results 2,251 to 2,277 of 2277
Thread
  1. Originally Posted by Selur View Post
    After the cropping your source has a resolution of 690x566 then you told Hybrid to divide the width by 2.00 this results in a resolution of 345x566.
    Problem is that
    Code:
    clip = core.fmtc.resample(clip=clip, w=345, h=566, kernel="spline36", interlaced=False, interlacedd=False)# before YUV444P16 after YUV444P16
    for some unknown reason does not allow uneven width (or height) you need to increase the divisor (2.00) until you end up with of example 344 as width.
    (This is strange since the input should be YUV444P16 and as such support uneven resolutions.)

    Cu Selur
    Ah ok, thanks. Hmm, this is strange. I compared the code in Notepad++ and it seems the short version was saved in another colorspace. Also there is a difference here:

    long version:
    HTML Code:
    clip = core.fmtc.resample(clip=clip, w=345, h=566, kernel="spline36", interlaced=False, interlacedd=False)# before YUV444P16 after YUV444P16
    and
    HTML Code:
    clip = core.resize.Spline36(clip=clip, format=vs.YUV420P8, range_s="full", dither_type="error_diffusion")
    short version:
    HTML Code:
    clip = core.fmtc.resample(clip=clip, w=345, h=566, kernel="spline36", interlaced=False, interlacedd=False)# before YUV422P8 after YUV422P16
    and
    HTML Code:
    clip = core.resize.Spline36(clip=clip, format=vs.YUV420P8, range_s="limited", dither_type="error_diffusion")
    So i guess sth is not accepted because of this.

    Edit: Can i somewhere play with colorspaces in hybrid ? so setting it manually somehow ?
    Last edited by Platos; 2nd May 2024 at 06:34.
    Quote Quote  
  2. No.
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  3. Ah ok, yeah then i have to use another divisor. With 1.5 instead of 2.0 it works.
    Quote Quote  
  4. assuming you had a good reason to use 2.0 instead of 1.5 at the start, you probably simply might want to increase 2.0 just a bit to get a width that is dividable by 2
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  5. Yeah you are right. 1.5 is not fixing the artifacts good enough. I use 2.003 or 1.997. Looks very close to 2.000 (Edit: i like 2.003 more)

    thanks again.

    And thanks for your software! Without it i would not be able to do a lot of stuff.
    Quote Quote  
  6. Member
    Join Date
    Jan 2024
    Location
    California
    Search PM
    hi Selur, I have two issues so I will split them up into two separate posts. In this first one, I need some help troubleshooting Hybrid crash. It appears to be related to vapoursynth. The only difference between my encode that worked and the one that crashed is that I ticked the box to enable "Finesharp" filtering. Did not change any values or anything. But this happens no matter what filter I choose, so I guess it's a problem with VS somewhere somehow...


    The Hybrid log tab in the main window says
    Code:
    2024-05-22@18_12_09_1410_10_video finished after 00:00:00.195 with exitCode -1
    Crashed with exit status 0
    -> 2024-05-22@18_12_09_1410_10_video crashed: Crashed with exit status 0
    The Hybrid Report log gave a little more clue
    Code:
    x264 [error]: could not open input file `-'
    So then I tried looking at the vapoursynth window and saw this
    Code:
    Failed to evaluate the script:
    Python exception: Failed to load D:/progs/media/video/encode/Hybrid/64bit/vsfilters/SourceFilter/LSmashSource/vslsmashsource.dll. GetLastError() returned 193.
    
    Traceback (most recent call last):
    File "src\\cython\\vapoursynth.pyx", line 3124, in vapoursynth._vpy_evaluate
    File "src\\cython\\vapoursynth.pyx", line 3125, in vapoursynth._vpy_evaluate
    File "D:\temp\tempPreviewVapoursynthFile18_33_26_692.vpy", line 12, in 
    core.std.LoadPlugin(path="D:/progs/media/video/encode/Hybrid/64bit/vsfilters/SourceFilter/LSmashSource/vslsmashsource.dll")
    File "src\\cython\\vapoursynth.pyx", line 2860, in vapoursynth.Function.__call__
    vapoursynth.Error: Failed to load D:/progs/media/video/encode/Hybrid/64bit/vsfilters/SourceFilter/LSmashSource/vslsmashsource.dll. GetLastError() returned 193.
    I clicked through File Explorer and checked all the paths and all the files seem to be where they're supposed to be.

    And in case you want to see the vpy code
    Code:
    # Imports
    import vapoursynth as vs
    # getting Vapoursynth core
    import sys
    import os
    core = vs.core
    # Import scripts folder
    scriptPath = 'D:/progs/media/video/encode/Hybrid/64bit/vsscripts'
    sys.path.insert(0, os.path.abspath(scriptPath))
    # Loading Plugins
    core.std.LoadPlugin(path="D:/progs/media/video/encode/Hybrid/64bit/vsfilters/GrainFilter/RemoveGrain/RemoveGrainVS.dll")
    core.std.LoadPlugin(path="D:/progs/media/video/encode/Hybrid/64bit/vsfilters/SourceFilter/LSmashSource/vslsmashsource.dll")
    # Import scripts
    import G41Fun
    # source: 'F:\source\IA.1080p.Bluray.mkv'
    # current color space: YUV420P8, bit depth: 8, resolution: 1920x1080, fps: 23.976, color matrix: 709, yuv luminance scale: limited, scanorder: progressive
    # Loading F:\source\IA.1080p.Bluray.mkv using LWLibavSource
    clip = core.lsmas.LWLibavSource(source="F:/source/IA.1080p.Bluray.mkv", format="YUV420P8", stream_index=0, cache=0, prefer_hw=0)
    frame = clip.get_frame(0)
    # Setting detected color matrix (709).
    clip = core.std.SetFrameProps(clip, _Matrix=1)
    # Setting color transfer (to 709), if it is not set.
    if '_Transfer' not in frame.props or not frame.props['_Transfer']:
      clip = core.std.SetFrameProps(clip, _Transfer=1)
    # Setting color primaries info (to 1), if it is not set.
    if '_Primaries' not in frame.props or not frame.props['_Primaries']:
      clip = core.std.SetFrameProps(clip, _Primaries=1)
    # Setting color range to TV (limited) range.
    clip = core.std.SetFrameProp(clip=clip, prop="_ColorRange", intval=1)
    # making sure frame rate is set to 23.976
    clip = core.std.AssumeFPS(clip=clip, fpsnum=24000, fpsden=1001)
    clip = core.std.SetFrameProp(clip=clip, prop="_FieldBased", intval=0) # progressive
    original = clip
    clip = core.std.CropRel(clip=clip, left=0, right=0, top=132, bottom=132)# cropping to 1920x816
    original = core.std.CropRel(clip=original, left=0, right=0, top=132, bottom=132)# cropping to 1920x816
    # sharpening using FineSharp
    clip = G41Fun.FineSharp(clip=clip)
    original = core.text.Text(clip=original,text="Original",scale=1,alignment=7)
    clip = core.text.Text(clip=clip,text="Filtered",scale=1,alignment=7)
    stacked = core.std.StackHorizontal([original,clip])
    # set output frame rate to 23.976fps (progressive)
    stacked = core.std.AssumeFPS(clip=stacked, fpsnum=24000, fpsden=1001)
    # Output
    stacked.set_output()
    Last edited by thedt; 22nd May 2024 at 21:30.
    Quote Quote  
  7. Member
    Join Date
    Jan 2024
    Location
    California
    Search PM
    My second issue involves the Audio tab. I want to add other audio files to be used. So under the Base sub-tab, in the Audio Source section, I use the file chooser to pick the audio file I want. Seems logical and great, it fills in the path to the file and it looks correct. Next, I assume that to add it into the queue box below, I just click the plus button as I usually do. Yes, it adds something to the queue, BUT it does NOT look like the audio file I chose because the path is completely different and points to the Main source file that was chosen in the original Base tab when loading up my makemkv file. The only other plus button on the Audio tab seems to point to loading a saved profile which is not what I want .... so I'm at a lost as to how to get it load the other audio files I want...
    Quote Quote  
  8. Not at a pc till next week, about the first issue:
    Code:
    .Error: Failed to load D:/progs/media/video/encode/Hybrid/64bit/vsfilters/SourceFilter/LSmashSource/vslsmashsource.dll. GetLastError() returned 193.
    Sounds like the dll doesn't work with your system.
    You can try another one from https://github.com/HomeOfAviSynthPlusEvolution/L-SMASH-Works/releases (and rename it)

    About your audio problem, sounds like everything is correct and i can't really tell whether there is really something wrong with:
    BUT it does NOT look like the audio file I chose because the path is completely different and points to the Main source file that was chosen in the original Base tab when loading up my makemkv file.
    since you didn't post enough details, read https://www.selur.de/support if you are unsure how to provide proper details.
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  9. Member
    Join Date
    Jan 2024
    Location
    California
    Search PM
    Thanks for that link! It no longer throws an error and can continue! Yay!

    Regarding the audio adding issue. It might be easier to show you the screen grabs.

    1. This is what the Audio tab looks like by default - after loading the source mkv and selecting the "auto add all" from the main tab.
    Image
    [Attachment 79346 - Click to enlarge]


    2. Then I use the 'minus' button to remove the tracks from the queue since I want to use different ones.
    Image
    [Attachment 79347 - Click to enlarge]


    3. Then I load the audio files I want using the file chooser, use the 'plus' button to add it to the queue, but it seems to not be doing that.
    Image
    [Attachment 79348 - Click to enlarge]
    Quote Quote  
  10. Make sure to set Audio Processing to 'custom' is you are not using the auto handling modes,...
    From what I see of the Audio Queue entry, it looks correct,... 1st part of the queue points to the main source the audio should be added to.

    Cu Selur
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  11. Member
    Join Date
    Jan 2024
    Location
    California
    Search PM
    Ah OK now I understand. Thanks!
    Quote Quote  
  12. How can I convert a variable frame rate video to constant frame rate video using hybrid? I already know it's not as simple as choosing a preset and Constant rate encoding. The resulting output seemed to be a speeded-up video.
    Quote Quote  
  13. If you tell Hybrid to decode to cfr (Config->Input->Decoding->CFR Output) Hybrid will decode it to the reported average fps by MediaInfo.
    Additionally, you could overwrite the input frame rate (Filtering->Misc->Overwrite Input->Overwrite input frame rate) and then something lik sRestore or RIFE to archive a specific frame rate or use FillDuplicate frames to replace duplicates with interpolated frames.
    Depending on your source, it might be feasible to simply tell Hybrid to ignore the input time codes (Internals->Handling->Ignore all input timecodes) before loading your source.
    => Whatever approach might be the best totally depends on your source and what you are aiming for.

    Cu Selur
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  14. My situation is like this, I have two sets of videos of the same series.

    First, source video with encoded audio. CFR video.
    Second, source audio with encoded video. This is the vfr video. In addition, every episode has approximately 0.5 seconds of blank video before the start of the episode compared to the source video version.

    I would dearly love to combine the source video and source audio streams into one video but I would need to snip the blank space from the start of the encoded videos and they don't have a convenient keyframe at the right spot to make things easy. So I thought to reencode the vfr videos with a keyframe inserted where I needed it. But the results were as I described.

    Which of those methods do you think would work best in this situation?
    Quote Quote  
  15. No clue, you will have to try yourself, just stating that you have a vfr video doesn't say anything about the 'nature' of the vfr.
    The whole thing sounds more like something that should be tackled in an NLE.
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  16. locotus
    Join Date
    May 2011
    Location
    Cypress, Tx.
    Search Comp PM
    Last two versions seems to have some problems with variable bit rate using NVenc with h265.
    Problem can't be solved going back to the last workable one Hybrid_2024.05.11.1
    Image Attached Files
    Quote Quote  
  17. Seems like the size calculation might be looping for some reason. 'some problems' doesn't really say much.
    Will needs some details on what you are doing (step-by-step) to reproduce this.
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  18. locotus
    Join Date
    May 2011
    Location
    Cypress, Tx.
    Search Comp PM
    Originally Posted by Selur View Post
    Seems like the size calculation might be looping for some reason. 'some problems' doesn't really say much.
    Will needs some details on what you are doing (step-by-step) to reproduce this.
    Not doing anything, not going further, just opening the file, and trying to set the variable bitrate mode, save a profile.
    If setting a size, bitrate is grayed and with a very low value. if setting any value for bitrate the file size goes too high.
    At this point I close the program and tried again but same thing happened.
    Quote Quote  
  19. not really a step-by-step,.. I will look into it, but this will take a while,..
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  20. locotus
    Join Date
    May 2011
    Location
    Cypress, Tx.
    Search Comp PM
    Originally Posted by Selur View Post
    not really a step-by-step,.. I will look into it, but this will take a while,..
    Take your time. Thanks.
    Quote Quote  
  21. I got an idea, I suspect it's that Hybrid assumes that the max bit rate is 240 000 not 800000,...
    (switching level from auto to something else adjusts the max bit rate properly)
    => I build a dev version where I initialize the max bit rate with 800 000 which is the max allowed bit rate for level 6.2.
    Send you a link via pm, let me know whether that works for you. If not, please create and share another debug output with that version.

    Cu Selur
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  22. locotus
    Join Date
    May 2011
    Location
    Cypress, Tx.
    Search Comp PM
    Originally Posted by Selur View Post
    I got an idea, I suspect it's that Hybrid assumes that the max bit rate is 240 000 not 800000,...
    (switching level from auto to something else adjusts the max bit rate properly)
    => I build a dev version where I initialize the max bit rate with 800 000 which is the max allowed bit rate for level 6.2.
    Send you a link via pm, let me know whether that works for you. If not, please create and share another debug output with that version.

    Cu Selur

    Thanks a lot, working fine now.
    Quote Quote  
  23. selur What should I do to preserve the original colors?

    Image
    [Attachment 80044 - Click to enlarge]
    Quote Quote  
  24. No clue what you are doing to change them in the first place,...
    Looking at the histogram after adding each filter might help to figure out what's happening and when.
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  25. Originally Posted by Selur View Post
    No clue what you are doing to change them in the first place,...
    Looking at the histogram after adding each filter might help to figure out what's happening and when.
    First of all, every file without a filter is the same problem, the colors are different from the main file?

    avs script
    Imports
    import vapoursynth as vs
    # getting Vapoursynth core
    import sys
    import os
    core = vs.core
    # Import scripts folder
    scriptPath = 'D:/Hybrid/64bit/vsscripts'
    sys.path.insert(0, os.path.abspath(scriptPath))
    # loading plugins
    core.std.LoadPlugin(path="D:/Hybrid/64bit/vsfilters/SourceFilter/LSmashSource/LSMASHSource.dll")
    # Import scripts
    import validate
    # Source: 'D:\Hudutların Kanunu 1966 Criterion Collection Bluray 1080p H265 AC3 #turkseed\Hudutların Kanunu 1966 Criterion Collection Bluray 1080p H265 AC3 #turkseed.mkv'
    # Current color space: YUV420P8, bit depth: 8, resolution: 1478x1080, frame rate: 23.976fps, scanorder: progressive, yuv luminance scale: limited, matrix: 709, transfer: bt.709, primaries: bt.709
    # Loading D:\Hudutların Kanunu 1966 Criterion Collection Bluray 1080p H265 AC3 #turkseed\Hudutların Kanunu 1966 Criterion Collection Bluray 1080p H265 AC3 #turkseed.mkv using LWLibavSource
    clip = core.lsmas.LWLibavSource(source="D:/Hudutların Kanunu 1966 Criterion Collection Bluray 1080p H265 AC3 #turkseed/Hudutların Kanunu 1966 Criterion Collection Bluray 1080p H265 AC3 #turkseed.mkv", format="YUV420P8", stream_index=0, cache=0, prefer_hw=0)
    frame = clip.get_frame(0)
    # Setting detected color matrix (709).
    clip = core.std.SetFrameProps(clip=clip, _Matrix=1)
    # setting color transfer (709), if it is not set.
    if validate.transferIsInvalid(clip):
    clip = core.std.SetFrameProps(clip=clip, _Transfer=1)
    # setting color primaries info (to 709), if it is not set.
    if validate.primariesIsInvalid(clip):
    clip = core.std.SetFrameProps(clip=clip, _Primaries=1)
    # setting color range to TV (limited) range.
    clip = core.std.SetFrameProps(clip=clip, _ColorRange=1)
    # making sure frame rate is set to 23.976fps
    clip = core.std.AssumeFPS(clip=clip, fpsnum=24000, fpsden=1001)
    # making sure the detected scan type is set (detected: progressive)
    clip = core.std.SetFrameProps(clip=clip, _FieldBased=0) # progressive
    original = clip
    original = core.text.Text(clip=original,text="Original",scale =2,alignment=7)
    clip = core.text.Text(clip=clip,text="Filtered",scale=2,a lignment=7)
    stacked = core.std.StackHorizontal([original,clip])
    # set output frame rate to 23.976fps (progressive)
    stacked = core.std.AssumeFPS(clip=stacked, fpsnum=24000, fpsden=1001)
    # output
    stacked.set_output()
    Quote Quote  
  26. First of all, every file without a filter is the same problem, the colors are different from the main file?
    What is the 'main file'?

    avs script
    That is not an Avisynth, but a Vapoursynth script. Also, the indention in script you posted are wrong.
    Code:
    # setting color transfer (170), if it is not set.
    if validate.transferIsInvalid(clip):
      clip = core.std.SetFrameProps(clip=clip, _Transfer=6)
    # setting color primaries info (to 470), if it is not set.
    if validate.primariesIsInvalid(clip):
      clip = core.std.SetFrameProps(clip=clip, _Primaries=5)
    I assume you used 'quote'- instead of 'code'-tags and this can be ignored.

    This script, show on both sides the same frame. The only difference between the frames is the label 'Original' vs. 'Filtered'.
    At this stage, any difference you see between the two sides (aside from the labels) is due to the lack of color stability depending on the viewing angle of your monitor.
    If this is the issue, setting 'Filtering->Vapoursynth->Misc->Preview->Split Compare View' to 'interleaved' while using 'Compare View' might help, since this way the 'Original' and the 'Filtered' version are interleaved.

    If the preview has different colors than you see them in side a media player, the problem might be due to wrong flags. (since your source is 8 bit it's not HDR, so color problems between SDR and HDR are not the problem)

    Cu Selur
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  27. Originally Posted by Selur View Post
    First of all, every file without a filter is the same problem, the colors are different from the main file?
    What is the 'main file'?

    avs script
    That is not an Avisynth, but a Vapoursynth script. Also, the indention in script you posted are wrong.
    Code:
    # setting color transfer (170), if it is not set.
    if validate.transferIsInvalid(clip):
      clip = core.std.SetFrameProps(clip=clip, _Transfer=6)
    # setting color primaries info (to 470), if it is not set.
    if validate.primariesIsInvalid(clip):
      clip = core.std.SetFrameProps(clip=clip, _Primaries=5)
    I assume you used 'quote'- instead of 'code'-tags and this can be ignored.

    This script, show on both sides the same frame. The only difference between the frames is the label 'Original' vs. 'Filtered'.
    At this stage, any difference you see between the two sides (aside from the labels) is due to the lack of color stability depending on the viewing angle of your monitor.
    If this is the issue, setting 'Filtering->Vapoursynth->Misc->Preview->Split Compare View' to 'interleaved' while using 'Compare View' might help, since this way the 'Original' and the 'Filtered' version are interleaved.

    If the preview has different colors than you see them in side a media player, the problem might be due to wrong flags. (since your source is 8 bit it's not HDR, so color problems between SDR and HDR are not the problem)

    Cu Selur
    thank you
    Quote Quote  



Similar Threads

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