Recherche avancée

Médias (0)

Mot : - Tags -/acrobat

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (112)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • Script d’installation automatique de MediaSPIP

    25 avril 2011, par

    Afin de palier aux difficultés d’installation dues principalement aux dépendances logicielles coté serveur, un script d’installation "tout en un" en bash a été créé afin de faciliter cette étape sur un serveur doté d’une distribution Linux compatible.
    Vous devez bénéficier d’un accès SSH à votre serveur et d’un compte "root" afin de l’utiliser, ce qui permettra d’installer les dépendances. Contactez votre hébergeur si vous ne disposez pas de cela.
    La documentation de l’utilisation du script d’installation (...)

  • De près ou de loin...

    29 avril 2011, par

    Ils ne le savent pas forcément mais sont indispensables
    MediaSPIP est un logiciel open-source, il se base sur d’autres logiciels, et d’autres logiciels lui sont également nécessaires pour fonctionner ... Les personnes ici listées ne savent pas forcément qu’elles ont un rôle important dans le développement, elles ont apporté leur connaissances dans le cadre de la création d’une partie de ces éléments nécessaires ou ont écrit des articles permettant de comprendre certaines choses... il semble indispensable (...)

Sur d’autres sites (4475)

  • How to create a widget – Introducing the Piwik Platform

    4 septembre 2014, par Thomas Steur — Development

    This is the next post of our blog series where we introduce the capabilities of the Piwik platform (our previous post was How to create a scheduled task in Piwik). This time you’ll learn how to create a new widget. For this tutorial you will need to have basic knowledge of PHP.

    What is a widget in Piwik ?

    Widgets can be added to your dashboards or exported via a URL to embed it on any page. Most widgets in Piwik represent a report but a widget can display anything. For instance a RSS feed of your corporate news. If you prefer to have most of your business relevant data in one dashboard why not display the number of offline sales, the latest stock price, or other key metrics together with your analytics data ?

    Getting started

    In this series of posts, we assume that you have already set up your development environment. If not, visit the Piwik Developer Zone where you’ll find the tutorial Setting up Piwik.

    To summarize the things you have to do to get setup :

    • Install Piwik (for instance via git).
    • Activate the developer mode : ./console development:enable --full.
    • Generate a plugin : ./console generate:plugin --name="MyWidgetPlugin". There should now be a folder plugins/MyWidgetPlugin.
    • And activate the created plugin under Settings => Plugins.

    Let’s start creating a widget

    We start by using the Piwik Console to create a widget template :

    ./console generate:widget

    The command will ask you to enter the name of the plugin the widget should belong to. I will simply use the above chosen plugin name “MyWidgetPlugin”. It will ask you for a widget category as well. You can select any existing category, for instance “Visitors”, “Live !” or “Actions”, or you can define a new category, for instance your company name. There should now be a file plugins/MyWidgetPlugin/Widgets.php which contains already some examples to get you started easily :

    1. class Widgets extends \Piwik\Plugin\Widgets
    2. {
    3.     /**
    4.      * Here you can define the category the widget belongs to. You can reuse any existing widget category or define your own category.
    5.      * @var string
    6.      */
    7.     protected $category = 'ExampleCompany';
    8.  
    9.     /**
    10.      * Here you can add one or multiple widgets. You can add a widget by calling the method "addWidget()" and pass the name of the widget as well as a method name that should be called to render the widget. The method can be defined either directly here in this widget class or in the controller in case you want to reuse the same action for instance in the menu etc.
    11.      */
    12.     protected function init()
    13.     {
    14.         $this->addWidget('Example Widget Name', $method = 'myExampleWidget');
    15.         $this->addWidget('Example Widget 2',    $method = 'myExampleWidget', $params = array('myparam' => 'myvalue'));
    16.     }
    17.  
    18.     /**
    19.      * This method renders a widget as defined in "init()". It's on you how to generate the content of the widget. As long as you return a string everything is fine. You can use for instance a "Piwik\View" to render a twig template. In such a case don't forget to create a twig template (eg. myViewTemplate.twig) in the "templates" directory of your plugin.
    20.      *
    21.      * @return string
    22.      */
    23.     public function myExampleWidget()
    24.     {
    25.         $view = new View('@MyWidgetPlugin/myViewTemplate');
    26.         return $view->render();
    27.     }
    28. }

    Télécharger

    As you might have noticed in the generated template we put emphasis on adding comments to explain you directly how to continue and where to get more information. Ideally this saves you some time and you don’t even have to search for more information on our developer pages. The category is defined in the property $category and can be changed at any time. Starting from Piwik 2.6.0 the generator will directly create a translation key if necessary to make it easy to translate the category into any language. Translations will be a topic in one of our future posts until then you can explore this feature on our Internationalization guide.

    A simple example

    We can define one or multiple widgets in the init method by calling addWidget($widgetName, $methodName). To do so we define the name of a widget which will be seen by your users as well as the name of the method that shall render the widget.

    protected $category = 'Example Company';

    public function init()
    {
       // Registers a widget named 'News' under the category 'Example Company'.
       // The method 'myCorporateNews' will be used to render the widget.
       $this->addWidget('News', $method = 'myCorporateNews');
    }

    public function myCorporateNews()
    {
       return file_get_contents('http://example.com/news');
    }

    This example would display the content of the specified URL within the widget as defined in the method myCorporateNews. It’s on you how to generate the content of the widget. Any string returned by this method will be displayed within the widget. You can use for example a View to render a Twig template. For simplification we are fetching the content from another site. A more complex version would cache this content for faster performance. Caching and views will be covered in one of our future posts as well.

    Example Widget

    Did you know ? To make your life as a developer as stress-free as possible the platform checks whether the registered method actually exists and whether the method is public. If not, Piwik will display a notification in the UI and advice you with the next step.

    Checking permissions

    Often you do not want to have the content of a widget visible to everyone. You can check for permissions by using one of our many convenient methods which all start with \Piwik\Piwik::checkUser*. Just to introduce some of them :

    // Make sure the current user has super user access
    \Piwik\Piwik::checkUserHasSuperUserAccess();

    // Make sure the current user is logged in and not anonymous
    \Piwik\Piwik::checkUserIsNotAnonymous();

    And here is an example how you can use it within your widget :

    public function myCorporateNews()
    {
       // Make sure there is an idSite URL parameter
       $idSite = Common::getRequestVar('idSite', null, 'int');

       // Make sure the user has at least view access for the specified site. This is useful if you want to display data that is related to the specified site.
       Piwik::checkUserHasViewAccess($idSite);

       $siteUrl = \Piwik\Site::getMainUrlFor($idSite);

       return file_get_contents($siteUrl . '/news');
    }

    In case any condition is not met an exception will be thrown and an error message will be presented to the user explaining that he does not have enough permissions. You’ll find the documentation for those methods in the Piwik class reference.

    How to test a widget

    After you have created your widgets you are surely wondering how to test it. First, you should write a unit or integration test which we will cover in one of our future blog posts. Just one hint : You can use the command ./console generate:test to create a test. To manually test a widget you can add a widget to a dashboard or export it.

    Publishing your Plugin on the Marketplace

    In case you want to share your widgets with other Piwik users you can do this by pushing your plugin to a public GitHub repository and creating a tag. Easy as that. Read more about how to distribute a plugin.

    Advanced features

    Isn’t it easy to create a widget ? We never even created a file ! Of course, based on our API design principle “The complexity of our API should never exceed the complexity of your use case.” you can accomplish more if you want : You can clarify parameters that will be passed to your widget, you can create a method in the Controller instead of the Widget class to make the same method also reusable for adding it to the menu, you can assign different categories to different widgets, you can remove any widgets that were added by the Piwik core or other plugins and more.

    Would you like to know more about widgets ? Go to our Widgets class reference in the Piwik Developer Zone.

    If you have any feedback regarding our APIs or our guides in the Developer Zone feel free to send it to us.

  • How to add new pages and menu items to Piwik – Introducing the Piwik Platform

    11 septembre 2014, par Thomas Steur — Development

    This is the next post of our blog series where we introduce the capabilities of the Piwik platform (our previous post was How to create a widget). This time you’ll learn how to extend Piwik by adding new pages and menu items. For this tutorial you will need to have basic knowledge of PHP and optionally of Twig which is the template engine we use.

    What can be displayed in a page ?

    To make it short : You can display any corporate related content, key metrics, news, help pages, custom reports, contact details, information about your server, forms to manage any data and anything else.

    Getting started

    In this series of posts, we assume that you have already set up your development environment. If not, visit the Piwik Developer Zone where you’ll find the tutorial Setting up Piwik.

    To summarize the things you have to do to get setup :

    • Install Piwik (for instance via git).
    • Activate the developer mode : ./console development:enable --full.
    • Generate a plugin : ./console generate:plugin --name="MyControllerPlugin". There should now be a folder plugins/MyControllerPlugin.
    • And activate the created plugin under Settings => Plugins.

    Let’s start creating a page

    We start by using the Piwik Console to create a new page :

    ./console generate:controller

    The command will ask you to enter the name of the plugin the controller should belong to. I will simply use the above chosen plugin name “MyControllerPlugin”. There should now be two files plugins/MyControllerPlugin/Controller.php and plugins/MyControllerPlugin/templates/index.twig which both already contain an example to get you started easily :

    Controller.php

    1. class Controller extends \Piwik\Plugin\Controller
    2. {
    3.     public function index()
    4.     {
    5.         return $this->renderTemplate('index', array(
    6.              'answerToLife' => 42
    7.         ));
    8.     }
    9. }

    Télécharger

    and templates/index.twig

    1. {% extends 'dashboard.twig' %}
    2.  
    3. {% block content %}
    4.     <strong>Hello world!</strong>
    5.     <br/>
    6.  
    7.     The answer to life is {{ answerToLife }}
    8. {% endblock %}

    Télécharger

    Note : If you are generating the Controller before Piwik 2.7.0 the example will look slightly different.

    The controller action index assigns the view variable answerToLife to the view and renders the Twig template templates/index.twig. Any variable assigned this way can then be used in the view using for example {{ answerToLife }}.

    Using a Twig template to generate the content of your page is actually optional : instead feel free to generate any content as desired and return a string in your controller action.

    As the above template index.twig is extending the dashboard template the Logo as well as the top menu will automatically appear on top of your content which is defined within the block content.

    Rendered page content

    How to display the page within the admin

    If you would like to add the admin menu on the left you have to modify the following parts :

    • Extend \Piwik\Plugin\ControllerAdmin instead of \Piwik\Plugin\Controller in the file Controller.php. In a future version of Piwik this step will be no longer neccessary, see #6151
    • Extend the template admin.twig instead of dashboard.twig
    • Define a headline using an H2-element
    1. {% extends 'admin.twig' %}
    2.  
    3. {% block content %}
    4.     <h2>Hello world!</h2>
    5.     <br/>
    6.  
    7.     The answer to life is {{ answerToLife }}
    8. {% endblock %}

    Télécharger

    Note : Often one needs to add a page to the admin to make a plugin configurable. We have a unified solution for this using the Settings API.

    Admin page

    How to display a blank page

    If you would like to generate a blank page that shows only your content the template should contain only your markup as follows :

    1. <strong>Hello world!</strong>
    2. <br/>
    3.  
    4. The answer to life is {{ answerToLife }}

    Télécharger

    Predefined variables, UI components, security and accessing query parameters

    In this blog post we only cover the basics to get you started. We highly recommend to read the MVC guide on our developer pages which covers some of those advanced topics. For instance you might be wondering how to securely access $_GET or $_POST parameters, you might want to restrict the content of your page depending on a user role, and much more.

    If you would like to know how to make use of JavaScript, CSS and Less have a look at our Working with Piwik’s UI guide.

    Note : How to include existing UI components such as a site selector or a date selector will be covered in a future blog post. Also, there are default variables assigned to the view depending on the context. A list of those variables that may or may not be defined is unfortunately not available yet but we will catch up on this.

    Let’s add a menu item to make the page accessible

    So far you have created a page but you can still not access it. Therefore we need to add a menu item to one of the Piwik menus. We start by using the Piwik Console to create a menu template :

    ./console generate:menu

    The command will ask you to enter the name of the plugin the menu should belong to. I will use again the above chosen plugin name “MyControllerPlugin”. There should now be a file plugins/MyControllerPlugin/Menu.php which contains an example to get you started easily :

    Menu.php

    1. class Menu extends \Piwik\Plugin\Menu
    2. {
    3.     public function configureUserMenu(MenuUser $menu)
    4.     {
    5.         // reuse an existing category.
    6.         $menu->addManageItem('My User Item', $this->urlForAction('showList'));
    7.  
    8.         // or create a custom category
    9.         $menu->addItem('My Custom Category', 'My User Item', $this->urlForDefaultAction());
    10.     }
    11. }

    Télécharger

    This is only a part of the generated template since all the examples of the different menus are similar. You can add items to four menus :

    • configureReportingMenu To add a new item to the reporting menu which includes all the reports like “Actions” and “Visitors”.
    • configureAdminMenu To add a new item to the admin menu which includes items like “User settings” and “Websites”.
    • configureTopMenu To add a new item to the top menu which includes items like “All Websites” and “Logout”.
    • configureUserMenu To add a new item to the user menu which is accessible when clicking on the username on the top right.

    In this blog post we will add a new item to the user menu and to do so we adjust the generated template like this :

    1. class Menu extends \Piwik\Plugin\Menu
    2. {
    3.     public function configureUserMenu(MenuUser $menu)
    4.     {
    5.         $menu->addManageItem('My User Item', $this->urlForAction($method = 'index'), $orderId = 30);
    6.     }
    7. }

    Télécharger

    That’s it. This will add a menu item named “My User Item” to the “Manage” section of the user menu. When a user chooses the menu item, the “index” method of your controller will be executed and your previously created page will be first rendered and then displayed. Optionally, you can define an order to influence the position of the menu item within the manage section. Following this example you can add an item to any menu for any action. I think you get the point !

    User menu

    Note : In Piwik 2.6.0 and before the above example would look like this :

    1. class Menu extends \Piwik\Plugin\Menu
    2. {
    3.     public function configureUserMenu(MenuUser $menu)
    4.     {
    5.         $menu->addManageItem('My User Item', array($module = 'MyControllerPlugin', $action = 'index'), $orderId = 30);
    6.     }
    7. }

    Télécharger

    How to test a page

    After you have created your page you are surely wondering how to test it. A controller should be usually very simple as it is only the connector between model and view. Therefore, we do usually not create unit or integration test for controllers and for the view less than ever. Instead we would create a UI test that takes a screenshot of your page and compares it with an expected screenshot. Luckily, there is already a section UI tests in our Automated tests guide.

    Publishing your Plugin on the Marketplace

    In case you want to share your page with other Piwik users you can do this by pushing your plugin to a public GitHub repository and creating a tag. Easy as that. Read more about how to distribute a plugin.

    Advanced features

    Isn’t it easy to create a page ? We never even created a file ! Of course, based on our API design principle “The complexity of our API should never exceed the complexity of your use case.” you can accomplish more if you want : You can make use of Vanilla JavaScript, jQuery, AngularJS, Less and CSS, you can reuse UI components, you can access query parameters and much more.

    Would you like to know more about this ? Go to our MVC (Model-View-Controller) and Working with Piwik’s UI guides in the Piwik Developer Zone.

    If you have any feedback regarding our APIs or our guides in the Developer Zone feel free to send it to us.

  • Filter complex apply on ffmpeg for android outputs low quality video

    17 septembre 2014, par Alin

    I finally managed to build ffmpeg as detailed in here : https://enoent.fr/blog/2014/06/20/compile-ffmpeg-for-android/ and in the end, I have a ffmpeg library which accepts command arguments.

    I am trying to apply a watermark image over the video so for it I am using preparing this ffmpeg command :

    ffmpeg -i input.avi -i logo.png -filter_complex 'overlay=10:main_h-overlay_h-10' output.avi

    I have first tried it on windows using ffmpeg.exe and the result was as expected.

    I have tried it on android using the compiled android and the output is as follows :

    09-17 01:16:57.156: I/Videokit(1229): Loading native library compiled at 22:33:10 Sep 15 2014
    09-17 01:16:57.156: I/Videokit(1229): Option: ffmpeg
    09-17 01:16:57.156: I/Videokit(1229): Option: -loglevel
    09-17 01:16:57.156: I/Videokit(1229): Option: debug
    09-17 01:16:57.156: I/Videokit(1229): Option: -i
    09-17 01:16:57.156: I/Videokit(1229): Option: /storage/emulated/0/mute.mp4
    09-17 01:16:57.156: I/Videokit(1229): Option: -i
    09-17 01:16:57.156: I/Videokit(1229): Option: /storage/emulated/0/logo.png
    09-17 01:16:57.156: I/Videokit(1229): Option: -filter_complex
    09-17 01:16:57.156: I/Videokit(1229): Option: overlay=10:main_h-overlay_h-10
    09-17 01:16:57.156: I/Videokit(1229): Option: /storage/emulated/0/outVid.mp4
    09-17 01:16:57.156: I/Videokit(1229): Running main
    09-17 01:16:57.163: D/Videokit(1229): Splitting the commandline.
    09-17 01:16:57.163: D/Videokit(1229): Reading option '-loglevel' ...
    09-17 01:16:57.163: D/Videokit(1229):  matched as option 'loglevel' (set logging level) with argument 'debug'.
    09-17 01:16:57.163: D/Videokit(1229): Reading option '-i' ...
    09-17 01:16:57.163: D/Videokit(1229):  matched as input file with argument '/storage/emulated/0/mute.mp4'.
    09-17 01:16:57.163: D/Videokit(1229): Reading option '-i' ...
    09-17 01:16:57.163: D/Videokit(1229):  matched as input file with argument '/storage/emulated/0/logo.png'.
    09-17 01:16:57.163: D/Videokit(1229): Reading option '-filter_complex' ...
    09-17 01:16:57.163: D/Videokit(1229):  matched as option 'filter_complex' (create a complex filtergraph) with argument 'overlay=10:main_h-overlay_h-10'.
    09-17 01:16:57.163: D/Videokit(1229): Reading option '/storage/emulated/0/outVid.mp4' ...
    09-17 01:16:57.163: D/Videokit(1229):  matched as output file.
    09-17 01:16:57.163: D/Videokit(1229): Finished splitting the commandline.
    09-17 01:16:57.163: D/Videokit(1229): Parsing a group of options: global .
    09-17 01:16:57.163: D/Videokit(1229): Applying option loglevel (set logging level) with argument debug.
    09-17 01:16:57.163: D/Videokit(1229): Applying option filter_complex (create a complex filtergraph) with argument overlay=10:main_h-overlay_h-10.
    09-17 01:16:57.163: D/Videokit(1229): Successfully parsed a group of options.
    09-17 01:16:57.163: D/Videokit(1229): Parsing a group of options: input file /storage/emulated/0/mute.mp4.
    09-17 01:16:57.163: D/Videokit(1229): Successfully parsed a group of options.
    09-17 01:16:57.163: D/Videokit(1229): Opening an input file: /storage/emulated/0/mute.mp4.
    09-17 01:16:57.296: D/Videokit(1229): Successfully opened the file.
    09-17 01:16:57.296: D/Videokit(1229): Parsing a group of options: input file /storage/emulated/0/logo.png.
    09-17 01:16:57.296: D/Videokit(1229): Successfully parsed a group of options.
    09-17 01:16:57.296: D/Videokit(1229): Opening an input file: /storage/emulated/0/logo.png.
    09-17 01:16:57.304: D/Videokit(1229): Successfully opened the file.
    09-17 01:16:57.304: D/Videokit(1229): Parsing a group of options: output file /storage/emulated/0/outVid.mp4.
    09-17 01:16:57.304: D/Videokit(1229): Successfully parsed a group of options.
    09-17 01:16:57.304: D/Videokit(1229): Opening an output file: /storage/emulated/0/outVid.mp4.
    09-17 01:16:57.312: D/Videokit(1229): Successfully opened the file.
    09-17 01:16:57.351: I/Videokit(1229): Stream mapping:
    09-17 01:16:57.351: I/Videokit(1229):   Stream #0:0 (h264) -> overlay:main
    09-17 01:16:57.351: I/Videokit(1229):   Stream #1:0 (png) -> overlay:overlay
    09-17 01:16:57.351: I/Videokit(1229):   overlay
    09-17 01:16:57.351: I/Videokit(1229):  -> Stream #0:0 (mpeg4)
    09-17 01:16:57.351: I/Videokit(1229): Press [q] to stop, [?] for help
    09-17 01:16:57.890: I/Videokit(1229): frame=   12 fps=0.0 q=24.3 size=     113kB time=00:00:00.40 bitrate=2314.9kbits/s    
    09-17 01:16:58.413: I/Videokit(1229): frame=   26 fps= 25 q=31.0 size=     154kB time=00:00:00.86 bitrate=1455.1kbits/s    
    09-17 01:16:58.953: I/Videokit(1229): frame=   38 fps= 24 q=31.0 size=     180kB time=00:00:01.26 bitrate=1165.0kbits/s    
    09-17 01:17:00.085: I/Videokit(1229): frame=   50 fps= 24 q=31.0 size=     205kB time=00:00:01.66 bitrate=1006.8kbits/s    
    09-17 01:17:00.163: I/Videokit(1229): frame=   51 fps= 19 q=31.0 size=     206kB time=00:00:01.70 bitrate= 992.8kbits/s    
    09-17 01:17:00.632: I/Videokit(1229): frame=   64 fps= 20 q=31.0 size=     230kB time=00:00:02.13 bitrate= 883.9kbits/s    
    09-17 01:17:01.156: I/Videokit(1229): frame=   78 fps= 21 q=31.0 size=     254kB time=00:00:02.60 bitrate= 798.5kbits/s    
    09-17 01:17:01.679: I/Videokit(1229): frame=   92 fps= 21 q=31.0 size=     275kB time=00:00:03.06 bitrate= 734.7kbits/s    
    09-17 01:17:02.179: I/Videokit(1229): frame=  106 fps= 22 q=31.0 size=     296kB time=00:00:03.53 bitrate= 684.8kbits/s    
    09-17 01:17:02.726: I/Videokit(1229): frame=  121 fps= 23 q=24.8 size=     325kB time=00:00:04.03 bitrate= 660.1kbits/s    
    09-17 01:17:03.249: I/Videokit(1229): frame=  134 fps= 23 q=31.0 size=     344kB time=00:00:04.47 bitrate= 629.8kbits/s    
    09-17 01:17:03.781: I/Videokit(1229): frame=  147 fps= 23 q=31.0 size=     368kB time=00:00:04.90 bitrate= 614.2kbits/s    
    09-17 01:17:04.335: I/Videokit(1229): frame=  159 fps= 23 q=31.0 size=     390kB time=00:00:05.30 bitrate= 602.1kbits/s    
    09-17 01:17:04.921: I/Videokit(1229): frame=  171 fps= 23 q=31.0 size=     412kB time=00:00:05.70 bitrate= 591.3kbits/s    
    09-17 01:17:05.437: I/Videokit(1229): frame=  183 fps= 23 q=31.0 size=     432kB time=00:00:06.10 bitrate= 579.8kbits/s    
    09-17 01:17:05.937: I/Videokit(1229): frame=  196 fps= 23 q=31.0 size=     453kB time=00:00:06.53 bitrate= 568.0kbits/s    
    09-17 01:17:06.453: I/Videokit(1229): frame=  210 fps= 23 q=31.0 size=     483kB time=00:00:07.00 bitrate= 565.2kbits/s    
    09-17 01:17:06.976: I/Videokit(1229): frame=  224 fps= 23 q=31.0 size=     513kB time=00:00:07.47 bitrate= 562.3kbits/s    
    09-17 01:17:07.515: I/Videokit(1229): frame=  239 fps= 24 q=31.0 size=     538kB time=00:00:07.97 bitrate= 553.1kbits/s    
    09-17 01:17:08.007: I/Videokit(1229): frame=  249 fps= 23 q=31.0 size=     559kB time=00:00:08.30 bitrate= 551.2kbits/s    
    09-17 01:17:08.531: I/Videokit(1229): frame=  262 fps= 24 q=31.0 size=     581kB time=00:00:08.74 bitrate= 544.6kbits/s    
    09-17 01:17:09.359: I/Videokit(1229): frame=  272 fps= 23 q=31.0 size=     602kB time=00:00:09.07 bitrate= 543.1kbits/s    
    09-17 01:17:09.882: I/Videokit(1229): frame=  284 fps= 23 q=31.0 size=     624kB time=00:00:09.47 bitrate= 539.5kbits/s    
    09-17 01:17:10.374: I/Videokit(1229): frame=  296 fps= 23 q=31.0 size=     651kB time=00:00:09.87 bitrate= 540.2kbits/s    
    09-17 01:17:10.898: I/Videokit(1229): frame=  309 fps= 23 q=31.0 size=     682kB time=00:00:10.31 bitrate= 542.1kbits/s    
    09-17 01:17:11.406: I/Videokit(1229): frame=  324 fps= 23 q=31.0 size=     710kB time=00:00:10.81 bitrate= 538.3kbits/s    
    09-17 01:17:11.929: I/Videokit(1229): frame=  343 fps= 24 q=31.0 size=     749kB time=00:00:11.44 bitrate= 536.2kbits/s    
    09-17 01:17:12.437: I/Videokit(1229): frame=  361 fps= 24 q=24.8 size=     787kB time=00:00:12.04 bitrate= 535.3kbits/s    
    09-17 01:17:12.953: I/Videokit(1229): frame=  379 fps= 24 q=31.0 size=     821kB time=00:00:12.64 bitrate= 531.8kbits/s    
    09-17 01:17:13.460: I/Videokit(1229): frame=  397 fps= 25 q=24.8 size=     869kB time=00:00:13.24 bitrate= 537.2kbits/s    
    09-17 01:17:13.960: I/Videokit(1229): frame=  413 fps= 25 q=31.0 size=     903kB time=00:00:13.78 bitrate= 537.0kbits/s    
    09-17 01:17:14.468: I/Videokit(1229): frame=  430 fps= 25 q=31.0 size=     942kB time=00:00:14.34 bitrate= 537.7kbits/s    
    09-17 01:17:14.601: V/Videokit(1229): No more output streams to write to, finishing.
    09-17 01:17:14.609: I/Videokit(1229): frame=  435 fps= 25 q=31.0 Lsize=     959kB time=00:00:14.51 bitrate= 541.2kbits/s    
    09-17 01:17:14.609: I/Videokit(1229): video:956kB audio:0kB subtitle:0 data:0 global headers:0kB muxing overhead 0.275524%
    09-17 01:17:14.609: D/Videokit(1229): 439 frames successfully decoded, 0 decoding errors
    09-17 01:17:14.617: I/Videokit(1229): Main ended with status 0

    The problem is that the output on android has very poor quality How can I make ffmpeg build a video with a quality close to the original file. I presume that filter_complex forces a new video encode.