1

Мы пытаемся ввести одно изображение и преобразовать его в 5-секундное видео с применением colorchannelmixer. Процесс выполняется без ошибок, но видео .mp4 повреждено. Процесс работает, если выводить на одно изображение (png). Мы хотели бы завершить в одной командной строке.

Команда:

ffmpeg-latest -loop 1 -i /Users/tmp/video/img0.jpg -filter_complex "[0:v]colorchannelmixer=.393:.769:.189:0:.349:.686:.168:0:.272:.534:.131[colorchannelmixed],[colorchannelmixed]eq=1.0:0:1.3:2.4:1.0:1.0:1.0:1.0[color_effect]" -map [color_effect] -t 5 -c:v libx264 -s 1280x760 -y /Users/video/testing.mp4

Консольный вывод:

ffmpeg version N-77668-g7812997 Copyright (c) 2000-2016 the FFmpeg developers
  built with Apple LLVM version 7.0.2 (clang-700.1.81)
  configuration: --prefix=/usr/local/ffmpeg-latest --extra-cflags=-I/usr/local/Cellar/include --extra-ldflags=-L/usr/local/Cellar/lib --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-nonfree --enable-hardcoded-tables --enable-avresample --enable-vda --cc=cc --host-cflags= --host-ldflags= --enable-libx264 --enable-libmp3lame --enable-libxvid --enable-libfreetype --enable-libtheora --enable-libvorbis --enable-libvpx --enable-librtmp --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-aacenc --enable-libass --enable-ffplay --enable-libspeex --enable-libschroedinger --enable-libfdk-aac --enable-libopus --enable-libopenjpeg --extra-cflags=-I/usr/local/Cellar/openjpeg/1.5.1/include/openjpeg-1.5
  libavutil      55. 12.100 / 55. 12.100
  libavcodec     57. 21.100 / 57. 21.100
  libavformat    57. 21.100 / 57. 21.100
  libavdevice    57.  0.100 / 57.  0.100
  libavfilter     6. 23.100 /  6. 23.100
  libavresample   3.  0.  0 /  3.  0.  0
  libswscale      4.  0.100 /  4.  0.100
  libswresample   2.  0.101 /  2.  0.101
  libpostproc    54.  0.100 / 54.  0.100
[mjpeg @ 0x7ff069800c00] Changing bps to 8
Input #0, image2, from '/Users/Glenn/Documents/rails_one_click/RiverCloud_vr2/tmp/video/15761/img0.jpg':
  Duration: 00:00:00.04, start: 0.000000, bitrate: 23503 kb/s
    Stream #0:0: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown), 600x600 [SAR 1:1 DAR 1:1], 25 fps, 25 tbr, 25 tbn, 25 tbc
[swscaler @ 0x7ff06a808000] deprecated pixel format used, make sure you did set range correctly
No pixel format specified, yuv444p for H.264 encoding chosen.
Use -pix_fmt yuv420p for compatibility with outdated media players.
[libx264 @ 0x7ff0698a1e00] using SAR=19/32
[libx264 @ 0x7ff0698a1e00] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 AVX2 LZCNT BMI2
[libx264 @ 0x7ff0698a1e00] profile High 4:4:4 Predictive, level 3.2, 4:4:4 8-bit
[libx264 @ 0x7ff0698a1e00] 264 - core 148 r2601 a0cd7d3 - H.264/MPEG-4 AVC codec - Copyleft 2003-2015 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=4 threads=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to '/Users/Glenn/Documents/rails_one_click/RiverCloud_vr2/tmp/video/testing.mp4':
  Metadata:
    encoder         : Lavf57.21.100
    Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv444p, 1280x760 [SAR 19:32 DAR 1:1], q=-1--1, 25 fps, 12800 tbn, 25 tbc
    Metadata:
      encoder         : Lavc57.21.100 libx264
    Side data:
      unknown side data type 10 (24 bytes)
Stream mapping:
  Stream #0:0 (mjpeg) -> colorchannelmixer
  eq -> Stream #0:0 (libx264)
Press [q] to stop, [?] for help
frame=  125 fps= 33 q=-1.0 Lsize=     207kB time=00:00:04.92 bitrate= 345.1kbits/s speed= 1.3x    
video:205kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.122878%
[libx264 @ 0x7ff0698a1e00] frame I:1     Avg QP:19.49  size:198346
[libx264 @ 0x7ff0698a1e00] frame P:31    Avg QP:18.15  size:   215
[libx264 @ 0x7ff0698a1e00] frame B:93    Avg QP:28.33  size:    45
[libx264 @ 0x7ff0698a1e00] consecutive B-frames:  0.8%  0.0%  0.0% 99.2%
[libx264 @ 0x7ff0698a1e00] mb I  I16..4:  3.2% 60.9% 36.0%
[libx264 @ 0x7ff0698a1e00] mb P  I16..4:  0.0%  0.0%  0.0%  P16..4:  1.5%  0.1%  0.1%  0.0%  0.0%    skip:98.3%
[libx264 @ 0x7ff0698a1e00] mb B  I16..4:  0.0%  0.0%  0.0%  B16..8:  0.3%  0.0%  0.0%  direct: 0.0%  skip:99.7%  L0: 2.8% L1:97.2% BI: 0.0%
[libx264 @ 0x7ff0698a1e00] 8x8 transform intra:60.9% inter:93.9%
[libx264 @ 0x7ff0698a1e00] coded y,u,v intra: 93.3% 77.1% 68.5% inter: 0.0% 0.0% 0.0%
[libx264 @ 0x7ff0698a1e00] i16 v,h,dc,p:  6% 46%  7% 42%
[libx264 @ 0x7ff0698a1e00] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 16% 35%  8%  5%  5%  4%  8%  6% 14%
[libx264 @ 0x7ff0698a1e00] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 15% 32%  7%  5%  7%  5% 11%  5% 13%
[libx264 @ 0x7ff0698a1e00] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0x7ff0698a1e00] ref P L0: 32.9%  0.6% 49.4% 17.1%
[libx264 @ 0x7ff0698a1e00] ref B L1: 91.3%  8.7%
[libx264 @ 0x7ff0698a1e00] kb/s:334.75

0