Take the 2-minute tour ×
Video Production Stack Exchange is a question and answer site for engineers, producers, editors, and enthusiasts spanning the fields of video, and media creation. It's 100% free, no registration required.

Ok so I have a video made from dxtory. The video is using dxtory video codec and unknown audio codec. When I pop the file into avimux, I can clearly see two audio tracks/sources. I have successfully converted the video without loss of quality with the following.

ffmpeg -i "The Bunker.avi" -vcodec h264 TheBunkerMix.mp4

But, the resultant file only had one track/source. Basically I recorded game footage and the original file had both the in game sounds as well as the mic recording commentary on top. But, when I did the conversion my audio commentary track/source got lost in conversion. What other options can I include to get my audio tracks?

EDIT 2:

I've gotten close now, but still not right. I have used the following but again its seems to ignore the first -map option. If I flipped which map comes second, that is the stream that is audible in the output. How do I mux them together so they both play?

ffmpeg -i "The Bunker.avi" -map 0:0 -map 0:1 -map 0:2 -vcodec h264 -acodec:0 mp
 -acodec:1 mp3 TheBunkerNwMix.mp4

This is the stream mappings so I have no idea why it isn't mapping correctly?

Stream mapping:
  Stream #0:0 -> #0:0 (dxtory -> libx264)
  Stream #0:1 -> #0:1 (pcm_s16le -> libmp3lame)
  Stream #0:2 -> #0:2 (pcm_s16le -> libmp3lame)
share|improve this question
    
Do you want to keep both audio tracks and just convert the file so it can be used in an editing program or do you want to mix both audio files into one? –  Professor Sparkles Jun 29 at 21:44
    
Yes I basically want a small mp4 that I can edit with, without loss of audio. –  Kyle Jun 30 at 15:31

1 Answer 1

up vote 2 down vote accepted

If you copied your command there then your issue is probably -acodec:0 mp. That should be -acodec:0 mp3.

You can just use -c:a mp3 to apply the encoding options to all audio tracks at once, no need to apply them for each individually.

Other than that your mapping is correct and shouldn't be the issue.

Edit: To conclude the discussion in the comments regarding the actual reason behind the question: When it comes to editing it is no problem to just transcode the video stream if the source codec makes problems and import the audio from the source file by either muxing the audio into a new container with the transcoded video stream or just importing the transcoded video and audio streams separately (by demuxing the source) into your editing program and skip on the container format.

share|improve this answer
    
Is it possible that its a playback problem inside of wmp? –  Kyle Jun 30 at 15:31
    
definitely, Windows Media Player is bad, really really bad when it comes to format compatibility. Try VLC or Media Player Classic Home Cinema. –  Professor Sparkles Jun 30 at 16:23
    
Ok I will give that a shot when I get home later. If it does work there, is it safe to assume it would import correctly into Premiere? –  Kyle Jun 30 at 16:35
    
Not necessarily when it comes to codecs but in the case of several audio tracks, yes it should. Though if you just want to edit it, you can just import the file like it is into Premiere, h264 is really not suitable for editing and degrades quality if you recorded with dxtory's lossless codec (h264 is highly lossy compressed). The codec should integrate into the Windows AVI codecs so Premiere would be able to use it. Edit: It does, you can just import the recordings without transcoding. –  Professor Sparkles Jun 30 at 17:12
    
Really? That is interesting. But, the file size is definitely a problem. 60 GB video file is not so easy to transfer, but I can probably give it a shot. –  Kyle Jun 30 at 19:13

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.