VideoHelp Forum
+ Reply to Thread
Results 1 to 6 of 6
Thread
  1. I'm using this script in avisynth:

    Code:
    SetMTMode(5, 4)
    SetMemoryMax(1600)
    loadplugin("C:\Program Files (x86)\AviSynth 2.5\plugins\DGAVCDecode.dll")
    A= DirectShowSource("audio PID 1100 L2 2ch 48 192 DELAY -3ms.mp2", video=false)
    V= AvcSource(video.dga")
    AudioDub(V, A)
    Trim(639,15946) + Trim(20972,29961)
    The thing is, I don't know how to actually edit the MP2 Audio. I'm encoding with x264, so that takes care of the video. Should I use something different to edit the audio?
    Quote Quote  
  2. I figured out a good way to do this. If you're wondering, I decided to open the script in virtualdub and save the audio as a WAV, then use nero to encode it to AAC.
    Quote Quote  
  3. Member
    Join Date
    Nov 2002
    Location
    United States
    Search Comp PM
    You could also open script in Virtualdub, do any editing if necessary and then use the external encoder feature to save as aac.mp4.

    Encoder Set:

    MP4 Medium

    Video encoder: x264 Medium
    Audio encoder: neroaac
    Multiplexer: mp4box

    File description: mp4box
    File extension: mp4box

    Encoders:

    x264 Medium:

    Type: Video encoder
    Program: C:\Tools\x264.exe
    Command argument: --crf 17 --preset medium --tune film --demuxer raw --input-csp i420 --input-res %(width)x%(height) --fps %(fpsnum)/%(fpsden) -o "%(tempvideofile)" -
    Output parameters: %(outputname).264
    Launch parameters:
    x Interpret non zero return code as error
    x Redirect standard output to log
    x Redirect standard error to log

    neroaac

    Type: Audio encoder
    Program: C:\Tools\neroAacEnc.exe
    Command argument: -q 0.45 -ignorelength -if - -of "%(tempaudiofile)"
    Output parameters: %(outputname).aac
    Launch parameters:
    x Interpret non zero return code as error
    x Redirect standard output to log
    x Redirect standard error to log

    Audio Tab:
    Input format: WAV file
    Compression: Bypass compression

    mp4box:

    Type: Multiplexer
    Program: C:\Tools\MP4Box\MP4Box.exe
    Command argument: -add "%(tempvideofile)" -add "%(tempaudiofile)" "%(outputname)" -fps %(fps)
    Output parameters:
    Launch parameters:
    x Interpret non zero return code as error
    x Redirect standard output to log
    x Redirect standard error to log
    x Delete output file before starting

    or...


    Here is my most resent encoder set vdprof file. It has most encoder sets that you would ever use. Change the .txt extension to .vdprof and place in C:\Tools\VDPROF folder. Open Virtualdub and under Options, choose External encoders, choose import and select the .vdprof file.

    Most of my CLI encoders are in my C:\Tools folder unless they depend on other files. You'll need to either find and download all the CLI encoders or you could download Selur's Hybrid program that has then all in one folder. You'll need to redirect the external encoder to wherever you have the CLI encoders.

    It seems like a lot of work but once you have them set up, just choose File > Export > Using external encoder > choose appropriate encoder > Save as > Save.
    Image Attached Files
    Quote Quote  
  4. MeGUI has an "AVS Cutter" under the Tools menu. It basically just adds "Trim()" or multiple trims to a script as you've already done. It'll also save a "cuts file" which can be loaded into MeGUI's audio section and the audio will then be re-encoded to match the video.
    Alternatively, MeGUI has an audio cutter under the Tools menu. It'll load the same "cuts file" and split and rejoin the audio to match the video without re-encoding it, if you'd prefer not to.

    MeGUI's audio cutter uses BeSplit to do the work. You could probably split and rejoin the audio yourself via a commandline but that'd involve converting Trim() to timecodes, I'd imagine.... I just let MeGUI do it.
    Quote Quote  
  5. If you want to cut only and without re-encoding MP2 you may use mp3DirectCut.
    Quote Quote  
  6. Banned
    Join Date
    Oct 2004
    Location
    Freedonia
    Search Comp PM
    The old MPEGVCR program has a true MPEG-2 audio editor. Just FYI. But it can't handle H.264 video so you really have to just want to edit the audio to use it.
    Quote Quote  
Visit our sponsor! Try DVDFab and backup Blu-rays!