VideoHelp Forum




+ Reply to Thread
Results 1 to 9 of 9
  1. I'm almost not sure where I should start. I'm running Windows 7 Pro 64-bit. What I'm trying to do, and have done in the past, is use AVISynth to load MKV and MP4 files into VirtualDub so I can convert them. This is where GraphEdit comes into play. Since I couldn't get the AVS files to play properly in MPC I was attempting to see what would and would not work. The MKV and MP4 files play fine in GraphEdit. The files use H264 video and AAC audio. The H264 video doesn't work in GraphEdit, but from what I read online that's not too surprising since it's raw H264 and I only have FFDShow. I don't have the proper filters/decoders for it. AAC works, but I have to manually make the graph. Moreover, I went and tested AVS files and found some rather interesting information. The MKV and MP4 files with H264 and AAC don't play, no video and no audio. MKV files with H264 and AC3 don't work either. I can however, get the audio half to work properly. MKV file with AVI and AAC plays video fine, but the AAC is fast and very squeaky.

    So, long story short, I can't seem to get H264 and AAC to work in AVS files and I don't know why, especially since it used to work. What can I do?
    Quote Quote  
  2. do the pins connect when you render the mp4 or mkv in graphedit / graphstudio ? does it use ffdshow or microsoft decoder ?

    you can use win7dsfiltertweaker to change the defaults

    The H264 video doesn't work in GraphEdit, but from what I read online that's not too surprising since it's raw H264
    you should always use audio & video in a container . Most splitters and decoders will have issues with elementary streams and you will get sync issues. The exception is if you can use an indexing application (like DGNVTools , DGAVCIndex - but DGAVCIndex is old, and doesn't work for some streams, especially PAFF streams)

    a better idea is to avoid directshow, and use another source filter (directshowsource isn't necessarily frame accurate, and is inconsistent, and as you can see causes many problems) . For example you could use ffmpegsource2
    http://code.google.com/p/ffmpegsource/
    Quote Quote  
  3. Well, that certainly works. Thanks for the suggestion. I never realized that you could load MVKs and such from that. It's named FFMpeg after all and finding that info took me a while.

    Doesn't explain why DirectShowSource stopped functioning properly after it was. Maybe I'll just forget about it since this works.
    Quote Quote  
  4. Weird, it now takes 3x longer than it used to to encode to Xvid. I tried all the different ways I could set up the filters, including the old way (except for the audio since that didn't work the old way) and it doesn't change anything. Doubt the audio would cause the performance discrepancy.
    Quote Quote  
  5. Originally Posted by Alexstarfire View Post
    Weird, it now takes 3x longer than it used to to encode to Xvid. I tried all the different ways I could set up the filters, including the old way (except for the audio since that didn't work the old way) and it doesn't change anything. Doubt the audio would cause the performance discrepancy.
    what takes longer ? ffms2 ?

    are you using the ffms2-mt branch? it's quite a bit faster for decoding (multithreaded) - so if decoding was your bottleneck, it should encode faster

    if you meant directshowsource, first answer the questions asked earlier
    Quote Quote  
  6. Member AlanHK's Avatar
    Join Date
    Apr 2006
    Location
    Hong Kong
    Search Comp PM
    Originally Posted by Alexstarfire View Post
    Weird, it now takes 3x longer than it used to to encode to Xvid. I tried all the different ways I could set up the filters, including the old way (except for the audio since that didn't work the old way) and it doesn't change anything. Doubt the audio would cause the performance discrepancy.
    Post your complete AVS script.

    I use something like :

    FFmpegSource2("Tattoo.mkv",atrack=1)
    where FFmpegSource2 is defined in ffms2.avsi
    This caches the index file, so after the first launch it's pretty fast.

    "atrack=1" loads the first audio track, which works most of the time.

    Then I usually downmix to stereo.
    Last edited by AlanHK; 30th Aug 2010 at 09:30.
    Quote Quote  
  7. Yes, all the pins connected... except for the subtitles. It used the Microsoft decoder so that was why. After using the Filter Tweaker you posted all the pins connected including the subtitles because it used the FFDShow filter like it was supposed to.

    My usual AVS file goes like this:
    v = DirectShowSource("E:\New Folder\Temp\hayate no gotoku!\Episode 33.mkv", audio=false, fps=29.97, convertfps=true)
    a = DirectShowSource("E:\New Folder\Temp\hayate no gotoku!\Episode 33.mkv", video=false)
    AudioDub(V, (A.AudioChannels()==6) ? DownMix(A) : A)

    Function DownMix(clip A){
    flr = GetChannel(a, 1, 2)
    fcc = GetChannel(a, 3, 3)
    lrc = MixAudio(flr, fcc, 0.3254, 0.2301)
    bl = GetChannel(a, 4)
    br = GetChannel(a, 5)
    sl = MixAudio(bl, br, 0.2818, 0.1627)
    sr = MixAudio(bl, br, -0.1627, -0.2818)
    blr = MergeChannels(sl, sr)
    return MixAudio(lrc, blr, 1.0, 1.0).Normalize()
    }

    AddBorders(0, 0, 0, 160)
    TextSub("Episode 33.ass")
    Using FFMpegSource2 it goes like this:
    a = FFAudioSource("E:\New Folder\Temp\hayate no gotoku!\Episode 33.mkv")
    v = FFVideoSource("E:\New Folder\Temp\hayate no gotoku!\Episode 33.mkv", fpsnum=30000, fpsden=1001)
    AudioDub(V, (A.AudioChannels()==6) ? DownMix(A) : A)

    Function DownMix(clip A){
    flr = GetChannel(a, 1, 2)
    fcc = GetChannel(a, 3, 3)
    lrc = MixAudio(flr, fcc, 0.3254, 0.2301)
    bl = GetChannel(a, 4)
    br = GetChannel(a, 5)
    sl = MixAudio(bl, br, 0.2818, 0.1627)
    sr = MixAudio(bl, br, -0.1627, -0.2818)
    blr = MergeChannels(sl, sr)
    return MixAudio(lrc, blr, 1.0, 1.0).Normalize()
    }

    AddBorders(0, 0, 0, 160)
    TextSub("Episode 33.ass")
    I even tried:
    FFMpegSource2("Episode 33.mkv")
    AddBorders(0, 0, 0, 160)
    TextSub("Episode 33.ass")
    They all take nearly the exact same amount of time. The DirectShow one doesn't matter what filters are actually used either: Microsoft, FFDShow, or FFDShow (DXVA).

    Also, VirtualDub is set up for dual-core usage.
    Quote Quote  
  8. So what was the comment with 3x slower to encode? I don't understand what you are asking (or even if you're asking a question ?)

    Clarify what the "old way" was . Did it use the same avs script with hardsubbing ? What has changed since then? just OS win7 x64 ? or other stuff like hardware ?
    Quote Quote  
  9. I'm wondering why it's 3x slower than when DirectShowSource first broke. I haven't changed anything since then. The "old way" is the AVS file with DirectShowSource in it. Can't say exactly what filters it was using since I never looked at the graphedit back then. I had all the current filters I'm using though: FFDShow, Xvid, AC3Filter, and Haali Media Splitter. I have a good feeling it used to use the Microsoft Decoder back then though since that was the original filter it used when I first used graphedit. I've used several filter combinations and they all take the same amount of time.

    FFMpeg is supposed to be faster, but it's certainly not for me. It really just isn't making any sense.

    And yes, same script (modified slightly when using FFMpeg).

    My question is why is it slower despite the fact that it's supposed to be quicker?
    Quote Quote  



Similar Threads

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