[FFmpeg-user] creating dash multiple audio codecs

James Northrup jim at vsiwest.com
Fri Mar 15 22:12:22 EET 2019


i'm trying to automate bumpers with audio content and supply dash in one
stroke.  the concat and split seem to be exactly like the sample code
promises.

my understanding is that dash is a format, so i can include multiple tracks
or programs in one container.  what happens appears to be 3 opus instead of
aac(orig)/aac(HE)/opus based on browser codec pref+bandwidth

ffmpeg -i 53f4cc2e686e87dc2004e0ed9669cb50.m4a -i
880f1ecd9c960940b077896915a3841c.m4a -i
aff159b2496019e9b714e6d6660d779c.m4a  \
-filter_complex 'concat=n=3:v=0:a=1:unsafe=1,asplit=3[out1][out2][out3]'
 -nostdin \
-map '[out1]' -c:a copy   \
-map '[out2]' -c:a libfdk_aac -b:a 32k -profile:a aac_he_v2 -map 1:a \
-map '[out3]' -c:a opus -b:a 32k -strict -2 -application voip
 -frame_duration 60 -vbr off -compression_level 10  -packet_loss 0  \
-dash_segment_type mp4  x.mpd

ffmpeg version N-93335-ga8c5ae4 Copyright (c) 2000-2019 the FFmpeg
developers
  built with gcc 8 (Ubuntu 8.3.0-2ubuntu2)
  configuration: --prefix=/home/jim/ffmpeg_build
--pkg-config-flags=--static --extra-cflags=-I/home/jim/ffmpeg_build/include
--extra-ldflags=-L/home/jim/ffmpeg_build/lib --extra-libs='-lpthread -lm'
--bindir=/home/jim/bin --disable-ffplay --enable-bzlib --enable-ffmpeg
--enable-gpl --enable-iconv --enable-libfdk-aac --enable-libmp3lame
--enable-libopus --enable-libsnappy --enable-libssh --enable-nonfree
--enable-openssl --enable-version3 --enable-zlib --enable-libfreetype
--enable-libtwolame --enable-libvpx --enable-avresample --enable-librsvg
--enable-libx264 --enable-libvorbis --enable-libtheora --enable-libfreetype
--enable-libtwolame --enable-libvpx --enable-avresample --enable-librsvg
--enable-libx264 --enable-libvorbis --enable-libtheora --disable-shared
--enable-lto --enable-static
  libavutil      56. 26.100 / 56. 26.100
  libavcodec     58. 47.103 / 58. 47.103
  libavformat    58. 26.101 / 58. 26.101
  libavdevice    58.  6.101 / 58.  6.101
  libavfilter     7. 48.100 /  7. 48.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  4.100 /  5.  4.100
  libswresample   3.  4.100 /  3.  4.100
  libpostproc    55.  4.100 / 55.  4.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from
'53f4cc2e686e87dc2004e0ed9669cb50.m4a':
  Metadata:
    major_brand     : M4A
    minor_version   : 512
    compatible_brands: isomiso2
    encoder         : Lavf58.26.101
  Duration: 00:00:07.95, start: 0.000000, bitrate: 33 kb/s
    Stream #0:0(und): Audio: aac (HE-AACv2) (mp4a / 0x6134706D), 44100 Hz,
stereo, fltp, 32 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
Input #1, mov,mp4,m4a,3gp,3g2,mj2, from
'880f1ecd9c960940b077896915a3841c.m4a':
  Metadata:
    major_brand     : M4A
    minor_version   : 512
    compatible_brands: isomiso2
    date            : 2019-03-08 20:15
    encoder         : Lavf58.26.101
  Duration: 00:01:13.25, start: 0.000000, bitrate: 32 kb/s
    Stream #1:0(und): Audio: aac (HE-AACv2) (mp4a / 0x6134706D), 44100 Hz,
stereo, fltp, 32 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
Input #2, mov,mp4,m4a,3gp,3g2,mj2, from
'aff159b2496019e9b714e6d6660d779c.m4a':
  Metadata:
    major_brand     : M4A
    minor_version   : 512
    compatible_brands: isomiso2
    encoder         : Lavf58.26.101
  Duration: 00:00:08.02, start: 0.000000, bitrate: 33 kb/s
    Stream #2:0(und): Audio: aac (HE-AACv2) (mp4a / 0x6134706D), 44100 Hz,
stereo, fltp, 32 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
Codec AVOption packet_loss (Expected packet loss percentage) specified for
output file #0 (x.mpd) has not been used for any stream. The most likely
reason is either wrong type (e.g. a video option with no video streams) or
that it is a private option of some encoder which was not actually used for
any stream.
Codec AVOption application (Intended application type) specified for output
file #0 (x.mpd) has not been used for any stream. The most likely reason is
either wrong type (e.g. a video option with no video streams) or that it is
a private option of some encoder which was not actually used for any stream.
Codec AVOption frame_duration (Duration of a frame in milliseconds)
specified for output file #0 (x.mpd) has not been used for any stream. The
most likely reason is either wrong type (e.g. a video option with no video
streams) or that it is a private option of some encoder which was not
actually used for any stream.
Codec AVOption vbr (VBR mode (1-5)) specified for output file #0 (x.mpd)
has not been used for any stream. The most likely reason is either wrong
type (e.g. a video option with no video streams) or that it is a private
option of some encoder which was not actually used for any stream.
Stream mapping:
  Stream #0:0 (aac) -> concat:in0:a0 (graph 0)
  Stream #1:0 (aac) -> concat:in1:a0 (graph 0)
  Stream #2:0 (aac) -> concat:in2:a0 (graph 0)
  asplit:output0 (graph 0) -> Stream #0:0 (opus)
  asplit:output1 (graph 0) -> Stream #0:1 (opus)
  Stream #1:0 -> #0:2 (aac (native) -> opus (native))
  asplit:output2 (graph 0) -> Stream #0:3 (opus)
[dash @ 0x55d4f4058900] Opening 'init-stream0.mp4' for writing
[dash @ 0x55d4f4058900] Opening 'init-stream1.mp4' for writing
[dash @ 0x55d4f4058900] Opening 'init-stream2.mp4' for writing
[dash @ 0x55d4f4058900] Opening 'init-stream3.mp4' for writing
Output #0, dash, to 'x.mpd':
  Metadata:
    major_brand     : M4A
    minor_version   : 512
    compatible_brands: isomiso2
    encoder         : Lavf58.26.101
    Stream #0:0: Audio: opus, 48000 Hz, stereo, fltp, 32 kb/s
    Metadata:
      encoder         : Lavc58.47.103 opus
    Stream #0:1: Audio: opus, 48000 Hz, stereo, fltp, 32 kb/s
    Metadata:
      encoder         : Lavc58.47.103 opus
    Stream #0:2(und): Audio: opus, 48000 Hz, stereo, fltp, 32 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
      encoder         : Lavc58.47.103 opus
    Stream #0:3: Audio: opus, 48000 Hz, stereo, fltp, 32 kb/s
    Metadata:
      encoder         : Lavc58.47.103 opus
[dash @ 0x55d4f4058900] Opening 'chunk-stream0-00001.mp4.tmp' for writing
[dash @ 0x55d4f4058900] Opening 'chunk-stream1-00001.mp4.tmp' for writing
[dash @ 0x55d4f4058900] Opening 'chunk-stream2-00001.mp4.tmp' for writing
[dash @ 0x55d4f4058900] Opening 'chunk-stream3-00001.mp4.tmp' for writing
[dash @ 0x55d4f4058900] Opening 'x.mpd.tmp' for writing
[...]


More information about the ffmpeg-user mailing list