【问题标题】:Q.For encoding error of ffmpegQ.关于ffmpeg的编码错误
【发布时间】:2016-01-10 18:51:57
【问题描述】:

我运行了以下命令。

ffmpeg -i test.mp4 -threads 2 -codec:v libx264 -s:v 1280x720 -aspect:v 16:9 -b:v 256k -map 0 -f segment -segment_format mpegts -segment_time 10 -segment_list stream.m3u8 streamfiles/stream%03d.ts

执行结果

ffmpeg version N-75926-gce0834b Copyright (c) 2000-2015 the FFmpeg developers
  built with gcc 4.6 (Debian 4.6.3-14+rpi1)
  configuration: --arch=armel --target-os=linux --enable-shared --enable-gpl --enable-libx264 --enable-nonfree
  libavutil      55.  3.100 / 55.  3.100
  libavcodec     57.  5.100 / 57.  5.100
  libavformat    57.  3.100 / 57.  3.100
  libavdevice    57.  0.100 / 57.  0.100
  libavfilter     6. 11.100 /  6. 11.100
  libswscale      4.  0.100 /  4.  0.100
  libswresample   2.  0.100 /  2.  0.100
  libpostproc    54.  0.100 / 54.  0.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'test.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf56.40.100
  Duration: 00:00:03.28, start: 0.000000, bitrate: 10159 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080, 10156 kb/s, 25 fps, 25 tbr, 1200k tbn, 2400k tbc (default)
    Metadata:
      handler_name    : VideoHandler
Illegal instruction

结果是发生了错误。 有人告诉我,如果您不将选项放在./configurelibx264 中,那将是一个错误。该选项是--extra-cflags='-march=armv6' --extra-ldflags='-march=armv6'。否则会使用不支持的指令。

所以我使用选项运行./configure,然后运行make,现在我收到一条错误消息:

common/arm/quant-a.S: Assembler messages:
common/arm/quant-a.S:362: Error: selected processor does not support ARM mode `rbit r1,r1'
common/arm/quant-a.S:363: Error: selected processor does not support ARM mode `rbit r1,r1'
Makefile:217: recipe for target 'common/arm/quant-a.o' failed
make: *** [common/arm/quant-a.o] Error 1

我不知道这个错误的含义。你应该如何处理我这个错误?

我使用的机器是 Raspberry PI B+,我的操作系统是 Raspbian。我想使用ffmpeglibx264

任何意见和建议将不胜感激。

【问题讨论】:

  • 你需要交叉编译到ffmpeg吗?我不知道我是否应该下载任何crosstool-ng、、、
  • 这不是强制性的,但它更快,可能会解决您的问题。
  • 我正在学习相同的教程。您为 x264 建议的分支对我有用。 Alsa-lib 1.1.0 版在 2015 年 12 月 28 日为我工作,没有错误。谢谢。

标签: linux ffmpeg raspberry-pi raspbian libx264


【解决方案1】:

我在构建 libx264 时遇到了同样的错误,但我需要编译一个旧版本。似乎最近对库的一些更改破坏了 armv6 处理器的构建(或者我不知道有一个必需的编译开关)。

我的解决方案:

git clone git://git.videolan.org/x264
cd x264
git checkout 3902ae02a0edede5d6c44cb3ee9e24e618c66e6a

然后 ./configure 使用所需的选项、make、make install 等。

我正在尝试按照here 的说明在我的台式机上交叉编译 ffmpeg。我不知道我的解决方案是否有效,因为我被困在下一步(alsa-lib 似乎需要 python)!

【讨论】:

  • 谢谢——我遇到了同样的问题,我刚刚成功编译了那个版本的 x264。我会看看我在 alsa 上能走多远……
  • 感谢您的提示!我对 x264 的历史做了一分为二,问题是在提交 5c13589b,“实现 x284_decimate_score15/16/64_neon”中引入的。查看它的父代 3902ae02 对我有用。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2012-12-15
  • 1970-01-01
  • 1970-01-01
  • 2013-10-18
  • 2013-05-28
  • 2012-08-26
  • 2021-01-07
相关资源
最近更新 更多