Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
lenz1111 opened this issue May 7, 2016 · 4 comments
Closed

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

lenz1111 opened this issue May 7, 2016 · 4 comments

Comments

@lenz1111
Copy link
Contributor

lenz1111 commented May 7, 2016

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:

lenz1111/core@master...lenz1111:video_transcode

This is example of using preview video in files_videoplayer:

lenz1111/files_videoplayer@master...lenz1111:video_transcode

All should work on owncloud 9.0.

This is just my proposition...

@lenz1111
Copy link
Contributor Author

lenz1111 commented May 19, 2016

@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

@davitol
Copy link
Contributor

davitol commented May 20, 2016

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

@felixboehm
Copy link
Contributor

owncloud/ios-legacy#787

@butonic
Copy link
Member

butonic commented Apr 19, 2017

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
Projects
None yet
Development

No branches or pull requests

8 participants