gpt4 book ai didi

ffmpeg trim .mp3 - 输出长度强制为 2 秒

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

我刚刚下载了最新版本的 ffmpeg,我正在尝试从 40 秒的 .mp3 文件中修剪前 14 秒和最后 6 秒。

我的问题是没关系-t X我使用,输出总是只有 2 秒的长度。这是我第一次使用 ffmpeg,但似乎有什么东西迫使它将输出限制为 2 秒。

我尝试了很多命令,包括

ffmpeg -ss 00:00:14.358 -i input.mp3 -ab 32k -t 00:00:20.04 -c:a copy output.mp3 -y

ffmpeg -ss 14 -i input.mp3 -ab 32k -t 20 -c:a copy output.mp3 -y

ffmpeg -ss 14 -i input.mp3 -t 20 -acodec copy output.mp3 -y

ffmpeg -ss 14 -i input.mp3 -acodec copy output.mp3 -y

ffmpeg -ss 14 -t 20 -i input.mp3 output.mp3

ffmpeg -ss 14 -i input.mp3 -t 20 output.mp3

但结果几乎总是一个 2 秒的 mp3 文件。
现在我没有想法了。

根据要求,这是控制台的输出:
> Input #0, mp3, from 'C:\Track7.mp3':   Duration: 00:00:40.49, start:
> 0.000000, bitrate: 128 kb/s
> Stream #0:0: Audio: mp3, 44100 Hz, stereo, s16p, 128 kb/s Output #0, mp3, to 'C:\Track7.mp3': Metadata:
> TSSE : Lavf57.2.100
> Stream #0:0: Audio: mp3, 44100 Hz, stereo, 128 kb/s Stream mapping: Stream #0:0 -> #0:0 (copy) Press [q] to stop, [?] for help
> size= 1kB time=00:00:00.00 bitrate= 752.3kbits/s video:0kB
> audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing
> overhead: 110.287079%
>
> C:\Je>ffmpeg -ss 00:00:14.358 -i "C:\Track7.mp3" -t 5 -c:a copy
> "C:\Track7.mp3" -y ffmpeg version N-75463-g53e8bef Copyright (c)
> 2000-2015 the FFmpeg developers built with gcc 4.9.3 (GCC)
> configuration: --enable-gpl --enable-version3 --disable-w32threads
> --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnu tls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libdcadec --enable-libfreetype --enable-libgme --enab le-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable
> -libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --ena ble-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --e nable-libxavs --enable-libxvid --enable-lzma --enable-decklink --enable-zlib libavutil 55. 2.100 / 55. 2.100 libavcodec 57. 3.100 /
> 57. 3.100 libavformat 57. 2.100 / 57. 2.100 libavdevice 57. 0.100 / 57. 0.100 libavfilter 6. 6.100 / 6. 6.100 libswscale 4. 0.100 / 4. 0.100 libswresample 2. 0.100 /
> 2. 0.100 libpostproc 54. 0.100 / 54. 0.100 [mp3 @ 0000000002fb02c0] Skipping 0 bytes of junk at 0. [mp3 @
> 0000000002fb02c0] Estimating duration from bitrate, this may be
> inaccurate Input #0, mp3, from 'C:\Track7.mp3': Duration:
> 00:00:40.49, start: 0.000000, bitrate: 128 kb/s
> Stream #0:0: Audio: mp3, 44100 Hz, stereo, s16p, 128 kb/s Output #0, mp3, to 'C:\Track7.mp3': Metadata:
> TSSE : Lavf57.2.100
> Stream #0:0: Audio: mp3, 44100 Hz, stereo, 128 kb/s Stream mapping: Stream #0:0 -> #0:0 (copy) Press [q] to stop, [?] for help
> size= 32kB time=00:00:02.04 bitrate= 129.5kbits/s video:0kB
> audio:32kB subtitle:0kB other streams:0kB global headers:0kB muxing
> overhead: 1.410433%
>
> C:\Je>ffmpeg -ss 00:00:14.358 -i "C:\Track7.mp3" -c:a copy
> "C:\Track7.mp3" -t 5 -y ffmpeg version N-75463-g53e8bef Copyright (c)
> 2000-2015 the FFmpeg developers built with gcc 4.9.3 (GCC)
> configuration: --enable-gpl --enable-version3 --disable-w32threads
> --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnu tls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libdcadec --enable-libfreetype --enable-libgme --enab le-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable
> -libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --ena ble-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --e nable-libxavs --enable-libxvid --enable-lzma --enable-decklink --enable-zlib libavutil 55. 2.100 / 55. 2.100 libavcodec 57. 3.100 /
> 57. 3.100 libavformat 57. 2.100 / 57. 2.100 libavdevice 57. 0.100 / 57. 0.100 libavfilter 6. 6.100 / 6. 6.100 libswscale 4. 0.100 / 4. 0.100 libswresample 2. 0.100 /
> 2. 0.100 libpostproc 54. 0.100 / 54. 0.100 Trailing options were found on the commandline. [mp3 @ 0000000003020300] Skipping 0
> bytes of junk at 0. [mp3 @ 0000000003020300] Estimating duration from
> bitrate, this may be inaccurate Input #0, mp3, from 'C:\Track7.mp3':
> Duration: 00:00:40.49, start: 0.000000, bitrate: 128 kb/s
> Stream #0:0: Audio: mp3, 44100 Hz, stereo, s16p, 128 kb/s Output #0, mp3, to 'C:\Track7.mp3': Metadata:
> TSSE : Lavf57.2.100
> Stream #0:0: Audio: mp3, 44100 Hz, stereo, 128 kb/s Stream mapping: Stream #0:0 -> #0:0 (copy) Press [q] to stop, [?] for help
> size= 32kB time=00:00:02.04 bitrate= 129.5kbits/s video:0kB
> audio:32kB subtitle:0kB other streams:0kB global headers:0kB muxing
> overhead: 1.410433%
>
> C:\Je>ffmpeg -ss 00:00:14.358 -i "C:\Track7.mp3" -c:a copy -t 5
> "C:\Track7.mp3" -y ffmpeg version N-75463-g53e8bef Copyright (c)
> 2000-2015 the FFmpeg developers built with gcc 4.9.3 (GCC)
> configuration: --enable-gpl --enable-version3 --disable-w32threads
> --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnu tls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libdcadec --enable-libfreetype --enable-libgme --enab le-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable
> -libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --ena ble-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --e nable-libxavs --enable-libxvid --enable-lzma --enable-decklink --enable-zlib libavutil 55. 2.100 / 55. 2.100 libavcodec 57. 3.100 /
> 57. 3.100 libavformat 57. 2.100 / 57. 2.100 libavdevice 57. 0.100 / 57. 0.100 libavfilter 6. 6.100 / 6. 6.100 libswscale 4. 0.100 / 4. 0.100 libswresample 2. 0.100 /
> 2. 0.100 libpostproc 54. 0.100 / 54. 0.100 [mp3 @ 00000000003102c0] Skipping 0 bytes of junk at 0. [mp3 @
> 00000000003102c0] Estimating duration from bitrate, this may be
> inaccurate Input #0, mp3, from 'C:\Track7.mp3': Duration:
> 00:00:40.49, start: 0.000000, bitrate: 128 kb/s
> Stream #0:0: Audio: mp3, 44100 Hz, stereo, s16p, 128 kb/s Output #0, mp3, to 'C:\Track7.mp3': Metadata:
> TSSE : Lavf57.2.100
> Stream #0:0: Audio: mp3, 44100 Hz, stereo, 128 kb/s Stream mapping: Stream #0:0 -> #0:0 (copy) Press [q] to stop, [?] for help
> size= 32kB time=00:00:02.04 bitrate= 129.5kbits/s video:0kB
> audio:32kB subtitle:0kB other streams:0kB global headers:0kB muxing
> overhead: 1.410433%
>
> C:\Je>ffmpeg -ss 00:00:14.358 -t 5 -i "C:\Track7.mp3" -c:a copy
> "C:\Track7.mp3" -y ffmpeg version N-75463-g53e8bef Copyright (c)
> 2000-2015 the FFmpeg developers built with gcc 4.9.3 (GCC)
> configuration: --enable-gpl --enable-version3 --disable-w32threads
> --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnu tls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libdcadec --enable-libfreetype --enable-libgme --enab le-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable
> -libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --ena ble-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --e nable-libxavs --enable-libxvid --enable-lzma --enable-decklink --enable-zlib libavutil 55. 2.100 / 55. 2.100 libavcodec 57. 3.100 /
> 57. 3.100 libavformat 57. 2.100 / 57. 2.100 libavdevice 57. 0.100 / 57. 0.100 libavfilter 6. 6.100 / 6. 6.100 libswscale 4. 0.100 / 4. 0.100 libswresample 2. 0.100 /
> 2. 0.100 libpostproc 54. 0.100 / 54. 0.100 [mp3 @ 0000000002fb02c0] Skipping 0 bytes of junk at 0. [mp3 @
> 0000000002fb02c0] Estimating duration from bitrate, this may be
> inaccurate Input #0, mp3, from 'C:\Track7.mp3': Duration:
> 00:00:40.49, start: 0.000000, bitrate: 128 kb/s
> Stream #0:0: Audio: mp3, 44100 Hz, stereo, s16p, 128 kb/s Output #0, mp3, to 'C:\Track7.mp3': Metadata:
> TSSE : Lavf57.2.100
> Stream #0:0: Audio: mp3, 44100 Hz, stereo, 128 kb/s Stream mapping: Stream #0:0 -> #0:0 (copy) Press [q] to stop, [?] for help
> size= 32kB time=00:00:02.04 bitrate= 129.5kbits/s video:0kB
> audio:32kB subtitle:0kB other streams:0kB global headers:0kB muxing
> overhead: 1.410433%
>
> C:\Je>ffmpeg -i "C:\Track7.mp3"-ss 00:00:14.358 -acodec copy
> "C:\Track7.mp3" -y ffmpeg version N-75463-g53e8bef Copyright (c)
> 2000-2015 the FFmpeg developers built with gcc 4.9.3 (GCC)
> configuration: --enable-gpl --enable-version3 --disable-w32threads
> --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnu tls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libdcadec --enable-libfreetype --enable-libgme --enab le-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable
> -libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --ena ble-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --e nable-libxavs --enable-libxvid --enable-lzma --enable-decklink --enable-zlib libavutil 55. 2.100 / 55. 2.100 libavcodec 57. 3.100 /
> 57. 3.100 libavformat 57. 2.100 / 57. 2.100 libavdevice 57. 0.100 / 57. 0.100 libavfilter 6. 6.100 / 6. 6.100 libswscale 4. 0.100 / 4. 0.100 libswresample 2. 0.100 /
> 2. 0.100 libpostproc 54. 0.100 / 54. 0.100 C:\Track7.mp3-ss: No such file or directory
>
> C:\Je>ffmpeg -i "C:\Track7.mp3" -ss 00:00:14.358 -acodec copy
> "C:\Track7.mp3" -y ffmpeg version N-75463-g53e8bef Copyright (c)
> 2000-2015 the FFmpeg developers built with gcc 4.9.3 (GCC)
> configuration: --enable-gpl --enable-version3 --disable-w32threads
> --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnu tls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libdcadec --enable-libfreetype --enable-libgme --enab le-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable
> -libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --ena ble-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --e nable-libxavs --enable-libxvid --enable-lzma --enable-decklink --enable-zlib libavutil 55. 2.100 / 55. 2.100 libavcodec 57. 3.100 /
> 57. 3.100 libavformat 57. 2.100 / 57. 2.100 libavdevice 57. 0.100 / 57. 0.100 libavfilter 6. 6.100 / 6. 6.100 libswscale 4. 0.100 / 4. 0.100 libswresample 2. 0.100 /
> 2. 0.100 libpostproc 54. 0.100 / 54. 0.100 [mp3 @ 0000000002fb0240] Skipping 0 bytes of junk at 0. [mp3 @
> 0000000002fb0240] Estimating duration from bitrate, this may be
> inaccurate Input #0, mp3, from 'C:\Track7.mp3': Duration:
> 00:00:40.49, start: 0.000000, bitrate: 128 kb/s
> Stream #0:0: Audio: mp3, 44100 Hz, stereo, s16p, 128 kb/s Output #0, mp3, to 'C:\Track7.mp3': Metadata:
> TSSE : Lavf57.2.100
> Stream #0:0: Audio: mp3, 44100 Hz, stereo, 128 kb/s Stream mapping: Stream #0:0 -> #0:0 (copy) Press [q] to stop, [?] for help
> size= 0kB time=00:00:00.00 bitrate=N/A video:0kB audio:0kB
> subtitle:0kB other streams:0kB global headers:0kB muxing overhead:
> unknown Output file is empty, nothing was encoded (check -ss / -t /
> -frames parameters if used)
>
> C:\Je>ffmpeg -ss 00:00:14.358 -i "C:\Track7.mp3" -c:a copy
> "C:\Track7.mp3" -y ffmpeg version N-75463-g53e8bef Copyright (c)
> 2000-2015 the FFmpeg developers built with gcc 4.9.3 (GCC)
> configuration: --enable-gpl --enable-version3 --disable-w32threads
> --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnu tls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libdcadec --enable-libfreetype --enable-libgme --enab le-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable
> -libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --ena ble-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --e nable-libxavs --enable-libxvid --enable-lzma --enable-decklink --enable-zlib libavutil 55. 2.100 / 55. 2.100 libavcodec 57. 3.100 /
> 57. 3.100 libavformat 57. 2.100 / 57. 2.100 libavdevice 57. 0.100 / 57. 0.100 libavfilter 6. 6.100 / 6. 6.100 libswscale 4. 0.100 / 4. 0.100 libswresample 2. 0.100 /
> 2. 0.100 libpostproc 54. 0.100 / 54. 0.100 [mp3 @ 0000000002fb0220] Skipping 0 bytes of junk at 0. [mp3 @
> 0000000002fb0220] Estimating duration from bitrate, this may be
> inaccurate Input #0, mp3, from 'C:\Track7.mp3': Duration:
> 00:00:40.49, start: 0.000000, bitrate: 128 kb/s
> Stream #0:0: Audio: mp3, 44100 Hz, stereo, s16p, 128 kb/s Output #0, mp3, to 'C:\Track7.mp3': Metadata:
> TSSE : Lavf57.2.100
> Stream #0:0: Audio: mp3, 44100 Hz, stereo, 128 kb/s Stream mapping: Stream #0:0 -> #0:0 (copy) Press [q] to stop, [?] for help
> size= 32kB time=00:00:02.04 bitrate= 129.5kbits/s video:0kB
> audio:32kB subtitle:0kB other streams:0kB global headers:0kB muxing
> overhead: 1.410433%
>
> C:\Je>ffmpeg -ss 00:00:14.358 -i "C:\Track7.mp3" -ab 32k -c:a copy
> "C:\Track7.mp3" -y ffmpeg version N-75463-g53e8bef Copyright (c)
> 2000-2015 the FFmpeg developers built with gcc 4.9.3 (GCC)
> configuration: --enable-gpl --enable-version3 --disable-w32threads
> --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnu tls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libdcadec --enable-libfreetype --enable-libgme --enab le-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable
> -libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --ena ble-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --e nable-libxavs --enable-libxvid --enable-lzma --enable-decklink --enable-zlib libavutil 55. 2.100 / 55. 2.100 libavcodec 57. 3.100 /
> 57. 3.100 libavformat 57. 2.100 / 57. 2.100 libavdevice 57. 0.100 / 57. 0.100 libavfilter 6. 6.100 / 6. 6.100 libswscale 4. 0.100 / 4. 0.100 libswresample 2. 0.100 /
> 2. 0.100 libpostproc 54. 0.100 / 54. 0.100 [mp3 @ 0000000002fb02c0] Skipping 0 bytes of junk at 0. [mp3 @
> 0000000002fb02c0] Estimating duration from bitrate, this may be
> inaccurate Input #0, mp3, from 'C:\Track7.mp3': Duration:
> 00:00:40.49, start: 0.000000, bitrate: 128 kb/s
> Stream #0:0: Audio: mp3, 44100 Hz, stereo, s16p, 128 kb/s Output #0, mp3, to 'C:\Track7.mp3': Metadata:
> TSSE : Lavf57.2.100
> Stream #0:0: Audio: mp3, 44100 Hz, stereo, 128 kb/s Stream mapping: Stream #0:0 -> #0:0 (copy) Press [q] to stop, [?] for help
> size= 32kB time=00:00:02.04 bitrate= 129.5kbits/s video:0kB
> audio:32kB subtitle:0kB other streams:0kB global headers:0kB muxing
> overhead: 1.410433%
>
> C:\Je>ffmpeg -ss 00:00:14.358 -i "C:\Track7.mp3" -ab 32k -t
> 00:00:20.04 -c:a copy "C:\Track7.mp3" -y ffmpeg version
> N-75463-g53e8bef Copyright (c) 2000-2015 the FFmpeg developers built
> with gcc 4.9.3 (GCC) configuration: --enable-gpl --enable-version3
> --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnu tls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libdcadec --enable-libfreetype --enable-libgme --enab le-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame
> --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable
> -libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --ena ble-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --e nable-libxavs --enable-libxvid --enable-lzma --enable-decklink --enable-zlib libavutil 55. 2.100 / 55. 2.100 libavcodec 57. 3.100 /
> 57. 3.100 libavformat 57. 2.100 / 57. 2.100 libavdevice 57. 0.100 / 57. 0.100 libavfilter 6. 6.100 / 6. 6.100 libswscale 4. 0.100 / 4. 0.100 libswresample 2. 0.100 /
> 2. 0.100 libpostproc 54. 0.100 / 54. 0.100 [mp3 @ 00000000031903c0] Skipping 0 bytes of junk at 0. [mp3 @
> 00000000031903c0] Estimating duration from bitrate, this may be
> inaccurate Input #0, mp3, from 'C:\Track7.mp3': Duration:
> 00:00:40.49, start: 0.000000, bitrate: 128 kb/s
> Stream #0:0: Audio: mp3, 44100 Hz, stereo, s16p, 128 kb/s Output #0, mp3, to 'C:\Track7.mp3': Metadata:
> TSSE : Lavf57.2.100
> Stream #0:0: Audio: mp3, 44100 Hz, stereo, 128 kb/s Stream mapping: Stream #0:0 -> #0:0 (copy) Press [q] to stop, [?] for help
> size= 32kB time=00:00:02.04 bitrate= 129.5kbits/s video:0kB
> audio:32kB subtitle:0kB other streams:0kB global headers:0kB muxing
> overhead: 1.410433%

我究竟做错了什么 ?

最佳答案

以下为我工作。这是前 14 秒:

ffmpeg -i input.mp3 -ab 32k -c:a copy -t 00:00:14 output.mp3 -y

最后 4 秒(从结束前 6 秒开始 -> 40-6=34):
ffmpeg -ss 00:00:34 -i input.mp3 -ab 32k -c:a copy -t 00:00:06 output.mp3 -y

关于ffmpeg trim .mp3 - 输出长度强制为 2 秒,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32706422/

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