• Skip to content
  • Skip to primary sidebar
  • Skip to footer

Foliovision

Making the web work for you

Main navigation

  • Weblog
    • FV Player
    • WordPress
    • Video of the Week
    • Case Studies
    • Business
  • About
    • Testimonials
    • Meet the Team
    • We Support
    • Careers
    • Contact
    • Pricing
  • Products
  • Support
    • FV Player Docs
    • Pro Support
  • Login
  • Basket is empty
Affordable VAST/VPAID for Wordpress has arrived. Serve ads with your videos starting today!
    • Docs
      • Installation
      • Configuration
      • User guide
      • Downgrading
      • Changelog
    • FAQ
    • Support
      • Free Support
      • Pro Support
    • PRO

    How to Use Multiple Audio Tracks with FV Player

    List of contents:

    • How to Encode Multiple Audio Tracks
    • How to Serve Multiple Audio Tracks
      • FV Player Coconut
      • Amazon Web Services
    • How to Use Multiple Audio Tracks with FV Player
    • Example

    Adding multiple audio tracks to your videos opens up a world of possibilities. You can make your video available for as wide range of people as possible, or cater to the specific needs of your users. Subtitles are important, but sometimes they are not enough.

    Whether you want to include various language speakers, add a curated commentary to your short film, or even provide your music students with various layers of a song, that’s where multiple audio tracks come into play.

    How to Encode Multiple Audio Tracks

    Note: For Amazon Web services, the encoding happens in Mediaconvert. If you’re using AWS, click here.

    In order to stream a video with multiple audio tracks, you will need to encode it prior to hosting it anywhere. We recommend using the free and open-source tool FFmpeg. 

    The fact that FFmpeg works from a command line instead of having an interface of its own can be quite intimidating, but there’s no need to worry. It is truly powerful and best of its kind.  With the right command, which we will provide you with in this guide, you can do just about anything. And for any other needs, FFmpeg is backed by a huge community of devote users eager to help.

    Note: Unfortunately, more user friendly alternatives, such as HandBrake do not support this yet, but hopefully will in the future.

      1. Prepare both your video file and all your audio files into a single folder.
      2. Download FFmpeg here
      1. You might need to take further steps before being able to use FFmpeg successfully. All this depends on your operating system and download choice.
      2. Once you are sure FFmpeg is properly set up, open your command line and point it to the correct folder first, by inserting the cd (change directory) command. For example:
    cd desktop\subfolder\subfolder2
    1. Once pointed to the correct folder, insert the encoding command according to this scheme
    ffmpeg -i video.mp4 -i audio1.mp3 -i audio2.mp3 -i audio3.mp3 -map 0:v -map 1:a -map 2:a -map 3:a -metadata:s:a:0 language=eng -metadata:s:a:1 language=ger -metadata:s:a:2 language=spa -codec copy name-of-output-video.mp4

    If you are adding audio tracks, that are not languages, or wish to name your language tracks differently, instead of language=eng, write title=”Your Title”

    If you are inserting language instead of title, it is important to insert the correct language shortcuts to ensure, that the language gets recognized.

    Note: Multiple audio track files can only be in mp3 or AAC format.

    This is the encoding command used for adding multiple audio tracks to the example below. Adding English, German and Spanish language tracks in mp3 format to multiple-audio-tracks-raven.mp4 video and outputting a video called raven-multilangauge.mp4:

    ffmpeg -i multiple-audio-tracks-raven.mp4 -i  raven_en-edit.mp3 -i raven_de-edit.mp3 -i raven_es-edit.mp3 -map 0:v -map 1:a -map 2:a -map 3:a -metadata:s:a:0 language=eng -metadata:s:a:1 language=ger -metadata:s:a:2 language=spa  -codec copy raven-multilanguage.mp4

    How to Serve Multiple Audio Tracks

    Not all hosting services support using multiple audio tracks. You will also want to encode the files into an HLS Stream to ensure that all browsers will be able to play the video properly.

    Vimeo and YouTube do not support multiple audio tracks as of yet. YouTube is currently testing this feature and it could be available to the general public fairly soon.

    FV Player Coconut

    We recommend using Coconut, as it fully supports multiple audio tracks and you do not need to do anything special.

    Encode your video with multiple audio tracks encoded (via FFmpeg) into an HLS Stream via the free FV Player Coconut as you always would and insert the link into the FV Player shortcode editor.

    Amazon Web Services

    Amazon Web Services supports multiple audio tracks too. With AWS, you do not need to use FFmpeg, as the multiple audio tracks encoding happens all in the Mediaconvert console.

    1. Upload the audio files to your S3 bucket.
    2. Prepare the video input and outputs as per this guide.
    3. Go to Input and configure audio selectors.Choose selector type based on your needs and preferences (Language code, track, PID).

      You can add as many of them as you need by clicking Add audio selector.

      We recommend you add the audio files from your S3 bucket, as it is the easiest way. Browse S3 in the external file field.

    4. Now go over to the output group. You will need new outputs for each audio track. Do not add the audio into existing video outputs.

      Remove audio from encoding settings of all the video quality outputs, and remove video from encoding settings of audio inputs.

      This is an output group with a single video and 3 audio outputs:

    5. In each audio output, go to Output Settings -> Audio. Put in an arbitrary Audio group ID.

      The Audio group ID must be the same in all audio outputs.

      Then select the Audio track type – “Alternate audio, auto select, default” for the default audio and “Alternate audio,auto select, not default” for all the rest.

    6. AWS requires you to set an arbitrary Name modifier – this will be appended to the file name.

      Audio output settings
    7. Underneath, in Encoding Settings -> Audio Source Select the correct number of Audio Selector created in step 3. None of the other encoding settings are required for this purpose.
      Adding audio rendition sets to video output settings

      Double check, if all selectors have correct audio source and the same Audio group ID.

    8. Finally, go into all the video outputs. There, go to Output settings -> Advanced. Write the Audio group ID you set in step 5. to the Audio rendition sets. In this case, our audio group ID is simply called “Audio”:
    9. How to Use Multiple Audio Tracks With FV Player

      Just insert the link to the shortcode editor as you would a normal video, and FV Player will recognize the multiple audio tracks automatically.

      Once posted, the video will have an AUD button on the controlbar, allowing you to switch between the audio tracks.

      EXAMPLE

      video
      Link
      Share
      Tweet
      Share
      0 Shares

    Reader Interactions

    Primary Sidebar

    Advanced

    1. Why FV Player?
    2. Getting Started
    3. Download | Buy
    4. Basic Setup
    5. FV Player Demos
    6. Advanced
      1. Troubleshooting Javascript Errors
      2. How to use FV Player Database
      3. How to use FV Player Widget
      4. Integrations/Compatibility Options
      5. Setting up Video Custom Fields
      6. Timeline Previews
      7. Using Google Universal Analytics
      8. Using Google Analytics 4 with FV Player
      9. Using Matomo Analytics with FV Player
      10. AB Loop Function
      11. How to Use Subtitles
      12. How to Use Multiple Audio Tracks with FV Player
      13. Interactive Video Transcript
      14. Using LearnDash And Video Progression with FV Player
      15. How to Use Custom Start/End Time
      16. Optimizing FV Player Loading
      17. Sticky Video
      18. CSS Tips and Fixes
      19. Using FV Player with Minify Plugins
      20. How To Use FV Player With Tutor LMS
      21. How to Use the Speed Buttons
      22. Using FV Player with Chromecast
      23. FV Player Profile Videos
      24. Using Video SEO With FV Player Videos
      25. Video Downloading With Simple History Support
      26. Email Subscription Form Pop-ups
      27. How to create membership site with RCP and FV Player
      28. Using FV Player With AMP
      29. How To Use The Shortcode Conversion tool
      30. Popular Membership Plugins Compatible with FV Player
      31. Staging Sites For Developers
      32. Programmer's Guide
      33. Setting Up the HTML Pop-up Feature
      34. Changelog
      35. Incompatible Plugins and Scripts
    7. Video Hosting
    8. Securing Your Video
    9. Ads
    10. VAST/VPAID Ads
    11. Additional Services
    12. Legal
    13. Settings
    14. FV Player Pay Per View

    Footer

    Our Plugins

    • FV WordPress Flowplayer
    • FV Thoughtful Comments
    • FV Simpler SEO
    • FV Antispam
    • FV Gravatar Cache
    • FV Testimonials

    Free Tools

    • Pandoc Online
    • Article spinner
    • WordPress Password Finder
    • Delete LinkedIn Account
    • Responsive Design Calculator
    Foliovision logo
    All materials © 2022 Foliovision s.r.o. | Panská 12 - 81101 Bratislava - Slovakia | info@foliovision.com
    • This Site Uses Cookies
    • Privacy Policy
    • Terms of Service
    • Site Map
    • Contact
    • Tel. +1 518 412 4600

    We are using cookies to give you the best experience on our website.

    You can find out more about which cookies we are using or switch them off in settings.

    Powered by  GDPR Cookie Compliance
    Privacy Overview

    This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.

    Necessary Cookies

    Strictly Necessary Cookie allow you to log in and download your software or post to forums.

    We use the WordPress login cookie and the session cookie.

    If you disable this cookie, we will not be able to save your preferences. This means that every time you visit this website you will need to enable or disable cookies again.

    Support Cookies

    Foliovision.com uses self-hosted Rocket.chat and self-hosted Freescout support desk to provide support for FV Player users. These cookies allow our visitors to chat with us and/or submit support tickets.

    We are delighted to recommend self-hosted Rocket.chat and especially Freescout to other privacy-conscious independent publishers who would prefer to self-host support.

    Please enable Strictly Necessary Cookies first so that we can save your preferences!

    3rd Party Cookies

    This website uses Google Analytics and Statcounter to collect anonymous information such as the number of visitors to the site, and the most popular pages.

    Keeping this cookie enabled helps us to improve our website.

    We reluctantly use Google Analytics as it helps us to test FV Player against popular Google Analytics features. Feel free to turn off these cookies if they make you feel uncomfortable.

    Statcounter is an independent Irish stats service which we have been using since the beginning of recorded time, sixteen years ago.

    Please enable Strictly Necessary Cookies first so that we can save your preferences!