Это Ubuntu 16.04, работающая на плате armhf.

Я использую ffmpeg для записи видео с веб-камеры. Этот процесс лучше всего работает в версии ffmpeg. Я хочу установить / откат к определенной версии.

Вывод из клона, который имеет проблемы:

ffmpeg -version
ffmpeg version 4.1.git Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 5.4.0 (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.10) 20160609
configuration: --enable-gpl --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libx264 --enable-nonfree --enable-version3 --enable-indev=v4l2
libavutil      56. 25.100 / 56. 25.100
libavcodec     58. 42.104 / 58. 42.104
libavformat    58. 25.100 / 58. 25.100
libavdevice    58.  6.101 / 58.  6.101
libavfilter     7. 46.101 /  7. 46.101
libswscale      5.  4.100 /  5.  4.100
libswresample   3.  4.100 /  3.  4.100
libpostproc    55.  4.100 / 55.  4.100


root@busplay4:/usr/bin# dpkg-query -W ffmpeg
ffmpeg  5:201812261919-git-1
root@busplay4:/usr/bin# dpkg -l | grep ffmpeg
ii  chromium-codecs-ffmpeg-extra           71.0.3578.98-0ubuntu0.16.04.1                armhf        Extra ffmpeg codecs for the Chromium Browser
ii  ffmpeg                                 5:201812261919-git-1                         armhf        Package created with checkinstall 1.6.2
ii  ffmpeg-doc                             7:3.3.3-5ubuntu1                             all          Documentation of the FFmpeg multimedia framework
ii  ffmpegthumbnailer                      2.0.10-0.1                                   armhf        fast and lightweight video thumbnailer
ii  libavcodec-ffmpeg56:armhf              7:2.8.15-0ubuntu0.16.04.1                    armhf        FFmpeg library with de/encoders for audio/video codecs - runtime files
ii  libavdevice-ffmpeg56:armhf             7:2.8.15-0ubuntu0.16.04.1                    armhf        FFmpeg library for handling input and output devices - runtime files
ii  libavfilter-ffmpeg5:armhf              7:2.8.15-0ubuntu0.16.04.1                    armhf        FFmpeg library containing media filters - runtime files
ii  libavformat-ffmpeg56:armhf             7:2.8.15-0ubuntu0.16.04.1                    armhf        FFmpeg library with (de)muxers for multimedia containers - runtime files
ii  libavresample-ffmpeg2:armhf            7:2.8.15-0ubuntu0.16.04.1                    armhf        FFmpeg compatibility library for resampling - runtime files
ii  libavutil-ffmpeg54:armhf               7:2.8.15-0ubuntu0.16.04.1                    armhf        FFmpeg library with functions for simplifying programming - runtime files
ii  libffmpegthumbnailer4v5                2.0.10-0.1                                   armhf        shared library for ffmpegthumbnailer
ii  libpostproc-ffmpeg53:armhf             7:2.8.15-0ubuntu0.16.04.1                    armhf        FFmpeg library for post processing - runtime files
ii  libswresample-ffmpeg1:armhf            7:2.8.15-0ubuntu0.16.04.1                    armhf        FFmpeg library for audio resampling, rematrixing etc. - runtime files
ii  libswscale-ffmpeg3:armhf               7:2.8.15-0ubuntu0.16.04.1                    armhf        FFmpeg library for image scaling and various conversions - runtime files

Выход из рабочего клона:

ffmpeg -version
ffmpeg version 3.3.3-5ubuntu1 Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 5.4.1 (Ubuntu/Linaro 5.4.1-2ubuntu1~16.04) 20160904
configuration: --prefix=/usr --extra-version=5ubuntu1 --toolchain=hardened --libdir=/usr/lib/arm-linux-gnueabihf --incdir=/usr/include/arm-linux-gnueabihf --enable-gpl --disable-stripping --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-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librubberband --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-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --disable-d3d11va --disable-dxva2 --disable-nvenc --disable-vaapi --disable-vda --disable-vdpau --disable-videotoolbox --enable-v4l2_m2m --enable-libdc1394 --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
libavutil      55. 58.100 / 55. 58.100
libavcodec     57. 89.100 / 57. 89.100
libavformat    57. 71.100 / 57. 71.100
libavdevice    57.  6.100 / 57.  6.100
libavfilter     6. 82.100 /  6. 82.100
libavresample   3.  5.  0 /  3.  5.  0
libswscale      4.  6.100 /  4.  6.100
libswresample   2.  7.100 /  2.  7.100
libpostproc    54.  5.100 / 54.  5.100

Эти два XU4 были клонами, нам каким-то образом удалось изменить версию на более новую с помощью make/build. У нас нет информации о том, как мы закончили с другой версией. Как нам откатиться или перейти на предпочитаемую версию. Причиной отката является то, что производительность записи видео с использованием ffmpeg лучше в предыдущей версии.

Выход из клона, который работает нормально. Версия 3.3.3-5ubuntu1.

ffmpeg version 3.3.3-5ubuntu1 Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 5.4.1 (Ubuntu/Linaro 5.4.1-2ubuntu1~16.04) 20160904
  configuration: --prefix=/usr --extra-version=5ubuntu1 --toolchain=hardened --libdir=/usr/lib/arm-linux-gnueabihf --incdir=/usr/include/arm-linux-gnueabihf --enable-gpl --disable-stripping --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-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librubberband --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-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --disable-d3d11va --disable-dxva2 --disable-nvenc --disable-vaapi --disable-vda --disable-vdpau --disable-videotoolbox --enable-v4l2_m2m --enable-libdc1394 --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
  WARNING: library configuration mismatch
  avcodec     configuration: --prefix=/usr --extra-version=5ubuntu1 --toolchain=hardened --libdir=/usr/lib/arm-linux-gnueabihf --incdir=/usr/include/arm-linux-gnueabihf --enable-gpl --disable-stripping --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-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librubberband --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-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --disable-d3d11va --disable-dxva2 --disable-nvenc --disable-vaapi --disable-vda --disable-vdpau --disable-videotoolbox --enable-v4l2_m2m --enable-libdc1394 --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared --enable-version3 --disable-doc --disable-programs --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libtesseract --enable-libvo_amrwbenc --enable-netcdf
  avfilter    configuration: --prefix=/usr --extra-version=5ubuntu1 --toolchain=hardened --libdir=/usr/lib/arm-linux-gnueabihf --incdir=/usr/include/arm-linux-gnueabihf --enable-gpl --disable-stripping --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-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librubberband --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-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --disable-d3d11va --disable-dxva2 --disable-nvenc --disable-vaapi --disable-vda --disable-vdpau --disable-videotoolbox --enable-v4l2_m2m --enable-libdc1394 --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared --enable-version3 --disable-doc --disable-programs --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libtesseract --enable-libvo_amrwbenc --enable-netcdf
  libavutil      55. 58.100 / 55. 58.100
  libavcodec     57. 89.100 / 57. 89.100
  libavformat    57. 71.100 / 57. 71.100
  libavdevice    57.  6.100 / 57.  6.100
  libavfilter     6. 82.100 /  6. 82.100
  libavresample   3.  5.  0 /  3.  5.  0
  libswscale      4.  6.100 /  4.  6.100
  libswresample   2.  7.100 /  2.  7.100
  libpostproc    54.  5.100 / 54.  5.100
[video4linux2,v4l2 @ 0x645ec0] The V4L2 driver changed the video from 320x240 to 640x480
[video4linux2,v4l2 @ 0x645ec0] The driver changed the time per frame from 1/30 to 1/60
Input #0, video4linux2,v4l2, from '/dev/video0':
  Duration: N/A, start: 16103.299011, bitrate: N/A
    Stream #0:0: Video: mjpeg, yuvj422p(pc, bt470bg/unknown/unknown), 640x480, 60 fps, 60 tbr, 1000k tbn, 1000k tbc
Codec AVOption x264opts (x264 options) specified for output file #0 (lq4.mp4) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some encoder which was not actually used for any stream.
Stream mapping:
  Stream #0:0 -> #0:0 (mjpeg (native) -> h264 (h264_v4l2m2m))
Press [q] to stop, [?] for help
[swscaler @ 0x67c9f0] deprecated pixel format used, make sure you did set range correctly
[h264_v4l2m2m @ 0x649940] driver 'uvcvideo' on card '3.0 USB Camera: 3.0 USB Camera'
[h264_v4l2m2m @ 0x649940] driver 'exynos-gsc' on card 'exynos-gsc gscaler'
    Last message repeated 1 times
[h264_v4l2m2m @ 0x649940] driver 's5p-mfc' on card 's5p-mfc-enc'
[h264_v4l2m2m @ 0x649940] Using device /dev/video11
[h264_v4l2m2m @ 0x649940] driver 's5p-mfc' on card 's5p-mfc-enc'
[h264_v4l2m2m @ 0x649940] h264_v4l2m2m encoder: enabling bit rate control: 750000
[h264_v4l2m2m @ 0x649940] h264 profile not found
[h264_v4l2m2m @ 0x649940] Encoder adjusted: qmin (0), qmax (51)
Output #0, mp4, to 'lq4.mp4':
  Metadata:
    encoder         : Lavf57.71.100
    Stream #0:0: Video: h264 (h264_v4l2m2m) ([33][0][0][0] / 0x0021), nv21, 640x480, q=2-31, 750 kb/s, 60 fps, 15360 tbn, 60 tbc
    Metadata:
      encoder         : Lavc57.89.100 h264_v4l2m2m
[h264_v4l2m2m @ 0x649940] output  POLLERR
[mp4 @ 0x648400] Non-monotonous DTS in output stream 0:0; previous: 0, current: 0; changing to 1. This may result in incorrect timestamps in the output file.
frame=  737 fps= 61 q=-0.0 Lsize=    2561kB time=00:00:12.25 bitrate=1712.3kbits/s dup=153 drop=0 speed=1.02x   
video:2557kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.153437%

Выход из версии, которая не работает:

ffmpeg -framerate 30 -video_size 320x240 -input_format mjpeg -i /dev/video0 -pix_fmt nv21 -vcodec h264 -acodec none -c:v h264_v4l2m2m -x264opts nal-hrd=cbr:force-cfr=1 -b:v 750k -minrate 750k -maxrate 750k -bufsize 1000k lq4.mp4
ffmpeg version 4.1.git Copyright (c) 2000-2018 the FFmpeg developers
  built with gcc 5.4.0 (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.10) 20160609
  configuration: --enable-gpl --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libx264 --enable-nonfree --enable-version3 --enable-indev=v4l2
  libavutil      56. 25.100 / 56. 25.100
  libavcodec     58. 42.104 / 58. 42.104
  libavformat    58. 25.100 / 58. 25.100
  libavdevice    58.  6.101 / 58.  6.101
  libavfilter     7. 46.101 /  7. 46.101
  libswscale      5.  4.100 /  5.  4.100
  libswresample   3.  4.100 /  3.  4.100
  libpostproc    55.  4.100 / 55.  4.100
[video4linux2,v4l2 @ 0x16f4390] The V4L2 driver changed the video from 320x240 to 640x480
[video4linux2,v4l2 @ 0x16f4390] The driver changed the time per frame from 1/30 to 1/60
Input #0, video4linux2,v4l2, from '/dev/video0':
  Duration: N/A, start: 375.645303, bitrate: N/A
    Stream #0:0: Video: mjpeg (Baseline), yuvj422p(pc, bt470bg/unknown/unknown), 640x480, 60 fps, 60 tbr, 1000k tbn, 1000k tbc
Codec AVOption x264opts (x264 options) specified for output file #0 (lq4.mp4) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some encoder which was not actually used for any stream.
Stream mapping:
  Stream #0:0 -> #0:0 (mjpeg (native) -> h264 (h264_v4l2m2m))
Press [q] to stop, [?] for help
[swscaler @ 0x1706dd0] deprecated pixel format used, make sure you did set range correctly
[h264_v4l2m2m @ 0x16f8490] driver 'uvcvideo' on card '3.0 USB Camera: 3.0 USB Camera'
[h264_v4l2m2m @ 0x16f8490] driver 'exynos-gsc' on card 'exynos-gsc gscaler'
    Last message repeated 1 times
[h264_v4l2m2m @ 0x16f8490] driver 's5p-mfc' on card 's5p-mfc-enc'
[h264_v4l2m2m @ 0x16f8490] Using device /dev/video11
[h264_v4l2m2m @ 0x16f8490] driver 's5p-mfc' on card 's5p-mfc-enc'
[h264_v4l2m2m @ 0x16f8490] h264 profile not found
[h264_v4l2m2m @ 0x16f8490] Encoder adjusted: qmin (0), qmax (51)
Output #0, mp4, to 'lq4.mp4':
  Metadata:
    encoder         : Lavf58.25.100
    Stream #0:0: Video: h264 (h264_v4l2m2m) (avc1 / 0x31637661), nv21, 640x480, q=2-31, 750 kb/s, 60 fps, 15360 tbn, 60 tbc
    Metadata:
      encoder         : Lavc58.42.104 h264_v4l2m2m
[mp4 @ 0x16f7050] Non-monotonous DTS in output stream 0:0; previous: 0, current: 0; changing to 1. This may result in incorrect timestamps in the output file.
[mjpeg @ 0x16f5c90] mjpeg_decode_dc: bad vlc: 0:0 (0x16f626c)
[mjpeg @ 0x16f5c90] error dc
[mjpeg @ 0x16f5c90] error y=41 x=1
Video encoding failed=-0.0 size=    2560kB time=00:00:00.80 bitrate=26212.8kbits/s dup=29 drop=0 speed=1.58x   
Conversion failed!

Выход из версии, которая не работает:

root@busplay4:/usr/bin# dpkg -l | grep ffmpeg
ii  chromium-codecs-ffmpeg-extra           71.0.3578.98-0ubuntu0.16.04.1                armhf        Extra ffmpeg codecs for the Chromium Browser
ii  ffmpeg                                 5:201812261919-git-1                         armhf        Package created with checkinstall 1.6.2
ii  ffmpeg-doc                             7:3.3.3-5ubuntu1                             all          Documentation of the FFmpeg multimedia framework
ii  ffmpegthumbnailer                      2.0.10-0.1                                   armhf        fast and lightweight video thumbnailer
ii  libavcodec-ffmpeg56:armhf              7:2.8.15-0ubuntu0.16.04.1                    armhf        FFmpeg library with de/encoders for audio/video codecs - runtime files
ii  libavdevice-ffmpeg56:armhf             7:2.8.15-0ubuntu0.16.04.1                    armhf        FFmpeg library for handling input and output devices - runtime files
ii  libavfilter-ffmpeg5:armhf              7:2.8.15-0ubuntu0.16.04.1                    armhf        FFmpeg library containing media filters - runtime files
ii  libavformat-ffmpeg56:armhf             7:2.8.15-0ubuntu0.16.04.1                    armhf        FFmpeg library with (de)muxers for multimedia containers - runtime files
ii  libavresample-ffmpeg2:armhf            7:2.8.15-0ubuntu0.16.04.1                    armhf        FFmpeg compatibility library for resampling - runtime files
ii  libavutil-ffmpeg54:armhf               7:2.8.15-0ubuntu0.16.04.1                    armhf        FFmpeg library with functions for simplifying programming - runtime files
ii  libffmpegthumbnailer4v5                2.0.10-0.1                                   armhf        shared library for ffmpegthumbnailer
ii  libpostproc-ffmpeg53:armhf             7:2.8.15-0ubuntu0.16.04.1                    armhf        FFmpeg library for post processing - runtime files
ii  libswresample-ffmpeg1:armhf            7:2.8.15-0ubuntu0.16.04.1                    armhf        FFmpeg library for audio resampling, rematrixing etc. - runtime files
ii  libswscale-ffmpeg3:armhf               7:2.8.15-0ubuntu0.16.04.1                    armhf        FFmpeg library for image scaling and various conversions - runtime files

Выход из рабочего XU4

odroid@odroid:~$ dpkg  --list | grep "ffmpeg"
ii  chromium-codecs-ffmpeg-extra           71.0.3578.98-0ubuntu0.16.04.1                armhf        Extra ffmpeg codecs for the Chromium Browser
ii  ffmpeg                                 7:3.3.3-5ubuntu1                             armhf        Tools for transcoding, streaming and playing of multimedia files
ii  ffmpeg-doc                             7:3.3.3-5ubuntu1                             all          Documentation of the FFmpeg multimedia framework
ii  ffmpegthumbnailer                      2.0.10-0.1                                   armhf        fast and lightweight video thumbnailer
ii  libavcodec-ffmpeg56:armhf              7:2.8.15-0ubuntu0.16.04.1                    armhf        FFmpeg library with de/encoders for audio/video codecs - runtime files
ii  libavdevice-ffmpeg56:armhf             7:2.8.15-0ubuntu0.16.04.1                    armhf        FFmpeg library for handling input and output devices - runtime files
ii  libavfilter-ffmpeg5:armhf              7:2.8.15-0ubuntu0.16.04.1                    armhf        FFmpeg library containing media filters - runtime files
ii  libavformat-ffmpeg56:armhf             7:2.8.15-0ubuntu0.16.04.1                    armhf        FFmpeg library with (de)muxers for multimedia containers - runtime files
ii  libavresample-ffmpeg2:armhf            7:2.8.15-0ubuntu0.16.04.1                    armhf        FFmpeg compatibility library for resampling - runtime files
ii  libavutil-ffmpeg54:armhf               7:2.8.15-0ubuntu0.16.04.1                    armhf        FFmpeg library with functions for simplifying programming - runtime files
ii  libffmpegthumbnailer4v5                2.0.10-0.1                                   armhf        shared library for ffmpegthumbnailer
ii  libpostproc-ffmpeg53:armhf             7:2.8.15-0ubuntu0.16.04.1                    armhf        FFmpeg library for post processing - runtime files
ii  libswresample-ffmpeg1:armhf            7:2.8.15-0ubuntu0.16.04.1                    armhf        FFmpeg library for audio resampling, rematrixing etc. - runtime files
ii  libswscale-ffmpeg3:armhf               7:2.8.15-0ubuntu0.16.04.1                    armhf        FFmpeg library for image scaling and various conversions - runtime files

Также предложите, если ошибки не из-за изменения версии, и журналы предлагают что-то еще, связанное с ffmpeg.

0