gpt4 book ai didi

video - AVI 无法编码为 MP4

转载 作者:行者123 更新时间:2023-12-04 22:53:36 29 4
gpt4 key购买 nike

我正在尝试使用以下命令将 avi 转换为 mp4:

ffmpeg -i avi_videos.avi -c copy new.mp4 

我收到了一个错误(见下文),我不太明白。我需要添加哪些其他参数才能将其编码为 mp4?你能给我提供一个示例片段吗?有关原始 avi 的信息也在下面。

enter image description here

不确定这是否相关,但我也在 linux 中尝试过并得到了类似的输出:
leke@leke:~/Videos$ ffmpeg -i avi_videos.avi -c copy new.mp4
ffmpeg version 2.4.3-1ubuntu1~trusty6 Copyright (c) 2000-2014 the FFmpeg developers
built on Nov 22 2014 17:07:19 with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1)
configuration: --prefix=/usr --extra-version='1ubuntu1~trusty6' --build-suffix=-ffmpeg --toolchain=hardened --extra-cflags= --extra-cxxflags= --libdir=/usr/lib/x86_64-linux-gnu --shlibdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --enable-shared --disable-stripping --enable-avresample --enable-avisynth --enable-fontconfig --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-opengl --enable-x11grab --enable-libxvid --enable-libx265 --enable-libdc1394 --enable-libiec61883 --enable-libzvbi --enable-libzmq --enable-frei0r --enable-libx264 --enable-libsoxr --enable-openal --enable-libopencv
libavutil 54. 7.100 / 54. 7.100
libavcodec 56. 1.100 / 56. 1.100
libavformat 56. 4.101 / 56. 4.101
libavdevice 56. 0.100 / 56. 0.100
libavfilter 5. 1.100 / 5. 1.100
libavresample 2. 1. 0 / 2. 1. 0
libswscale 3. 0.100 / 3. 0.100
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 0.100 / 53. 0.100
Guessed Channel Layout for Input Stream #0.1 : mono
Input #0, avi, from 'avi_videos.avi':
Metadata:
encoder : Lavf57.50.100
Duration: 02:04:21.06, start: 0.000000, bitrate: 14664 kb/s
Stream #0:0: Video: mjpeg (MJPG / 0x47504A4D), yuvj422p(pc, bt470bg), 640x480, 14571 kb/s, 30 fps, 30 tbr, 30 tbn, 30 tbc
Stream #0:1: Audio: pcm_u8 ([1][0][0][0] / 0x0001), 11024 Hz, 1 channels, u8, 88 kb/s
[mp4 @ 0xed93c0] Tag [1][0][0][0]/0x00000001 incompatible with output codec id '65541' ([0][0][0][0])
Output #0, mp4, to 'new.mp4':
Metadata:
encoder : Lavf57.50.100
Stream #0:0: Video: mjpeg (l[0][0][0] / 0x006C), yuvj422p, 640x480, q=2-31, 14571 kb/s, 30 fps, 30 tbn, 30 tbc
Stream #0:1: Audio: pcm_u8 ([1][0][0][0] / 0x0001), 11024 Hz, mono, 88 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Stream #0:1 -> #0:1 (copy)
Could not write header for output file #0 (incorrect codec parameters ?): Invalid data found when processing input

最佳答案

您当前的命令正在尝试复制流,但 ffmpeg 不支持 MP4 中的 PCM 音频。利用

ffmpeg -i avi_videos.avi -c:v copy new.mp4

关于video - AVI 无法编码为 MP4,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39611273/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com