Download & Extend

Error extracting thumbnails after 5th second

Project:Video
Version:7.x-2.x-dev
Component:Video Transcoding
Category:bug report
Priority:major
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

There is an error in the code that sets the time for extracting the thumbnails. I think it is a custom modification of the PHPVideoToolkit made for the Drupal version, because it is not present in the original code available in the project repository.

In lines 1855-1856 it reads:

<?php
$this
->addCommand('-ss', $this->formatTimecode($seconds - 5, $timecode_format, '%hh:%mm:%ss:%ms', $frames_per_second), TRUE);
$this->addCommand('-ss', $this->formatTimecode(5, $timecode_format, '%hh:%mm:%ss:%ms', $frames_per_second), FALSE);
?>

The timecode format is wrong. Milliseconds must use a dot "." as separator. The correct code is:

<?php
$this
->addCommand('-ss', $this->formatTimecode($seconds - 5, $timecode_format, '%hh:%mm:%ss.%ms', $frames_per_second), TRUE);
$this->addCommand('-ss', $this->formatTimecode(5, $timecode_format, '%hh:%mm:%ss.%ms', $frames_per_second), FALSE);
?>

You owe me a beer for the time wasted debugging this ;)

Comments

#1

Version:7.x-2.9» 7.x-2.x-dev
Component:Code» Video Transcoding
Status:active» needs review

Nasty bug. Wasted some of my time too.

The ffmpeg error message (for reference): "Invalid duration specification for ss"

AttachmentSizeStatusTest resultOperations
video-invalid_timecode-1907504-1.patch1.09 KBIdlePASSED: [[SimpleTest]]: [MySQL] 224 pass(es).View details

#2

Status:needs review» fixed

Thanks a lot for finding this! Next time you're in The Netherlands, I'll buy you a beer :)

#3

Next time you are in Finland I will buy you two beers.

#4

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

nobody click here