VideoHelp Forum
+ Reply to Thread
Results 1 to 3 of 3
Thread
  1. Member
    Join Date
    Dec 2008
    Location
    Canada
    Search Comp PM
    Hi
    I would like to have avidemux take an avi file, replace the audio with another mp3 file and, of course, output a new avi file with only the inputted mp3 audio, the same way mkvtoolnix works with mkv files.
    I download old tv series and movies for old people to view and some, particularly Afred Hitchcock's series are only in avi.
    I took visual basic in 1996 when I was very young at 53, but I have never written a batch file.
    If someone could guide me or steer me to a place where I can learn, I would share some of my delicious homemade wine (if you are close enough) or else name one of my delicious homemade wine batches after him/her.
    i also thank you very much.
    Lorne
    Quote Quote  
  2. You have to explain exactly what you want to do, e.g. why the output has to be an avi, which other mp3 should replace the original audio (length and sync problems), why you want to replace the original audio etc.
    We also need details about the source files.
    Post a mediainfo report (text mode) of such an avi here.
    Quote Quote  
  3. Member
    Join Date
    Apr 2007
    Location
    Australia
    Search Comp PM
    Using ffmpeg.exe. All avi & mp3 files in the same folder with ffmpeg.

    AddnewMP3.cmd
    Code:
    if not exist New\ md New
    for %%a in ("*.mp3") do if exist "%%~na.avi" ffmpeg.exe -i "%%~na.avi" -i "%%a" -map 0:v -map 1:a -bsf:v h264_mp4toannexb -c:v copy -c:a copy -y "New\%%~na.avi"
    echo Output is in the New\ folder &pause
    This is a small modification of a batch file I have to hand. Should work. No testing done.

    Cheers.
    EDIT: If you have problems playing the output avi try running the batch file again AFTER removing -bsf:v h264_mp4toannexb
    This bitstream filter can cause problems with some players
    Last edited by pcspeak; 23rd May 2024 at 16:52.
    Quote Quote  



Similar Threads

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