Basic muxing of mp4 and m4a

Discuss about generic usage of MediaCoder.

Moderator: HuggiL

Post Reply
zorgkang
Beginner
Beginner
Posts: 9
Joined: Sat Jul 26, 2014 10:53 am

Basic muxing of mp4 and m4a

Post by zorgkang » Sat Jul 26, 2014 10:58 am

Hi,
I thought this would be straightforward, but it's not working so far. I want to copy video and audio (no recompression at all) and just mux the x264 encoded video stream from an mp4 file, and add the audio from a NERO-AAC encoded audio stream in an m4a file. FFmpeg gives error 15, MP4box says success, but there is no sound in the file, looks like there's 2 video streams instead? I haven't found yet if there's a detailed output log that would give me more info. Any tips, ideas? Or what more details should I give?
Thanks!

User avatar
HuggiL
Modest
Modest
Posts: 233
Joined: Tue Oct 18, 2011 3:44 am
Location: Perth, Australia

Re: Basic muxing of mp4 and m4a

Post by HuggiL » Sat Jul 26, 2014 3:10 pm

Are you trying to have two audio streams in one mp4 file? Or just the video from the mp4 file and add a separate audio track from the m4a?
In theory, theory and practice are the same. In practice, they are not.

Tips & Guides: http://forum.mediacoderhq.com/viewtopic.php?f=17&t=8061
Older versions: http://www.videohelp.com/tools/MediaCoder/old-versions#download

stanley
Site Admin
Site Admin
Posts: 4135
Joined: Mon May 15, 2006 7:43 pm
Location: Sydney

Re: Basic muxing of mp4 and m4a

Post by stanley » Sat Jul 26, 2014 7:08 pm

Muxing only does not always work. What's the input formats?
When things work together, things work.

zorgkang
Beginner
Beginner
Posts: 9
Joined: Sat Jul 26, 2014 10:53 am

Re: Basic muxing of mp4 and m4a

Post by zorgkang » Tue Jul 29, 2014 2:36 am

Thanks for the replies guys,

Stanley, I thought I gave the formats, unless you're asking something different?

To clarify, yes only video from the main input file which is an mp4 with x264 encoded video and has no audio. The external audio file I'm copying as I said is NERO-AAC encoded audio stream in an m4a file (also tried aac extension, in case that made a difference).

Edit: One thing I didn't mention is that the audio is mono.

I'll play with it some more today, but if you have tips, they are most welcome.
Cheers
(P.S. I was waiting to get email notifications, but apparently it doesn't work, was even checking my spam over the weekend.)

User avatar
HuggiL
Modest
Modest
Posts: 233
Joined: Tue Oct 18, 2011 3:44 am
Location: Perth, Australia

Re: Basic muxing of mp4 and m4a

Post by HuggiL » Tue Jul 29, 2014 2:08 pm

Interestingly, my MediaCoder just keeps crashing when I start converting a file with an external audio file... I've tried copy video/audio as well as reconverting them but the program crashes either way.
In theory, theory and practice are the same. In practice, they are not.

Tips & Guides: http://forum.mediacoderhq.com/viewtopic.php?f=17&t=8061
Older versions: http://www.videohelp.com/tools/MediaCoder/old-versions#download

zorgkang
Beginner
Beginner
Posts: 9
Joined: Sat Jul 26, 2014 10:53 am

Re: Basic muxing of mp4 and m4a

Post by zorgkang » Wed Jul 30, 2014 12:24 am

Hmm, that's too bad. Seems like a serious issue...

But since I've been able to get my live capture working (see my other post), it won't affect me too much anymore. I only have 1 recording of separate video and audio that I need to mux.

User avatar
HuggiL
Modest
Modest
Posts: 233
Joined: Tue Oct 18, 2011 3:44 am
Location: Perth, Australia

Re: Basic muxing of mp4 and m4a

Post by HuggiL » Wed Jul 30, 2014 2:34 pm

Seems the crashing was something else. Got it fixed it now.
Anyway, I tried this again using a mp4 video (it had its own audio track) and then using a mp3 external audio. My testing seems to find that copying tracks does not work, you will need to re-encode them. I just set the codecs and bitrate, everything else was basically left on auto/default.
In theory, theory and practice are the same. In practice, they are not.

Tips & Guides: http://forum.mediacoderhq.com/viewtopic.php?f=17&t=8061
Older versions: http://www.videohelp.com/tools/MediaCoder/old-versions#download

Post Reply