Opened 10 years ago

Closed 10 years ago

#3314 closed defect (invalid)

ffmpeg -b:v 1M -c:v libvpx-vp9 produces large blocks of color corruption

Reported by: Hello71 Owned by:
Priority: normal Component: undetermined
Version: unspecified Keywords: libvpx
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:
How to reproduce:

% ffmpeg -i 4ls.mkv -strict -2 -c:v libvpx-vp9 -b:v 1M -c:a copy 4ls_ff.webm
ffmpeg version 2.1.2 Copyright (c) 2000-2013 the FFmpeg developers
  built on Jan 16 2014 16:49:36 with gcc 4.8.2 (Gentoo 4.8.2 p1.3, pie-0.5.8)
  configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --enable-shared --cc=x86_64-pc-linux-gnu-gcc --cxx=x86_64-pc-linux-gnu-g++ --ar=x86_64-pc-linux-gnu-ar --optflags='-O2 -pipe -march=corei7 -mcx16 -msahf -mno-movbe -mno-aes -mpopcnt -mno-abm -mno-lwp -mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-tbm --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=3072' --extra-cflags='-O2 -pipe -march=corei7 -mcx16 -msahf -mno-movbe -mno-aes -mpopcnt -mno-abm -mno-lwp -mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-tbm --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=3072' --extra-cxxflags='-O2 -pipe -march=corei7 -mcx16 -msahf -mno-movbe -mno-aes -mpopcnt -mno-abm -mno-lwp -mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-tbm --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=3072' --disable-static --enable-gpl --enable-postproc --enable-avfilter --enable-avresample --disable-stripping --enable-version3 --disable-indev=v4l2 --disable-outdev=v4l2 --disable-indev=oss --disable-indev=jack --disable-outdev=oss --enable-nonfree --enable-bzlib --disable-runtime-cpudetect --disable-debug --disable-doc --disable-gnutls --enable-hardcoded-tables --enable-iconv --disable-network --disable-openssl --enable-ffplay --disable-vaapi --disable-vdpau --enable-zlib --enable-libvo-aacenc --disable-libvo-amrwbenc --enable-libmp3lame --disable-libaacplus --disable-libfaac --enable-libtheora --disable-libtwolame --disable-libwavpack --enable-libx264 --enable-libxvid --disable-libcdio --disable-libiec61883 --disable-libdc1394 --disable-libcaca --disable-openal --disable-libv4l2 --disable-libpulse --enable-x11grab --disable-libflite --disable-frei0r --disable-fontconfig --disable-ladspa --disable-libass --enable-libfreetype --disable-libsoxr --enable-pthreads --disable-libopencore-amrwb --disable-libopencore-amrnb --enable-libfdk-aac --disable-libopenjpeg --disable-libbluray --disable-libcelt --disable-libgme --disable-libgsm --disable-libmodplug --enable-libopus --disable-libquvi --disable-librtmp --disable-libssh --disable-libschroedinger --disable-libspeex --enable-libvorbis --enable-libvpx --disable-libzvbi --disable-armv5te --disable-armv6 --disable-armv6t2 --disable-neon --disable-vfp --disable-mips32r2 --disable-mipsdspr1 --disable-mipsdspr2 --disable-mipsfpu --disable-altivec --disable-vis --disable-amd3dnow --disable-amd3dnowext --disable-avx2 --disable-fma4 --disable-mmxext --disable-sse4 --cpu=corei7
  libavutil      52. 48.101 / 52. 48.101
  libavcodec     55. 39.101 / 55. 39.101
  libavformat    55. 19.104 / 55. 19.104
  libavdevice    55.  5.100 / 55.  5.100
  libavfilter     3. 90.100 /  3. 90.100
  libavresample   1.  1.  0 /  1.  1.  0
  libswscale      2.  5.101 /  2.  5.101
  libswresample   0. 17.104 /  0. 17.104
  libpostproc    52.  3.100 / 52.  3.100
[matroska,webm @ 0x240f7e0] Unknown entry 0x80
Input #0, matroska,webm, from '4ls.mkv':
  Metadata:
    TITLE           : 
    ARTIST          : 
    COMPOSER        : 
    SYNOPSIS        : 
    DATE_RELEASED   : 
    GENRE           : 
  Duration: 00:00:08.97, start: 0.000000, bitrate: 2376 kb/s
    Stream #0:0(eng): Video: mpeg4 (Simple Profile), yuv420p, 800x600 [SAR 1:1 DAR 4:3], 30 fps, 30 tbr, 1k tbn, 30 tbc (default)
    Stream #0:1(eng): Audio: vorbis, 44100 Hz, stereo, fltp (default)
File '4ls_ff.webm' already exists. Overwrite ? [y/N] y
[libvpx-vp9 @ 0x2451380] v1.3.0
[libvpx-vp9 @ 0x2451380] Failed to set VP8E_SET_TOKEN_PARTITIONS codec control: Unspecified internal error
Output #0, webm, to '4ls_ff.webm':
  Metadata:
    TITLE           : 
    ARTIST          : 
    COMPOSER        : 
    SYNOPSIS        : 
    DATE_RELEASED   : 
    GENRE           : 
    encoder         : Lavf55.19.104
    Stream #0:0(eng): Video: vp9 (libvpx-vp9), yuv420p, 800x600 [SAR 1:1 DAR 4:3], q=-1--1, 1000 kb/s, 1k tbn, 30 tbc (default)
    Stream #0:1(eng): Audio: vorbis, 44100 Hz, stereo (default)
Stream mapping:
  Stream #0:0 -> #0:0 (mpeg4 -> libvpx-vp9)
  Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
frame=  269 fps=5.1 q=0.0 Lsize=     824kB time=00:00:08.96 bitrate= 753.2kbits/s    
video:672kB audio:140kB subtitle:0 global headers:0kB muxing overhead 1.583648%

Omitting the bitrate, using CRF only (without -b), using VP8, or invoking vpxenc manually all work.

Attachments (2)

corrupt.png (136.9 KB ) - added by Hello71 10 years ago.
Screenshot of example video corruption; top right is part of animation, but the bar should be almost solid white
corrupt2.png (21.0 KB ) - added by Hello71 10 years ago.
Too-high brightness during fade-out

Download all attachments as: .zip

Change History (9)

by Hello71, 10 years ago

Attachment: corrupt.png added

Screenshot of example video corruption; top right is part of animation, but the bar should be almost solid white

comment:1 by Carl Eugen Hoyos, 10 years ago

Keywords: libvpx added

Is the problem reproducible with -an?
Does -f lavfi -i testsrc allow to reproduce?

Please test current git head.

in reply to:  1 ; comment:2 by Hello71, 10 years ago

Replying to cehoyos:

Is the problem reproducible with -an?

Yes.

Does -f lavfi -i testsrc allow to reproduce?

[lavfi @ 0xd1b820] No such filter: '4ls.mkv'
4ls.mkv: Invalid argument

Please test current git head.

Compiling.

Of note, the issue may not be -b:v itself, but passing a sufficiently high -b:v. -b:v 200k does not appear to exhibit the problem, but -b:v 1M does. Is there any way to extract a vpxenc command that I could run manually to test this?

When I ran vpxenc, I passed --target-bitrate=1000, but I have no idea what any of the more internal options do, so I omitted them.

in reply to:  2 comment:3 by Hello71, 10 years ago

Replying to Hello71:

Replying to cehoyos:

Please test current git head.

Compiling.

Appears to work. Also fixes the VP8E_SET_TOKEN_PARTITIONS error.

comment:4 by Hello71, 10 years ago

Wait, no, there's still some improper encoding. In the last few seconds, the fadeout has chunks lingering at too-high brightness.

by Hello71, 10 years ago

Attachment: corrupt2.png added

Too-high brightness during fade-out

comment:5 by Hello71, 10 years ago

All the text should be the same color, that is to say, gray.

comment:6 by Hello71, 10 years ago

Status: newopen

Actually, that may have been due to my video setup. I can't reproduce it anymore.

How do I close this?

comment:7 by Carl Eugen Hoyos, 10 years ago

Resolution: invalid
Status: openclosed
Note: See TracTickets for help on using tickets.