[FFmpeg-user] cutting and merging video and audio with different audio configs
Kevin Wells
kevwells at hotmail.co.uk
Sat Oct 17 12:27:33 CEST 2015
Hi, I have two videos which I want to cut and concatenate together but they have different audio configurations.Clip1 has: video, mono, mono, mono, mono, mono, mono, stereo.
Clip2 has: video, stereo, mono, mono, mono, mono, mono, mono.
I want to take clip 1 and cut it, -ss 38.75 -to 46.25 and then concatenate with clip 2, my resulting clip should have an audio config of video, mono, mono, mono, mono, mono, mono, stereo.So I need to map the audios correctly. I have looked at various solutions for concatenating and mapping audio, but can't figure out how to do both in one command.Here is the ffmpeg output for Clip 1:ffmpeg -i /Users/Movies/Clip1.mov
ffmpeg version 2.8.1-tessus Copyright (c) 2000-2015 the FFmpeg developers
built with Apple LLVM version 6.0 (clang-600.0.57) (based on LLVM 3.5svn)
configuration: --cc=/usr/bin/clang --prefix=/opt/ffmpeg --as=yasm --extra-version=tessus --enable-avisynth --enable-fontconfig --enable-gpl --enable-libass --enable-libbluray --enable-libfreetype --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopus --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzmq --enable-version3 --disable-ffplay --disable-indev=qtkit --disable-indev=x11grab_xcb
libavutil 54. 31.100 / 54. 31.100
libavcodec 56. 60.100 / 56. 60.100
libavformat 56. 40.101 / 56. 40.101
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 40.101 / 5. 40.101
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 2.101 / 1. 2.101
libpostproc 53. 3.100 / 53. 3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/Users/kev/Movies/Clip1.mov':
Metadata:
major_brand : qt
minor_version : 537199360
compatible_brands: qt
creation_time : 2015-06-19 08:58:43
Duration: 00:01:58.04, start: 0.000000, bitrate: 162728 kb/s
Stream #0:0(eng): Video: prores (apch / 0x68637061), yuv422p10le(bt709), 1920x1080, 153454 kb/s, SAR 1:1 DAR 16:9, 24 fps, 24 tbr, 24 tbn, 24 tbc (default)
Metadata:
creation_time : 2015-06-19 08:58:43
handler_name : Apple Alias Data Handler
encoder : Apple ProRes 422 HQ
timecode : 00:00:00:00
Stream #0:1(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, mono, s32 (24 bit), 1152 kb/s (default)
Metadata:
creation_time : 2015-06-19 08:58:43
handler_name : Apple Alias Data Handler
Stream #0:2(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, mono, s32 (24 bit), 1152 kb/s (default)
Metadata:
creation_time : 2015-06-19 08:58:43
handler_name : Apple Alias Data Handler
Stream #0:3(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, mono, s32 (24 bit), 1152 kb/s (default)
Metadata:
creation_time : 2015-06-19 08:58:43
handler_name : Apple Alias Data Handler
Stream #0:4(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, mono, s32 (24 bit), 1152 kb/s (default)
Metadata:
creation_time : 2015-06-19 08:58:43
handler_name : Apple Alias Data Handler
Stream #0:5(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, mono, s32 (24 bit), 1152 kb/s (default)
Metadata:
creation_time : 2015-06-19 08:58:43
handler_name : Apple Alias Data Handler
Stream #0:6(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, mono, s32 (24 bit), 1152 kb/s (default)
Metadata:
creation_time : 2015-06-19 08:58:43
handler_name : Apple Alias Data Handler
Stream #0:7(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, stereo, s32 (24 bit), 2304 kb/s (default)
Metadata:
creation_time : 2015-06-19 08:58:43
handler_name : Apple Alias Data Handler
Stream #0:8(eng): Data: none (tmcd / 0x64636D74) (default)
Metadata:
creation_time : 2015-06-19 08:59:20
handler_name : Apple Alias Data Handler
timecode : 00:00:00:00
Here is the ffmpeg output for Clip 2:ffmpeg -i /Users/Movies/Clip2.mov
ffmpeg version 2.8.1-tessus Copyright (c) 2000-2015 the FFmpeg developers
built with Apple LLVM version 6.0 (clang-600.0.57) (based on LLVM 3.5svn)
configuration: --cc=/usr/bin/clang --prefix=/opt/ffmpeg --as=yasm --extra-version=tessus --enable-avisynth --enable-fontconfig --enable-gpl --enable-libass --enable-libbluray --enable-libfreetype --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopus --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzmq --enable-version3 --disable-ffplay --disable-indev=qtkit --disable-indev=x11grab_xcb
libavutil 54. 31.100 / 54. 31.100
libavcodec 56. 60.100 / 56. 60.100
libavformat 56. 40.101 / 56. 40.101
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 40.101 / 5. 40.101
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 2.101 / 1. 2.101
libpostproc 53. 3.100 / 53. 3.100
Guessed Channel Layout for Input Stream #0.2 : mono
Guessed Channel Layout for Input Stream #0.3 : mono
Guessed Channel Layout for Input Stream #0.4 : mono
Guessed Channel Layout for Input Stream #0.5 : mono
Guessed Channel Layout for Input Stream #0.6 : mono
Guessed Channel Layout for Input Stream #0.7 : mono
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/Users/kev/Movies/Clip2.mov':
Metadata:
major_brand : qt
minor_version : 512
compatible_brands: qt
encoder : Lavf56.40.101
Duration: 00:00:03.13, start: 0.000000, bitrate: 141790 kb/s
Stream #0:0(eng): Video: prores (apch / 0x68637061), yuv422p10le, 1920x1080, 135584 kb/s, 24 fps, 24 tbr, 12288 tbn, 12288 tbc (default)
Metadata:
handler_name : Apple Alias Data Handler
encoder : Lavc56.60.100 prores_ks
Stream #0:1(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, stereo, s16, 1536 kb/s (default)
Metadata:
handler_name : Apple Alias Data Handler
Stream #0:2(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, 1 channels, s16, 768 kb/s (default)
Metadata:
creation_time : 2015-10-17 06:32:18
handler_name : Apple Alias Data Handler
Stream #0:3(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, 1 channels, s16, 768 kb/s (default)
Metadata:
creation_time : 2015-10-17 06:32:40
handler_name : Apple Alias Data Handler
Stream #0:4(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, 1 channels, s16, 768 kb/s (default)
Metadata:
creation_time : 2015-10-17 06:32:55
handler_name : Apple Alias Data Handler
Stream #0:5(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, 1 channels, s16, 768 kb/s (default)
Metadata:
creation_time : 2015-10-17 06:33:18
handler_name : Apple Alias Data Handler
Stream #0:6(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, 1 channels, s16, 768 kb/s (default)
Metadata:
creation_time : 2015-10-17 06:33:35
handler_name : Apple Alias Data Handler
Stream #0:7(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, 1 channels, s16, 768 kb/s (default)
Metadata:
creation_time : 2015-10-17 06:33:48
handler_name : Apple Alias Data Handler
More information about the ffmpeg-user
mailing list