[FFmpeg-trac] #7759(avcodec:open): Wrong length/frames with VP9 when using yuva420p and lossless
FFmpeg
trac at avcodec.org
Sat May 2 12:31:10 EEST 2020
#7759: Wrong length/frames with VP9 when using yuva420p and lossless
--------------------------------------+-----------------------------------
Reporter: ChristianW | Owner:
Type: defect | Status: open
Priority: normal | Component: avcodec
Version: git-master | Resolution:
Keywords: libvpx alpha | Blocked By:
Blocking: | Reproduced by developer: 1
Analyzed by developer: 0 |
--------------------------------------+-----------------------------------
Comment (by bertieb):
Using info from my post to ffmpeg-user: http://ffmpeg.org/pipermail
/ffmpeg-user/2020-April/048530.html
This also occurs for PNG-to-yuva420p encodes using libvpx-VP9 '''which are
not lossless''' or crf 0.
Lossless versus crf 30 seem to drop differing numbers of frames. For my
input 300 frames produced an output with 294 frames using `-lossless 1`
and 297 frames using `-crf 30 -b:v 0`. I have not yet tested the input
with additional crf values.
Using `-lag-in-frames 0` per previous comment produces the correct number
of frames.
Additionally, I cannot reproduce Carl's testsrc2 example. On my machine it
produces the correct number of frames in output for duration up to at
least 200 (5000 frames). I am however using the Arch package as opposed to
compiling from git.
----
Lossless:
{{{
$ ffmpeg -framerate 60 -f image2 -i 4frame%04d.png -c:v libvpx-vp9
-lossless 1 -pix_fmt yuva420p -an spacestinger5b.webm
ffmpeg version n4.2.2 Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 9.3.0 (Arch Linux 9.3.0-1)
configuration: --prefix=/usr --disable-debug --disable-static --disable-
stripping --enable-fontconfig --enable-gmp --enable-gnutls --enable-gpl
--enable-ladspa --enable-libaom --enable-libass --enable-libbluray
--enable-libdav1d --enable-libdrm --enable-libfreetype --enable-libfribidi
--enable-libgsm --enable-libiec61883 --enable-libjack --enable-libmfx
--enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb
--enable-libopencore_amrwb --enable-libopenjpeg --enable-libopus --enable-
libpulse --enable-libsoxr --enable-libspeex --enable-libsrt --enable-
libssh --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-
libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-
libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-nvdec
--enable-nvenc --enable-omx --enable-shared --enable-version3
libavutil 56. 31.100 / 56. 31.100
libavcodec 58. 54.100 / 58. 54.100
libavformat 58. 29.100 / 58. 29.100
libavdevice 58. 8.100 / 58. 8.100
libavfilter 7. 57.100 / 7. 57.100
libswscale 5. 5.100 / 5. 5.100
libswresample 3. 5.100 / 3. 5.100
libpostproc 55. 5.100 / 55. 5.100
Input #0, image2, from '4frame%04d.png':
Duration: 00:00:05.00, start: 0.000000, bitrate: N/A
Stream #0:0: Video: png, rgba(pc), 1920x1080 [SAR 2835:2835 DAR 16:9],
60 fps, 60 tbr, 60 tbn, 60 tbc
Stream mapping:
Stream #0:0 -> #0:0 (png (native) -> vp9 (libvpx-vp9))
Press [q] to stop, [?] for help
[libvpx-vp9 @ 0x555782769d00] v1.8.2
Output #0, webm, to 'spacestinger5b.webm':
Metadata:
encoder : Lavf58.29.100
Stream #0:0: Video: vp9 (libvpx-vp9), yuva420p, 1920x1080 [SAR 1:1 DAR
16:9], q=-1--1, 200 kb/s, 60 fps, 1k tbn, 60 tbc
Metadata:
encoder : Lavc58.54.100 libvpx-vp9
Side data:
cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
frame= 300 fps=1.9 q=0.0 Lsize= 151542kB time=00:00:04.91
bitrate=252426.0kbits/s speed=0.0308x
video:45087kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: 236.109558%
}}}
Frames: 294; ffprobe DURATION: 00:00:04.934000000
CRF 30:
{{{
$ ffmpeg -framerate 60 -f image2 -i 4frame%04d.png -c:v libvpx-vp9 -pi
x_fmt yuva420p -an -crf 30 -b:v 0 spacestinger8.webm
ffmpeg version n4.2.2 Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 9.3.0 (Arch Linux 9.3.0-1)
configuration: --prefix=/usr --disable-debug --disable-static --disable-
stripping --enable-fontconfig --enable-gmp
--enable-gnutls --enable-gpl --enable-ladspa --enable-libaom --enable-
libass --enable-libbluray --enable-libdav1d -
-enable-libdrm --enable-libfreetype --enable-libfribidi --enable-libgsm
--enable-libiec61883 --enable-libjack --enab
le-libmfx --enable-libmodplug --enable-libmp3lame --enable-
libopencore_amrnb --enable-libopencore_amrwb --enable-lib
openjpeg --enable-libopus --enable-libpulse --enable-libsoxr --enable-
libspeex --enable-libsrt --enable-libssh --ena
ble-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvorbis
--enable-libvpx --enable-libwebp --enable-libx
264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid
--enable-nvdec --enable-nvenc --enable-omx --
enable-shared --enable-version3
libavutil 56. 31.100 / 56. 31.100
libavcodec 58. 54.100 / 58. 54.100
libavformat 58. 29.100 / 58. 29.100
libavdevice 58. 8.100 / 58. 8.100
libavfilter 7. 57.100 / 7. 57.100
libswscale 5. 5.100 / 5. 5.100
libswresample 3. 5.100 / 3. 5.100
libpostproc 55. 5.100 / 55. 5.100
Input #0, image2, from '4frame%04d.png':
Duration: 00:00:05.00, start: 0.000000, bitrate: N/A
Stream #0:0: Video: png, rgba(pc), 1920x1080 [SAR 2835:2835 DAR 16:9],
60 fps, 60 tbr, 60 tbn, 60 tbc
Stream mapping:
Stream #0:0 -> #0:0 (png (native) -> vp9 (libvpx-vp9))
Press [q] to stop, [?] for help
[libvpx-vp9 @ 0x56298095a7c0] v1.8.2
Output #0, webm, to 'spacestinger8.webm':
Metadata:
encoder : Lavf58.29.100
Stream #0:0: Video: vp9 (libvpx-vp9), yuva420p, 1920x1080 [SAR 1:1 DAR
16:9], q=-1--1, 60 fps, 1k tbn, 60 tbc
Metadata:
encoder : Lavc58.54.100 libvpx-vp9
Side data:
cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
frame= 300 fps=0.8 q=0.0 Lsize= 36659kB time=00:00:04.93
bitrate=60864.8kbits/s speed=0.0132x
video:1012kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: 3521.110596%
}}}
Frames: 297; ffprobe DURATION: 00:00:04.950000000
--
Ticket URL: <https://trac.ffmpeg.org/ticket/7759#comment:5>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list