VideoHelp Forum
+ Reply to Thread
Results 1 to 3 of 3
Thread
  1. Member
    Join Date: Apr 2013
    Location: Italy
    Search PM
    Hi ****,

    please can you help the ***?

    with this commandline I put an audio track to a mp4 that don't have any audio:

    ffmpeg.exe -y -i source.mp4 -i audiotrack.wav -vcodec copy -c:a ac3 -b:a 256k -aspect 16:9 output.mp4


    Now I wonder: and for audio replacement?

    and IF the source.mp4 have jet any audio track (or audio tracks) can I modify the commandline so that the only audio that videoANDaudio.mp4 become to have, is audiotrack.wav? FFMpeg have to delete all audio track inside source.mp4 (if it have any audio track) and add the only audiotrack.wav

    is it possible?

    thanks
    Quote Quote  
  2. Member
    Join Date: Sep 2007
    Location: Canada
    Search Comp PM
    you need to use -map

    Code:
    ffmpeg.exe -i source.mp4 -i audiotrack.wav -map 0:0 -map 1:0 -c:v copy -c:a ac3 -b:a 256k -aspect 16:9 output.mp4
    Quote Quote  
  3. Member
    Join Date: Apr 2013
    Location: Italy
    Search PM
    Name:  SUPERCAT.jpg
Views: 66
Size:  31.1 KB mmmmm good
    Quote Quote