我有一个视频文件,其中有一个立体声音轨和两个额外的立体声音频流。我将在最后包含媒体信息详细信息。我最接近能够摘录这个大文件的一部分,同时保留所有流的是:
ffmpeg -i output.mov -ss 1200 -map 0 -c copy -to 00:21:00 -map 0:1 -c:a copy -map 0:2 -c:a copy output_excerpt.mov
不过,这似乎给了我很多额外的流量。执行此操作的正确命令是什么?
我期待四个流,一个视频,第二个视频的主音频,然后是两个额外的流,每个流有 2 个通道。这是我的命令在 mediainfo 中显示的内容:
Complete name : output_excerpt.mov
Format : MPEG-4
Format profile : QuickTime
Codec ID : qt 0000.02 (qt )
File size : 492 MiB
Duration : 1 min 0 s
Overall bit rate mode : Variable
Overall bit rate : 68.8 Mb/s
Frame rate : 29.970 FPS
Writing application : Lavf58.76.100
Video
ID : 1
Format : ProRes
Format version : Version 0
Format profile : 422 HQ
Codec ID : apch
Duration : 1 min 0 s
Source duration : 59 s 993 ms
Bit rate mode : Variable
Bit rate : 58.8 Mb/s
Width : 720 pixels
Height : 540 pixels
Display aspect ratio : 4:3
Frame rate mode : Constant
Frame rate : 29.970 (30000/1001) FPS
Color space : YUV
Chroma subsampling : 4:2:2
Scan type : Progressive
Bits/(Pixel*Frame) : 5.043
Stream size : 421 MiB (85%)
Source stream size : 440 MiB (89%)
Writing library : Apple
Matrix coefficients : BT.470 System B/G
mdhd_Duration : 60025
Audio #1
ID : 2
Format : PCM
Format settings : Little / Signed
Codec ID : sowt
Duration : 1 min 0 s
Bit rate mode : Constant
Bit rate : 1 536 kb/s
Channel(s) : 2 channels
Channel layout : L R
Sampling rate : 48.0 kHz
Bit depth : 16 bits
Stream size : 11.0 MiB (2%)
Default : Yes
Alternate group : 1
Audio #2
ID : 3
Format : PCM
Format settings : Little / Signed
Codec ID : sowt
Duration : 1 min 0 s
Source duration : 1 min 0 s
Bit rate mode : Constant
Bit rate : 1 411.2 kb/s
Channel(s) : 2 channels
Channel layout : L R
Sampling rate : 44.1 kHz
Bit depth : 16 bits
Stream size : 10.1 MiB (2%)
Source stream size : 10.1 MiB (2%)
Default : No
Alternate group : 2
mdhd_Duration : 60008
Audio #3
ID : 4
Format : PCM
Format settings : Little / Signed
Codec ID : sowt
Duration : 1 min 0 s
Source duration : 1 min 0 s
Bit rate mode : Constant
Bit rate : 1 411.2 kb/s
Channel(s) : 2 channels
Channel layout : L R
Sampling rate : 44.1 kHz
Bit depth : 16 bits
Stream size : 10.1 MiB (2%)
Source stream size : 10.1 MiB (2%)
Default : No
Alternate group : 3
mdhd_Duration : 60008
Audio #4
ID : 5
Format : PCM
Format settings : Little / Signed
Codec ID : sowt
Duration : 1 min 0 s
Bit rate mode : Constant
Bit rate : 1 536 kb/s
Channel(s) : 2 channels
Channel layout : L R
Sampling rate : 48.0 kHz
Bit depth : 16 bits
Stream size : 11.0 MiB (2%)
Default : Yes
Alternate group : 4
Audio #5
ID : 6
Format : PCM
Format settings : Little / Signed
Codec ID : sowt
Duration : 1 min 0 s
Source duration : 1 min 0 s
Bit rate mode : Constant
Bit rate : 1 411.2 kb/s
Channel(s) : 2 channels
Channel layout : L R
Sampling rate : 44.1 kHz
Bit depth : 16 bits
Stream size : 10.1 MiB (2%)
Source stream size : 10.1 MiB (2%)
Default : No
Alternate group : 5
mdhd_Duration : 60008
感谢您对此的任何指导。
这似乎有效:
ffmpeg -i output2.mov -ss 1200 -map 0 -c copy -to 00:21:00 output_excerpt.mov
我想这比我想象的要简单。