Menu

#858 Audio lag with LSMASH indexer

General
closed-fixed
nobody
5
2017-11-04
2016-11-01
Duncan Webb
No

Hi,

When using the oneclick function (which is great btw) to encode my videos that were captured with dxtory using the Lagarith Lossless Codec the audio become very badly out of sync (4-5 seconds). However the ffmpeg codec works correctly. The source is in sync when played back with VLC.

The script that I used (switching between lsmash and ffmpeg) is:

LoadPlugin("C:\Program Files (x86)\MeGUI\tools\ffms\ffms2.dll")
V = FFVideoSource(source, fpsnum=30, fpsden=1, threads=1).Lanczos4Resize(1280, 720)
A1 = FFAudioSource(source, track=1).Normalize(volume=1.0, show=false)
A2 = FFAudioSource(source, track=2).Normalize(volume=1.0, show=false)
#LoadPlugin("C:\Program Files (x86)\MeGUI\tools\lsmash\LSMASHSource.dll")
#V = LWLibavVideoSource(source).Lanczos4Resize(1280, 720).AssumeFPS(30)
#A1 = LWLibavAudioSource(source, stream_index=1).Normalize(volume=1.0, show=false)
#A2 = LWLibavAudioSource(source, stream_index=2).Normalize(volume=1.0, show=false)
commentary = MonoToStereo(A1, A1)
audio = MixAudio(commentary, A2, 0.9, 0.1)
AudioDub(V, audio)
return last

The dxtory settings are 30 fps and key frame rate 15 no scaling as the window is sized to 1920x1080.

As this is a bug report about megui I would say that ffmpeg should not be disabled, as opposed to lsmash being preferred and ffmpeg being available. An audio lag is much worse than jittery video (even though I have not noticed any jitter)

Really this is a question about compatibilty between the three components.

Thanks
Duncan

Discussion

  • Zathor

    Zathor - 2016-11-06
    • status: open --> pending
     
  • Zathor

    Zathor - 2016-11-06

    Thank you very much for the report. Please post a full log of a not working oneclick encode. Also try the various decoders in the audio configuration (like NicAudio)

     
  • hello_hello

    hello_hello - 2016-11-07

    Deleted. Posted in wrong place. Sorry.

     

    Last edit: hello_hello 2016-11-07
  • Duncan Webb

    Duncan Webb - 2016-11-07

    Hi Zathor,

    I quess that it is best to attach the log as a zipped text file. I've also included the mediainfo output from the source and the two encoding. The lsmash one is 2 seconds short. I think that my problem is the indexing by lsmash. I just tries a second time to use lsmash to index the file.

    I'm not sure how to use other decoders for this source.

    I hope this helps and if you need anything else like the source this is no problem to send somewhere.

    Thanks

     
  • Zathor

    Zathor - 2016-11-07

    Do you have created the file runningred-0091.lsmash.avs? Is it the one on top? Why do you use this script for the audio instead of an extracted audio track?

    And you can try to switch in the MeGUI settings to the development update server. There are new versions of the FFMS and L-SMASH plugins available which may also fix your problem.

     
  • Duncan Webb

    Duncan Webb - 2016-11-09

    Yes I used the script above with the L-SMASH bits uncommented and the FFMS bits commented. I used to extract the audio tracks and use Audacity to prepare the audio but decided this took more time to prepare and was less repeatable. Also it is easier to trim sections out of the clip when the audio is also being trimmed.

    I put the clips together like this:

    Import("D:\dxtory\common.avs")
    Import("D:\dxtory\runningred-0067.avi.avs")
    video1=last
    Import("D:\dxtory\runningred-0068.avi.avs")
    video2=last

    TransFunnel(video1,video2,time,direction)

    trim_in = 0
    trim_out = FrameCount

    Trim(trim_in, trim_out)
    FadeIn(fade_frames)
    Subtitle("Welcome back", first_frame=0, last_frame=title_frames-1, size=font_size, align=align, text_color=text_color, halo_color=halo_color)
    FadeOut(fade_frames)
    Subtitle("Until next time...", first_frame=FrameCount-title_frames-1, last_frame=FrameCount-1, size=font_size, align=align, text_color=text_color, halo_color=halo_color)

    ConvertToYV12(interlaced=false)
    tweak(bright=10)

    I've tried the development server versions and the L-SMASH encodes still have several seconds audio lag. I suppose that I should ask the L-SMASH developers what is happening even though I'm happy with FFMS.

    I've attached the screen shot of the indexer dialogue and I don't understand why the FFMS option is unavailable, especially when the FFMS encode works correctly and the L-SMASH doesn't.

    What I'm hoping for is that the FFMS option is enabled again so I can use a template.

    Thanks,

     
  • Zathor

    Zathor - 2017-05-07

    Do you still have the problem with the newly updated build?

     
  • Duncan Webb

    Duncan Webb - 2017-05-08

    Just tested this and the FFMS option is available again. Many thanks.

     
  • Zathor

    Zathor - 2017-11-04
    • status: pending --> closed-fixed
     

Log in to post a comment.