FFMPEG用新的mp3音频替换音频会出现错误无法识别的选项'编解码器'

时间:2016-02-14 16:32:34

标签: ffmpeg centos

我正在尝试用另一种音频替换视频中的音频:

ffmpeg -i \/home\/test\/public_html\/ted\/videos\/c812e2423b6b5da2f4e00c62bf70d2f3.mp4 -i \/home\/test\/public_html\/ted\/app\/templates\/default\/sounds\/taj-express-30sec.mp3 -codec copy -shortest \/home\/test\/public_html\/ted\/videos\/55e5a21e111af1cc0bdb3637b601f64d_with_audio.mp4
FFmpeg version 0.6.5, Copyright (c) 2000-2010 the FFmpeg developers
  built on Jan 29 2012 17:52:15 with gcc 4.4.5 20110214 (Red Hat 4.4.5-6)
  configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --incdir=/usr/include --disable-avisynth --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fPIC' --enable-avfilter --enable-avfilter-lavf --enable-libdc1394 --enable-libdirac --enable-libfaac --enable-libfaad --enable-libfaadbin --enable-libgsm --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libx264 --enable-gpl --enable-nonfree --enable-postproc --enable-pthreads --enable-shared --enable-swscale --enable-vdpau --enable-version3 --enable-x11grab
  libavutil     50.15. 1 / 50.15. 1
  libavcodec    52.72. 2 / 52.72. 2
  libavformat   52.64. 2 / 52.64. 2
  libavdevice   52. 2. 0 / 52. 2. 0
  libavfilter    1.19. 0 /  1.19. 0
  libswscale     0.11. 0 /  0.11. 0
  libpostproc   51. 2. 0 / 51. 2. 0

Seems stream 0 codec frame rate differs from container frame rate: 20.00 (20/1) -> 10.00 (20/2)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/home/test/public_html/ted/videos/c812e2423b6b5da2f4e00c62bf70d2f3.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: mp41isom
  Duration: 00:00:23.44, start: 0.000000, bitrate: 273 kb/s
    Stream #0.0(und): Video: h264, yuv420p, 1364x698 [PAR 1:1 DAR 682:349], 268 kb/s, 9.98 fps, 10 tbr, 10k tbn, 20 tbc
    Stream #0.1(und): Audio: aac, 44100 Hz, mono, s16, 1 kb/s
[mp3 @ 0x1c648a0]max_analyze_duration reached
Input #1, mp3, from '/home/test/public_html/ted/app/templates/default/sounds/taj-express-30sec.mp3':
  Metadata:
    comment         : Description
    TENC            : BLUE PRODUCTION
    originator_reference: CCOOONNNNNNNNNNNNHHMMSSRRRRRRRRR
    TDRC            : 2012:05:03
    coding_history  : A=PCM,F=44100,W=16,M=stereo,T=Nuendo

    time_reference  : 1601731
    umid            : 0x24FF296F2093409DA42CA66529FF7FA800000000000000000000000000000000
    TSSE            : Lavf57.23.101
  Duration: 00:00:30.04, start: 0.000000, bitrate: 128 kb/s
    Stream #1.0: Audio: mp3, 44100 Hz, 2 channels, s16, 128 kb/s
Unrecognized option 'codec'

但我一直在无法识别的选项'编解码器'

它在ubuntu上可以正常工作,但是在带有WHM cPanel的服务器centos 6上它不是!为什么呢?

1 个答案:

答案 0 :(得分:0)

根据@Mulvya,我能够解决这个问题,因为我不能在我的服务器上升级FFMPEG,否则它应该有效:

ffmpeg -i PATH/VIDEO_FILE_NAME.mp4 -i PATH/AUDIO_FILE_NAME.mp3 -vcodec copy -shortest DESTINATION_PATH/NEW_VIDEO_FILE_NAME.mp4