[FFmpeg-user] QuickTime Player plays two audio tracks when I open a file transcoded with ffmpeg
Frank Häfemeier
ffmpeg at frank.haefemeier.eu
Tue Nov 27 00:43:28 CET 2012
Hi,
Am Montag, den 26.11.2012, 23:15 +0100 schrieb Gonzalo Suárez:
> Hi all.
>
> I'm having a weird behaviour when I open a file that was transcoded
> using ffmpeg. The command I used to transcode the file is the
> following:
>
> $ ffmpeg -i Collateral.vob -map 0:0 -map 0:30 -map 0:29 -preset
> ultrafast -crf 18 -vf crop=720:416 -profile:v high -ss 300 -t 30
> Collateral.mp4
>
> As you can see, I have two audio streams in the resulting mp4 file.
> When I open it in QuickTime Player and hit play, the audio of both
> streams is mixed. If I select View>Languages, none of the two streams
> is selected. If I select one of them, audio starts playing correctly.
I have the same behaviour if I try to look a video on my ipad. If there
are two different language streams in there, I have to select explicitly
a stream. Otherwise I will heard both. I hadn't thought about it,
but today I had another issue, which is related.
I tried to stream the video from my ipad to an Apple TV 2 (ATV2). And
now I heard nothing. But I found the reason and IMHO it has the same
root cause with your QuickTime player.
There was a recent change in ATV2 (got a hint from
http://www.videoredo.net/msgBoard/showthread.php?t=29620), the streams
must be grouped and only one stream should be enabled.
With the tool 'MP4Box' you can do this. If you call 'MP4Box -info
Collateral.mp4' it will create an output similar to this
* Movie Info *
Timescale 1000 - Duration 00:58:02.934
Fragmented File no - 3 track(s)
File suitable for progressive download (moov before mdat)
File Brand isom - version 512
Created: UNKNOWN DATE
File has no MPEG4 IOD/OD
iTunes Info:
Encoder Software: Lavf54.25.104
Track # 1 Info - TrackID 1 - TimeScale 25 - Duration 00:58:02.920
Media Info: Language "Undetermined" - Type "vide:avc1" - 87073 samples
Visual Track layout: x=0 y=0 width=1024 height=576
MPEG-4 Config: Visual Stream - ObjectTypeIndication 0x21
AVC/H264 Video - Visual Size 720 x 576
AVC Info: 1 SPS - 1 PPS - Profile High @ Level 3
NAL Unit length bits: 32
Pixel Aspect Ratio 64:45 - Indicated track size 1024 x 576
Self-synchronized
Track # 2 Info - TrackID 2 - TimeScale 48000 - Duration 00:58:02.933
Media Info: Language "German" - Type "soun:mp4a" - 163263 samples
MPEG-4 Config: Audio Stream - ObjectTypeIndication 0x40
MPEG-4 Audio MPEG-4 Audio AAC LC - 2 Channel(s) - SampleRate 48000
Synchronized on stream 1
Alternate Group ID 1
Track # 3 Info - TrackID 3 - TimeScale 48000 - Duration 00:58:02.912
Media Info: Language "German" - Type "soun:ac-3" - 108841 samples
AC3 stream - Sample Rate 48000 - 2 channel(s) - bitrate 448000
Alternate Group ID 1
You will see, ffmpeg had create the groups but both streams are enabled.
With the call 'MP4Box -disable 3 Collateral.mp4' you disable this audio
track. In my case this was the solution to hear again the audio on ATV2.
I don't know, if it is possible to do it with ffmpeg, but it would be
nice. I prefer to use only one tool.
Hope it helps.
Frank
P.S.: If you get an error message from 'MP4Box' like '[iso file]
Incomplete box ..w.' the reason could be a too old ffmpeg.
More information about the ffmpeg-user
mailing list