我正在运行以下命令来剪切文件的30秒部分
ffmpeg -i 'river.mp3' -ss 30 -t 30 -acodec libmp3lame -b:a 128k 'audio_trimmed.mp3'
但是我收到了“无效的PNG签名”错误。有没有办法跳过图像,因为我不需要它并让命令成功运行?
ffmpeg version 2.8.5 Copyright (c) 2000-2016 the FFmpeg developers
built with Apple LLVM version 7.3.0 (clang-703.0.31)
configuration: --prefix=/usr/local/Cellar/ffmpeg/2.8.5 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-opencl --enable-libx264 --enable-libmp3lame --enable-libvo-aacenc --enable-libxvid --enable-libvorbis --enable-vda
libavutil 54. 31.100 / 54. 31.100
libavcodec 56. 60.100 / 56. 60.100
libavformat 56. 40.101 / 56. 40.101
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 40.101 / 5. 40.101
libavresample 2. 1. 0 / 2. 1. 0
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 2.101 / 1. 2.101
libpostproc 53. 3.100 / 53. 3.100
[mp3 @ 0x7f8419010600] Skipping 0 bytes of junk at 73436.
[png @ 0x7f8419812600] Invalid PNG signature 0xFFD8FFE000104A46.
[mp3 @ 0x7f8419010600] decoding for stream 1 failed
[mp3 @ 0x7f8419010600] Could not find codec parameters for stream 1 (Video: png, none(pc)): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, mp3, from 'river.mp3':
Metadata:
genre : Podcast
album : River City Church's Podcast
artist : Antley Fowler
title : Jubilee Brings Justice
date : 2016-08-15 10:23
Duration: 00:28:28.07, start: 0.025056, bitrate: 64 kb/s
Stream #0:0: Audio: mp3, 44100 Hz, mono, s16p, 64 kb/s
Stream #0:1: Video: png, none(pc), 90k tbr, 90k tbn, 90k tbc
Metadata:
title : Episode Artwork
comment : Cover (front)
[buffer @ 0x7f8418c18de0] Unable to parse option value "0x0" as image size
[buffer @ 0x7f8418c18de0] Unable to parse option value "-1" as pixel format
[buffer @ 0x7f8418c18de0] Unable to parse option value "0x0" as image size
[buffer @ 0x7f8418c18de0] Error setting option video_size to value 0x0.
[graph 0 input from stream 0:1 @ 0x7f8418c18ee0] Error applying options to the filter.
Error opening filters!
答案 0 :(得分:1)
您只需添加-map 0:a
选项即可选择音频。或者,您可以使用-vn
来停用任何视频流,但我更喜欢-map
,因为它更灵活。有关详细信息,请参阅-map
documentation。
如果您想避免重新编码而只是重新复用,请使用-c:a copy
代替-c:a libmp3lame
。有关详细信息,请参阅stream copy documentation。