Stream order swapped when converting FLV -> MP4
It looks like stream order can be rearranged when converting between container formats.
I used VLC to convert a .flv Flash video to .m4v MP4, keeping the original codec streams, and in the process it switched the stream order. The resulting file plays correctly in VLC, but not in iTunes and Quicktime: there is no audio output, only video, in the Apple programs.
I used VLC 2.1.5 x64 on OS X 10.9.4.
I did the conversion by doing a File -> Convert / Stream, and using a custom profile named "MP4 - No transcode" with these settings: Encapsulation: MP4/MOV Video codec: [X] Video, [X] Keep original video track Audio codec: [X] Audio, [X] Keep original audio track
The input file was an FLV file downloaded from the KCRW website. You can reproduce it by taking the file at this URL, renaming it to have a .flv extension, and using that as the input. cf.c.ooyala.com/dkdjN1ZDqzW12tw7ET4FT7tiG-4P9_qa/RxMStukup89p4FAO1Ahq8DNPeARvoo8fyPMGaAlJ4H6nglO48TZn-p4cVGGsAraZ/video_1800_640Seg1-Frag17
The input file had the following streams: Stream 0: H.264 video Stream 1: MPEG AAC Audio (mp4a)
The output file kept the same codecs, but the streams were swapped: Stream 0: MPEG AAC Audio (mp4a) Stream 1: H.264 video
The converter insisted I use the .m4v file extension instead of .mp4, so I used that initially. I also switched it to .mp4 to see if that would get Quicktime to notice the audio, but that had no effect.
After this didn't work, I did the same conversion using ffmpeg. It kept the streams in the same order, and both VLC and iTunes/Quicktime were able to play the resulting output file. So it looks like Apple's playback stuff has trouble with this stream arrangement.
I would expect that the conversion utility would keep the stream order the same when re-encapsulating a file. This seems like a bug in VLC's conversion behavior.
(I originally posted this to the forums here - https://forum.videolan.org/viewtopic.php?f=12&t=121126 - but didn't get a response, so I think this is an actual bug and am posting it to the bug tracker now.)