Member banner gif to mp4 conversion

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
      Unable to create and execute files in /tmp.
      Set the TMPDIR environment variable to another directory and make sure that it is not mounted noexec.
      Sanity test failed.

      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:

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
 

Mark

Administrator
Staff member
Maybe we can use your screenshot server so we can generate MP4s ?
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.
 

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.
 

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
 

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.
 

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:

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
 
Top