Skip to content

Video support

Thomas Kuther edited this page Jun 1, 2017 · 12 revisions

The theme supports video content on the picture detail page and inside the PhotoSwipe slideshow For both a standard HTML 5 video player widget is used.

Some notes on this:

  • Currently only mp4/m4v files are handled.

  • There is no fancy metadata syncronization like in piwigo-videojs.

  • The video implementation is totally independent from other plugins. Just upload .mp4/.m4v videos to any virtual or physical gallery using the upload form in the backend.

  • In order to be able to upload videos you need to add following override in local/config/config.inc.php:

    // either allow all file types
    //$conf['upload_form_all_types'] = true;
    
    //or mp4/m4v additionally to the default
    $conf['file_ext'] = array_merge(
      $conf['picture_ext'],
      array('tiff', 'tif', 'mpg','zip','avi','mp3','ogg','pdf','mp4','m4v')
      );
    
  • If you use the piwigo-videojs, the video player on the picture page is the videojs one. The PhotoSwipe player is the standard HTML 5 player. To get the standard HTML 5 player on the picture page, you need to disable videojs.

  • Portrait mode videos (e.g. from mobile phones) need to be recoded in actual portrait orientation, rotation tags won't work. Here is a (very basic) script I use for that:

    #!/bin/bash
    INPUT=$1
    OUTPUT=$2
    
    if [$# -ne 2]; then
          echo "Usage: `basename $0` <input> <output>"
          exit 1
    fi
    
    ffmpeg -i $INPUT -map_metadata 0 -c:v libx264 -c:a aac $OUTPUT
    
Clone this wiki locally