gpt4 book ai didi

ffmpeg - 如何从mov文件中提取ffmpeg中的音频

转载 作者:行者123 更新时间:2023-12-04 23:12:26 27 4
gpt4 key购买 nike

我有一个带有 .mov 的 ProRes422 文件容器:FINAL.mov .我想将音轨保存到一个新文件中(没有编码或任何东西,只需将其保存)。在 QuickTime 中有一个选项可以保存“仅音频”——
enter image description here
ffmpeg 中执行此操作的等效方法是什么? ?从基础研究来看,似乎是这样的:

$ ffmpeg \
-i FINAL.mov \
-vn # remove video? \
?? # keep audio \
MYAUDIO_FINAL.mov
$ ffmpeg -i给出:
Guessed Channel Layout for Input Stream #0.1 : stereo
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'FINAL.mov':
Metadata:
major_brand : qt
minor_version : 537199360
compatible_brands: qt
creation_time : 2016-01-11T19:23:10.000000Z
com.apple.finalcutstudio.media.uuid: CE6F1278-8982-4B98-9E46-AE7C329436EF
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
com.apple.quicktime.player.version: 7.6.6 (7.6.6)
com.apple.quicktime.version: 7.7.3 (2826.24) 0x7738000 (Mac OS X, 10.9.5, 13F34)
Duration: 00:01:59.58, start: 0.000000, bitrate: 154872 kb/s
Stream #0:0(eng): Video: prores (apch / 0x68637061), yuv422p10le(bt709, progressive), 1920x1080, 153307 kb/s, SAR 1:1 DAR 16:9, 23.98 fps, 23.98 tbr, 23976 tbn, 23976 tbc (default)
Metadata:
creation_time : 2016-01-11T19:23:10.000000Z
handler_name : Apple Alias Data Handler
encoder : Apple ProRes 422 (HQ)
Stream #0:1(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, stereo, s16, 1536 kb/s (default)
Metadata:
creation_time : 2016-01-11T19:23:10.000000Z
handler_name : Apple Alias Data Handler
还有一个带有 8 channel 音频的文件:
  Duration: 01:10:12.00, start: 0.000000, bitrate: 173231 kb/s
Stream #0:0(eng): Video: prores (apch / 0x68637061), yuv422p10le(bt709, progressive), 1920x1080, 164007 kb/s, SAR 1:1 DAR 16:9, 23.98 fps, 23.98 tbr, 24k tbn, 24k tbc (default)
Metadata:
handler_name : Apple Alias Data Handler
encoder : Apple ProRes 422 (HQ)
Stream #0:1(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, 1 channels (FL), s32 (24 bit), 1152 kb/s (default)
Metadata:
handler_name : Apple Alias Data Handler
Stream #0:2(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, 1 channels (FR), s32 (24 bit), 1152 kb/s (default)
Metadata:
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:
handler_name : Apple Alias Data Handler
Stream #0:4(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, 1 channels (LFE), s32 (24 bit), 1152 kb/s (default)
Metadata:
handler_name : Apple Alias Data Handler
Stream #0:5(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, 1 channels (BL), s32 (24 bit), 1152 kb/s (default)
Metadata:
handler_name : Apple Alias Data Handler
Stream #0:6(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, 1 channels (BR), s32 (24 bit), 1152 kb/s (default)
Metadata:
handler_name : Apple Alias Data Handler
Stream #0:7(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, 1 channels (DL), s32 (24 bit), 1152 kb/s (default)
Metadata:
handler_name : Apple Alias Data Handler
Stream #0:8(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, 1 channels (DR), s32 (24 bit), 1152 kb/s (default)
Metadata:
handler_name : Apple Alias Data Handler
At least one output file must be specified

最佳答案

ffmpeg -i input.mov -map 0:a -c copy output.mov
  • -map 0:a从输入中选择 # 0全部 a音频流。使用 -map禁用默认 stream selection否则默认情况下会为每种流类型选择一个流的行为。
  • 这使用 stream copy模式( -c copy )所以它就像复制和粘贴,不会发生重新编码。
  • 关于ffmpeg - 如何从mov文件中提取ffmpeg中的音频,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63235173/

    27 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com