#7129: Color change observed while converting png to mp4 format
----------------------------------+--------------------------------------
             Reporter:  testh001  |                     Type:  defect
               Status:  new       |                 Priority:  normal
            Component:  ffmpeg    |                  Version:  git-master
             Keywords:  png mp4   |               Blocked By:
             Blocking:            |  Reproduced by developer:  0
Analyzed by developer:  0         |
----------------------------------+--------------------------------------
 Note: This ticket follows all the requirements for a valid ticket. It
 contains:
 1. Full input line including all the input parameters
 2. Full output including header (banner)
 3. Reproducible test cases
 4. Input image
 5. Output

 Summary of the bug:
 When converting a png file from png format to mp4 format, colors sometime
 change to darker colors. Here is an example:
 {{{
 % ffmpeg -i 1.png 1.mp4
 }}}
 And here is the full output:
 {{{
   built with gcc 7.3.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-libopencore-amrnb
 --enable-
 libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine
 --enab
 le-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame
 --enable-li
 bvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-
 libx265 --en
 able-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp
 --enable-
 libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa
 --enabl
 e-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf
 --enabl
 e-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec
 --enab
 le-dxva2 --enable-avisynth
   libavutil      56. 12.100 / 56. 12.100
   libavcodec     58. 16.100 / 58. 16.100
   libavformat    58. 10.100 / 58. 10.100
   libavdevice    58.  2.100 / 58.  2.100
   libavfilter     7. 13.100 /  7. 13.100
   libswscale      5.  0.102 /  5.  0.102
   libswresample   3.  0.101 /  3.  0.101
   libpostproc    55.  0.100 / 55.  0.100
 Input #0, png_pipe, from '1.png':
   Duration: N/A, bitrate: N/A
     Stream #0:0: Video: png, rgb24(pc), 1920x1080 [SAR 3779:3779 DAR
 16:9], 25 t
 br, 25 tbn, 25 tbc
 Stream mapping:
   Stream #0:0 -> #0:0 (png (native) -> h264 (libx264))
 Press [q] to stop, [?] for help
 [libx264 @ 000000592af5d580] using SAR=1/1
 [libx264 @ 000000592af5d580] using cpu capabilities: MMX2 SSE2Fast LZCNT
 SSSE3 S
 SE4.2
 [libx264 @ 000000592af5d580] profile High 4:4:4 Predictive, level 4.0,
 4:4:4 8-b
 it
 [libx264 @ 000000592af5d580] 264 - core 155 r2901 7d0ff22 - H.264/MPEG-4
 AVC cod
 ec - Copyleft 2003-2018 - http://www.videolan.org/x264.html - options:
 cabac=1 r
 ef=3 deblock=1:0:0 analyse=0x1:0x111 me=hex subme=7 psy=1 psy_rd=1.00:0.00
 mixed
 _ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=0 cqm=0 deadzone=21,11
 fast_pski
 p=1 chroma_qp_offset=4 threads=3 lookahead_threads=1 sliced_threads=0 nr=0
 decim
 ate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3
 b_pyramid=2 b_a
 dapt=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 '1.mp4':
   Metadata:
     encoder         : Lavf58.10.100
     Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuv444p,
 1920x1080 [
 SAR 1:1 DAR 16:9], q=-1--1, 25 fps, 12800 tbn, 25 tbc
     Metadata:
       encoder         : Lavc58.16.100 libx264
     Side data:
       cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
 frame=    1 fps=0.0 q=28.0 Lsize=       2kB time=00:00:00.00
 bitrate=206666.7kbi
 ts/s speed=0.000999x
 video:1kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
 muxing ove
 rhead: 68.196999%
 [libx264 @ 000000592af5d580] frame I:1     Avg QP:13.00  size:   510
 [libx264 @ 000000592af5d580] mb I  I16..4: 100.0%  0.0%  0.0%
 [libx264 @ 000000592af5d580] coded y,u,v intra: 0.0% 0.0% 0.0%
 [libx264 @ 000000592af5d580] i16 v,h,dc,p: 99%  0%  1%  0%
 [libx264 @ 000000592af5d580] kb/s:102.00
 }}}

 Here is input file (I have no idea how to upload image here, I just
 uploaded to github and posted link to it). The output 1.mp4 has only one
 frame and it has DARKER colors. Colors are changed. So basically, open
 output 1.mp4 in in any video player, then screenshot screen, paste
 somewhere, use color picker and you will see that colors are changed. It
 should not happen. Here is input file 1.png (and I dont know how to upload
 1.mp4, but you can easily make it by using ffmpeg command line I posted
 above). For reference, here is my old ticket:
 [https://trac.ffmpeg.org/ticket/7115]

 [[Image(https://user-
 images.githubusercontent.com/29530279/38495846-776e4676-3bfb-
 11e8-8770-a0ebbbd892de.png)]]

--
Ticket URL: <https://trac.ffmpeg.org/ticket/7129>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
_______________________________________________
FFmpeg-trac mailing list
FFmpeg-trac@avcodec.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-trac

Reply via email to