Get MP4BOX and do it in a couple of passes.
First, get a good look at the streams in file, you will need to know their numbers so you can extract them appropriately:
mp4box -info media_file.m4v
Next, you will want to extract the individual streams:
mp4box -raw 1 media_file.m4v
mp4box -raw 2 media_file.m4v
etc...
Finally, you will want to reassemble the streams into a new container. Make special note that you may need to adjust the fps - MP4BOX defaults to 25fps. The info command from step 1 should include the relevant info
mp4box -add media_file.x264 -add media_file.aac -add media_file.ac3 -fps 23.976 new_output_container.m4v
For good measure, you may want to also take advantage of the new itags support to inject a bit of metadata into your m4v container:
mp4box -itags "name=Your Great Movie" new_output_container.m4v