Topic on Extension talk:TimedMediaHandler

Thumbnail creation error

3
Asterton (talkcontribs)

Hi, i have some problem with an thumbnail creation.

I have two wikis - prod and test.

OS - Debian 11 bullseye

Wiki - 1.35

On the test, the extension works without problems, on prod, when loading some videos, an error thubnail creation. The problem is not observed with all video files. However, problematic videos load fine on the test wiki.

I can't figure out where to look for the problem.

Reinstalled the extension. LocalSettings compared. ffmpeg reinstalled. ImageMagick installed

Error creating thumbnail: '/usr/bin/ffmpeg' -nostdin -threads 1 -ss 102 -y -i '/usr/share/mediawiki/images/8/81/Vіdeo_іnstruction_configurator_of_gearboxes15.mp4' -ss 1 -s 1280x720 -f mjpeg -an -vframes 1 '/tmp/transform_75cc2215ccd5.jpg' 2>&1 wgMaxShellMemory: 307200 ffmpeg version 4.3.4-0+deb11u1 Copyright (c) 2000-2021 the FFmpeg developers built with gcc 10 (Debian 10.2.1-6) configuration: --prefix=/usr --extra-version=0+deb11u1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-pocketsphinx --enable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared libavutil 56. 51.100 / 56. 51.100 libavcodec 58. 91.100 / 58. 91.100 libavformat 58. 45.100 / 58. 45.100 libavdevice 58. 10.100 / 58. 10.100 libavfilter 7. 85.100 / 7. 85.100 libavresample 4. 0. 0 / 4. 0. 0 libswscale 5. 7.100 / 5. 7.100 libswresample 3. 7.100 / 3. 7.100 libpostproc 55. 7.100 / 55. 7.100 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/usr/share/mediawiki/images/8/81/Vіdeo_іnstruction_configurator_of_gearboxes15.mp4': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2avc1mp41 encoder : Lavf58.12.100 Duration: 00:03:27.01, start: 0.000000, bitrate: 1367 kb/s Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 1169 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default) Metadata: handler_name : VideoHandler Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 193 kb/s (default) Metadata: handler_name : SoundHandler Stream mapping: Stream #0:0 -> #0:0 (h264 (native) -> mjpeg (native)) [swscaler @ 0x5643c4470f40] deprecated pixel format used, make sure you did set range correctly Output #0, mjpeg, to '/tmp/transform_75cc2215ccd5.jpg': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2avc1mp41 encoder : Lavf58.45.100 Stream #0:0(und): Video: mjpeg, yuvj420p(pc), 1280x720 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 25 fps, 25 tbn, 25 tbc (default) Metadata: handler_name : VideoHandler encoder : Lavc58.91.100 mjpeg Side data: cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: N/A [h264 @ 0x5643c4115ec0] get_buffer() failed [h264 @ 0x5643c4115ec0] thread_get_buffer() failed [h264 @ 0x5643c4115ec0] decode_slice_header error [h264 @ 0x5643c4115ec0] no frame!

And this message repeating many times:

Error while decoding stream #0:0: Invalid data found when processing input [h264 @ 0x5643c4115ec0] get_buffer() failed [h264 @ 0x5643c4115ec0] thread_get_buffer() failed [h264 @ 0x5643c4115ec0] decode_slice_header error [h264 @ 0x5643c4115ec0] no frame!

And then

Cannot allocate memory frame= 0 fps=0.0 q=0.0 Lsize= 0kB time=00:00:00.00 bitrate=N/A speed= 0x video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown Output file is empty, nothing was encoded (check -ss / -t / -frames parameters if used) Conversion failed!


If i run in console:

'/usr/bin/ffmpeg' -nostdin -threads 1 -ss 102 -y -i '/usr/share/mediawiki/images/8/81/Vіdeo_іnstruction_configurator_of_gearboxes15.mp4' -ss 1 -s 1280x720 -f mjpeg -an -vframes 1 '/tmp/transform_75cc2215ccd5.jpg' 2>&1

jpeg alrady created.


What else needs to be checked? I have no idea...

Tacsipacsi (talkcontribs)

The error message states that it exceeded the $wgMaxShellMemory limit—this is a MediaWiki configuration, so it of course doesn’t apply if you run ffmpeg directly from the command line, and it may be configured differently for the two wikis (although it’d be weird to do so). In any case, you’ll need to increase the limit.

Asterton (talkcontribs)

Thanks a lot!

I tried to set this parameter, but left the value 307200 and, of course, did not get a result.

Reply to "Thumbnail creation error"