При попытке добавить фильтр перспективы к видео с помощью ffmpeg, я получаю черную картинку со звуком, когда в результате получается формат MP4.
ffmpeg -i 2416593.flv -vf "frei0r=perspective:0.2/0.2:0.8/0.2" combined.mp4
В результате получается фильм, в котором воспроизводится звук, но картинка черная.
Если я изменю формат контейнера требуемого вывода на MPEG или AVI, как это:
ffmpeg -i 2416593.flv -vf "frei0r=perspective:0.2/0.2:0.8/0.2" combined.mpg
Я получаю как изображение, так и звук.
Что я должен сделать, чтобы получить отфильтрованное видео без необходимости дополнительного транскодирования?
Вывод ffmpeg выглядит следующим образом:
ffmpeg version 1.2.1 Copyright (c) 2000-2013 the FFmpeg developers
built on Sep 3 2013 18:39:11 with Apple LLVM version 4.2 (clang-425.0.27) (based on LLVM 3.2svn)
configuration: --prefix=/usr/local/Cellar/ffmpeg/1.2.1 --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-libfaac --enable-libmp3lame --enable-libxvid --enable-frei0r
libavutil 52. 18.100 / 52. 18.100
libavcodec 54. 92.100 / 54. 92.100
libavformat 54. 63.104 / 54. 63.104
libavdevice 54. 3.103 / 54. 3.103
libavfilter 3. 42.103 / 3. 42.103
libswscale 2. 2.100 / 2. 2.100
libswresample 0. 17.102 / 0. 17.102
libpostproc 52. 2.100 / 52. 2.100
Input #0, flv, from '2416593.flv':
Metadata:
moovPosition : 8369817
avcprofile : 77
avclevel : 30
aacaot : 2
videoframerate : 25
audiochannels : 2
Duration: 00:00:52.24, start: 0.000000, bitrate: 764 kb/s
Stream #0:0: Video: h264 (Main), yuv420p, 768x432 [SAR 1:1 DAR 16:9], 25 tbr, 1k tbn, 50 tbc
Stream #0:1: Audio: aac, 48000 Hz, stereo, fltp
[libx264 @ 0x7fce828f5600] using SAR=1/1
[libx264 @ 0x7fce828f5600] using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2 AVX
[libx264 @ 0x7fce828f5600] profile High 4:4:4 Predictive, level 3.0, 4:4:4 8-bit
[libx264 @ 0x7fce828f5600] 264 - core 125 - H.264/MPEG-4 AVC codec - Copyleft 2003-2012 - 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=12 lookahead_threads=2 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 'combined.mp4':
Metadata:
moovPosition : 8369817
avcprofile : 77
avclevel : 30
aacaot : 2
videoframerate : 25
audiochannels : 2
encoder : Lavf54.63.104
Stream #0:0: Video: h264 ([33][0][0][0] / 0x0021), yuv444p, 768x432 [SAR 1:1 DAR 16:9], q=-1--1, 12800 tbn, 25 tbc
Stream #0:1: Audio: aac ([64][0][0][0] / 0x0040), 48000 Hz, stereo, s16, 128 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (h264 -> libx264)
Stream #0:1 -> #0:1 (aac -> libfaac)
Press [q] to stop, [?] for help
frame= 753 fps= 88 q=-1.0 Lsize= 3145kB time=00:00:30.04 bitrate= 857.7kbits/s dup=2 drop=0
video:2653kB audio:469kB subtitle:0 global headers:0kB muxing overhead 0.750993%
[libx264 @ 0x7fce828f5600] frame I:10 Avg QP:18.43 size: 22903
[libx264 @ 0x7fce828f5600] frame P:234 Avg QP:25.39 size: 7449
[libx264 @ 0x7fce828f5600] frame B:509 Avg QP:28.63 size: 1461
[libx264 @ 0x7fce828f5600] consecutive B-frames: 6.1% 9.8% 4.4% 79.7%
[libx264 @ 0x7fce828f5600] mb I I16..4: 8.7% 67.6% 23.7%
[libx264 @ 0x7fce828f5600] mb P I16..4: 1.9% 5.1% 2.7% P16..4: 22.9% 13.4% 6.9% 0.0% 0.0% skip:47.1%
[libx264 @ 0x7fce828f5600] mb B I16..4: 0.1% 0.1% 0.1% B16..8: 24.4% 3.5% 0.9% direct: 1.0% skip:69.9% L0:41.2% L1:50.2% BI: 8.6%
[libx264 @ 0x7fce828f5600] 8x8 transform intra:57.4% inter:57.5%
[libx264 @ 0x7fce828f5600] coded y,u,v intra: 47.3% 27.1% 22.4% inter: 8.0% 2.4% 1.2%
[libx264 @ 0x7fce828f5600] i16 v,h,dc,p: 17% 37% 7% 39%
[libx264 @ 0x7fce828f5600] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 17% 16% 38% 3% 3% 7% 4% 6% 5%
[libx264 @ 0x7fce828f5600] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 19% 25% 19% 5% 5% 9% 5% 8% 5%
[libx264 @ 0x7fce828f5600] Weighted P-Frames: Y:3.4% UV:2.6%
[libx264 @ 0x7fce828f5600] ref P L0: 56.2% 11.7% 20.1% 11.8% 0.2%
[libx264 @ 0x7fce828f5600] ref B L0: 88.1% 8.3% 3.6%
[libx264 @ 0x7fce828f5600] ref B L1: 96.5% 3.5%
[libx264 @ 0x7fce828f5600] kb/s:721.32