Page MenuHomePhabricator

Wikimedia videoscalers cannot transcode videos with frame rate lower than 1 fps to VP8
Closed, DuplicatePublic

Description

Event Timeline

This comment was removed by Yann.
Paladox triaged this task as High priority.Jan 12 2017, 1:23 PM

Setting high priority as I can see it not transcoding for me on those two videos.

Using https://quarry.wmflabs.org/query/15434 (I ran it on toollabs to get the log without formatting removed):

1'/usr/bin/ffmpeg' -y -i '/tmp/localcopy_553254a6ef0a.webm' -threads 2 -skip_threshold 0 -bufsize 6000k -rc_init_occupancy 4000 -qmin 1 -qmax 51 -vb '4096000' -vcodec libvpx -f webm -s 844x1080 -aq '3' -acodec libvorbis /tmp/transcode_1080p.webmceda1b215db6.webm
2
3Exitcode: 1
4Memory: 4194304
5
6ffmpeg version 2.7.2-1~wmf2 Copyright (c) 2000-2015 the FFmpeg developers
7 built with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1)
8 configuration: --prefix=/usr --extra-version='1~wmf2' --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --enable-shared --disable-stripping --enable-avresample --enable-avisynth --enable-frei0r --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-openal --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libxvid --enable-libzvbi --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-libsoxr --enable-libx264 --enable-libopencv --enable-libx265
9 libavutil 54. 27.100 / 54. 27.100
10 libavcodec 56. 41.100 / 56. 41.100
11 libavformat 56. 36.100 / 56. 36.100
12 libavdevice 56. 4.100 / 56. 4.100
13 libavfilter 5. 16.101 / 5. 16.101
14 libavresample 2. 1. 0 / 2. 1. 0
15 libswscale 3. 1.101 / 3. 1.101
16 libswresample 1. 2.100 / 1. 2.100
17 libpostproc 53. 3.100 / 53. 3.100
18Input #0, matroska,webm, from '/tmp/localcopy_553254a6ef0a.webm':
19 Metadata:
20 encoder : Lavf57.25.100
21 Duration: 00:00:10.00, start: 0.000000, bitrate: 662 kb/s
22 Stream #0:0: Video: vp8, yuv420p, 1761x2254, SAR 1:1 DAR 1761:2254, 0.50 fps, 0.50 tbr, 1k tbn, 1k tbc (default)
23 Metadata:
24 alpha_mode : 1
25[libvpx @ 0x1a1f580] v1.4.0
26[libvpx @ 0x1a1f580] Failed to initialize encoder: Invalid parameter
27[libvpx @ 0x1a1f580] Additional information: g_timebase.num out of range [1..cfg->g_timebase.den]
28Output #0, webm, to '/tmp/transcode_1080p.webmceda1b215db6.webm':
29 Metadata:
30 encoder : Lavf57.25.100
31 Stream #0:0: Video: vp8, none, q=2-31, 128 kb/s, SAR 237735:237797 DAR 0:0, 0.50 fps (default)
32 Metadata:
33 alpha_mode : 1
34 encoder : Lavc56.41.100 libvpx
35Stream mapping:
36 Stream #0:0 -> #0:0 (vp8 (native) -> vp8 (libvpx))
37Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height

Also tried on labs and locally:

1zhuyifei1999@encoding01:~$ '/usr/bin/ffmpeg' -y -i SviluppoUrbanoCasina.webm -threads 2 -skip_threshold 0 -bufsize 6000k -rc_init_occupancy 4000 -qmin 1 -qmax 51 -vb '4096000' -vcodec libvpx -f webm -s 844x1080 -aq '3' -acodec libvorbis /dev/null
2ffmpeg version 3.0.2-2~bpo8+1 Copyright (c) 2000-2016 the FFmpeg developers
3 built with gcc 4.9.2 (Debian 4.9.2-10)
4 configuration: --prefix=/usr --extra-version='2~bpo8+1' --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librubberband --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-chromaprint --enable-libx264
5 libavutil 55. 17.103 / 55. 17.103
6 libavcodec 57. 24.102 / 57. 24.102
7 libavformat 57. 25.100 / 57. 25.100
8 libavdevice 57. 0.101 / 57. 0.101
9 libavfilter 6. 31.100 / 6. 31.100
10 libavresample 3. 0. 0 / 3. 0. 0
11 libswscale 4. 0.100 / 4. 0.100
12 libswresample 2. 0.101 / 2. 0.101
13 libpostproc 54. 0.100 / 54. 0.100
14Input #0, matroska,webm, from 'SviluppoUrbanoCasina.webm':
15 Metadata:
16 encoder : Lavf57.25.100
17 Duration: 00:00:10.00, start: 0.000000, bitrate: 662 kb/s
18 Stream #0:0: Video: vp8, yuv420p, 1761x2254, SAR 1:1 DAR 1761:2254, 0.50 fps, 0.50 tbr, 1k tbn, 1k tbc (default)
19 Metadata:
20 alpha_mode : 1
21[libvpx @ 0xf898c0] v1.3.0
22[libvpx @ 0xf898c0] Failed to initialize encoder: Invalid parameter
23[libvpx @ 0xf898c0] Additional information: g_timebase.num out of range [1..cfg->g_timebase.den]
24Output #0, webm, to '/dev/null':
25 Metadata:
26 encoder : Lavf57.25.100
27 Stream #0:0: Video: vp8, none, q=2-31, 128 kb/s, SAR 237735:237797 DAR 0:0, 0.50 fps (default)
28 Metadata:
29 alpha_mode : 1
30 encoder : Lavc57.24.102 libvpx
31Stream mapping:
32 Stream #0:0 -> #0:0 (vp8 (native) -> vp8 (libvpx))
33Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height

1~$ '/usr/bin/ffmpeg' -y -i SviluppoUrbanoCasina.webm -threads 2 -skip_threshold 0 -bufsize 6000k -rc_init_occupancy 4000 -qmin 1 -qmax 51 -vb '4096000' -vcodec libvpx -f webm -s 844x1080 -aq '3' -acodec libvorbis /dev/null
2ffmpeg version 2.8.10-0ubuntu0.16.04.1 Copyright (c) 2000-2016 the FFmpeg developers
3 built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.4) 20160609
4 configuration: --prefix=/usr --extra-version=0ubuntu0.16.04.1 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv
5 WARNING: library configuration mismatch
6 avcodec configuration: --prefix=/usr --extra-version=0ubuntu0.16.04.1 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv --enable-version3 --disable-doc --disable-programs --disable-avdevice --disable-avfilter --disable-avformat --disable-avresample --disable-postproc --disable-swscale --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libvo_aacenc --enable-libvo_amrwbenc
7 libavutil 54. 31.100 / 54. 31.100
8 libavcodec 56. 60.100 / 56. 60.100
9 libavformat 56. 40.101 / 56. 40.101
10 libavdevice 56. 4.100 / 56. 4.100
11 libavfilter 5. 40.101 / 5. 40.101
12 libavresample 2. 1. 0 / 2. 1. 0
13 libswscale 3. 1.101 / 3. 1.101
14 libswresample 1. 2.101 / 1. 2.101
15 libpostproc 53. 3.100 / 53. 3.100
16Input #0, matroska,webm, from 'SviluppoUrbanoCasina.webm':
17 Metadata:
18 encoder : Lavf57.25.100
19 Duration: 00:00:10.00, start: 0.000000, bitrate: 662 kb/s
20 Stream #0:0: Video: vp8, yuv420p, 1761x2254, SAR 1:1 DAR 1761:2254, 0.50 fps, 0.50 tbr, 1k tbn, 1k tbc (default)
21 Metadata:
22 alpha_mode : 1
23[libvpx @ 0x846540] v1.5.0
24Output #0, webm, to '/dev/null':
25 Metadata:
26 encoder : Lavf56.40.101
27 Stream #0:0: Video: vp8 (libvpx), yuv420p, 844x1080 [SAR 237735:237797 DAR 1761:2254], q=1-51, 4096 kb/s, 0.50 fps, 1k tbn, 0.50 tbc (default)
28 Metadata:
29 alpha_mode : 1
30 encoder : Lavc56.60.100 libvpx
31Stream mapping:
32 Stream #0:0 -> #0:0 (vp8 (native) -> vp8 (libvpx))
33Press [q] to stop, [?] for help
34frame= 5 fps=0.0 q=0.0 Lsize= 623kB time=00:00:10.00 bitrate= 510.5kbits/s
35video:623kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.085628%

Organizing some of the data into a table:

WhereSuccess/FailFFmpeg versionlibvpx version
ProdFail2.7.2-1~wmf2v1.4.0
LabsFail3.0.2-2~bpo8+1v1.3.0
LocalSuccess2.8.10-0ubuntu0.16.04.1v1.5.0

Looks like a bug that got fixed in libvpx v1.5.0?

fails to transcode, but it may be another issue.

Yes, the transcode_error is:

* "mwstore://local-swift-eqiad/local-transcoded/b/b5/Президент_России_—_2016-01-14_—_Заседание_наблюдательного_совета_Агентства_стратегических_инициатив.webm/Президент_России_—_2016-01-14_—_Заседание_наблюдательного_совета_Агентства_стратегических_инициатив.webm.160p.ogv" is not a valid storage path.
* "mwstore://local-swift-codfw/local-transcoded/b/b5/Президент_России_—_2016-01-14_—_Заседание_наблюдательного_совета_Агентства_стратегических_инициатив.webm/Президент_России_—_2016-01-14_—_Заседание_наблюдательного_совета_Агентства_стратегических_инициатив.webm.160p.ogv" is not a valid storage path.

Searching the web I found https://lists.ffmpeg.org/pipermail/ffmpeg-user/2013-November/018607.html ([FFmpeg-user] Unable to encode web with frame rates <1 fps), which hints at the unusual 0.5 fps here. It unfortunately received no replies as far as I can tell.

zhuyifei1999 renamed this task from Failed to initialize encoder to Wikimedia videoscalers cannot transcode videos with frame rate lower than 1 fps to VP8.Jan 12 2017, 2:29 PM
zhuyifei1999 added a project: Video.

Setting high priority as I can see it not transcoding for me on those two videos.

@Paladox: Are there signs that more than these two videos are affected or why is this task rather urgent?

@Aklapper I thought that if it affects two videos, it may affect others. If other videos work properly then the stay could be changed back to before.

This comment was removed by Yann.