Recherche avancée

Médias (2)

Mot : - Tags -/rotation

Autres articles (101)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
    Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.

  • Creating farms of unique websites

    13 avril 2011, par

    MediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
    This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)

Sur d’autres sites (11997)

  • FFmpeg can't run in some device Android

    30 mars 2016, par tqn

    i’m working in a video processing project and now i’m using ffmpeg library in Android. I’m facing with a strange problem with asus zenphone 4 t00l (or all x86 device, I’ve just test in this x86 phone). When start command in project, app always crash :

    03-30 15:08:18.461 21068-21068/com.paditech.videa I/FFmpeg: Loading FFmpeg for armv7-neon CPU
    03-30 15:08:18.781 21068-21068/com.paditech.videa I/System.out: Success........
    03-30 15:26:12.933 21068-21068/com.paditech.videa E/IMGSRV: :0: PVRDRMOpen: TP3, ret = 59
    03-30 15:26:12.933 21068-21068/com.paditech.videa E/IMGSRV: :0: PVRDRMOpen: TP3, ret = 63
    03-30 15:26:15.913 21068-21068/com.paditech.videa D/VideoActivity: onDestroy
    03-30 15:26:18.993 21068-21068/com.paditech.videa I/FFmpeg: Loading FFmpeg for armv7-neon CPU
    03-30 15:26:19.263 21068-21068/com.paditech.videa I/System.out: Success........
    03-30 15:26:42.583 21068-21184/com.paditech.videa D/FFmpeg: Running publishing updates method
    03-30 15:26:42.583 21068-21068/com.paditech.videa E/IMGSRV: :0: PVRDRMOpen: TP3, ret = 59
    03-30 15:26:42.583 21068-21068/com.paditech.videa E/IMGSRV: :0: PVRDRMOpen: TP3, ret = 85
    03-30 15:26:42.683 21068-21068/com.paditech.videa D/VideoActivity: /data/data/com.paditech.videa/files/ffmpeg[1]: syntax error: '-�-4�' unexpected
    03-30 15:26:42.683 21068-21068/com.paditech.videa D/VideoActivity: /data/data/com.paditech.videa/files/ffmpeg[1]: syntax error: '-�-4�' unexpected

    First, I think the problem is ffmpeg library. So I created a test module with simple activity just load and run command and there’re no problem.

    Second, I’m afraid that app cannot load version ffmpeg, because in my log, it’s armv7-neon althought it’s x86 (In my test module, it display x86). And according my search result, may be a external library make app to use abi arm (Build.CPU_API="armv7"). So I try remove all library in gradle in module Test and detected a library. But check in aar file of library, it support all x86 and arm. But after remove it, app still crash with same log. And strangely, althogh Test module register as arm but it’still run success (External question : Why add library jp.wasabeef:picasso-transformations make system register as armv7 although it’s x86)

    Finally, i think problem is command. But after debug, I use same command for Test module but it still success. Now i’m still stuck with it. Could anyone help me to solve it. Thanks. Here my demo code :

       String input = "/storage/emulated/0/Videa/Video/VIDEO_20160122_160020.mp4";
       String output = "/storage/emulated/0/Videa/Audio/AUDIO_20160330_142501.wav";
       String[] command = {
               "-y",
               "-i",
               input,
               "-vn",
               "-f",
               "wav",
               output
       };
       FFmpeg ffmpeg = FFmpeg.getInstance(getApplicationContext());
       try {
           ffmpeg.execute(command, new ExecuteBinaryResponseHandler() {

               @Override
               public void onSuccess(String message) {
                   super.onSuccess(message);
                   System.out.println("Success " + message);
               }

               @Override
               public void onFailure(String message) {
                   super.onFailure(message);
                   System.out.println("Failure " + message);
               }
           });
       } catch (Exception e) {
           e.printStackTrace();
       }

    And here is Failed command :

       ArrayList<string> cmd = new ArrayList<string>();
       cmd.add("-y");
       cmd.add("-i");
       cmd.add(input);
       cmd.add("-vn");
       cmd.add("-f");
       cmd.add("wav");
       cmd.add(output);
       String[] result = new String[cmd.size()];
       return cmd.toArray(result);
    </string></string>
  • Converting video to GIF in Android Studio

    21 novembre 2019, par Wolfiebae

    I am trying to make my app to accept videos from the phone’s library to be uploaded and converted into GIF format. My code is giving out this build error though :-

    error: <anonymous> is not abstract and does not override abstract method onReschedule(String,ErrorInfo) in UploadCallback
    </anonymous>

    and also this warning on my onActivityResult method :-

    Overriding method should call super.onActivityResult

    The code is as below : -

    public class Video2gif extends AppCompatActivity {

       private Button uploadBtn;
       private ProgressBar progressBar;
       private int SELECT_VIDEO = 2;
       private ImageView img1;
       private DownloadManager downloadManager;
       private Button download_btn;
       private String gifUrl;

       @Override
       protected void onCreate(Bundle savedInstanceState) {
           super.onCreate(savedInstanceState);
           setContentView(R.layout.activity_video2gif);
           MediaManager.init(this);

           progressBar = findViewById(R.id.progress_bar);
           MediaManager.init(this);
           img1 = findViewById(R.id.img1);
           uploadBtn = findViewById(R.id.uploadBtn);

           uploadBtn.setOnClickListener(new View.OnClickListener() {
               @Override
               public void onClick(View view) {
                   pickVideoFromGallery();

               }
               private void pickVideoFromGallery() {
                   Intent GalleryIntent = new Intent();
                   GalleryIntent.setType("video/*");
                   GalleryIntent.setAction(Intent.ACTION_GET_CONTENT);
                   startActivityForResult(Intent.createChooser(GalleryIntent,
                           "select video"), SELECT_VIDEO);
               }
           });
       }
       @Override
       protected void onActivityResult(int requestCode, int resultCode, final Intent data) {

           if (requestCode == SELECT_VIDEO &amp;&amp; resultCode == RESULT_OK) {
               Uri selectedVideo = data.getData();
               MediaManager.get()
                       .upload(selectedVideo)
                       .unsigned("myid")
                       .option("resource_type", "video")
                       .callback(new UploadCallback(){
                           @Override
                           public void onStart(String requestId) {
                               progressBar.setVisibility(View.VISIBLE);
                               Toast.makeText(Video2gif.this,
                                       "Upload Started...", Toast.LENGTH_SHORT).show();
                           }

                           public void onProgress() {
                           }

                           public void onSuccess(String requestId, Map resultData) {

                               Toast.makeText(Video2gif.this, "Uploaded Succesfully",
                                       Toast.LENGTH_SHORT).show();
                               progressBar.setVisibility(View.GONE);
                               uploadBtn.setVisibility(View.INVISIBLE);

                               String publicId = resultData.get("public_id").toString();

                               gifUrl = MediaManager.get().url().resourceType("video")
                                       .transformation(new Transformation().videoSampling("25")
                                               .delay("200").height(200).effect("loop:10").crop("scale"))
                                       .resourceType("video").generate(publicId+".gif");

                               Glide.with(getApplicationContext()).asGif().load(gifUrl).into(img1);
                               download_btn.setVisibility(View.VISIBLE);

                           }
                           public void onError(String requestId, ErrorInfo error) {
                               Toast.makeText(Video2gif.this,
                                       "Upload Error", Toast.LENGTH_SHORT).show();
                               Log.v("ERROR!!", error.getDescription());
                           }


           });
       }
    }

    }

    I am also using Cloudinary to help process the video to GIF. Any help would be appreciated, many thanks !

  • Converting a video to a GIF

    21 novembre 2019, par Wolfiebae

    I am trying to make my app to accept videos from the phone’s library to be uploaded and converted into GIF format. My code is giving out this build error though :-

    error: <anonymous> is not abstract and does not override abstract method onReschedule(String,ErrorInfo) in UploadCallback
    </anonymous>

    and also this warning on my onActivityResult method :-

    Overriding method should call super.onActivityResult

    The code is as below : -

    public class Video2gif extends AppCompatActivity {

       private Button uploadBtn;
       private ProgressBar progressBar;
       private int SELECT_VIDEO = 2;
       private ImageView img1;
       private DownloadManager downloadManager;
       private Button download_btn;
       private String gifUrl;

       @Override
       protected void onCreate(Bundle savedInstanceState) {
           super.onCreate(savedInstanceState);
           setContentView(R.layout.activity_video2gif);
           MediaManager.init(this);

           progressBar = findViewById(R.id.progress_bar);
           MediaManager.init(this);
           img1 = findViewById(R.id.img1);
           uploadBtn = findViewById(R.id.uploadBtn);

           uploadBtn.setOnClickListener(new View.OnClickListener() {
               @Override
               public void onClick(View view) {
                   pickVideoFromGallery();

               }
               private void pickVideoFromGallery() {
                   Intent GalleryIntent = new Intent();
                   GalleryIntent.setType("video/*");
                   GalleryIntent.setAction(Intent.ACTION_GET_CONTENT);
                   startActivityForResult(Intent.createChooser(GalleryIntent,
                           "select video"), SELECT_VIDEO);
               }
           });
       }
       @Override
       protected void onActivityResult(int requestCode, int resultCode, final Intent data) {

           if (requestCode == SELECT_VIDEO &amp;&amp; resultCode == RESULT_OK) {
               Uri selectedVideo = data.getData();
               MediaManager.get()
                       .upload(selectedVideo)
                       .unsigned("myid")
                       .option("resource_type", "video")
                       .callback(new UploadCallback(){
                           @Override
                           public void onStart(String requestId) {
                               progressBar.setVisibility(View.VISIBLE);
                               Toast.makeText(Video2gif.this,
                                       "Upload Started...", Toast.LENGTH_SHORT).show();
                           }

                           public void onProgress() {
                           }

                           public void onSuccess(String requestId, Map resultData) {

                               Toast.makeText(Video2gif.this, "Uploaded Succesfully",
                                       Toast.LENGTH_SHORT).show();
                               progressBar.setVisibility(View.GONE);
                               uploadBtn.setVisibility(View.INVISIBLE);

                               String publicId = resultData.get("public_id").toString();

                               gifUrl = MediaManager.get().url().resourceType("video")
                                       .transformation(new Transformation().videoSampling("25")
                                               .delay("200").height(200).effect("loop:10").crop("scale"))
                                       .resourceType("video").generate(publicId+".gif");

                               Glide.with(getApplicationContext()).asGif().load(gifUrl).into(img1);
                               download_btn.setVisibility(View.VISIBLE);

                           }
                           public void onError(String requestId, ErrorInfo error) {
                               Toast.makeText(Video2gif.this,
                                       "Upload Error", Toast.LENGTH_SHORT).show();
                               Log.v("ERROR!!", error.getDescription());
                           }


           });
       }
    }

    }

    I am also using Cloudinary to help process the video to GIF. Any help would be appreciated, many thanks !