Recherche avancée

Médias (3)

Mot : - Tags -/plugin

Autres articles (54)

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

  • Publier sur MédiaSpip

    13 juin 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

  • Keeping control of your media in your hands

    13 avril 2011, par

    The vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
    While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
    MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
    MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...)

Sur d’autres sites (8341)

  • Cannot run program "/data/user/0/com.athkar.musliem/files/ffmpeg" : error=2, No such file or directory

    3 avril 2021, par gejivi2011

    I am trying to make a video with an audio and single image, but have the error that on the title, I am using android studio with FFmpeg :
I need to make that video with just one image and one mp3 file

    


    The error was :

    


    Exception while trying to run: [Ljava.lang.String;@b6e12b4
java.io.IOException: Cannot run program "/data/user/0/com.athkar.musliem/files/ffmpeg": 
error=2, No such file or directory

Caused by: java.io.IOException: error=2, No such file or directory


    


    1- this code to get the save directory

    


        String root = Environment.getExternalStorageDirectory().toString();
    myDir = new File(root);


    


    2- The image uri :

    


     imageUri = Uri.parse("android.resource://com.athkar.musliem/drawable/" + R.drawable.test_image);


    


    3- to select mp3 file :

    


        public void openMp3Selector() {
    Intent intent;
    intent = new Intent();
    intent.setAction(Intent.ACTION_GET_CONTENT);
    intent.setType("audio/*");
    startActivityForResult(Intent.createChooser(intent, "Select mp3"), REQ_CODE_PICK_SOUNDFILE);
}

 @Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
    super.onActivityResult(requestCode, resultCode, data);
    if (requestCode == REQ_CODE_PICK_SOUNDFILE && resultCode == Activity.RESULT_OK) {
        if ((data != null) && (data.getData() != null)) {
            audioFileUri = data.getData();
        }
    }
}


    


    4- finally FFmpeg code :

    


      fFmpeg = FFmpeg.getInstance(VideoMakerActivity.this);
            String[] strArr = new String[]{"-y", "-r", imageUri.getPath(), "-i", imageUri.getPath(), "-vcodec", "libx264", "-r", "2", "-pix_fmt", "yuv420p", "-preset", "ultrafast", audioFileUri.getPath()};
            try {
                fFmpeg.execute(strArr, new ExecuteBinaryResponseHandler() {
                    @Override
                    public void onSuccess(String message) {
                        super.onSuccess(message);
                        Log.e("MAS", "onSuccess");
                    }

                    @Override
                    public void onProgress(String message) {
                        super.onProgress(message);
                        Log.e("MAS", "onProgress");

                    }

                    @Override
                    public void onFailure(String message) {
                        super.onFailure(message);
                        Log.e("MAS", "onFailure");

                    }

                    @Override
                    public void onStart() {
                        super.onStart();
                        Log.e("MAS", "onStart");

                    }

                    @Override
                    public void onFinish() {
                        super.onFinish();
                        Log.e("MAS", "onFinish");

                    }
                });
            } catch (FFmpegCommandAlreadyRunningException e) {
                e.printStackTrace();
            }


    


  • Right way to use vmaf with ffmpeg

    14 juin, par dravit

    I am trying to calculate the VMAF score of a processed video wrt the original file.

    


    Command I have used :

    


    ffmpeg -y -loglevel info -stats -i original.mp4 -i processed.mp4 -lavfi "[0]null[refdeint];[refdeint]scale=1920:1080:flags=neighbor[ref];[1]setpts=PTS+0.0/TB[b];[b]scale=1920:1080:flags=neighbor[c];[c][ref]libvmaf=log_fmt=json:phone_model=1:model_path={model_path_here}/vmaf_v0.6.1.json:n_subsample=1:log_path=log.json" -f null -


    


    Now as per the official documentation of vmaf with ffmpeg found here, it says source/reference file followed by the encoded/distorted/processed file.

    


    But almost all of the blogs I came across, they are using the other way round order of the args, i.e. processed file followed by the original file.

    


    Few examples :

    


      

    1. https://medium.com/@eyevinntechnology/keep-an-eye-on-the-video-quality-b9bcb58dd5a1 : search for "Using VMAF within FFMPEG" in it.

      


    2. 


    3. https://websites.fraunhofer.de/video-dev/calculating-vmaf-and-psnr-with-ffmpeg/ : search for "Metric Calculation with FFmpeg" in it.

      


    4. 


    


    EDIT

    


    NOTE : Changing the order does change the VMAF score.

    


  • PHP FFMPEG to merge video and audio by links

    24 mai 2021, par Артем Паламарчук

    I have two links for the same video resource, like this :

    


    File One

    


    And

    


    File Two

    


    I want to retrieve audio from File Two and replace it with audio from File One and save the File One as a local file. Is any way to do this by the means of ffmpeg in my PHP code ? There is solution from Linux command line, but it is impossible for me to use it as I am on shared Linux hosting and it is unable to install ffmpeg on my Linux system. But I have installed ffmpeg as a php library via composer from github

    


    How can I implement this properly.