I have a video file that has a stereo audio track and two additional stereo streams of audio. I'll include the mediainfo details at the end. The closest I've come to being able to excerpt a portion of this large file, while keeping all of the streams, is this:
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
This seems to give me a bunch of extra streams, though. What's a correct command to do this?
I was expecting four streams, one video, a second for the video's main audio, then two additional strems of 2channels each. This is what my command shows in 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
thanks for any guidance on this.
This seemns to work:
I guess it's simpler than i thought.