我一直在尝试将.mov文件转换为.mp4文件一段时间,我认为这是正确的代码。
ffmpeg -i P1010989.MOV -vcodec copy -acodec copy out.mp4
但这是我的输出
FFmpeg version 0.6.5, Copyright (c) 2000-2010 the FFmpeg developers
built on Jan 29 2012 23:55:02 with gcc 4.1.2 20080704 (Red Hat 4.1.2-51)
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-libdirac --enable-libfaac --enable-libfaad --enable-libfaadbin --enable-libgsm --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --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
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'P1010989.MOV':
Duration: 00:00:01.00, start: 0.000000, bitrate: 11584 kb/s
Stream #0.0(eng): Video: mjpeg, yuvj420p, 640x480, 11315 kb/s, 30 fps, 30 tbr, 30 tbn, 30 tbc
Stream #0.1(eng): Audio: pcm_s16be, 16000 Hz, 1 channels, s16, 256 kb/s
File 'out.mp4' already exists. Overwrite ? [y/N] y
[mp4 @ 0x95b0080]track 1: could not find tag, codec not currently supported in container
Output #0, mp4, to 'out.mp4':
Metadata:
encoder : Lavf52.64.2
Stream #0.0(eng): Video: mjpeg, yuvj420p, 640x480, q=2-31, 11315 kb/s, 30 tbn, 30 tbc
Stream #0.1(eng): Audio: pcm_s16be, 16000 Hz, 1 channels, 256 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Stream #0.1 -> #0.1
Could not write header for output file #0 (incorrect codec parameters ?)
所以我正在尝试安装正确的编解码器而且有点丢失,并提供一些帮助。
我是否需要单独安装编解码器,从哪里下载并安装它们?
代码真的有一些帮助,谢谢。
答案 0 :(得分:30)
Stream #0.1(eng): Audio: pcm_s16be, 16000 Hz, 1 channels, s16, 256 kb/s
[mp4 @ 0x95b0080]track 1: could not find tag, codec not currently supported in container
这告诉你不是缺少编解码器,而是它与MP4格式不兼容。
您可以使用其他音频编解码器解决此问题。
ffmpeg -i P1010989.MOV -vcodec copy -acodec aac -strict -2 -b:a 384k out.mp4