Page 1 of 1

Converted FLV->MP4: No iTunes audio, swapped streams

Posted: 18 Aug 2014 12:43
by apjanke
Hi, VLC folks. I may have run in to an issue with VLC on OS X.

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 constructed from .flv fragments downloaded from the KCRW website. You can reproduce by taking the file at this URL, renaming it to have a .flv extension, and using that as the input.
http://cf.c.ooyala.com/dkdjN1ZDqzW12tw7 ... eg1-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: now stream 0 was the audio, and stream 1 was the 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. Is this a VLC bug? Or is there some part of the conversion process that I'm missing?