1

尝试将视频从闪存录像机转换为 mp4 时出现错误:

ubuntu@media:/data/media/failed$ avconv -i videoStream_1356794393712_805.flv -acodec aac  videoStream_1356794393712_805.mp4
avconv version 0.8.4-4:0.8.4-0ubuntu0.12.04.1, Copyright (c) 2000-2012 the Libav developers
  built on Nov  6 2012 16:51:33 with gcc 4.6.3
[libspeex @ 0x1091500] Missing Speex header, assuming defaults.
[flv @ 0x108d7a0] Estimating duration from bitrate, this may be inaccurate
Input #0, flv, from 'videoStream_1356794393712_805.flv':
  Metadata:
    creationdate    : Sat Dec 29 15:20:12
  Duration: 00:00:04.39, start: 0.000000, bitrate: N/A
    Stream #0.0: Video: h264 (Main), yuv420p, 640x480 [PAR 1:1 DAR 4:3], 30 tbr, 1k tbn, 60 tbc
    Stream #0.1: Audio: libspeex, 16000 Hz, 1 channels, s16
[buffer @ 0x1093a00] w:640 h:480 pixfmt:yuv420p
[mpeg4 @ 0x1094ce0] removing common factors from framerate
[aac @ 0x108d120] Too many bits per frame requested
Output #0, mp4, to 'videoStream_1356794393712_805.mp4':
  Metadata:
    creationdate    : Sat Dec 29 15:20:12
    Stream #0.0: Video: mpeg4, yuv420p, 640x480 [PAR 1:1 DAR 4:3], q=2-31, 200 kb/s, 90k tbn, 30 tbc
    Stream #0.1: Audio: aac, 16000 Hz, 1 channels, s16, 200 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (h264 -> mpeg4)
  Stream #0:1 -> #0:1 (libspeex -> aac)
Error while opening encoder for output stream #0:1 - maybe incorrect parameters such as bit_rate, rate, width or height
ubuntu@media:/data/media/failed$

Ubuntu 12.04 LTS,默认 ffmpeg/avconv。
我怎么解决这个问题?

ffprobe 日志:

ubuntu@media:/data/media/failed$ ffprobe videoStream_1356794393712_805.flv
avprobe version 0.8.4-4:0.8.4-0ubuntu0.12.04.1, Copyright (c) 2007-2012 the Libav developers
  built on Nov  6 2012 16:51:33 with gcc 4.6.3
[libspeex @ 0x1c27500] Missing Speex header, assuming defaults.
[flv @ 0x1c237a0] Estimating duration from bitrate, this may be inaccurate
Input #0, flv, from 'videoStream_1356794393712_805.flv':
  Metadata:
    creationdate    : Sat Dec 29 15:20:12
  Duration: 00:00:04.39, start: 0.000000, bitrate: N/A
    Stream #0.0: Video: h264 (Main), yuv420p, 640x480 [PAR 1:1 DAR 4:3], 30 tbr, 1k tbn, 60 tbc
    Stream #0.1: Audio: libspeex, 16000 Hz, 1 channels, s16
[libspeex @ 0x1c27500] Missing Speex header, assuming defaults.
ubuntu@media:/data/media/failed$
4

3 回答 3

2

我找到了解决方案。需要安装这些软件包:sudo apt-get install libavcodec-extra-53 libavdevice-extra-53 libavfilter-extra-2 libavformat-extra-53 libavutil-extra-51 libpostproc-extra-52 libswscale-extra-2

于 2012-12-29T16:40:03.577 回答
2

我找到了另一个解决方案。ffmpeg 应该从官方网站的链接下载二进制版本(linux x64)。

Ubuntu 版本的编解码器存在问题。

于 2013-02-09T13:05:46.127 回答
0

我在 Ubuntu 14.04 中通过使用 libvo_aacenc 编解码器而不是 aac 编解码器解决了这个问题。您可以将命令更改为如下所示:

avconv -i videoStream_1356794393712_805.flv -c:v mpeg4 -c:a libvo_aacenc  videoStream_1356794393712_805.mp4
于 2015-06-01T09:06:23.247 回答