VideoHelp Forum




+ Reply to Thread
Results 1 to 2 of 2
  1. Member
    Join Date
    Mar 2024
    Location
    France
    Search PM
    Hi everyone,

    i'm requesting your help because i have a problem with sound and i don't find the solution. I've tried many things without good results.
    I have a Bluray 3D movie which doesn't contain my mother language and the bluray available in my country which contain my language is not the same cut as the original 3D bluray.
    So i've started to use avisynth to make the same cut using the trim function.
    I load the two video side by side to find the right frames to cut.
    I've extracted the DTS-HD MA track from the bluray and converted it to lossless format like 5.1 FLAC or 5.1 LPCM using eac3to
    I want to export the audio after the trim cut. I've added the SoundOut() function to save the 5.1 file using FLAC.
    I want then to export the new FLAC to 6 wav but there is a lot of garbage and glitches. What is wrong in my process?
    Is it possible?
    here is a example of the avs:
    ------------------------ AVS File --------------------------------------
    loadplugin("C:\dgavcdec109\DGAVCDecode.dll")
    loadplugin("C:\dgavcdec109\NicAudio_x86.dll")
    sourceBR3D=avcsource("C:\Users\Pierre\Documents\mo vie3D\00000\00000.track_4113.dga").BicubicResize(9 60, 540).ShowFrameNumber(scroll=false, text_color=$ff0000)
    sourceBRFR=avcsource("C:\movie\BR-FR\00002.track_4113.dga").AssumeFPS(23.976, sync_audio=false).BicubicResize(960, 540).ShowFrameNumber(scroll=false, text_color=$ff0000)
    audioBRFR = NicLPCMSource("C:\movie\BR-FR\00002.track_4353.dts_.w64", 48000, 24, 6)
    sourceBRFR=AudioDub(sourceBRFR, audioBRFR)
    clip1=Trim(sourceBRFR, 0, 8901)
    clip2=Trim(sourceBRFR, 9339, 15736)
    clip3=Trim(sourceBRFR, 19165, 19888)
    clip4=Trim(sourceBRFR, 20038, 20270)
    clip5=Trim(sourceBRFR, 20533, 21835)
    clip6=Trim(sourceBRFR, 21951, 22224)
    clip7=Trim(sourceBRFR, 22319, 22681)
    clip8=Trim(sourceBRFR, 22918, 25094)
    clip9=Trim(sourceBRFR, 25740, 25853)
    clip11=Trim(sourceBRFR, 26292, 0)
    #clipfin=Trim(source, 93995,0)
    sourceBRFR= clip1 + clip2 + clip3 + clip4 + clip5 + clip6 + clip7 + clip8 + clip9 + clip11

    StackHorizontal(sourceBRFR.subtitle ("Bluray FR"), sourceBR3D.subtitle ("Bluray 3D"))
    AssumeFPS("ntsc_film")
    #SoundOut()
    Return(last)#.Info()
    --------------------------------------------------------------------------------------------------------------

    So, what is the best way to process?
    What is the best way to load and export the lossless audio using avisynth?
    At the end, i want to export the final audio cut to FLAC 5.1 or LPCM 5.1 and split them to 6 channels.
    I will use the DTS-HD MA Encoder suite to encode the result in DTS-HD MA without quality loss.

    Can someone help me please?
    Pierre
    Quote Quote  
  2. I'm not sure there's anything wrong with your process, although maybe try using AlignedSplice (++) instead of UnAlignedSplice (+) to see if that makes any difference.

    You could also save a bit of fiddling around if you join the trimmed sections as you go rather than joining them with clip1 + clip2 etc.
    Are you using AssumeFPS(23.976, sync_audio=false) because the video has a different frame rate such as 24 or 25fps? If so, you might need to slow the audio down before editing it. There's a function in my signature for doing that.

    It's been a while since I've done this sort of thing, but I dug out an old script and it looked like this. It's very similar to the way you're doing it, if not the same (the CropResize and Position functions are also in my signature, although you don't actually need them).

    Code:
    Audio1 = FFAudioSource("D:\Video1.mkv")
    Video1 = FFVideoSource("D:\Video1.mkv").CropResize(720,396)
    Video2 = FFVideoSource("D:\Video2.mkv").CropResize(720,396).Position(Time=false)
    
    Video1Audio1 = AudioDub(Video1, Audio1)
    Silence = BlankClip(Video1Audio1) # For adding blank frames with silence.
    
    NewVideoAudio = \
    Video1Audio1.Trim(29, 9145) ++ \
    Video1Audio1.Trim(9147, 23318) ++ \
    Silence.Trim(23319, 23320) ++ \
    Video1Audio1.Trim(23321, 0)
    
    Stacked = StackVertical(NewVideoAudio.Position(Time=false), Video2)
    Dubbed = AudioDub(Video2, NewVideoAudio)
    
    return Stacked
    # return Dubbed
    # return NewVideoAudio.KillVideo()
    Last edited by hello_hello; 21st Mar 2024 at 23:48.
    Quote Quote  



Similar Threads

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