VideoHelp Forum

+ Reply to Thread
Results 1 to 8 of 8
  1. I'm trying to shift the audio for around 50 files using avidemux command line. Other than shifting the audio, I want the file formats, codecs etc. to remain the same.

    I used the following on a single file:

    avidemux --load inputfile.mkv --audio-delay -200 --save outputfile.mkv
    and avidemux opens and appears to process the file with no errors, but the audio of the output file doesn't change. What am I doing wrong?
    Quote Quote  
  2. Member
    Join Date
    Dec 2005
    Search Comp PM
    I'm using version 2.4.4 and it works OK for me.
    Note that it's avidemux2_cli.exe in the version I'm using.

    avidemux2_cli.exe --load clip_oos.mkv --audio-delay -200 --save outputfile.mkv
    Quote Quote  
  3. Hi sambat. I'm using 2.7.6. I used avidemux_cli instead of avidemux but the audio of my output file remain unchanged.

    I tried posting the cmd output in my reply but I think the forum won't let me. I've attached the output in a .txt file.
    Image Attached Files
    Quote Quote  
  4. Member
    Join Date
    Dec 2005
    Search Comp PM
    From your output text:

    [AudioEncoder] Selected copy for index 0, tag 0x0

    Unknown command :--audio-delay
    I'll download 2.7.6 and try my input.
    Quote Quote  
  5. Did you manage to check this sambat?
    Quote Quote  
  6. With v. 2.6.0 I checked the available arguments with : “avidemux2_cli.exe --help”, “--audio-delay” does seem to be available :

     Command line possible arguments :
        --nogui, Run in silent mode  (no args)
        --listfilters, list all filters by name  (no args)
        --run, load and run a script  (one arg)
        --audio-normalize, activate normalization  (one arg)
        --audio-resample, resample to x hz  (one arg)
        --filters, load a filter preset  (one arg)
        --codec-conf, load a codec configuration  (one arg)
        --save-jpg, save JPEG images  (one arg)
        --begin, set start frame  (one arg)
        --end, set end frame  (one arg)
        --save-unpacked-vop, save avi, unpacking vop  (one arg)
        --save-packed-vop, save avi, packing vop  (one arg)
        --save-ogm, save as ogm file   (one arg)
        --save-raw-audio, save audio as-is   (one arg)
        --save-raw-video, save raw video stream (mpeg/... )   (one arg)
        --save-uncompressed-audio, save uncompressed audio  (one arg)
        --load, load video or workbench  (one arg)
        --load-workbench, load workbench file  (one arg)
        --append, append video  (one arg)
        --save, save avi  (one arg)
        --save-workbench, save workbench file  (one arg)
        --force-b-frame, Force detection of bframe in next loaded file  (no args)
        --force-alt-h264, Force use of alternate read mode for h264  (no args)
        --force-unpack, Force detection of packed vop in next loaded file  (no args)
        --force-smart, Engage smart copy mode with CQ=3 at next save  (no args)
        --external-mp3, load external mpeg audio as audio track  (one arg)
        --external-ac3, load external ac3 audio as audio track  (one arg)
        --external-wav, load external wav audio as audio track  (one arg)
        --no-audio, load external wav audio as audio track  (no args)
        --audio-delay, set audio time shift in ms (+ or -)  (one arg)
        --audio-map, build audio map (MP3 VBR)  (no args)
        --audio-bitrate, set audio encoding bitrate  (one arg)
        --fps, set frames per second  (one arg)
        --audio-codec, set audio codec (AAC/AC3/COPY/MP2/MP3/NONE (WAV PCM)/TWOLAME)  (one arg)
        --video-codec, set video codec (COPY/DV/FFHUFF/FFmpeg4/FFV1/FLV1/H263/HUFF/MJPEG/REQUANT/x264/XDVD/Xvid4/YV12)  (one arg)
        --video-conf, set video codec conf (cq=q|cbr=br|2pass=size)[,mbr=br][,matrix=(0|1|2|3)]  (one arg)
        --reuse-2pass-log, reuse 2pass logfile if it exists  (no args)
        --set-pp, set post processing default value, value(1=hdeblok|2=vdeblock|4=dering) and strength (0-5)  (two args)
        --vobsub, Create vobsub file (vobfile vosubfile ifofile)  (three args)
        --autosplit, split every N MBytes  (one arg)
        --info, show information about loaded video and audio streams  (no args)
        --autoindex, try to generate required index files  (no args)
        --output-format, set output format (AVI|OGM|ES|PS|AVI_DUAL|AVI_UNP|...)  (one arg)
        --rebuild-index, rebuild index with correct frame type  (no args)
        --var, set var (--var myvar=3)  (one arg)
        --help, print this  (no args)
        --quit, exit avidemux  (no args)
        --probePat, Probe for PAT//PMT..  (one arg)
    You typed “avidemux_cli”, but as “sambat” wrote above the CLI executable is usually named “avidemux2_cli.exe”. Apparently it worked anyway, and according to the log it's the CLI version indeed that was launched, so perhaps it has changed in that newer version. Anyway, I don't get why the --audio-delay is not recognized.

    If it still fails, this could also be done with mkvmerge, or ffmpeg.

    mkvmerge --output outputfile.mkv --sync 1:-200 inputfile.mkv --track-order 0:0,0:1
    ffmpeg -i inputfile.mkv -itsoffset 0.200 -i inputfile.mkv -map 1:v -map 0:a -c copy outputfile.mkv
    (Not tested)

    EDIT : I tested Avidemux 2.7.6 :
    1) Indeed the executable files have been renamed, so it's avidemux_cli, not avidemux2_cli as it used to be.
    2) The list of available arguments appears to be much shorter, surprisingly, and “--audio-delay” is no longer there :
     Command line possible arguments :
        --append, append video  (one arg )
        --audio-codec, set audio codec (copy|Lame|FDK_AAC|LavAC3|Opus|TwoLame|...)  (one arg )
        --avisynth-port, set avsproxy port accordingly  (one arg )
        --help, print this  ( no arg )
        --info, show information about loaded video and audio streams  ( no arg )
        --list-audio-languages, list all available audio langues  ( no arg )
        --load, load video or workbench  (one arg )
        --nogui, Run in silent mode  ( no arg )
        --output-format, set output format (MKV|MP4|ffTS|ffPS|AVI|RAW|...)  (one arg )
        --quit, exit avidemux  ( no arg )
        --slave, run as slave, master is on port arg  (one arg )
        --run, load and run a script  (one arg )
        --save, save video  (one arg )
        --save-jpg, save a jpeg  (one arg )
        --save-raw-audio, save audio as-is   (one arg )
        --save-uncompressed-audio, save uncompressed audio  (one arg )
        --set-audio-language, Set language of an active audio track {track_index} {language_short_name} (two args )
        --var, set var (--var myvar=3)  (one arg )
        --video-codec, set video codec (Copy|x264|x265|xvid4|ffMpeg2|ffNvEnc|...)  (one arg )
    This is really weird, normally an updated program should have at least as many options, or more, but not less. Does anyone have a clue as to why Avidemux CLI got stripped down like this ?
    Anyway, you're left with the two other methods I suggested above.
    Last edited by abolibibelot; 5th Aug 2020 at 21:56.
    Quote Quote  
  7. Weird. Anyhow, success following your instructions for mkvmerge, so many thanks. Will be interested to hear what's up with Avidemux.
    Quote Quote  
  8. Apart from “As you probably have noticed, avidemux is very GUI oriented”, I couldn't find much on the subject doing a quick search yesterday. And even that page hasn't been updated recently, as it still mentions options which apparently are gone.
    Quote Quote  

Similar Threads