我是 FFMPEG 的新手,所以我需要一些专业用户的帮助。
我有一个相对简单的任务:
我有一些 MOV 文件,其中有一个音轨,包含 16 个声道。我想删除最后 14 个音轨,并创建一个包含复制的视频(不重新编码)和前两个声道的文件。最后 14 个音轨应该被丢弃。
我找到了很多关于创建 5.1 文件等的教程,但不是我需要的。有人能给我指出正确的方向,甚至发布完成此任务的命令吗?
以下是来自源文件的信息,希望能给您带来帮助:
ffmpeg version N-94664-g0821bc4eee Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 9.1.1 (GCC) 20190807
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt
libavutil 56. 33.100 / 56. 33.100
libavcodec 58. 55.101 / 58. 55.101
libavformat 58. 31.104 / 58. 31.104
libavdevice 58. 9.100 / 58. 9.100
libavfilter 7. 58.101 / 7. 58.101
libswscale 5. 6.100 / 5. 6.100
libswresample 3. 6.100 / 3. 6.100
libpostproc 55. 6.100 / 55. 6.100
Guessed Channel Layout for Input Stream #0.1 : hexadecagonal
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'l:\Tag1 02092019\Stream 2 - Hilfsmittel\Teil1\Capture0000.mov':
Metadata:
creation_time : 2000-01-01T02:00:52.000000Z
com.apple.quicktime.player.version: 7.7.9 (Dev)
com.apple.quicktime.version: 7.7.9 (1680.95.84)
com.apple.quicktime.player.movie.audio.gain: 1.000000
com.apple.quicktime.player.movie.audio.treble: 0.000000
com.apple.quicktime.player.movie.audio.bass: 0.000000
com.apple.quicktime.player.movie.audio.balance: 0.000000
com.apple.quicktime.player.movie.audio.pitchshift: 0.000000
com.apple.quicktime.player.movie.audio.mute:
com.apple.quicktime.player.movie.visual.brightness: 0.000000
com.apple.quicktime.player.movie.visual.color: 1.000000
com.apple.quicktime.player.movie.visual.tint: 0.000000
com.apple.quicktime.player.movie.visual.contrast: 1.000000
Duration: 02:19:11.52, start: 0.000000, bitrate: 103685 kb/s
Stream #0:0(eng): Video: prores (LT) (apcs / 0x73637061), yuv422p10le(tv, bt709/unknown/unknown, top coded first (swapped)), 1920x1080, 85219 kb/s, SAR 1:1 DAR 16:9, 25 fps, 25 tbr, 2500 tbn, 2500 tbc (default)
Metadata:
creation_time : 2000-01-01T02:00:52.000000Z
handler_name : Apple Video Media Handler
encoder : Apple ProRes 422 LT
Stream #0:1(eng): Audio: pcm_s24le (lpcm / 0x6D63706C), 48000 Hz, hexadecagonal, s32 (24 bit), 18432 kb/s (default)
Metadata:
creation_time : 2000-01-01T02:00:52.000000Z
handler_name : Apple Sound Media Handler
答案1
您可以使用-map_channel
选项:
ffmpeg -i input.mov -map_channel 0.0.0 -map_channel 0.0.1 -c:v copy output.mov
其他渠道操纵选项包括channelmap
筛选. 请参阅维基页面查看更多示例。