[FFmpeg-user] remap filter gives only black and white output

Michael Koch astroelectronic at t-online.de
Wed Nov 22 00:44:11 EET 2017


I've written a C# program to create my own xmap and ymap files for the 
remap filter.
The geometric distortion in the output video looks as expected. But why 
is the output only black and white?
I've tested two different input videos with the same result. No colors 
in the output.
The console output is attached below.

Thanks,
Michael


F:\xxx\xxx>c:/ffmpeg/ffmpeg -i in.mp4 -i xmap_1000.pgm
  -i ymap_1000.pgm -lavfi remap -c:v mpeg4 -q:v 2 -y out.mp4
ffmpeg version N-88555-g6ea7711532 Copyright (c) 2000-2017 the FFmpeg 
developers

   built with gcc 7.2.0 (GCC)
   configuration: --enable-gpl --enable-version3 --enable-sdl2 
--enable-bzlib --e
nable-fontconfig --enable-gnutls --enable-iconv --enable-libass 
--enable-libblur
ay --enable-libfreetype --enable-libmp3lame --enable-libopenjpeg 
--enable-libopu
s --enable-libshine --enable-libsnappy --enable-libsoxr 
--enable-libtheora --ena
ble-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp 
--enable-lib
x264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma 
--enable-z
lib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-cuda 
--enable-c
uvid --enable-d3d11va --enable-nvenc --enable-dxva2 --enable-avisynth 
--enable-l
ibmfx
   libavutil      56.  0.100 / 56.  0.100
   libavcodec     58.  1.100 / 58.  1.100
   libavformat    58.  0.102 / 58.  0.102
   libavdevice    58.  0.100 / 58.  0.100
   libavfilter     7.  0.101 /  7.  0.101
   libswscale      5.  0.101 /  5.  0.101
   libswresample   3.  0.101 /  3.  0.101
   libpostproc    55.  0.100 / 55.  0.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'in.mp4':
   Metadata:
     major_brand     : isom
     minor_version   : 512
     compatible_brands: isomiso2mp41
     encoder         : Lavf58.0.102
   Duration: 00:00:12.02, start: 0.000000, bitrate: 22472 kb/s
     Stream #0:0(und): Video: mpeg4 (Simple Profile) (mp4v / 
0x7634706D), yuv420p
, 1000x1000 [SAR 1:1 DAR 1:1], 22381 kb/s, 30 fps, 30 tbr, 15360 tbn, 30 
tbc (de
fault)
     Metadata:
       handler_name    : VideoHandler
     Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, 
stereo, flt
p, 127 kb/s (default)
     Metadata:
       handler_name    : SoundHandler
Input #1, pgm_pipe, from 'xmap_1000.pgm':
   Duration: N/A, bitrate: N/A
     Stream #1:0: Video: pgm, gray16le, 1000x1000, 25 tbr, 25 tbn, 25 tbc
Input #2, pgm_pipe, from 'ymap_1000.pgm':
   Duration: N/A, bitrate: N/A
     Stream #2:0: Video: pgm, gray16le, 1000x1000, 25 tbr, 25 tbn, 25 tbc
Stream mapping:
   Stream #0:0 (mpeg4) -> remap:source (graph 0)
   Stream #1:0 (pgm) -> remap:xmap (graph 0)
   Stream #2:0 (pgm) -> remap:ymap (graph 0)
   remap (graph 0) -> Stream #0:0 (mpeg4)
   Stream #0:1 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
Output #0, mp4, to 'out.mp4':
   Metadata:
     major_brand     : isom
     minor_version   : 512
     compatible_brands: isomiso2mp41
     encoder         : Lavf58.0.102
     Stream #0:0: Video: mpeg4 (mp4v / 0x7634706D), yuv420p, 1000x1000 
[SAR 1:1 D
AR 1:1], q=2-31, 200 kb/s, 30 fps, 15360 tbn, 30 tbc (default)
     Metadata:
       encoder         : Lavc58.1.100 mpeg4
     Side data:
       cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: -1
     Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, 
stereo, flt
p, 128 kb/s (default)
     Metadata:
       handler_name    : SoundHandler
       encoder         : Lavc58.1.100 aac
frame=   43 fps=0.0 q=2.0 size=    1024kB time=00:00:01.53 
bitrate=5474.0kbits/s
frame=   91 fps= 88 q=2.0 size=    3840kB time=00:00:03.11 
bitrate=10110.2kbits/
frame=  137 fps= 89 q=2.0 size=    7168kB time=00:00:04.64 
bitrate=12644.4kbits/
frame=  184 fps= 89 q=2.0 size=   10496kB time=00:00:06.19 
bitrate=13868.9kbits/
frame=  231 fps= 90 q=2.0 size=   13824kB time=00:00:07.77 
bitrate=14558.6kbits/
frame=  280 fps= 91 q=2.0 size=   17408kB time=00:00:09.42 
bitrate=15127.0kbits/
frame=  329 fps= 91 q=2.0 size=   19968kB time=00:00:11.07 
bitrate=14768.8kbits/
frame=  360 fps= 92 q=2.0 Lsize=   20827kB time=00:00:12.00 
bitrate=14212.0kbits
/s speed=3.08x
video:20628kB audio:188kB subtitle:0kB other streams:0kB global 
headers:0kB muxi
ng overhead: 0.054835%
[aac @ 00000000005d2d80] Qavg: 206.162


More information about the ffmpeg-user mailing list