我正在尝试使用此处描述的方法拼接360°图片: https://trac.ffmpeg.org/wiki/RemapFilter#no1
这是我使用的命令:
ffmpeg -i 360_0008.JPG -i xmap_samsung_gear_2560x1280.pgm -i ymap_samsung_gear_2560x1280.pgm -lavfi remap out.png
我得到的错误:
ffmpeg version 2.8.6-1ubuntu2 Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 5.3.1 (Ubuntu 5.3.1-11ubuntu1) 20160311
configuration: --prefix=/usr --extra-version=1ubuntu2 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --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-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv
WARNING: library configuration mismatch
avcodec configuration: --prefix=/usr --extra-version=1ubuntu2 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --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-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv --enable-version3 --disable-doc --disable-programs --disable-avdevice --disable-avfilter --disable-avformat --disable-avresample --disable-postproc --disable-swscale --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libvo_aacenc --enable-libvo_amrwbenc
libavutil 54. 31.100 / 54. 31.100
libavcodec 56. 60.100 / 56. 60.100
libavformat 56. 40.101 / 56. 40.101
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 40.101 / 5. 40.101
libavresample 2. 1. 0 / 2. 1. 0
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 2.101 / 1. 2.101
libpostproc 53. 3.100 / 53. 3.100
[mjpeg @ 0x18c4920] Changeing bps to 8
Input #0, image2, from '360_0008.JPG':
Duration: 00:00:00.04, start: 0.000000, bitrate: N/A
Stream #0:0: Video: mjpeg, yuvj422p(pc, bt470bg/unknown/unknown), 7776x3888, 25 tbr, 25 tbn, 25 tbc
Input #1, image2, from 'xmap_samsung_gear_2560x1280.pgm':
Duration: 00:00:00.04, start: 0.000000, bitrate: N/A
Stream #1:0: Video: pgm, gray16le, 2560x1280, 25 tbr, 25 tbn, 25 tbc
Input #2, image2, from 'ymap_samsung_gear_2560x1280.pgm':
Duration: 00:00:00.04, start: 0.000000, bitrate: N/A
Stream #2:0: Video: pgm, gray16le, 2560x1280, 25 tbr, 25 tbn, 25 tbc
[AVFilterGraph @ 0x18c88c0] No such filter: 'remap'
Error initializing complex filters.
Invalid argument
我错过了什么吗?或者为Ubuntu 16.04打包的ffmpeg中是否缺少某些东西?
答案 0 :(得分:0)
我自己就遇到过这个问题,重新映射过滤器是在ffmpeg 3.1中引入的,奇怪的是ubuntu 16.04默认没有repos,为了让ffmpeg 3在ubuntu 16.04上工作,按照本指南,它适用于我:
http://ubuntuhandbook.org/index.php/2016/09/install-ffmpeg-3-1-ubuntu-16-04-ppa/
编辑:
但基本上,你会想把它们放到linux终端(我用16.04 Ubuntu进行测试)
sudo add-apt-repository ppa:jonathonf/ffmpeg-3
sudo apt-get update
sudo apt-get dist-upgrade
然后我更喜欢:
sudo apt-get autoremove
但请记住,如页面上所述,某些程序可能依赖于旧的ffmpeg2库,因此您需要根据需要进行调查。
希望这会有所帮助:)