Recherche avancée

Médias (1)

Mot : - Tags -/biographie

Autres articles (66)

  • 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 (...)

  • MediaSPIP version 0.1 Beta

    16 avril 2011, par

    MediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • Amélioration de la version de base

    13 septembre 2013

    Jolie sélection multiple
    Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
    Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)

Sur d’autres sites (10444)

  • How do i compress a video file in c# (Xamarin android)

    1er août 2016, par stackOverNo

    I’m currently working on a xamarin.android project, and am attempting to upload a video to an aws server, and then also be able to play it back. The upload is working correctly as far as I can tell.

    I’m retrieving the file from the user’s phone, turning it into a byte array, and uploading that. This is the code to upload :

    if (isImageAttached || isVideoAttached)
               {
                   //upload the file
                   byte[] fileInfo = System.IO.File.ReadAllBytes(filePath);
                   Task<media> task = client.SaveMediaAsync(fileInfo, nameOfFile);
                   mediaObj = await task;

                   //other code below is irrelevant to example
               }
    </media>

    and SaveMediaAsync is a function I wrote in a PCL :

    public async Task<media> SaveMediaAsync(byte[] fileInfo, string fName)
       {        
           Media a = new Media();
           var uri = new Uri(RestUrl);

           try
           {

               MultipartFormDataContent form = new MultipartFormDataContent();
               form.Add(new StreamContent(new MemoryStream(fileInfo)), "file", fName);  //add file

               var response = await client.PostAsync(uri, form);            //post the form   client is an httpclient object
               string info = await response.Content.ReadAsStringAsync();

       //save info to media object
               string[] parts = info.Split('\"');
               a.Name = parts[3];
               a.Path = parts[7];
               a.Size = Int32.Parse(parts[10]);

           }
           catch(Exception ex)
           {
       //handle exception
           }

           return a;

       }
    </media>

    After uploading the video like that, I’m able to view it in a browser using the public url. The quality is the same, and there is no issue with lag or load time. However when I try to play back the video using the same public url on my app on an android device, it takes an unbelievably long time to load the video. Even once it is loaded, it plays less than a second of it, and then seems to start loading the video again(the part of the progress bar that shows how much of the video has loaded jumps back to the current position and starts loading again).

    VideoView myVideo = FindViewById<videoview>(Resource.Id.TestVideo);

    myVideo.SetVideoURI(Android.Net.Uri.Parse(url));

    //add media controller
    MediaController cont = new MediaController(this);
    cont.SetAnchorView(myVideo);
    myVideo.SetMediaController(cont);

    //start video
    myVideo.Start();
    </videoview>

    Now I’m trying to play a 15 second video that is 5.9mb. When I try to play a 5 second video that’s 375kb it plays with no issue. This leads me to believe I need to make the video file smaller before playing it back, but I’m not sure how to do that. I’m trying to allow the user to upload their own videos, so I’ll have all different file formats and sizes.

    I’ve seen some people suggesting ffmpeg for a c# library to alter video files, but I’m not quite sure what it is I need to do to the video file. Can anyone fill in the gaps in my knowledge here ?

    Thanks for your time, it’s greatly appreciated !

  • Anomalie #2374 (Fermé) : request url too long

    17 octobre 2011, par Ben .

    après modification d’un article (avec du texte capillotracté disponible en privé sur demande) /ecrire/ ?exec=article_edit&id_article=134&id_parent=37&var_ajax=form&formulaire_action=editer_article&formulaire_action_args=ibCJz1%2BjA................. Request-URI Too Large The (...)

  • Evolution #2504 : plutôt pour afficher du code en bloque

    7 mars 2012, par cedric -

    le textarea a une finalité : permettre de faire un ctrl+a/ctrl+c pour selectionner tout+copier le texte. A noter que le form et input hidden ont été supprimés dans SPIP 3.0 car n’avaient plus d’utilité.