Advanced search

Medias (1)

Tag: - Tags -/artwork

Other articles (77)

  • List of compatible distributions

    26 April 2011, by

    The table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
    If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...)

  • Les notifications de la ferme

    1 December 2010, by

    Afin d’assurer une gestion correcte de la ferme, il est nécessaire de notifier plusieurs choses lors d’actions spécifiques à la fois à l’utilisateur mais également à l’ensemble des administrateurs de la ferme.
    Les notifications de changement de statut
    Lors d’un changement de statut d’une instance, l’ensemble des administrateurs de la ferme doivent être notifiés de cette modification ainsi que l’utilisateur administrateur de l’instance.
    À la demande d’un canal
    Passage au statut "publie"
    Passage au (...)

  • Publier sur MédiaSpip

    13 June 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

On other websites (10888)

  • Android FFMPEG - Low FPS & File Size is massive

    2 May 2018, by Alexzander Flores

    I am new to Android app development and I have been asked to make a video splitter app. I am trying to use FFMPEG, but the library size is massive and makes the .APK file 140MB. How can I solve this? Similar apps are around 15MBs in size.

    Also, the framerate starts at 30FPS and drops to around 2.2FPS over time when trying to split a 30 second long video into two parts. How can I solve this? This is my code currently:

    package splicer.com.splicer;

    import android.Manifest;
    import android.content.Context;
    import android.content.Intent;
    import android.content.pm.PackageManager;
    import android.database.Cursor;
    import android.media.MediaMetadataRetriever;
    import android.media.MediaScannerConnection;
    import android.net.Uri;
    import android.provider.MediaStore;
    import android.support.v4.app.ActivityCompat;
    import android.support.v4.content.ContextCompat;
    import android.support.v7.app.AppCompatActivity;
    import android.os.Bundle;
    import android.text.method.ScrollingMovementMethod;
    import android.view.View;
    import android.widget.Button;
    import android.widget.TextView;

    import com.github.hiteshsondhi88.libffmpeg.ExecuteBinaryResponseHandler;
    import com.github.hiteshsondhi88.libffmpeg.FFmpeg;
    import com.github.hiteshsondhi88.libffmpeg.LoadBinaryResponseHandler;
    import com.github.hiteshsondhi88.libffmpeg.exceptions.FFmpegNotSupportedException;

    public class MainActivity extends AppCompatActivity {

       private Button button;
       private TextView textView;
       private FFmpeg ffmpeg;

       static {
           System.loadLibrary("native-lib");
       }

       @Override
       protected void onCreate(Bundle savedInstanceState) {
           super.onCreate(savedInstanceState);
           setContentView(R.layout.activity_main);

           ffmpeg = FFmpeg.getInstance(getApplicationContext());
           try {
               ffmpeg.loadBinary(new LoadBinaryResponseHandler() {

                   @Override
                   public void onStart() {}

                   @Override
                   public void onFailure() {}

                   @Override
                   public void onSuccess() {}

                   @Override
                   public void onFinish() {}
               });
           } catch(FFmpegNotSupportedException e) {
               e.printStackTrace();
           }

           textView = (TextView) findViewById(R.id.textView);
           textView.setY(200);
           textView.setHeight(700);
           textView.setMovementMethod(new ScrollingMovementMethod());

           button = (Button) findViewById(R.id.button);
           button.setOnClickListener(new View.OnClickListener() {
               @Override
               public void onClick(View view) {
                   openGallery();
               }
           });
       }

       /**
        * A native method that is implemented by the 'native-lib' native library,
        * which is packaged with this application.
        */
       public native String stringFromJNI();

       public void openGallery() {
           if(ContextCompat.checkSelfPermission(this, Manifest.permission.READ_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) {
               ActivityCompat.requestPermissions(this, new String [] {Manifest.permission.READ_EXTERNAL_STORAGE}, 0);
           }

           if(ContextCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) {
               ActivityCompat.requestPermissions(this, new String [] {Manifest.permission.WRITE_EXTERNAL_STORAGE}, 0);
           }

           Intent gallery = new Intent(Intent.ACTION_PICK, MediaStore.Video.Media.EXTERNAL_CONTENT_URI);
           startActivityForResult(gallery, 100);
       }

       public String getRealPathFromURI(Context context, Uri contentUri) {
           Cursor cursor = null;
           try {
               String[] proj = { MediaStore.Images.Media.DATA };
               cursor = context.getContentResolver().query(contentUri,  proj, null, null, null);
               int column_index = cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA);
               cursor.moveToFirst();
               return cursor.getString(column_index);
           } finally {
               if (cursor != null) {
                   cursor.close();
               }
           }
       }

       @Override
       protected void onActivityResult(int requestCode, int resultCode, final Intent intent) {
           super.onActivityResult(requestCode, resultCode, intent);
           if(resultCode == RESULT_OK && requestCode == 100) {
               MediaMetadataRetriever retriever = new MediaMetadataRetriever();
               try {
                   retriever.setDataSource(getBaseContext(), intent.getData());
                   String time = retriever.extractMetadata(MediaMetadataRetriever.METADATA_KEY_DURATION);
                   long splitCount = Long.valueOf(time) / 1000 / 15;
                   if(splitCount > 1) {
                       final String path = getRealPathFromURI(getBaseContext(), Uri.parse(intent.getData().toString()));

                       for(int a = 0, start = 0; a < splitCount; ++a, start += 15) {
                           // I am only testing with .mp4s atm, this will change before production
                           final String targetPath = path.replace(".mp4", "_" + (a + 1) + ".mp4");

                           ffmpeg.execute(new String [] {
                                   "-r",
                                   "1",
                                   "-i",
                                   path,
                                   "-ss",
                                   String.valueOf(start),
                                   "-t",
                                   String.valueOf(start + 15),
                                   "-r",
                                   "24",
                                   targetPath
                           }, new ExecuteBinaryResponseHandler() {
                               @Override
                               public void onStart() {}

                               @Override
                               public void onProgress(String message) {
                                   textView.setText("onProcess: " + message);
                               }

                               @Override
                               public void onFailure(String message) {
                                   textView.setText("onFailure: " + message + " --- " + path);
                               }

                               @Override
                               public void onSuccess(String message) {
                                   textView.setText("onSuccess:" + message);
                                   MediaScannerConnection.scanFile(getBaseContext(),
                                   new String [] { targetPath }, null,
                                   new MediaScannerConnection.OnScanCompletedListener() {
                                       public void onScanCompleted(String path, Uri uri) {}
                                   });
                               }

                               @Override
                               public void onFinish() {}
                           });
                       }
                   }
               } catch(Exception e) {
                   e.printStackTrace();
               } finally {
                   retriever.release();
               }
           }
       }
    }

    I don’t believe everything here is as optimal as it could be, but I’m just trying to prove the concept at the moment. Any help in the right direction would be amazing, thank you!

  • carrierwave-ffmpeg .weba audio convert to .mp3 or .mp4

    14 May 2018, by nmadoug

    I use react-mic on the front-end of my React/Rails application to capture audio from the user. react-mic formats the audio blob as .weba. I’m trying to convert the .weba to .mp4 or .mp3 using carrierwave-ffmpeg . I can isolate the issue to my Rails uploader, which is as follows:

    require 'fog/aws'

    class UserResponseUploader < CarrierWave::Uploader::Base
     include CarrierWave::FFmpeg

     if Rails.env.test?
       storage :file
     else
       storage :fog
     end

     version :mp3 do
       puts `which ffmpeg`
       # binding.pry
       process encode: [:mp3, audio_codec: "a libmp3lame -qscale:a 2"]
       # process :encode_audio=> [:mp4, audio_codec: "aac",:custom => "-strict experimental -qscale:a 2"]

       def full_filename(for_file)
         super.chomp(File.extname(super)) + '.mp3'
       end
     end

     # Directory where uploaded files will be stored on file system or AWS
     def store_dir
       "uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}"
     end
    end

    ffmpeg is installed on my local PC and I can run the command on the terminal to get an audio file created

    ffmpeg -i audio.weba -codec:a libmp3lame -qscale:a 2 willwork.mp3

    My problem is when I try and run everything in my code, I get the following error message:

    NameError (undefined local variable or method `e' for #):

    I don’t know where it’s complaining. I have a feeling the encoding line is causing the problem and I don’t have it set up properly.

    Any ideas?

  • Thinking about switching to GeoIP2 for better location detection? Here’s what you should know

    5 June 2018, by Matomo Core Team

    In Matomo 3.5.0 we added a new feature to improve the location detection (country, region, city) of your visitors. Especially when it comes to IPv6 addresses, you will see less “Unknown” locations and more accurate results in general. This feature is now enabled for all new installations but needs to be manually enabled for existing Matomo self-hosted users.

    Why is the Matomo plugin not enabled for existing users?

    When you enable the GeoIP2 plugin, a database update will need to be executed on two datatable tables (“log_visit” and “log_conversion”) which stores some of the raw data. Please be aware that this update could take several hours depending on the size of your database.

    If you store many visits in your database, it is recommended to execute the update through the command line by executing the command ./console core:update to avoid the update from timing out. You may also have to put your Matomo into maintenance mode during this time and replay the missed traffic from logs afterwards as explained in the FAQ article.

    GeoIP2 may slow down your tracking

    In the past we have seen that a few Matomo databases with high traffic volumes struggle to handle all the tracking requests after enabling GeoIP2. The reason for this is the location database now contains many more entries because it has to store all the IPv6 addresses and the database itself has a different format. Hence, the location lookup takes longer.

    It is hard to say how much slower the location lookup gets, but we found GeoIP2-PHP is about 20 times slower than GeoIP1-PHP. On a fast CPU the lookup time for an IP with GeoIP2 takes about 1ms, but can also take much longer depending on the server.

    Making location lookups fast again

    There is a PHP extension available that makes lookups very fast, even faster than the old GeoIP1-PHP provider. If you can install additional PHP extensions on your server and have a high traffic website, you may want to install the GeoIP2 extension.

    There is also an Nginx module and an Apache module. Unfortunately, we don’t have any performance metrics for these providers.

    How do I activate the GeoIP2 location provider?

    As a Super User, log in to your Matomo and go to “Administration => Plugins”. There you can activate the “GeoIP2” plugin. As mentioned, this will trigger a database update which can take a while and you may want to perform this update through the command line.

    Now you can go to “Administration => Geolocation”. Here you will first need to install the GeoIP2 databases at the bottom of the page before you can activate the GeoIP2-PHP provider. To activate any of the other GeoIP2 providers, you will need to install the required modules.

    You will be able to check if the detection works on the right next to location provider. Once you selected one of the available providers, you’re all good to go.

    The post Thinking about switching to GeoIP2 for better location detection? Here’s what you should know appeared first on Analytics Platform - Matomo.