所以我有一个 .swf 文件,需要将其转换为 .mp3(或任何其他音频文件),它看起来像这样:
vytautas@vytautas-SATELLITE-C660:~/Desktop$ ffmpeg -i rem.swf
ffmpeg version 2.2.git Copyright (c) 2000-2014 the FFmpeg developers
built on May 18 2014 02:20:25 with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1)
configuration: --extra-libs=-ldl --prefix=/opt/ffmpeg --enable-avresample --disable-debug --enable-nonfree --enable-gpl --enable-version3 --enable-x11grab --enable-libpulse --enable-libx264 --enable-libfdk-aac --enable-libvorbis --enable-libmp3lame --enable-libopus --enable-libvpx --enable-libspeex --enable-libass --enable-avisynth --enable-libsoxr
libavutil 52. 84.100 / 52. 84.100
libavcodec 55. 62.100 / 55. 62.100
libavformat 55. 38.100 / 55. 38.100
libavdevice 55. 13.101 / 55. 13.101
libavfilter 4. 5.100 / 4. 5.100
libavresample 1. 2. 0 / 1. 2. 0
libswscale 2. 6.100 / 2. 6.100
libswresample 0. 19.100 / 0. 19.100
libpostproc 52. 3.100 / 52. 3.100
[swf @ 0x2762ae0] SWF compressed file detected
[swf @ 0x2762ae0] Could not find codec parameters for stream 0 (Audio: pcm_u8, 5512 Hz, mono, 44 kb/s): unspecified sample format
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, swf, from 'rem.swf':
Duration: 00:00:00.55, bitrate: 98 kb/s
Stream #0:0: Audio: pcm_u8, 5512 Hz, mono, 44 kb/s
Stream #0:1: Audio: mp3, 22050 Hz, mono, s16p, 128 kb/s
At least one output file must be specified
所以它的长度是:00:00:00.55,然后我使用此命令将其转换为.mp3:
ffmpeg -i rem.swf -map 0:1 -acodec copy rem.mp3
这是我得到的输出:
**output ommited, as it is same as above**
Input #0, swf, from 'rem.swf':
Duration: 00:00:00.55, bitrate: 98 kb/s
Stream #0:0: Audio: pcm_u8, 5512 Hz, mono, 44 kb/s
Stream #0:1: Audio: mp3, 22050 Hz, mono, s16p, 128 kb/s
File 'rem.mp3' already exists. Overwrite ? [y/N] y
Output #0, mp3, to 'rem.mp3':
Metadata:
TSSE : Lavf55.38.100
Stream #0:0: Audio: mp3, 22050 Hz, mono, 128 kb/s
Stream mapping:
Stream #0:1 -> #0:0 (copy)
Press [q] to stop, [?] for help
size= 5kB time=00:00:00.33 bitrate= 130.7kbits/s
video:0kB audio:5kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 9.080189%
所以现在长度只有 00:00:00.33,有什么想法吗?
这是文件的链接,即使您可以尝试在自己的机器上进行转换,这也会有所帮助:
https://docs.google.com/file/d/0ByJlZbStPk2cS0FwN09TX2VkWjg/edit
提前致谢!