首页 新闻 会员 周边 捐助

关于FFMpeg转换错误提示

0
悬赏园豆:50 [待解决问题]

centos 7 安装了FFMpeg,用于转换amr为mp3

其中转换日志中有这样一句:1.amr: Input/output error

虽有此错误,但也能成功(ffmpeg -i 1.amr 1.mp3)把amr转换为mp3,请问如何处理?

以下是转换日志

ffmpeg version 2.8.13 Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-11)
configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64 --optflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' --extra-ldflags='-Wl,-z,relro ' --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-version3 --enable-bzlib --disable-crystalhd --enable-gnutls --enable-ladspa --enable-libass --enable-libcdio --enable-libdc1394 --disable-indev=jack --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-openal --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libv4l2 --enable-libx264 --enable-libx265 --enable-libxvid --enable-x11grab --enable-avfilter --enable-avresample --enable-postproc --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --shlibdir=/usr/lib64 --enable-runtime-cpudetect
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
[amr @ 0x14d1bc0] Estimating duration from bitrate, this may be inaccurate
Input #0, amr, from '1.amr':
Duration: 00:00:27.84, bitrate: 5 kb/s
Stream #0:0: Audio: amr_nb (samr / 0x726D6173), 8000 Hz, mono, flt, 5 kb/s
Output #0, mp3, to '1.mp3':
Metadata:
TSSE : Lavf56.40.101
Stream #0:0: Audio: mp3 (libmp3lame), 8000 Hz, mono, fltp
Metadata:
encoder : Lavc56.60.100 libmp3lame
Stream mapping:
Stream #0:0 -> #0:0 (amr_nb (amrnb) -> mp3 (libmp3lame))
Press [q] to stop, [?] for help
1.amr: Input/output error
size= 28kB time=00:00:27.86 bitrate= 8.1kbits/s
video:0kB audio:27kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.931877%
View Code

 

古峰岳的主页 古峰岳 | 初学一级 | 园豆:152
提问于:2017-12-23 20:56
< >
分享
所有回答(1)
0

加上-loglevel debug参数看看

dudu | 园豆:30734 (高人七级) | 2017-12-23 21:35

ffmpeg -i 1.amr 1.mp3 -loglevel debug

同样有这样的提示:

ffmpeg -i 1.amr 1.mp3 -loglevel debug
ffmpeg version 2.6.8 Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-4)
  configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64 --optflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' --enable-bzlib --disable-crystalhd --enable-gnutls --enable-ladspa --enable-libass --enable-libcdio --enable-libdc1394 --enable-libfaac --enable-nonfree --enable-libfdk-aac --enable-nonfree --disable-indev=jack --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-openal --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libv4l2 --enable-libx264 --enable-libx265 --enable-libxvid --enable-x11grab --enable-avfilter --enable-avresample --enable-postproc --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --shlibdir=/usr/lib64 --enable-runtime-cpudetect
  libavutil      54. 20.100 / 54. 20.100
  libavcodec     56. 26.100 / 56. 26.100
  libavformat    56. 25.101 / 56. 25.101
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5. 11.102 /  5. 11.102
  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
Splitting the commandline.
Reading option '-i' ... matched as input file with argument '1.amr'.
Reading option '1.mp3' ... matched as output file.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument 'debug'.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option loglevel (set logging level) with argument debug.
Successfully parsed a group of options.
Parsing a group of options: input file 1.amr.
Successfully parsed a group of options.
Opening an input file: 1.amr.
[amr @ 0x1f524a0] Format amr probed with size=2048 and score=100
[amr @ 0x1f524a0] Before avformat_find_stream_info() pos: 6 bytes read:6894 seeks:0
[amr @ 0x1f524a0] All info found
[amr @ 0x1f524a0] Estimating duration from bitrate, this may be inaccurate
[amr @ 0x1f524a0] After avformat_find_stream_info() pos: 706 bytes read:6894 seeks:0 frames:50
Input #0, amr, from '1.amr':
  Duration: 00:00:09.84, bitrate: 5 kb/s
    Stream #0:0, 50, 1/8000: Audio: amr_nb (samr / 0x726D6173), 8000 Hz, mono, flt, 5 kb/s
Successfully opened the file.
Parsing a group of options: output file 1.mp3.
Successfully parsed a group of options.
Opening an output file: 1.mp3.
Successfully opened the file.
detected 2 logical cores
[graph 0 input from stream 0:0 @ 0x1f36d80] Setting 'time_base' to value '1/8000'
[graph 0 input from stream 0:0 @ 0x1f36d80] Setting 'sample_rate' to value '8000'
[graph 0 input from stream 0:0 @ 0x1f36d80] Setting 'sample_fmt' to value 'flt'
[graph 0 input from stream 0:0 @ 0x1f36d80] Setting 'channel_layout' to value '0x4'
[graph 0 input from stream 0:0 @ 0x1f36d80] tb:1/8000 samplefmt:flt samplerate:8000 chlayout:0x4
[audio format for output stream 0:0 @ 0x1f37120] Setting 'sample_fmts' to value 's32p|fltp|s16p'
[audio format for output stream 0:0 @ 0x1f37120] Setting 'sample_rates' to value '44100|48000|32000|22050|24000|16000|11025|12000|8000'
[audio format for output stream 0:0 @ 0x1f37120] Setting 'channel_layouts' to value '0x4|0x3'
[audio format for output stream 0:0 @ 0x1f37120] auto-inserting filter 'auto-inserted resampler 0' between the filter 'Parsed_anull_0' and the filter 'audio format for output stream 0:0'
[AVFilterGraph @ 0x1f373c0] query_formats: 4 queried, 6 merged, 3 already done, 0 delayed
[auto-inserted resampler 0 @ 0x1f2c580] ch:1 chl:mono fmt:flt r:8000Hz -> ch:1 chl:mono fmt:fltp r:8000Hz
Output #0, mp3, to '1.mp3':
  Metadata:
    TSSE            : Lavf56.25.101
    Stream #0:0, 0, 1/8000: Audio: mp3 (libmp3lame), 8000 Hz, mono, fltp
    Metadata:
      encoder         : Lavc56.26.100 libmp3lame
Stream mapping:
  Stream #0:0 -> #0:0 (amr_nb (amrnb) -> mp3 (libmp3lame))
Press [q] to stop, [?] for help
1.amr: Input/output error
[output stream 0:0 @ 0x1f44520] EOF on sink link output stream 0:0:default.
No more output streams to write to, finishing.
[libmp3lame @ 0x1f64c40] Trying to remove 239 more samples than there are in the queue
size=      10kB time=00:00:09.86 bitrate=   8.3kbits/s    
video:0kB audio:10kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 2.607914%
Input file #0 (1.amr):
  Input stream #0:0 (audio): 492 packets read (6888 bytes); 492 frames decoded (78720 samples); 
  Total: 492 packets (6888 bytes) demuxed
Output file #0 (1.mp3):
  Output stream #0:0 (audio): 137 frames encoded (78720 samples); 139 packets muxed (10008 bytes); 
  Total: 139 packets (10008 bytes) muxed
492 frames successfully decoded, 0 decoding errors
[AVIOContext @ 0x1f5a9a0] Statistics: 1 seeks, 141 writeouts
[AVIOContext @ 0x1f5ad40] Statistics: 6894 bytes read, 0 seeks
View Code

 

支持(0) 反对(0) 古峰岳 | 园豆:152 (初学一级) | 2017-12-23 21:41
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册