Page MenuHomePhabricator

thumbtime parameters are being ignored when using ffmpeg
Closed, InvalidPublic

Description

Setup MediaWiki

  • MediaWiki 1.35.4 (bb75fa9) 22:06, 1 November 2021
  • PHP 7.4.3 (apache2handler)
  • MariaDB 10.3.31-MariaDB-0ubuntu0.20.04.1
  • TimedMediaHandler 0.6.0 (6d92204) 06:48, 14 May 2021

Setup ffmpeg

ffmpeg version 4.2.4-1ubuntu0.1 Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 9 (Ubuntu 9.3.0-10ubuntu2)
  configuration: --prefix=/usr --extra-version=1ubuntu0.1 --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-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --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-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --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-libdc1394 --enable-libdrm --enable-libiec61883 --enable-nvenc --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
  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
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100

Issue
It is not possible to select the video still using the suggested wikitext syntax, e.g. [[File:Sample.mp4|thumbtime=0:01]]. Instead some still from the middle of the video is chosen.

Tested with .mp4 and .webm files which are equally failing.

See here for a live example

Event Timeline

on which page, and please add the exact syntax used.

Kghbln updated the task description. (Show Details)
Kghbln renamed this task from thumbtime parameters ignored to thumbtime parameters are being ignored.Nov 2 2021, 10:39 AM
Kghbln updated the task description. (Show Details)

on which page, and please add the exact syntax used.

Done. Please allow a couple of minutes to sort things out. Sometimes it takes a couple of edits to provide a somewhat sensible report.

Kghbln updated the task description. (Show Details)

It should pass it as an offset to the command line of ffmpeg:

https://github.com/wikimedia/mediawiki-extensions-TimedMediaHandler/blob/90ccec428cf22941cc36760e9f069658468bb73a/includes/TimedMediaThumbnail.php#L100

See if you can find that in the debug log perhaps ?
Alternatively, you can try configuring the oggthumb binary, see if you have better results with that. These paths are probably badly tested atm, because WMF uses thumbor for thumbnails instead of this path of the logic.

Thanks for the info. The use of thumbor probably explains why the WMF wikis are not hit by the issue. ;) I am in the wild so am stuck with ffmpeg in a sense.

Let me investigate a bit.

Aklapper renamed this task from thumbtime parameters are being ignored to thumbtime parameters are being ignored when using ffmpeg.Nov 15 2021, 10:30 PM

@Kghbln did you ever figure this out Karsten ? still an issue, found a cause, gave up, let me know ;)

brion subscribed.

I just did a quick local test on current code, and using ffmpeg as the backing for thumbtime it does appear to work. Please re-open if it's still not working elsewhere and we'll try to diagnose!