gpt4 book ai didi

带有图像的mp3上的ffmpeg amix过滤器

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

我使用 ffmpeg 将 2 个 mp3 文件与 amix 过滤器连接起来(请参阅完整日志)。

它适用于没有任何元数据的 mp3 文件,但它在元数据中带有封面图像的 mp3 文件失败,结果文件长度小于 1 秒。

我怎么能在同一个命令中修复它?

这是完整的日志:

localhost:Music user$ ffmpeg -i input.mp3 -i /opt/docker/tag_long.mp3 -filter_complex amix=inputs=2:duration=shortest,volume=2 -codec:a libmp3lame -q:a 5  out.mp3 -report
ffmpeg started on 2018-11-11 at 13:19:50
Report written to "ffmpeg-20181111-131950.log"
ffmpeg version 4.1 Copyright (c) 2000-2018 the FFmpeg developers
built with Apple LLVM version 10.0.0 (clang-1000.11.45.5)
configuration: --prefix=/usr/local/Cellar/ffmpeg/4.1 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gpl --enable-libmp3lame --enable-libopus --enable-libsnappy --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-lzma --enable-opencl --enable-videotoolbox
libavutil 56. 22.100 / 56. 22.100
libavcodec 58. 35.100 / 58. 35.100
libavformat 58. 20.100 / 58. 20.100
libavdevice 58. 5.100 / 58. 5.100
libavfilter 7. 40.101 / 7. 40.101
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 3.100 / 5. 3.100
libswresample 3. 3.100 / 3. 3.100
libpostproc 55. 3.100 / 55. 3.100
[mp3 @ 0x7fe506000000] Estimating duration from bitrate, this may be inaccurate
Input #0, mp3, from 'input.mp3':
Metadata:
artist : Paul
album : Underground Vol. 17
title : Crazy
track : 11/20
date : 2017
Duration: 00:04:46.23, start: 0.000000, bitrate: 324 kb/s
Stream #0:0: Audio: mp3, 44100 Hz, stereo, fltp, 320 kb/s
Stream #0:1: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown), 500x500 [SAR 1:1 DAR 1:1], 90k tbr, 90k tbn, 90k tbc
Metadata:
comment : Cover (front)
[mp3 @ 0x7fe50601aa00] Estimating duration from bitrate, this may be inaccurate
Input #1, mp3, from '/opt/docker/tag_long.mp3':
Metadata:
genre : Blues
id3v2_priv.XMP : <?xpacket begin="\xef\xbb\xbf" id="W5M0MpCehiHzreSzNTczkc9d"?>\x0a<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 5.6-c140 79.160302, 2017/03/02-16:59:38 ">\x0a <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">\x0a <rdf
Duration: 00:06:35.27, start: 0.000000, bitrate: 128 kb/s
Stream #1:0: Audio: mp3, 44100 Hz, stereo, fltp, 128 kb/s
File 'out.mp3' already exists. Overwrite ? [y/N] Y
Stream mapping:
Stream #0:0 (mp3float) -> amix:input0 (graph 0)
Stream #1:0 (mp3float) -> amix:input1 (graph 0)
volume (graph 0) -> Stream #0:0 (libmp3lame)
Stream #0:1 -> #0:1 (mjpeg (native) -> png (native))
Press [q] to stop, [?] for help
[swscaler @ 0x7fe506045000] deprecated pixel format used, make sure you did set range correctly
[mp3 @ 0x7fe507810000] Frame rate very high for a muxer not efficiently supporting it.
Please consider specifying a lower framerate, a different muxer or -vsync 2
Output #0, mp3, to 'out.mp3':
Metadata:
TPE1 : Paul
TALB : Underground Vol. 17
TIT2 : Crazy
TRCK : 11/20
TDRC : 2017
TSSE : Lavf58.20.100
Stream #0:0: Audio: mp3 (libmp3lame), 44100 Hz, stereo, fltp (default)
Metadata:
encoder : Lavc58.35.100 libmp3lame
Stream #0:1: Video: png, rgb24(progressive), 500x500 [SAR 1:1 DAR 1:1], q=2-31, 200 kb/s, 90k fps, 90k tbn, 90k tbc
Metadata:
comment : Cover (front)
encoder : Lavc58.35.100 png
frame= 1 fps=0.0 q=-0.0 Lsize= 496kB time=00:00:00.26 bitrate=15501.4kbits/s speed=0.336x
video:495kB audio:1kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.084876%

最佳答案

您遇到了一个已经修复的错误。 FFmpeg 开发非常活跃,这就是为什么您应该始终尝试使用最新的 ffmpeg 的示例。您可以使用的版本:尤其是在遇到问题时。

此 amix 挂起问题已通过 avfilter/af_amix: switch to activate 修复于 2017 年 8 月 26 日。因此,请使用更新的版本,例如 3.4 发布分支或更高版本,或者最好使用 git master 分支的最新版本。

FFmpeg Download指向最近 ffmpeg 静态版本的链接的页面适用于 Linux、macOS 和 Windows。或者,请参阅 FFmpeg Wiki用于编译指南。

关于带有图像的mp3上的ffmpeg amix过滤器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53231965/

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