[FFmpeg-user] No audio in 2nd concatenated part

Ulf Zibis Ulf.Zibis at CoSoCo.de
Fri Oct 13 02:49:26 EEST 2023


Hi,

I have concatenated 2 mkv videos, both with video and audio stream. In the resulting mkv video in the 2n part, there is no audio anymore.

What can I do, to have audio also in the 2nd part.

$ ffmpeg -f concat -safe 0 -i <(echo "file '$PWD/König_de.mkv'" && echo "file '$PWD/König_de_Abspann.mkv'") -c copy König_de_2.mkv
ffmpeg version 5.1.1-1ubuntu2.1 Copyright (c) 2000-2022 the FFmpeg developers
   built with gcc 12 (Ubuntu 12.2.0-3ubuntu1)
   configuration: --prefix=/usr --extra-version=1ubuntu2.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libglslang --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librist --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid 
--enable-libzimg --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --disable-sndio --enable-pocketsphinx --enable-librsvg --enable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-libplacebo --enable-shared
   libavutil      57. 28.100 / 57. 28.100
   libavcodec     59. 37.100 / 59. 37.100
   libavformat    59. 27.100 / 59. 27.100
   libavdevice    59.  7.100 / 59.  7.100
   libavfilter     8. 44.100 /  8. 44.100
   libswscale      6.  7.100 /  6.  7.100
   libswresample   4.  7.100 /  4.  7.100
   libpostproc    56.  6.100 / 56.  6.100
[matroska,webm @ 0x556462aa14c0] Auto-inserting h264_mp4toannexb bitstream filter
Input #0, concat, from '/dev/fd/63':
   Duration: N/A, start: 0.000000, bitrate: N/A
   Stream #0:0: Video: h264 (High), yuv420p(tv, bt709, progressive), 1280x688 [SAR 1:1 DAR 80:43], 24 fps, 24 tbr, 1k tbn
     Metadata:
       ENCODER         : Lavc59.37.100 libx264
       DURATION        : 02:08:03.063000000
   Stream #0:1: Audio: aac (LC), 48000 Hz, stereo, fltp
     Metadata:
       ENCODER         : Lavc59.37.100 aac
       DURATION        : 02:08:03.021000000
File 'König_de_2.mkv' already exists. Overwrite? [y/N] y
Output #0, matroska, to 'König_de_2.mkv':
   Metadata:
     encoder         : Lavf59.27.100
   Stream #0:0: Video: h264 (High) (H264 / 0x34363248), yuv420p(tv, bt709, progressive), 1280x688 [SAR 1:1 DAR 80:43], q=2-31, 24 fps, 24 tbr, 1k tbn
     Metadata:
       ENCODER         : Lavc59.37.100 libx264
       DURATION        : 02:08:03.063000000
   Stream #0:1: Audio: aac (LC) ([255][0][0][0] / 0x00FF), 48000 Hz, stereo, fltp
     Metadata:
       ENCODER         : Lavc59.37.100 aac
       DURATION        : 02:08:03.021000000
Stream mapping:
   Stream #0:0 -> #0:0 (copy)
   Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
[matroska,webm @ 0x556462eeee80] Auto-inserting h264_mp4toannexb bitstream filters speed=30.5x
frame=186583 fps=744 q=-1.0 Lsize= 1202413kB time=02:09:34.35 bitrate=1267.0kbits/s speed=  31x
video:1076832kB audio:121728kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.321466%

-Ulf



More information about the ffmpeg-user mailing list