metalx1000

FFMPEG Multi Audio Track Videos

May 7th, 2016
631
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.67 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. echo "An example of creating an Multi Audio Track Video."
  4. echo "This can be used for different Languages or "
  5. echo "============================================"
  6. echo "             Getting Media                  "
  7. echo "============================================"
  8.  
  9. #downloading Video and Audio tracks
  10. youtube-dl -c "https://youtu.be/9L-chI5kj3A" -o video
  11. youtube-dl -c -x --audio-format mp3 "https://youtu.be/1U7f5sczZ-c" -o track1.mp3
  12.  
  13. echo "Combining Both Audio Tracking into one Video file"
  14. ffmpeg -i video* -i track1.mp3 -map 0 -map 1 -c copy output1.mkv
  15.  
  16. echo "Swapping Audio Tracks..."
  17. ffmpeg -i output1.mkv -map 0:2 -map 0:1 -map 0:0 -c copy output2.mkv
Add Comment
Please, Sign In to add comment