Page MenuHomePhabricator

Wrong video duration in search results
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

What happens?:
The wrong duration is displayed in search results.

What should have happened instead?:
The correct duration should be displayed.

Other information (browser name/version, screenshots, etc.):

image.png (610×302 px, 69 KB)

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Also, not related to search, but to video duration and therefore possibly somehow related, this file is alleged by Commons to last 26 days. This is not, in fact, the case; it is 1h 46m long.

@Ijon that file is captured from a stream right ? The original is probably not well formed. I'll try and fix it.

Screenshot 2023-09-19 at 21.40.41.png (448×1 px, 106 KB)

Yup, claimed to be 643 hours long.. Remuxed with:
ffmpeg -i /Users/hartman/Downloads/WikiForHumanRights_2023_Capacity_Building_on_Building_Article_List_with_Petscan.webm -map 0 -map_metadata 0 -c copy out.webm

to fix the file metadata and uploaded the new version.

OK, this issue is because MediaSearch does not expect media files to be longer than an hour :)

/**
 * @return {string|null}
 */
formattedDuration: function () {
        var minutes,
                seconds;

        if ( this.duration ) {
                minutes = '0' + Math.floor( this.duration / 60 );
                seconds = '0' + this.duration % 60;
                return minutes.slice( -2 ) + ':' + seconds.slice( -2 );
        } else {
                return null;
        }
},

well technically.. longer than 99 minutes i guess.

Change 959052 had a related patch set uploaded (by TheDJ; author: TheDJ):

[mediawiki/extensions/MediaSearch@master] Fix duration indicator for media longer than 99 minutes

https://gerrit.wikimedia.org/r/959052

Change 959052 merged by jenkins-bot:

[mediawiki/extensions/MediaSearch@master] Fix duration indicator for media longer than 99 minutes

https://gerrit.wikimedia.org/r/959052

TheDJ claimed this task.