Re: [FFmpeg-trac] #6574(swscale:new): ffmpeg butchers video quality when downscaling

2017-08-08 Thread FFmpeg
#6574: ffmpeg butchers video quality when downscaling
+---
 Reporter:  birdie  |Owner:
 Type:  defect  |   Status:  new
 Priority:  critical|Component:  swscale
  Version:  git-master  |   Resolution:
 Keywords:  |   Blocked By:
 Blocking:  |  Reproduced by developer:  0
Analyzed by developer:  0   |
+---

Comment (by birdie):

 When encoding a single image using

 {{{
 ffmpeg -i source.png -vf scale=768x342:flags=lanczos result.png
 }}}

 The problem disappears (the colors are slightly off though). It's only
 when encoding the entire video there's this issue.

--
Ticket URL: 
FFmpeg 
FFmpeg issue tracker
___
FFmpeg-trac mailing list
FFmpeg-trac@avcodec.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-trac


Re: [FFmpeg-trac] #6574(swscale:new): ffmpeg butchers video quality when downscaling

2017-08-08 Thread FFmpeg
#6574: ffmpeg butchers video quality when downscaling
+---
 Reporter:  birdie  |Owner:
 Type:  defect  |   Status:  new
 Priority:  critical|Component:  swscale
  Version:  git-master  |   Resolution:
 Keywords:  |   Blocked By:
 Blocking:  |  Reproduced by developer:  0
Analyzed by developer:  0   |
+---
Changes (by birdie):

 * version:  3.2.4 => git-master


--
Ticket URL: 
FFmpeg 
FFmpeg issue tracker
___
FFmpeg-trac mailing list
FFmpeg-trac@avcodec.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-trac


Re: [FFmpeg-trac] #6574(swscale:new): ffmpeg butchers video quality when downscaling

2017-08-08 Thread FFmpeg
#6574: ffmpeg butchers video quality when downscaling
--+---
 Reporter:  birdie|Owner:
 Type:  defect|   Status:  new
 Priority:  critical  |Component:  swscale
  Version:  3.2.4 |   Resolution:
 Keywords:|   Blocked By:
 Blocking:|  Reproduced by developer:  0
Analyzed by developer:  0 |
--+---

Comment (by birdie):

 I've tried ffmpeg from git - the result is the same:

 {{{
 ffmpeg -i source.mkv -vf scale=768x342 -sws_flags spline -c:v libx264
 -preset veryslow -x264opts keyint=230:min-keyint=23:bframes=16 -crf 0
 -tune film result.mkv

 ffmpeg version N-86925-g4ff94558f2 Copyright (c) 2000-2017 the FFmpeg
 developers
   built with gcc 6.4.0 (Debian 6.4.0-2) 20170724
   configuration: --enable-gpl --enable-version3 --enable-static --disable-
 debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio
 --cc=gcc-6 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-
 gray --enable-libass --enable-libfreetype --enable-libfribidi --enable-
 libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-
 libopenjpeg --enable-libopus --enable-librtmp --enable-libsoxr --enable-
 libspeex --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc
 --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264
 --enable-libx265 --enable-libxvid --enable-libzimg
   libavutil  55. 69.100 / 55. 69.100
   libavcodec 57.102.100 / 57.102.100
   libavformat57. 76.100 / 57. 76.100
   libavdevice57.  7.100 / 57.  7.100
   libavfilter 6. 96.100 /  6. 96.100
   libswscale  4.  7.101 /  4.  7.101
   libswresample   2.  8.100 /  2.  8.100
   libpostproc54.  6.100 / 54.  6.100
 Input #0, matroska,webm, from 'source.mkv':
   Metadata:
 ENCODER : Lavf57.56.100
   Duration: 00:00:14.43, start: 0.00, bitrate: 5636 kb/s
 Chapter #0:0: start 0.00, end 179.00
 Chapter #0:1: start 179.00, end 998.00
 Chapter #0:2: start 998.00, end 1598.00
 Chapter #0:3: start 1598.00, end 2043.00
 Chapter #0:4: start 2043.00, end 2614.00
 Chapter #0:5: start 2614.00, end 3387.00
 Chapter #0:6: start 3387.00, end 4007.00
 Chapter #0:7: start 4007.00, end 4729.00
 Chapter #0:8: start 4729.00, end 5163.504000
 Stream #0:0: Video: h264 (High), yuv420p(progressive), 1920x800 [SAR
 1:1 DAR 12:5], 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)
 Metadata:
   DURATION: 00:00:14.43100
 Stream mapping:
   Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
 Press [q] to stop, [?] for help
 [libx264 @ 0x4817540] using SAR=171/160
 [libx264 @ 0x4817540] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
 AVX
 [libx264 @ 0x4817540] profile High 4:4:4 Predictive, level 3.1, 4:2:0
 8-bit
 [libx264 @ 0x4817540] 264 - core 152 r19 ba24899 - H.264/MPEG-4 AVC codec
 - Copyleft 2003-2017 - http://www.videolan.org/x264.html - options:
 cabac=1 ref=16 deblock=1:-1:-1 analyse=0x1:0x131 me=umh subme=9 psy=0
 mixed_ref=1 me_range=24 chroma_me=1 trellis=0 8x8dct=1 cqm=0
 deadzone=21,11 fast_pskip=0 chroma_qp_offset=0 threads=6
 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0
 bluray_compat=0 constrained_intra=0 bframes=0 weightp=2 keyint=230
 keyint_min=23 scenecut=40 intra_refresh=0 rc=cqp mbtree=0 qp=0
 Output #0, matroska, to 'result.mkv':
   Metadata:
 encoder : Lavf57.76.100
 Chapter #0:0: start 0.00, end 179.00
 Chapter #0:1: start 179.00, end 998.00
 Chapter #0:2: start 998.00, end 1598.00
 Chapter #0:3: start 1598.00, end 2043.00
 Chapter #0:4: start 2043.00, end 2614.00
 Chapter #0:5: start 2614.00, end 3387.00
 Chapter #0:6: start 3387.00, end 4007.00
 Chapter #0:7: start 4007.00, end 4729.00
 Chapter #0:8: start 4729.00, end 5163.504000
 Stream #0:0: Video: h264 (libx264) (H264 / 0x34363248), yuv420p,
 768x342 [SAR 171:160 DAR 12:5], q=-1--1, 23.98 fps, 1k tbn, 23.98 tbc
 (default)
 Metadata:
   DURATION: 00:00:14.43100
   encoder : Lavc57.102.100 libx264
 Side data:
   cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
 frame=  343 fps= 30 q=-1.0 Lsize=   27649kB time=00:00:14.39
 bitrate=15740.4kbits/s speed=1.24x
 video:27645kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
 muxing overhead: 0.014695%
 [libx264 @ 0x4817540] frame I:5 Avg QP: 0.00  size:152679
 [libx264 @ 0x4817540] frame P:338   Avg QP: 0.00  size: 81494
 [libx264 @ 0x4817540] mb I  I16..4: 22.0%  0.0% 78.0%
 [libx264 @ 0x4817540] mb P  I16..4:  6.6%  0.0%  3.6%  

Re: [FFmpeg-trac] #6574(swscale:new): ffmpeg butchers video quality when downscaling

2017-08-08 Thread FFmpeg
#6574: ffmpeg butchers video quality when downscaling
--+---
 Reporter:  birdie|Owner:
 Type:  defect|   Status:  new
 Priority:  critical  |Component:  swscale
  Version:  3.2.4 |   Resolution:
 Keywords:|   Blocked By:
 Blocking:|  Reproduced by developer:  0
Analyzed by developer:  0 |
--+---

Comment (by birdie):

 Oops, I've forgotten to add the encoding string:

 ffmpeg -i source.mkv -vf scale=768x342 -c:v libx264 -preset veryslow
 -x264opts keyint=230:min-keyint=23:bframes=16 -crf 0 -tune film result.mkv

--
Ticket URL: 
FFmpeg 
FFmpeg issue tracker
___
FFmpeg-trac mailing list
FFmpeg-trac@avcodec.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-trac


[FFmpeg-trac] #6574(swscale:new): ffmpeg butchers video quality when downscaling

2017-08-08 Thread FFmpeg
#6574: ffmpeg butchers video quality when downscaling
-+
 Reporter:  birdie   | Type:  defect
   Status:  new  | Priority:  critical
Component:  swscale  |  Version:  3.2.4
 Keywords:   |   Blocked By:
 Blocking:   |  Reproduced by developer:  0
Analyzed by developer:  0|
-+
 Summary of the bug: even if I choose crf 0 (!) the resulting video is
 extremely blurry and there's a huge loss of details.

 How to reproduce:
 {{{

 ffmpeg version 3.2.2 Copyright (c) 2000-2016 the FFmpeg developers
   built with gcc 4.5.4 (GCC)
   configuration: --disable-static --enable-nonfree --enable-avfilter
 --enable-shared --enable-gpl --enable-postproc --enable-pthreads --enable-
 libspeex --enable-libmp3lame --enable-libx264 --enable-libxvid --enable-
 libopus --enable-libopenjpeg --disable-debug --disable-doc --enable-
 libpulse --extra-cflags='-march=native' --extra-ldflags='-Wl,-O1 -Wl
 ,--hash-style=gnu -Wl,--enable-new-dtags' --enable-version3 --enable-
 libvorbis --enable-libfdk-aac --enable-x11grab --enable-gnutls --enable-
 libfreetype --enable-libx265
   libavutil  55. 34.100 / 55. 34.100
   libavcodec 57. 64.101 / 57. 64.101
   libavformat57. 56.100 / 57. 56.100
   libavdevice57.  1.100 / 57.  1.100
   libavfilter 6. 65.100 /  6. 65.100
   libswscale  4.  2.100 /  4.  2.100
   libswresample   2.  3.100 /  2.  3.100
   libpostproc54.  1.100 / 54.  1.100
 Input #0, matroska,webm, from 'source.mkv':
   Metadata:
 ENCODER : Lavf57.56.100
   Duration: 00:00:14.43, start: 0.00, bitrate: 5636 kb/s
 Chapter #0:0: start 0.00, end 179.00
 Chapter #0:1: start 179.00, end 998.00
 Chapter #0:2: start 998.00, end 1598.00
 Chapter #0:3: start 1598.00, end 2043.00
 Chapter #0:4: start 2043.00, end 2614.00
 Chapter #0:5: start 2614.00, end 3387.00
 Chapter #0:6: start 3387.00, end 4007.00
 Chapter #0:7: start 4007.00, end 4729.00
 Chapter #0:8: start 4729.00, end 5163.504000
 Stream #0:0: Video: h264 (High), yuv420p(progressive), 1920x800 [SAR
 1:1 DAR 12:5], 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)
 Metadata:
   DURATION: 00:00:14.43100
 [libx264 @ 0x981b3a0] using SAR=171/160
 [libx264 @ 0x981b3a0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
 AVX
 [libx264 @ 0x981b3a0] profile High 4:4:4 Predictive, level 3.1, 4:2:0
 8-bit
 [libx264 @ 0x981b3a0] 64 - core 148 - H.264/MPEG-4 AVC codec - Copyleft
 2003-2016 - http://www.videolan.org/x264.html - options: cabac=1 ref=16
 deblock=1:-1:-1 analyse=0x1:0x131 me=umh subme=9 psy=0 mixed_ref=1
 me_range=24 chroma_me=1 trellis=0 8x8dct=1 cqm=0 deadzone=21,11
 fast_pskip=0 chroma_qp_offset=0 threads=6 lookahead_threads=1
 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0
 constrained_intra=0 bframes=0 weightp=2 keyint=230 keyint_min=23
 scenecut=40 intra_refresh=0 rc=cqp mbtree=0 qp=0
 Output #0, matroska, to 'result.mkv':
   Metadata:
 encoder : Lavf57.56.100
 Chapter #0:0: start 0.00, end 179.00
 Chapter #0:1: start 179.00, end 998.00
 Chapter #0:2: start 998.00, end 1598.00
 Chapter #0:3: start 1598.00, end 2043.00
 Chapter #0:4: start 2043.00, end 2614.00
 Chapter #0:5: start 2614.00, end 3387.00
 Chapter #0:6: start 3387.00, end 4007.00
 Chapter #0:7: start 4007.00, end 4729.00
 Chapter #0:8: start 4729.00, end 5163.504000
 Stream #0:0: Video: h264 (libx264) (H264 / 0x34363248), yuv420p,
 768x342 [SAR 171:160 DAR 12:5], q=-1--1, 23.98 fps, 1k tbn, 23.98 tbc
 (default)
 Metadata:
   DURATION: 00:00:14.43100
   encoder : Lavc57.64.101 libx264
 Side data:
   cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
 Stream mapping:
   Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
 Press [q] to stop, [?] for help
 frame=  343 fps= 26 q=-1.0 Lsize=   26724kB time=00:00:14.39
 bitrate=15213.7kbits/s speed=1.08x
 video:26720kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
 muxing overhead: 0.015149%
 [libx264 @ 0x981b3a0] frame I:5 Avg QP: 0.00  size:149249
 [libx264 @ 0x981b3a0] frame P:338   Avg QP: 0.00  size: 78742
 [libx264 @ 0x981b3a0] mb I  I16..4: 21.5%  0.0% 78.5%
 [libx264 @ 0x981b3a0] mb P  I16..4:  8.6%  0.0%  3.6%  P16..4: 47.8% 14.8%
 21.6%  1.8%  1.7%skip: 0.0%
 [libx264 @ 0x981b3a0] 8x8 transform intra:0.0% inter:65.1%
 [libx264 @ 0x981b3a0] coded y,uvDC,uvAC intra: 93.7% 99.5% 99.5% inter:
 99.6% 99.4% 99.4%
 [libx264 @ 0x981b3a0] i16 v,h,dc,p: 75% 23%  2%  0%
 [libx264 @ 0x981b3a0] i4