Member banner gif to mp4 conversion

Discussion in 'General Help' started by Basti, Feb 12, 2019.

  1. Basti
    • Staff

    Basti Administrator Staff Member

    Starting with VisioList 1.6, we offer gif to mp4 conversion for reduced file size if your system supports it. This is used for the member banners

    ffmpeg Requirements
    If you already have Visiolist 1.6+ installed, you can quickly check admin -> tools -> convert member banners to see if your system supports it.

    1) A Virtual or Dedicate server with root access. Very unlikely all stuff is supported on shared hosting.
    2) It requires a library called ffmpeg -> https://ffmpeg.org

    2.1) Type the following in your terminal to validate if ffmpeg is installed or not. It has to return a path to the ffmpeg binary. If nothing is returned or if its not within the shared binary path, you need to fix / install it.

    Code:
    type -P ffmpeg
    2.2) ffmpeg installation

    • Manual compile if its not installed
      • Binary files need to be accessible system wide, there are several methods described in the wiki. Just make sure its accessible by every user, usually within within /usr/local/bin
      • given the CentOS documentation: https://trac.ffmpeg.org/wiki/CompilationGuide/Centos
      • You will notice everything is done in /root
      • Now how to make it system wide instead so its accessible by other users? We need to adjust where the binary files are stored
      • Most commands have something like this: --bindir="$HOME/bin" and the last step has in addition: PATH="$HOME/bin:$PATH"
      • Now we would simply replace $HOME with /usr/local wherever you see a reference like that
      • On the last step ( actual ffmpeg install ) if you get an error similar to

        Run the following code and repeat the failed step afterwards
        Code:
        export TMPDIR=~/tmp-ffmpeg
        mkdir $TMPDIR
        
        Once install finished, run the following
        Code:
        rm -rf $TMPDIR
        unset TMPDIR
        
    • Installation via package manager
      • There are also packages available for various systems. While they work, they are often really outdated and miss many improvements ( due missing codec updates, bug fixes )
      • If your package manager has an up to date version, go for it, its a lot easier.
    2.3) Type the following in your terminal to revalidate if ffmpeg is installed correctly. It has to return a path to the ffmpeg binary. If nothing is returned or if its not within the shared binary path, something went wrong
    Code:
    type -P ffmpeg
    3) To run the ffmpeg commands from within your toplist, you also need to have the php function shell_exec enabled
    3.1) shell_exec is usually defined in php.ini in the disable_functions section, remove it from there and restart apache
    3.2) Servers running php-fpm might also need to modify the fpm configuration yaml file. Either global configuration or for a single domain only. We suggest domain only

    Support for ffmpeg
    • If you have trouble to install / modify your server for this, we offer support at $35 / hour. Requires root login
    • If you have everything installed and notice some odd behavour and want to get normal banner display back, add the following to settings_sql.php
    • Code:
      $CONF['disable_mp4'] = 1;
    • To enable it again, set it to 0 or remove the line completely. For now, we keep this as an manual setting instead of admin setting
    Last edited: May 20, 2019
    leonor and Mark like this.
  2. Mark
    • Staff

    Mark Administrator Staff Member

    This is awesome, really great job on this!
  3. cajkan

    cajkan Active Member

    Maybe we can use your screenshot server so we can generate MP4s ?
  4. Basti
    • Staff

    Basti Administrator Staff Member

    Hmm interesting idea, theoretical that should be possible, but that mass convert will put heavy burden on the server. Since I don't know the specs of that server ill have a discuss with Mark
  5. Mark
    • Staff

    Mark Administrator Staff Member

    its possible, and a good idea :) Will consider how we might implement this in the future, since its taxing on hardware it may need to be a "premium" service option.
  6. ozguru
    • Licensed

    ozguru New Member

    Hey Guys,

    I just install ffmpeg on the Server and the transcoding from gif the mp4 work fine.

    The problem is that on Mobile devices like iPhone the mp4 banner doesn’t play the animation.

    Is there any way to fix this issue, maybe with implementing a HTML5 player that automatically play the mp4 (I don’t know whether it does technical possible, it is just a idea from my side).

    But basically I think the best option would be if the visiolist could be compatible with HTML5 Banners.
    So it would Compatible with all devices.
    Also creating Banner with Google Webdesigner Studio is very easy and free.
  7. Basti
    • Staff

    Basti Administrator Staff Member

    It does autoplay in my test and is html5
    Those the tags like autoplay="autoplay" loop="loop" muted="true" are the html4 way of writing, cause its default for parabola skin which isn't html5.

    You could edit that to just the following, but it not makes a difference really
    Code:
    autoplay loop muted

    Could you try adding to banner_mp4.html to the video tag the attribute
    Code:
    playsinline
    Have just read it up and could be iPhone requires this so autoplay works
    ozguru and cajkan like this.
  8. ozguru
    • Licensed

    ozguru New Member

    Thanks a lot Basti, with this attribute it does alo start on iOS.
    Basti likes this.
  9. Basti
    • Staff

    Basti Administrator Staff Member

    Cool thanks for confirming, will push this into the next release and upgrade docs
    ozguru likes this.
  10. ozguru
    • Licensed

    ozguru New Member

    Cool, maybe you can also add also HTML5 Banner Support for the next update.
  11. Basti
    • Staff

    Basti Administrator Staff Member

    What exactly shall a html5 banner be?
  12. Mark
    • Staff

    Mark Administrator Staff Member

    It’s basically a mini web page, a group of files with an index that is responsive, they can include dynamic content, have multiple links etc. Fairly common on google ads, not so common anywhere else.
  13. Basti
    • Staff

    Basti Administrator Staff Member

    Oh I see, never actually heard of that. Seems a pain to validate. Since they can enter anything into it. Nope we won't add this
    Last edited: Feb 27, 2019
  14. Basti
    • Staff

    Basti Administrator Staff Member

    Just for information: Manual compile instructions have been updated with instructions due an error which can happen quite regulary regarding tmp directory

Share This Page