Video file .mp4 preview Is it possible?

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 12.0.2): 13.0.4
Operating system and version (eg, Ubuntu 17.04): CentOS 7
Apache or nginx version (eg, Apache 2.4.25): Nginx 1.15.0
PHP version (eg, 7.1): 7.2.6

The issue you are facing:
I can’t have previews (thumbnails) from video .mp4 files.
I think I had a preview at the beginning from Nextcloud.mp4 sample video few months ago… Or did I…? Anyway I would like to have previews from videos taken with phone.

I have set preview generator to pre-generate previews, but no help.

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

'enable_previews' => true,                                                 
  'enabledPreviewProviders' =>                                               
  array (                                                                    
    0 => 'OC\\Preview\\Image',                                               
    1 => 'OC\\Preview\\Movie',                                               
    2 => 'OC\\Preview\\TXT',                                                 
  ),

Here’s a line from access log:
[04/Jul/2018:15:43:54 +0000] “GET /index.php/apps/files/api/v1/thumbnail/512/512/Nextcloud.mp4 HTTP/1.1” 404 29 “-” “Mozilla/5.0 (Android) ownCloud-android/3.2.1
RC1”
At the Play Store there are video previews on the example pics. Where are my thumbnails…?
Can someone help me?

Hi,

Sorry, I can’t help. I don’t have previews either. Maybe it is a limitation with or of MP4.

Throw an eye on this installation guide:
https://www.allerstorfer.at/nextcloud-install-preview-generator/

@Sanook Thanks a lot for that link! That helped indeed with the preview images.
Do you have an idea as well for, how to be able to play all mp4 files in the NC video player? It is strange, that some mp4 files can be played, but others can’t. I know that the browser needs to support specific file types, but that in mind, it confuses me, that some mp4 will play and some won’t.

3GP files can’t be played at all, but they show a preview as well.

Maybe you have an idea or even another solution for that :slight_smile:

Probably the codec is not supported by the player.

h264 is working well.

what is the output of

ffmpeg -i video.3gp -hide_banner

or what does Mediainfo say?

You need to install ffmpeg and add the path to ffmpeg to the environment so that Nextcloud can find it.

Nice command, I learn a lot today :slight_smile:

So it prints the following for the 3GP and one of the not-working MP4:

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'MOV00522.3GP':
  Metadata:
    major_brand     : 3gp5
    minor_version   : 512
    compatible_brands: vfj13gp43gp5mp42
    creation_time   : 2007-09-27T08:12:01.000000Z
    copyright       :
    copyright-eng   :
  Duration: 00:02:48.85, start: 0.000000, bitrate: 83 kb/s
    Stream #0:0(jpn): Video: h263 (s263 / 0x33363273), yuv420p, 176x144 [SAR 12:11 DAR 4:3], 70 kb/s, 10.01 fps, 250 tbr, 1k tbn, 29.97 tbc (default)
    Metadata:
      creation_time   : 2007-09-27T08:12:01.000000Z
      handler_name    : VideoHandler
    Stream #0:1(jpn): Audio: amr_nb (samr / 0x726D6173), 8000 Hz, mono, flt, 12 kb/s (default)
    Metadata:
      creation_time   : 2007-09-27T08:12:01.000000Z
      handler_name    : SoundHandler
	  
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'MOV00583.MP4':
  Metadata:
    major_brand     : 3gp5
    minor_version   : 512
    compatible_brands: vfj13gp43gp5mp42emp
    creation_time   : 2009-11-20T21:47:21.000000Z
    copyright       :
    copyright-eng   :
  Duration: 00:00:38.02, start: 0.000000, bitrate: 461 kb/s
    Stream #0:0(jpn): Video: mpeg4 (Simple Profile) (mp4v / 0x7634706D), yuv420p, 320x240 [SAR 1:1 DAR 4:3], 363 kb/s, 28.96 fps, 30 tbr, 1k tbn, 30 tbc (default)
    Metadata:
      creation_time   : 2009-11-20T21:47:21.000000Z
      handler_name    : VideoHandler
    Stream #0:1(jpn): Audio: aac (LC) (mp4a / 0x6134706D), 32000 Hz, stereo, fltp, 94 kb/s (default)
    Metadata:
      creation_time   : 2009-11-20T21:47:21.000000Z
      handler_name    : SoundHandler

Does that tell you something?

Yes, seems that those codecs are not supported by the Nextcloud player.

The clips need to be transcoded to h264 with AAC sound.

1 Like

Thank you again!
If someone is interested more deeply, here is other thread where Sanook helped me with this problem.
https://help.nextcloud.com/t/thumbnail-preview-generation/34123/7