[FFmpeg-user] Multiple audio tracks

Mike Rotondo Rbigm101 at gmail.com
Thu Dec 1 07:01:20 CET 2011


For some reason this won't transcode.

Here is the mediainfo output

General
Unique ID                                :
208982034738622594494005333413410480718 (0x9D3879D194D7F24E9BDC5DEC23FDA24E)
Complete name                            : Sample.mkv
Format                                   : Matroska
Format version                           : Version 2
File size                                : 37.9 MiB
Duration                                 : 1mn 2s
Overall bit rate                         : 5 072 Kbps
Encoded date                             : UTC 2011-11-05 13:06:58
Writing application                      : mkvmerge v4.4.0 ('Die
Wiederkehr') built on Oct 31 2010 21:52:48
Writing library                          : libebml v1.0.0 + libmatroska
v1.0.0

Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : High at L4.1
Format settings, CABAC                   : Yes
Format settings, ReFrames                : 5 frames
Muxing mode                              : Header stripping
Codec ID                                 : V_MPEG4/ISO/AVC
Duration                                 : 1mn 2s
Width                                    : 1 920 pixels
Height                                   : 800 pixels
Display aspect ratio                     : 2.40:1
Frame rate                               : 23.976 fps
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive

Audio #1
ID                                       : 2
Format                                   : AAC
Format/Info                              : Advanced Audio Codec
Format profile                           : LC
Codec ID                                 : A_AAC
Duration                                 : 1mn 2s
Channel(s)                               : 8 channels
Channel positions                        : Front: L C R, Side: L R, Back: L
R, LFE
Sampling rate                            : 48.0 KHz
Compression mode                         : Lossy
Delay relative to video                  : 14ms
Language                                 : English

Audio #2
ID                                       : 3
Format                                   : AAC
Format/Info                              : Advanced Audio Codec
Format profile                           : LC
Codec ID                                 : A_AAC
Duration                                 : 1mn 2s
Channel(s)                               : 2 channels
Channel positions                        : Front: L R
Sampling rate                            : 48.0 KHz
Compression mode                         : Lossy
Delay relative to video                  : 14ms
Language                                 : English

Audio #3
ID                                       : 4
Format                                   : AC-3
Format/Info                              : Audio Coding 3
Mode extension                           : CM (complete main)
Muxing mode                              : Header stripping
Codec ID                                 : A_AC3
Duration                                 : 1mn 2s
Bit rate mode                            : Constant
Bit rate                                 : 384 Kbps
Channel(s)                               : 6 channels
Channel positions                        : Front: L C R, Side: L R, LFE
Sampling rate                            : 48.0 KHz
Bit depth                                : 16 bits
Compression mode                         : Lossy
Delay relative to video                  : 29ms
Stream size                              : 2.87 MiB (8%)
Title                                    : takrian hindi 5.1

This is the command I am trying to use.

usr/local/bin/ffmpeg -i "/home/user/Downloads/Sample.mkv"
-acodec ac3 -ab 384k -vcodec copy -vbsf h264_mp4toannexb -f mpegts -y
Sample1.mkv

I don't think the fact that there is 8 channels in the audio is hurting it.
However there is this
hindi track and I'm worried that this may require me to remove the audio
tracks
then reinsert them. The problem with that is I'm transcoding for streaming.
 I would like it to be one command.

Here's the output:

ffmpeg version 0.8.7, Copyright (c) 2000-2011 the FFmpeg developers
  built on Nov 30 2011 19:19:32 with gcc 4.4.3
  configuration: --enable-gpl --enable-libfaac --enable-libmp3lame
--enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora
--enable-libvorbis --enable-libx264 --enable-nonfree --enable-postproc
--enable-version3 --enable-x11grab
  libavutil    51.  9. 1 / 51.  9. 1
  libavcodec   53.  8. 0 / 53.  8. 0
  libavformat  53.  5. 0 / 53.  5. 0
  libavdevice  53.  1. 1 / 53.  1. 1
  libavfilter   2. 23. 0 /  2. 23. 0
  libswscale    2.  0. 0 /  2.  0. 0
  libpostproc  51.  2. 0 / 51.  2. 0
[matroska,webm @ 0x18b6400] Estimating duration from bitrate, this may be
inaccurate

Seems stream 0 codec frame rate differs from container frame rate: 47.95
(20000000/417083) -> 23.98 (24000/1001)
Input #0, matroska,webm, from '/home/banana/Downloads/
Transformers-Dark of the Moon 2011 1080p BRRip 7.1{Dual Audio Eng Hindi}5.1
[Takrian]/Sample.mkv':
  Duration: 00:01:02.71, start: 0.000000, bitrate: 384 kb/s
    Stream #0.0: Video: h264 (High), yuv420p, 1920x800 [PAR 1:1 DAR 12:5],
23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)
    Stream #0.1(eng): Audio: aac, 48000 Hz, 7.1(wide), s16
    Stream #0.2(eng): Audio: aac, 48000 Hz, stereo, s16 (default)
    Stream #0.3: Audio: ac3, 48000 Hz, 5.1, s16, 384 kb/s
    Metadata:
      title           : takrian hindi 5.1
[ac3 @ 0x1b92680] channel_layout not specified
[ac3 @ 0x1b92680] No channel layout specified. The encoder will guess the
layout, but it might be incorrect.
[ac3 @ 0x1b92680] invalid channel layout
Output #0, mpegts, to 'Sample1.mp4':
    Stream #0.0: Video: libx264, yuv420p, 1920x800 [PAR 1:1 DAR 12:5],
q=2-31, 90k tbn, 23.98 tbc (default)
    Stream #0.1(eng): Audio: ac3, 48000 Hz, 8 channels, s16, 384 kb/s
Stream mapping:
  Stream #0.0 -> #0.0
  Stream #0.1 -> #0.1
Error while opening encoder for output stream #0.1 - maybe incorrect
parameters such as bit_rate, rate, width or height


More information about the ffmpeg-user mailing list