我想用 ffmpeg 从许多 .MOV 文件中提取音频流。
目标是输出文件大小小,并且声音与输入文件完全相同。目前我正在使用这个 ffmpeg 命令:
ffmpeg -i input.mov -vn -ab 92k -acodec aac -strict -2 output.m4a
我的问题是重新编码pcm_s24le
创建AAC
的输出文件在开头缺少一些毫秒的时间。
有没有解决方法或办法解决这个问题?比如将输出填充 50ms
输入/输出信息:
ffmpeg version 2.5 Copyright (c) 2000-2014 the FFmpeg developers
built on Dec 20 2014 09:33:55 with Apple LLVM version 6.0 (clang-600.0.56) (based on LLVM 3.5svn)
configuration: --prefix=/usr/local/Cellar/ffmpeg/2.5 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-libx264 --enable-libmp3lame --enable-libxvid --enable-libvo-aacenc --enable-libfdk-aac --enable-nonfree --enable-vda
libavutil 54. 15.100 / 54. 15.100
libavcodec 56. 13.100 / 56. 13.100
libavformat 56. 15.102 / 56. 15.102
libavdevice 56. 3.100 / 56. 3.100
libavfilter 5. 2.103 / 5. 2.103
libavresample 2. 1. 0 / 2. 1. 0
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 3.100 / 53. 3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '6.2.mov':
Metadata:
major_brand : qt
minor_version : 0
compatible_brands: qt
creation_time : 2014-12-03 10:12:08
Duration: 00:00:01.58, start: 0.000000, bitrate: 42754 kb/s
Stream #0:0(und): Video: prores (apcn / 0x6E637061), yuv422p10le(bt709), 960x540, 40383 kb/s, SAR 1:1 DAR 16:9, 23.98 fps, 23.98 tbr, 24k tbn, 24k tbc (default)
Metadata:
creation_time : 2014-12-03 10:12:08
handler_name : Core Media Data Handler
encoder : Apple ProRes 422
timecode : 00:00:00:00
Stream #0:1(und): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, stereo, s32 (24 bit), 2304 kb/s (default)
Metadata:
creation_time : 2014-12-03 10:12:08
handler_name : Core Media Data Handler
Stream #0:2(und): Data: none (tmcd / 0x64636D74), 0 kb/s (default)
Metadata:
creation_time : 2014-12-03 10:12:08
handler_name : Core Media Data Handler
timecode : 00:00:00:00
File 'try.m4a' already exists. Overwrite ? [y/N] y
Output #0, ipod, to 'try.m4a':
Metadata:
major_brand : qt
minor_version : 0
compatible_brands: qt
encoder : Lavf56.15.102
Stream #0:0(und): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp (24 bit), 92 kb/s (default)
Metadata:
creation_time : 2014-12-03 10:12:08
handler_name : Core Media Data Handler
encoder : Lavc56.13.100 aac
Stream mapping:
Stream #0:1 -> #0:0 (pcm_s24le (native) -> aac (native))
Press [q] to stop, [?] for help
size= 19kB time=00:00:01.60 bitrate= 97.9kbits/s
video:0kB audio:18kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 5.684210%