VideoHelp Forum
+ Reply to Thread
Results 1 to 14 of 14
Thread
  1. Hello everyone. I'm recorded some footage using Dxtory and the file was output as an AVI. The AVI contains 2 audio tracks, both can be heard when using WMP (speaker audio and microphone). When I open the file in VLC, only the speaker audio, not my microphone audio can be heard. I can switch between the two audio tracks using the mixer, but can't play both simultaneously. Likewise I can't compress the AVI into an MP4 and retain both audio tracks.

    Is there an easy way to do this? I don't need the tracks to be separate, I just need all video and audio to be in one playable file for upload to YouTube (so any YouTube compatible file format would work).
    Quote Quote  
  2. Member bat999's Avatar
    Join Date: Feb 2008
    Location: United Kingdom
    Search Comp PM
    Originally Posted by Herdo View Post
    ... the file was output as an AVI. The AVI contains 2 audio tracks...
    What does the file look like with MediaInfo, does it show a video track and two audio tracks?
    Let's see it.
    Quote Quote  
  3. Originally Posted by bat999 View Post
    Originally Posted by Herdo View Post
    ... the file was output as an AVI. The AVI contains 2 audio tracks...
    What does the file look like with MediaInfo, does it show a video track and two audio tracks?
    Let's see it.
    Ah, yes it does show two audio tracks.

    Source : Video:Lagarith Lossless Codec Audio0:Speakers (Razer Megalodon) Audio1:Microphone (Razer Megalodon)


    Quote Quote  
  4. Member bat999's Avatar
    Join Date: Feb 2008
    Location: United Kingdom
    Search Comp PM
    Originally Posted by Herdo View Post
    ... Ah, yes it does show two audio tracks...
    Hi
    You could put the audio tracks into Audacity and use "Mix and Render to New Track" then re-mux.

    Or to do the job with FFmpeg, this command is probably OK

    Code:
    ffmpeg -i filename.avi -c:v copy -filter_complex "[0:1][0:2]amerge=inputs=2" -c:a pcm_s16le output.avi

    And to convert it for YouTube at the same time, something like this...
    Code:
    ffmpeg -i filename.avi -c:v libx264 -crf 23 -preset medium -filter_complex "[0:1][0:2]amerge=inputs=2" -c:a aac -strict -2 -b:a 128k -ar 44100 -ac 2 output.mp4
    Quote Quote  
  5. vanished El Heggunte's Avatar
    Join Date: Jun 2009
    Location: Misplaced Childhood
    Search Comp PM
    You'd better demux the audio tracks and mix them with an audio editor.
    WMP doesn't know what is a stream switcher, now you know why it plays all audio streams at the same time.

    Oooops, bat999 was faster than I =^.^=
    Quote Quote  
  6. Handbrake or XMediaRecode.
    Quote Quote  
  7. Originally Posted by bat999 View Post
    Originally Posted by Herdo View Post
    ... Ah, yes it does show two audio tracks...
    Hi
    You could put the audio tracks into Audacity and use "Mix and Render to New Track" then re-mux.

    Or to do the job with FFmpeg, this command is probably OK

    Code:
    ffmpeg -i filename.avi -c:v copy -filter_complex "[0:1][0:2]amerge=inputs=2" -c:a pcm_s16le output.avi

    And to convert it for YouTube at the same time, something like this...
    Code:
    ffmpeg -i filename.avi -c:v libx264 -crf 23 -preset medium -filter_complex "[0:1][0:2]amerge=inputs=2" -c:a aac -strict -2 -b:a 128k -ar 44100 -ac 2 output.mp4
    Great, thank you! Got it mixed together, and exported as a single WAV file. What software do I use to "remux" the video and audio? Is this something I can do within VLC?
    Quote Quote  
  8. Member bat999's Avatar
    Join Date: Feb 2008
    Location: United Kingdom
    Search Comp PM
    ...
    Last edited by bat999; 18th May 2014 at 08:34.
    Quote Quote  
  9. Hmm, thanks for all the responses everyone.

    I thought I had it figured out with handbrake, adding a second track, but that doesn't seem to do anything.

    So starting from the beginning, I right-clicked on my avi file, clicked extract audio stream, and it gave me 2 wav files. I then put those into audacity, mixed and rendered them, then exported it as a WAV file.

    And now I am stuck. I guess what I need is a way to mix the new WAV file with the original AVI file, while removing the old audio tracks.
    Quote Quote  
  10. Originally Posted by Herdo View Post
    I thought I had it figured out with handbrake, adding a second track, but that doesn't seem to do anything.
    On the Audio Tab, Add Track (pulldown) -> Add All Remaining Tracks.

    Click image for larger version

Name:	tracks.png
Views:	13
Size:	1.96 MB
ID:	24900
    Quote Quote  
  11. Member bat999's Avatar
    Join Date: Feb 2008
    Location: United Kingdom
    Search Comp PM
    ...
    Quote Quote  
  12. Hmm, I don't have the drop down option. If I right click I have an option for "Add All Remaining Tracks", but it again only adds the one track. If I manually add a new track it and run handbrake, it still only plays one track. In VLC, the mixer shows 2 tracks though, and I can toggle between them.

    Sorry if I'm missing something here, I've never messed around with anything like this until this morning.
    Quote Quote  
  13. vanished El Heggunte's Avatar
    Join Date: Jun 2009
    Location: Misplaced Childhood
    Search Comp PM
    Originally Posted by Herdo View Post
    I guess what I need is a way to mix the new WAV file with the original AVI file, while removing the old audio tracks.
    AVI-Mux GUI. Or ffmpeg. Or VirtualDub.
    Quote Quote  
  14. Ok, I got it. I used VirtualDub and I clicked Audio->Audio From Another File, and I then used the combined audio file I created previously with Audacity.

    I then followed this guide to encode with x264.
    http://www.wcreplays.com/forums/showthread.php?t=113891

    My file is now compressed and much smaller and also has both audio tracks audible.


    The video is 1080p 30fps, about 10 minutes long and about 500MBs. Does this sound reasonable? The quality is very good.

    Also, the video is compressed but not converted from AVI. I guess this isn't really a problem because YouTube allows AVI uploads, however if there is an easy way to convert the file to MP4 without compressing, I'd be happy to hear it.

    Thank you everyone!
    Last edited by Herdo; 1st May 2014 at 16:06.
    Quote Quote