Skip to content

Video preview (transcoded mp4) in the thumbnails folder #24480

Closed

Description

@lenz1111

Steps to reproduce

When you uploaded a video in large resolution (4K for example) - video player will not play it smoothly (especially on slow internet connection) - due to the size of video. Similar problem is when your movie is in the format not supported by browsers.

Expected behaviour

We can transcode uploaded movies to smaller size and the correct format and save it in the thumbnails folder (we have to do it async in the background process) then the video player will be playing transcoded video (if available, else original video).

Proposition for transcoding movie (when: 'enable_movie_transcode' => true is enabled in the config file) that should work with ffmpeg and avconv:

https://github.com/lenz1111/core/compare/master...lenz1111:video_transcode

This is example of using preview video in files_videoplayer:

https://github.com/lenz1111/files_videoplayer/compare/master...lenz1111:video_transcode

All should work on owncloud 9.0.

This is just my proposition...

Activity

  1. lenz1111 commented on May 19, 2016

    @lenz1111
    ContributorAuthor

    @davitol Try again - I fixed my code:

    1. set in config.php:
    'enable_previews' => true,
    'preview_max_x' => 640,
    'preview_max_y' => 640,
    'enabledPreviewProviders' => 
      array (
        0 => 'OC\\Preview\\Movie',
        1 => 'OC\\Preview\\Image',
      ),
      'enable_movie_transcode' => true,
    

    (enable preview and set size of preview video)
    2. Make sure you have working ffmpeg / avconv in your system (recommended ffmpeg)
    3. Upload video - after upload ffmpeg should start in background and then it should create file preview.mp4 in thumbnails/ folder
    4. If file preview.mp4 exists - files_videoplayer should use it for preview

    Patch:
    Tested with current owncloud/master owncloud/files_videoplayer/master
    video_trancode_patch.zip

    Try it

  2. davitol commented on May 20, 2016

    @davitol
    Contributor

    @PVince81 @lenz1111 👍 Following the steps written in your comment #24480 (comment) it WFM 👏

  3. modified the milestone: backlog on Jul 25, 2016
  4. felixboehm commented on Oct 4, 2016

    @felixboehm
    Contributor
  5. butonic commented on Apr 19, 2017

    @butonic
    Contributor

    patch might need some polish otherwise pretty cool. we could move the preview generation to a background job...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions