Skip to content

Preview of MP4 Videos failing to generate with ffmpeg/avconf if larger than 5MB #1475

@sascha-schieferdecker

Description

@sascha-schieferdecker

Steps to reproduce

  1. Upload MP4 video larger than 5MB, with the moov atom at the end of the file, e.g. from an older android phone. About the moov atom: https://www.adobe.com/devnet/video/articles/mp4_movie_atom.html

Expected behaviour

Video Thumbnail should be generated, works with MPG files.

Actual behaviour

avconf/ffmpeg fail because only the forst 5MB of the video are taken into account, see https://github.com/nextcloud/server/blob/master/lib/private/Preview/Movie.php#L57

If the moov atom is at the beginning of a video, the preview generation works. If the the moov atom is at end of the video, the generation fails. If it is a local file would it be possible to load it completely? Removing the limit in the stream_get_contents call generates the preview just fine. Or maybe would it be possible to streamline the video using something like qt-faststart first?

Server configuration

Operating system: Debian 8

Web server: Apache 2.4

Database: MySQL

PHP version: PHP 7.0.11

Nextcloud version: Nextcloud 10.0 (stable)

Updated from an older Nextcloud/ownCloud or fresh install: No

Where did you install Nextcloud from: Homepage

Please forgive me if I don't post any other configuration details, IMHO they are not relevant to described behaviour.
``

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions