r96875 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r96874‎ | r96875 | r96876 >
Date:17:55, 12 September 2011
Author:j
Status:ok
Tags:
Comment:
better comment for seek workaround
Modified paths:
  • /trunk/extensions/TimedMediaHandler/TimedMediaThumbnail.php (modified) (history)

Diff [purge]

Index: trunk/extensions/TimedMediaHandler/TimedMediaThumbnail.php
@@ -21,14 +21,19 @@
2222 $cmd = wfEscapeShellArg( $wgFFmpegLocation );
2323
2424 $offset = intval( self::getThumbTime( $options ) );
25 - //seek 2 seconds before offset and seek in decoded stream,
26 - //works around
 25+ /*
 26+ This is a workaround until ffmpegs ogg demuxer properly seeks to keyframes.
 27+ Seek 2 seconds before offset and seek in decoded stream after that.
 28+ -ss before input seeks without decode
 29+ -ss after input seeks in decoded stream
 30+ */
2731 if($offset > 2) {
2832 $cmd .= ' -ss ' . ($offset - 2);
2933 $offset = 2;
3034 }
3135 $cmd .= ' -i ' . wfEscapeShellArg( $options['file']->getPath() );
3236 $cmd .= ' -ss ' . $offset . ' ';
 37+
3338 // Set the output size if set in options:
3439 if( isset( $options['width'] ) && isset( $options['height'] ) ){
3540 $cmd.= ' -s '. intval( $options['width'] ) . 'x' . intval( $options['height'] );

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r96873work around ffmpeg seeking issues in ogg filesj17:50, 12 September 2011

Status & tagging log