VideoHelp Forum




+ Reply to Thread
Results 1 to 15 of 15
  1. i dont know why but for some reason some anime videos i load into avspmod without a script or anything just "DirectShowSource" it plays at 120 fps completely ******* the video, fast forwarding looping etc ...

    http://imgur.com/jWci1gj
    Quote Quote  
  2. Dinosaur Supervisor KarMa's Avatar
    Join Date
    Jul 2015
    Location
    US
    Search Comp PM
    I would suggest indexing with FFMSIndex or L-Smash, but if you still want to use Directshow this is what I would use.

    Code:
    DirectShowSource("O:\Video.mpg", fps=29.970, pixel_type="YV12")
    Look at my example with the fps=29.970, change it to what ever it is designed to be.

    Directshow is outputing YUY2 which is probably wrong, and should tell it to be YV12. Just about everything is YV12, unless you know your video truely is YUY2.

    More info http://avisynth.nl/index.php/DirectShowSource
    Quote Quote  
  3. Originally Posted by KarMa View Post
    I would suggest indexing with FFMSIndex or L-Smash, but if you still want to use Directshow this is what I would use.

    Code:
    DirectShowSource("O:\Video.mpg", fps=29.970, pixel_type="YV12")
    Look at my example with the fps=29.970, change it to what ever it is designed to be.

    Directshow is outputing YUY2 which is probably wrong, and should tell it to be YV12. Just about everything is YV12, unless you know your video truely is YUY2.

    More info http://avisynth.nl/index.php/DirectShowSource
    well i dont know why but if i put it at YV12 it becomes even weirder saying no video and playing nothing at 96x32?
    https://forum.videohelp.com/images/imgfiles/BFUuY9V.png
    if i set it the same but change only the pixel type to YUY2 it seems to work if i make this scripts

    DirectShowSource("D:\4.mp4", fps=29.970)
    or
    DirectShowSource("O:\Video.mpg", fps=29.970, pixel_type="YUY2")
    it seems to work is it ok ?
    Quote Quote  
  4. Originally Posted by zanzar View Post

    well i dont know why but if i put it at YV12 it becomes even weirder saying no video and playing nothing at 96x32?
    What's the resolution of your 'source'? If you don't know then post the information MediaInfo gives you. The information might be useful anyway. And maybe a short 10-second sample from this same 'source'.

    And, as KarMa mentioned already, DirectShowSource is about the worst source filter. I doubt it's the reason for this particular problem, but if you're serious about using AviSynth you should not use it whenever possible.
    Quote Quote  
  5. About the only time I've seen the "wrong speed" problem it was because the player was getting the sample rate of the audio wrong.

    I might be on the wrong track, but try disabling the audio.

    DirectShowSource("O:\Video.mpg", audio=false)

    It's possible whatever DirectShow decoder is being used, it's not decoding properly. Is the source video 8 bit or 10 bit? MediaInfo should tell you. Not that I think a 10 bit source should cause problems, but you never know.
    Quote Quote  
  6. Originally Posted by hello_hello View Post
    About the only time I've seen the "wrong speed" problem it was because the player was getting the sample rate of the audio wrong.

    I might be on the wrong track, but try disabling the audio.

    DirectShowSource("O:\Video.mpg", audio=false)

    It's possible whatever DirectShow decoder is being used, it's not decoding properly. Is the source video 8 bit or 10 bit? MediaInfo should tell you. Not that I think a 10 bit source should cause problems, but you never know.
    Originally Posted by manono View Post
    Originally Posted by zanzar View Post

    well i dont know why but if i put it at YV12 it becomes even weirder saying no video and playing nothing at 96x32?
    What's the resolution of your 'source'? If you don't know then post the information MediaInfo gives you. The information might be useful anyway. And maybe a short 10-second sample from this same 'source'.

    And, as KarMa mentioned already, DirectShowSource is about the worst source filter. I doubt it's the reason for this particular problem, but if you're serious about using AviSynth you should not use it whenever possible.
    here is a sample

    DirectShowSource("D:\5.mp4", fps=29.970)
    ConvertToYV12()
    Sharpen(0.3)
    nnedi3_rpow2(2, cshift="Spline36Resize", fwidth=1280, fheight=720)
    aWarpSharp(depth=5)
    sharpen(0.3)


    look that the before video is and how the after is where a few frames at the start disappear and at the end it just loops and oes blank
    Image Attached Files
    Quote Quote  
  7. It's fine here no matter how I open it. Even AVSPmod and DirectShowSource.

    Assuming this is the same source you're using with MeGUI from your other thread......
    One problem is it's variable frame rate and MeGUI is converting it to a constant frame rate, but getting it wrong.

    If you index it with FFMSIndex you'll need to check the frame rate conversion part of the script and fix it. For 29.970fps:

    FFVideoSource("E:\before.mp4", fpsnum=30000, fpsden=1001)

    If you index it with L-Smash you'll need to add the frame rate conversion to the script manually.

    LSMASHVideoSource("E:\before.mp4", fpsnum=30000, fpsden=1001)

    For AvsPmod, I think your DirectShow decoder is confused by the variable frame rate. I'm not sure if it's fixable. I can't test it because DirectShow is getting the frame rate correct for me. MeGUI isn't though. If you open the video via DirectShow MeGUI will convert it to a constant frame rate but it's getting the constant frame rate wrong. I assume it's supposed to be 29.970fps. You'll need to check the frame rate conversion part of the script and fix it, but I'm not sure it'll work in your case.

    DirectShowSource("E:\before.mp4", fps=29.970, audio=false, convertfps=true).AssumeFPS(30000,1001)

    Try it with and without convertfps=true. I don't think you'll need it in your case, and it might make things worse, but I don't know what your DirectShow decoder is doing.

    The source is YV12 so I don't know why your decoder is outputting YUY2. What DirectShow decoder do you have installed? If it's something that comes with Windows I guess Microsoft decided changing the output type would be a clever idea.
    ffdshow and LAV Filters should let you pick the output type, although by default it's the same as the input (well.... often YV12 is converted to NV12 but that's just a different variation of the same thing). I like ffdshow as it's tooltip tells you what it's doing.

    Name:  ffdshow.gif
Views: 1406
Size:  5.3 KB
    Last edited by hello_hello; 5th Feb 2016 at 16:04.
    Quote Quote  
  8. Originally Posted by hello_hello View Post
    It's fine here no matter how I open it. Even AVSPmod and DirectShowSource.

    Assuming this is the same source you're using with MeGUI from your other thread......
    One problem is it's variable frame rate and MeGUI is converting it to a constant frame rate, but getting it wrong.

    If you index it with FFMSIndex you'll need to check the frame rate conversion part of the script and fix it. For 29.970fps:

    FFVideoSource("E:\before.mp4", fpsnum=30000, fpsden=1001)

    If you index it with L-Smash you'll need to add the frame rate conversion to the script manually.

    LSMASHVideoSource("E:\before.mp4", fpsnum=30000, fpsden=1001)

    For AvsPmod, I think your DirectShow decoder is confused by the variable frame rate. I'm not sure if it's fixable. I can't test it because DirectShow is getting the frame rate correct for me. MeGUI isn't though. If you open the video via DirectShow MeGUI will convert it to a constant frame rate but it's getting the constant frame rate wrong. I assume it's supposed to be 29.970fps. You'll need to check the frame rate conversion part of the script and fix it, but I'm not sure it'll work in your case.

    DirectShowSource("E:\before.mp4", fps=29.970, audio=false, convertfps=true).AssumeFPS(30000,1001)

    The source is YV12 so I don't know why your decoder is outputting YUY2. What DirectShow decoder do you have installed? If it's something that comes with Windows I guess Microsoft decoded changing the output type would be a clever idea.
    ffdshow and LAV Filters should let you pick the output type, although by default it's the same as the input. I like ffdshow as it's tooltip tells you what it's doing.

    Image
    [Attachment 35526 - Click to enlarge]
    its not about the frame rate its about the start and the end of the video look that "before" start about 1-2 seconds earlier the "after" and at the end of after it loops and at the last second just goes blank gray (it loops at 11 seconds) whyyy?

    also can i just look at the source FPS and do fps="what i see at mediainfo" ?

    i also want to make"dehalo_alpha(rx=2.0, ry=2.0)" work but i just cant understand how, i put the text avsi file into the plugin folder but it just doesnt stick lol and basically saying "i dont know what this command is" when i try to load it

    thank you for your help this is my first time at this so sorry if i am slow

    edit: i also use ffdshow and it tells me its yv12 too
    Last edited by zanzar; 5th Feb 2016 at 16:05.
    Quote Quote  
  9. Originally Posted by zanzar View Post
    its not about the frame rate its about the start and the end of the video look that "before" start about 1-2 seconds earlier the "after" and at the end of after it loops and at the last second just goes blank gray (it loops at 11 seconds) whyyy?
    Because it's not being decoded by DirectShow correctly. The fix is to not use DirectShow. Get MeGUI to index it instead, but then it will be about the frame rate as I described.

    Originally Posted by zanzar View Post
    also can i just look at the source FPS and do fps="what i see at mediainfo" ?
    Which frame rate?

    Click image for larger version

Name:	mediainfo.gif
Views:	1254
Size:	17.8 KB
ID:	35527

    But no, not necessarily. You'd probably want to use "original frame rate" but that's not always shown and I've no idea where MediaInfo gets that info from.
    DirectShow usually gets it right, but L-Smash and FFMSIndex output the average frame rate for variable frame rate sources, which is why MeGUI converts to a constant frame rate. Only it's not converting to 29.970fps, so you'd need to fix that.

    Originally Posted by zanzar View Post
    i also want to make"dehalo_alpha(rx=2.0, ry=2.0)" work but i just cant understand how, I put the text avsi file into the plugin folder but it just doesnt stick lol and basically saying "i dont know what this command is" when i try to load it
    It sounds like you didn't put the plugins dehalo_alpha requires in the plugins folder too, or you don't have the runtime files installed the plugins require. I mentioned it earlier. If you let us know which command it's referring to, that might help narrow it down a bit.

    Edit: That's odd. I just noticed MPC-HC is reporting the wrong frame rate too, which is unusual, although I think it's playing at the correct speed.

    Click image for larger version

Name:	before.gif
Views:	1190
Size:	13.2 KB
ID:	35528
    Last edited by hello_hello; 5th Feb 2016 at 16:30.
    Quote Quote  
  10. Originally Posted by hello_hello View Post
    Originally Posted by zanzar View Post
    its not about the frame rate its about the start and the end of the video look that "before" start about 1-2 seconds earlier the "after" and at the end of after it loops and at the last second just goes blank gray (it loops at 11 seconds) whyyy?
    Because it's not being decoded by DirectShow correctly. The fix is to not use DirectShow. Get MeGUI to index it instead, but then it will be about the frame rate as I described.

    Originally Posted by zanzar View Post
    also can i just look at the source FPS and do fps="what i see at mediainfo" ?
    Which frame rate?

    Image
    [Attachment 35527 - Click to enlarge]


    But no, not necessarily. You'd probably want to use "original frame rate" but that's not always shown and I've no idea where MediaInfo gets that info from.
    DirectShow usually gets it right, but L-Smash and FFMSIndex output the average frame rate for variable frame rate sources, which is why MeGUI converts to a constant frame rate. Only it's not converting to 29.970fps, so you'd need to fix that.

    Originally Posted by zanzar View Post
    i also want to make"dehalo_alpha(rx=2.0, ry=2.0)" work but i just cant understand how, I put the text avsi file into the plugin folder but it just doesnt stick lol and basically saying "i dont know what this command is" when i try to load it
    It sounds like you didn't put the plugins dehalo_alpha requires in the plugins folder too, or you don't have the runtime files installed the plugins require. I mentioned it earlier. If you let us know which command it's referring to, that might help narrow it down a bit.

    Edit: That's odd. I just noticed MPC-HC is reporting the wrong frame rate too, which is unusual, although I think it's playing at the correct speed.

    Image
    [Attachment 35528 - Click to enlarge]
    hey i created the script with meGUI now its just stucks at the start for few seconds then start playing , at least if doesn't loop at the end or go gray at the end

    also i see that it looses bit rates from 1000 to 700 does it matter ?

    heh retarded program please just take the filters take the video mixem all together and spit out a new normal video file lmao

    DirectShowSource("D:\before.mp4", fps=24.710, audio=false, convertfps=true).AssumeFPS(2471,100)
    ConvertToYV12()
    Sharpen(0.3)
    nnedi3_rpow2(2, cshift="Spline36Resize", fwidth=1280, fheight=720)
    aWarpSharp(depth=5)
    sharpen(0.3)
    Quote Quote  
  11. Dinosaur Supervisor KarMa's Avatar
    Join Date
    Jul 2015
    Location
    US
    Search Comp PM
    Directshowsource() acts the same way with all my sources when I use it. It always puts out a YUY2 video, which is a problem for me and so have to use pixel_type="YV12". Not sure what it is, might be LAV decoding as YUY2. Spent a few hours on the problem and never fixed it, so I moved on.

    Looks like OP also uses LAV.
    Last edited by KarMa; 5th Feb 2016 at 19:33.
    Quote Quote  
  12. DirectShowSource() should only be used as a last resort. Use ffmpeg or LSmash source filters instead. Try starting with this (LSmash):

    Code:
    LWLibavVideoSource("before.mp4", fpsnum=30000, fpsden=1001) 
    TDecimate()
    That will give you normal 23.976 fps with no jerkiness (at least with this clip).
    Last edited by jagabo; 5th Feb 2016 at 20:38.
    Quote Quote  
  13. Originally Posted by zanzar View Post
    hey i created the script with meGUI now its just stucks at the start for few seconds then start playing , at least if doesn't loop at the end or go gray at the end
    I assume you're still using DirectShowSource despite all the advice to the contrary?

    Originally Posted by zanzar View Post
    also i see that it looses bit rates from 1000 to 700 does it matter ?
    You can change the bitrate in the encoder configuration. Or you've already changed it somewhere, or you've specified a file size.

    Originally Posted by zanzar View Post
    DirectShowSource("D:\before.mp4", fps=24.710, audio=false, convertfps=true).AssumeFPS(2471,100)
    Did you decide against fixing the frame rate?
    Quote Quote  
  14. Originally Posted by hello_hello View Post
    Originally Posted by zanzar View Post
    hey i created the script with meGUI now its just stucks at the start for few seconds then start playing , at least if doesn't loop at the end or go gray at the end
    I assume you're still using DirectShowSource despite all the advice to the contrary?

    Originally Posted by zanzar View Post
    also i see that it looses bit rates from 1000 to 700 does it matter ?
    You can change the bitrate in the encoder configuration. Or you've already changed it somewhere, or you've specified a file size.

    Originally Posted by zanzar View Post
    DirectShowSource("D:\before.mp4", fps=24.710, audio=false, convertfps=true).AssumeFPS(2471,100)
    Did you decide against fixing the frame rate?
    Originally Posted by jagabo View Post
    DirectShowSource() should only be used as a last resort. Use ffmpeg or LSmash source filters instead. Try starting with this (LSmash):

    Code:
    LWLibavVideoSource("before.mp4", fpsnum=30000, fpsden=1001) 
    TDecimate()
    That will give you normal 23.976 fps with no jerkiness (at least with this clip).
    Originally Posted by KarMa View Post
    Directshowsource() acts the same way with all my sources when I use it. It always puts out a YUY2 video, which is a problem for me and so have to use pixel_type="YV12". Not sure what it is, might be LAV decoding as YUY2. Spent a few hours on the problem and never fixed it, so I moved on.

    Looks like OP also uses LAV.
    yea looks like LAV filters are causing this if i delete them it says "pins cannot connect due to not supporting the same transport" is there any way around this? i have ffdshow and i checked the avisynth script serving bars...

    sorry its like my first day dealing with that matter so sorry if i look like a retard

    edit:i used the script
    LWLibavVideoSource("d:\4.mp4", fpsnum=30000, fpsden=1001)
    looks like it works good i cant find a download for "TDecimate" the wiki's one looks like it died can some one upload it here please?
    i still wonder what is the deal with the lav filters and why it screws all up

    also any good scripts to upscale anime like this?
    https://forum.videohelp.com/images/imgfiles/XcIP03q.jpg

    jagabo also gave me a few but i want to learn more
    Quote Quote  
  15. TDecimate() is part of the TIVTC package: http://avisynth.nl/index.php/TIVTC

    Also, don't forget to change the color matrix when upscaling SD to HD:

    Code:
    ColorMatrix(mode="rec.601->rec.709")
    Or if your video is RGB:

    Code:
    ConvertToYV12(matrix="rec709")
    Last edited by jagabo; 6th Feb 2016 at 07:15.
    Quote Quote  



Similar Threads

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