Recherche avancée

Médias (1)

Mot : - Tags -/MediaSPIP 0.2

Autres articles (30)

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 0.2 est la première version de MediaSPIP stable.
    Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Comme pour la version précédente, 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 (...)

  • Mise à disposition des fichiers

    14 avril 2011, par

    Par défaut, lors de son initialisation, MediaSPIP ne permet pas aux visiteurs de télécharger les fichiers qu’ils soient originaux ou le résultat de leur transformation ou encodage. Il permet uniquement de les visualiser.
    Cependant, il est possible et facile d’autoriser les visiteurs à avoir accès à ces documents et ce sous différentes formes.
    Tout cela se passe dans la page de configuration du squelette. Il vous faut aller dans l’espace d’administration du canal, et choisir dans la navigation (...)

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

Sur d’autres sites (4602)

  • Xuggler decode H264 packets

    18 novembre 2015, par Roy Bean

    I’m making a test with xuggler, and I’m observing a behavior that I don’t understand.

    So I have a H264 frame, stored in a file and I want to decode it.
    Bassically I need of the IVideoPicture to then get a buffred image.

    for the same same packet I need of 10 tries until it retrieved that the IVideoPicture is complete.

    this is what ffmpeg does when reads the frame :

    Input #0, h264, from 'sample1.jpg':
    Duration: N/A, bitrate: N/A
    Stream #0:0: Video: h264 (Baseline), yuv420p, 352x288, 25 tbr, 1200k tbn, 50 tbc

    Can someone of xuggler or ffmpeg knowledge explain what is happen ?

    My code bellow :

    IContainer container = IContainer.make();

    RandomAccessFile aFile = new RandomAccessFile("c://sample1Frame/sample1.jpg","r");
    IContainerFormat format = IContainerFormat.make();
    format.setInputFormat("h264");
    container.open(aFile, IContainer.Type.READ, null);
    int numStreams = container.getNumStreams();


    IStreamCoder videoCoder = null;
    for(int i = 0; i < numStreams; i++)
    {
       IStream stream = container.getStream(i);
       // Get the pre-configured decoder that can decode this stream;
       IStreamCoder coder = stream.getStreamCoder();
       if(coder.getCodecType() == ICodec.Type.CODEC_TYPE_VIDEO)
       {
           System.out.println("coder");
       }
       videoCoder = coder;
    }

    // The timebase here is used as the camera frame rate    
    videoCoder.setTimeBase(IRational.make(25,1));

    // we need to tell the driver what video with and height to use
    videoCoder.setWidth(352);
    videoCoder.setHeight(288);

    if(videoCoder.open(null , null) < 0){
       System.err.println("Could not open video decoder for input container");
       return;
    }
    //      videoCoder.setFlag(IStreamCoder.Flags.FLAG_QSCALE,true);
    //      videoCoder.setFlag(IStreamCoder.Flags.FLAG2_FAST,true);

    IPacket packet = IPacket.make();
    //      long firstTimestampInStream = Global.NO_PTS;
    //      long systemClockStartTime = 0;
    int complete = 1;


    while(container.readNextPacket(packet) >= 0){
       int trys= 1;
       System.out.println("PCK = ");
       while(true)
       {
           trys++;
           System.out.println("trys = " + trys);
           System.out.println("packet " + packet.getSize());
           IVideoPicture picture = IVideoPicture.make(videoCoder.getPixelType(), videoCoder.getWidth(), videoCoder.getHeight());


           //TODO
           int offset = 0;
           while(offset < packet.getSize())
           {
               /*
                * Now, we decode the video, checking for any errors.
                *
                */
               System.out.println("packet getTimeBase " + packet.getTimeBase());
               System.out.println("vc getTimeBase " + videoCoder.getTimeBase());
               System.out.println("vc getCodecID " + videoCoder.getCodecID().toString());
               int bytOffset = videoCoder.decodeVideo(picture, packet, offset);
               Logger.getLogger(VideoSamsung.class.getName()).log(Level.SEVERE,"bytOffset =  " + bytOffset);

               if(bytOffset < 0){
                   //                  videoCoder.close();
                   //                  //                  picture.setComplete(true, com.xuggle.xuggler.IPixelFormat.Type.YUV420P, 352, 288, packet.getPts());
                   //                  System.err.println("picture.isComplete()"+picture.isComplete());
                   //                                      BufferedImage sdf = Utils.videoPictureToImage(picture);
                   //                                      File outputfile = new File("c://sdf/image.jpg");
                   //                                      ImageIO.write(sdf, "jpg", outputfile);
                   Logger.getLogger(VideoSamsung.class.getName()).log(Level.SEVERE,"BUMMMMMM!!!!!!!!!!!!!!!!!!!");
                   break;
               }else{
                   //System.out.println(DatatypeConverter.printBase64Binary(videoCoder.getExtraData().getByteArray(0, videoCoder.getExtraData().getSize())));
               }
               offset += bytOffset;
               System.err.println("picture.isComplete()"+picture.isComplete());

               /*
                * Some decoders will consume data in a packet, but will not be able to construct
                * a full video picture yet.  Therefore you should always check if you
                * got a complete picture from the decoder
                */

           }//end while(offset < packet.getSize())

           if (picture.isComplete())
           {
               System.out.println("isComplete");
               IVideoPicture newPic = picture;
               BufferedImage sdf = Utils.videoPictureToImage(picture);
               File outputfile = new File("c://sdf/image_"+complete+".jpg");
               ImageIO.write(sdf, "jpg", outputfile);
               complete++;
               System.out.println("trys = " + trys);
               break;
               //              System.exit(0);
           }else{
               System.out.println("Picture is not Complete");
           }

           if(trys > 20){
               System.out.println("FAIL!!!!!!!!!!  trys = " + trys);
               break;
           }
       }
    }
    /*
    * Technically since we're exiting anyway, these will be cleaned up by
    * the garbage collector... but because we're nice people and want
    * to be invited places for Christmas, we're going to show how to clean up.
    */
    if (videoCoder != null)
    {
       videoCoder.close();
       videoCoder = null;
    }
    if (container !=null)
    {
       container.close();
       container = null;
    }

    the console output :

       PCK =
    trys = 2
    packet 1748
    packet getTimeBase 1/1200000
    vc getTimeBase 25/1
    vc getCodecID CODEC_ID_H264
    Nov 18, 2015 5:39:11 PM filepath main
    SEVERE: bytOffset =  1748
    Picture is not Complete
    trys = 3
    packet 1748
    packet getTimeBase 1/1200000
    vc getTimeBase 25/1
    vc getCodecID CODEC_ID_H264
    picture.isComplete()false
    Nov 18, 2015 5:39:11 PM filepath main
    SEVERE: bytOffset =  1748
    Picture is not Complete
    picture.isComplete()false
    trys = 4
    packet 1748
    packet getTimeBase 1/1200000
    vc getTimeBase 25/1
    vc getCodecID CODEC_ID_H264
    Nov 18, 2015 5:39:11 PM filepath main
    SEVERE: bytOffset =  1748
    picture.isComplete()false
    Picture is not Complete
    trys = 5
    packet 1748
    packet getTimeBase 1/1200000
    vc getTimeBase 25/1
    vc getCodecID CODEC_ID_H264
    Nov 18, 2015 5:39:11 PM filepath main
    SEVERE: bytOffset =  1748
    picture.isComplete()false
    Picture is not Complete
    trys = 6
    packet 1748
    packet getTimeBase 1/1200000
    vc getTimeBase 25/1
    vc getCodecID CODEC_ID_H264
    Nov 18, 2015 5:39:11 PM filepath main
    SEVERE: bytOffset =  1748
    picture.isComplete()false
    Picture is not Complete
    trys = 7
    packet 1748
    packet getTimeBase 1/1200000
    vc getTimeBase 25/1
    vc getCodecID CODEC_ID_H264
    Nov 18, 2015 5:39:11 PM filepath main
    SEVERE: bytOffset =  1748
    picture.isComplete()false
    Picture is not Complete
    trys = 8
    packet 1748
    packet getTimeBase 1/1200000
    vc getTimeBase 25/1
    vc getCodecID CODEC_ID_H264
    Nov 18, 2015 5:39:11 PM filepath main
    SEVERE: bytOffset =  1748
    picture.isComplete()false
    Picture is not Complete
    trys = 9
    packet 1748
    packet getTimeBase 1/1200000
    vc getTimeBase 25/1
    vc getCodecID CODEC_ID_H264
    Nov 18, 2015 5:39:11 PM filepath main
    SEVERE: bytOffset =  1748
    picture.isComplete()false
    Picture is not Complete
    trys = 10
    packet 1748
    packet getTimeBase 1/1200000
    vc getTimeBase 25/1
    vc getCodecID CODEC_ID_H264
    Nov 18, 2015 5:39:11 PM filepath main
    SEVERE: bytOffset =  1748
    picture.isComplete()true
    isComplete
    trys = 10
  • Anomalie #4543 (Nouveau) : Accessibilité des chargements ajax (live regions)

    2 septembre 2020, par nicod _

    Suite à un audit de site par Temesis, il remonte que les attributs aria qu’on utilise sont mal placés.

    Je cite :

    Il semble qu’il y a un problème plus global avec l’utilisation des live region :
    Je rencontre à nouveau le div englobant div.ariaformprop qui possèdent les attributs

    aria-live
    aria-atomic
    aria-relevant

    Cette utilisation de ces attributs est erronée :

    elle ne donne pas le résultat probablement attendu
    le support d’aria-relevant dans les assistances technologiques n’est pas assuré

    Il est donc nécessaire de ne pas utiliser de live region sur une div englobante comme là.
    Il faut supprimer ces attributs et utiliser aria-live et aria-atomic avec parcimonie.

    J’ai regardé l’exemple que tu donnes sur spip.net également.

    L’exemple était : https://www.spip.net/spip.php?page=recherche&recherche=plugin&debut_articles=0#pagination_articles

    Cette prolifération d’aria-live + aria-atomic part probablement d’un bon sentiment, mais comme parfois avec l’accessibilité, le mieux est l’ennemi du bien.

    En positionnant ces attributs, avec ces valeurs, sur des div englobantes, cela génère dans les lecteurs d’écran la lecture automatique des contenus qui ont été mis à jour.

    Certes la lecture peut être interrompue par l’utilisateur, mais cela revient, à mon avis à imposer quelque chose qui n’a pas été forcément souhaité. De cette manière le propriétaire du site impose une expérience différente aux utilisateurs de lecteur d’écran.
    Ensuite, il faut bien entendu prendre en compte le contexte. Il pourrait arriver que ce comportement soit pertinent. Ce n’est pas le cas ici.

    Dans le cas de rechargement ajax, il faut étudier chaque cas et son contexte, mais le plus souvent le principe est :

    Ne pas utiliser ces attributs lorsqu’il n’y a pas d’interactions / rechargement ajax . Exemple sur un formulaire, cela n’a pas de sens : on rempli un form et puis on valide le form. A priori (si j’ai bien compris le fonctionnement) il n ’y a aucune raison d’utiliser de live region. En théorie, la présence de ces attributs s’il n’y a pas de rechargement ne devrait pas gêner. Mais certains lecteurs d’écran peuvent prendre des libertés par rapport aux spécifications et vocaliser des contenus tout de même. C’est pourquoi il faut être parcimonieux.

    Lorsqu’ils sont utiles et nécessaires, utiliser ces attributs pour informer d’un changement. Exemple : donner le nouveau nombre de résultats après utilisation de filtre. Mais il faut bien penser que dans plusieurs cas ils ne sont pas nécessaires, en effet, un bouton d’action doit être explicite avant qu’on appuie dessus. Donc par exemple : lorsque je demande à afficher la page 2 dans une pagination de résultat, il n’y a pas d’info à vocaliser automatiquement, le fait que le bouton dise "afficher la page 2" est suffisant, il serait superflu, voire gênant d’aller plus loin dans ce qui est vocalisé.

    Enfin, il faut gérer le focus clavier. Cet aspect est essentiel dès qu’il y a des interactions ajax, mais il dépend totalement du contexte. Et cet aspect est indépendant de la nécessité d’utiliser les live regions. Exemple : dans une série de filtre on va laisser le focus sur le filtre pour que l’utilisateur puisse parcourir la série de filtre. A contrario, dans une pagination (ou quand on a un bouton de type "afficher plus d’articles", dans des news ou dans une page de produits pour un site de e-commerce) on va déplacer le focus sur le 1er nouveau élément qui vient de s’afficher (la zone qui a été mise à jour).

  • ClickOnce Deployment looking for manifest signature on an nuget sourced .exe (FFMPEG #) as if it is a .csproj output. Deployment fails

    9 octobre 2019, par M_Ryce

    I have a C# forms app which utilizes the nuget package "FFMPEG Sharp" (Nuget Github) to generate video from a sequence of images.

    Unlike most nuget packages which simply pull in a .dll, installing FFMPEG Sharp places an "FFMPEG" folder into the .csproj root directory, in addition to bringing the appropriate .dll into "packages"

    Inside this folder are a few FFMPEG artifacts and a /bin folder containing FFMPEG executables. According to the project’s Github readme, this /bin directory needs to be specified in the app.config.

    From Github Readme example :

    <appsettings>
     <add key="ffmpegRoot" value="C:\ffmpeg\bin\"></add>
    </appsettings>`

    Adjusting the above to work in alignment with the default location Nuget placed the dependency artifacts :

    <appsettings>
     <add key="ffmpegRoot" value="..\..\FFMPEG\bin"></add>
    </appsettings>`

    Everything related to this dev effort has been smooth sailing, until I tried to utilize the existing Clickonce deployment for the app. The FFMPEG folder in my .csproj root wasn’t making it to the build output and therefore the application’s call to the FFMPEG .exe was throwing a null reference error. Understandable result, given that I had not set up any method of ensuring the FFMPEG artifacts made it to the build output with the same folder structure as existed on my local dev box.

    To counter this, I set a POST-build command to XCOPY....

    XCOPY "$(SolutionDir)MyApp\FFMPEG" "$(TargetDir)FFMPEG" /S /Y /I

    ...the nuget-provisioned FFMPEG artifacts into the build output root, and adjusted the config setting accordingly (see below)

    <appsettings>
     <add key="ffmpegRoot" value=".\FFMPEG\bin"></add>
    </appsettings>`

    This worked like a dream when building/running locally. The XCOPY succeeded in placing FFMPEG folder contents into the compiled solution’s Debug/Release bin and the updated config referenced them. No errors.

    Attempting to deploy with the .NET ClickOnce tool has created a rather befuddling error though.

    (Apologies for formatting ugliness below. I tried but didn’t succeed. The important parts are in bold)

    ERROR SUMMARY
    Below is a summary of the errors, details of these errors are listed later in the log.
    Activation of https://MySite/MyApp/Install/MyApp.application resulted in exception. Following failure messages were detected :
    + Downloading https://MySite/MyApp/Install/Application Files/MyApp/FFMPEG/bin/x86/ffmpeg.exe.deploy did not succeed.
    + The remote server returned an error : (404) Not Found.

    COMPONENT STORE TRANSACTION FAILURE SUMMARY
    No transaction error was detected.
    WARNINGS
    The manifest for this application does not have a signature. Signature validation will be ignored.
    * The manifest for this application does not have a signature. Signature validation will be ignored.
    OPERATION PROGRESS STATUS
    * [10/8/2019 2:03:37 PM] : Activation of https://MySite/MyApp/Install/MyApp.application has started.
    * [10/8/2019 2:03:37 PM] : Processing of deployment manifest has successfully completed.
    * [10/8/2019 2:03:37 PM] : Installation of the application has started.
    * [10/8/2019 2:03:37 PM] : Processing of application manifest has successfully completed.
    * [10/8/2019 2:03:40 PM] : Found compatible runtime version 4.0.30319.
    * [10/8/2019 2:03:40 PM] : Request of trust and detection of platform is complete.
    ERROR DETAILS
    Following errors were detected during this operation.
    * [10/8/2019 2:03:40 PM] System.Deployment.Application.DeploymentDownloadException (Unknown subtype)
    - Downloading https://MySite/MyApp/Install/Application Files/MyApp/FFMPEG/bin/x86/ffmpeg.exe.deploy did not succeed.*

    ...

    My interpretation of this is that the ClickOnce deployment is treating the Nuget-sourced .exe’s as if they are compiled code from this very project, and checking for a signed manifest.

    This ClickOnce deployment was not set up by me, and had not needed to account for such external artifacts existing in the output previously. I do not believe turning off signed assemblies is an option for me, for security reasons.

    Is there a way to make ClickOnce deployments ignore a specific .exe when checking for signed manifests ? I think the "correct" intended usage is for FFMPEG to be pre-installed on the machine as a stand-alone application, but This is not an option for me at this time. I will need FFMPEG to be brought in by the ClickOnce.