Recherche avancée

Médias (1)

Mot : - Tags -/publier

Autres articles (32)

  • Installation en mode ferme

    4 février 2011, par

    Le mode ferme permet d’héberger plusieurs sites de type MediaSPIP en n’installant qu’une seule fois son noyau fonctionnel.
    C’est la méthode que nous utilisons sur cette même plateforme.
    L’utilisation en mode ferme nécessite de connaïtre un peu le mécanisme de SPIP contrairement à la version standalone qui ne nécessite pas réellement de connaissances spécifique puisque l’espace privé habituel de SPIP n’est plus utilisé.
    Dans un premier temps, vous devez avoir installé les mêmes fichiers que l’installation (...)

  • Multilang : améliorer l’interface pour les blocs multilingues

    18 février 2011, par

    Multilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
    Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela.

  • De l’upload à la vidéo finale [version standalone]

    31 janvier 2010, par

    Le chemin d’un document audio ou vidéo dans SPIPMotion est divisé en trois étapes distinctes.
    Upload et récupération d’informations de la vidéo source
    Dans un premier temps, il est nécessaire de créer un article SPIP et de lui joindre le document vidéo "source".
    Au moment où ce document est joint à l’article, deux actions supplémentaires au comportement normal sont exécutées : La récupération des informations techniques des flux audio et video du fichier ; La génération d’une vignette : extraction d’une (...)

Sur d’autres sites (5795)

  • Revision 663916cea7 : SVC improvements These changes were originally made in the Stratacaster team-re

    12 octobre 2013, par Ivan Maltz

    Changed Paths :
     Modify /libs.mk


     Add /test/svc_test.cc


     Modify /test/test.mk


     Modify /vp9/common/vp9_onyx.h


     Modify /vp9/encoder/vp9_onyx_if.c


     Modify /vp9/vp9_cx_iface.c


     Modify /vp9_spatial_scalable_encoder.c


     Modify /vpx/exports_enc


     Add /vpx/src/svc_encodeframe.c


     Add /vpx/svc_context.h


     Modify /vpx/vp8cx.h


     Modify /vpx/vpx_codec.mk



    SVC improvements

    These changes were originally made in the Stratacaster team-review repository

    commit e114bffcd82ad74c3696ec58e13c0ac895d6c82d
    Author : Charles 'Buck' Krasic <ckrasic@google.com>
    Date : Mon Oct 14 16:52:13 2013 -0700

    Make dummy frame handling a bit more explicit, fixing bug
    with single layer encodes.

    Squashed commit of the following :

    commit 1ebbfd976c0fadb02bf1ea562a2d0e3f0206daad
    Merge : ac468dd 54e88b7
    Author : Ivan Maltz <ivanmaltz@google.com>
    Date : Fri Oct 11 17:29:58 2013 -0700

    Move SVC code from vp9_spatial_scalable_encoder to libvpx module accessible
    from ffmpeg

    commit 54e88b78b160becc9569fc3c6cb6b0a8c95dc357
    Author : Ivan Maltz <ivanmaltz@google.com>
    Date : Tue Oct 8 09:08:40 2013 -0700

    common svc encoding code for sample app and ffmpeg

    added svc_encodeframe.c, svc_context.h, svc_test.cc

    vp9_spatial_scalable_encoder uses vpx_svc_encode

    commit 5616ec8e2e3d3e8d277333d8a9242f6c70151162
    Merge : 4528014 e29137d
    Author : Ivan Maltz <ivanmaltz@google.com>
    Date : Tue Oct 8 08:47:58 2013 -0700

    Merge branch 'master' into stratacaster

    commit 45280148450b1f3d61e390df8aadedf85cd5bce1
    Merge : bb2b675 1ab60f7
    Author : Sujeevan Rajayogam <sujee@google.com>
    Date : Fri Oct 4 10:22:31 2013 -0700

    Merge branch 'master' into stratacaster

    commit bb2b675e595dc9bfc8551e963edf56800c3aea61
    Author : Sujeevan Rajayogam <sujee@google.com>
    Date : Wed Oct 2 12:37:26 2013 -0700

    Track individual frame sizes and psnrs instead of averages.

    commit c6d303b714795c81e7ceb4173967115c9f8ff5b7
    Merge : fa87df9 3583087
    Author : Sujeevan Rajayogam <sujee@google.com>
    Date : Fri Sep 27 10:05:35 2013 -0700

    Merge branch 'master' into stratacaster

    commit fa87df94fba923d9f7aeb8ae20c6e15f777e00b5
    Merge : bf22d71 3c465af
    Author : Sujeevan Rajayogam <sujee@google.com>
    Date : Thu Sep 26 16:10:31 2013 -0700

    Merge branch 'master' into stratacaster

    commit bf22d7144895a82e0c348ac177c8a261b9e2b88e
    Author : Sujeevan Rajayogam <sujee@google.com>
    Date : Thu Sep 26 11:10:34 2013 -0700

    Parameterized quantizer, 16th scalefactors, more logging, enabled single
    layer encodes to generate baseline.

    commit ceffd7e6025b765f9886b5ea0f324248aa37e327
    Author : Sujeevan Rajayogam <sujee@google.com>
    Date : Thu Sep 19 10:04:49 2013 -0700

    - Include new mode for 3 layer I frame with 5 total layers.
    - Refactor svc api.

    Change-Id : Ie4d775e21e006fa597d884c59488dc999478e9b5

  • Realtime video conversion using nodejs and ffmpeg

    2 février 2015, par LadislavM

    I’m trying to create very simple server-side video conversion using ffmpeg and nodejs.
    So far, I have 2 UDP servers, one for converting video input and second one for listening for converted video and passing it to websocket.

    I’ve created one UDP server, where stream comes, converts the video input by calling ffmpeg. Then the second UDP server get the converted video and pass it to the websocket server to stream video to browser.

    The problem is probably with input into the ffmpeg. The error I get is

    _stream_readable.js:476
     dest.on('unpipe', onunpipe);
          ^
    TypeError: Object

    The code looks like this :

    // Websocket Server
    var socketServer = new (require('ws').Server)({port: 8081});
    socketServer.on('connection', function(socket) {
       socket.on('close', function(code, message){
           console.log( 'Disconnected WebSocket ('+socketServer.clients.length+' total)' );
       });
    });

    socketServer.broadcast = function(data, opts) {
       for( var i in this.clients ) {
           this.clients[i].send(data, opts);
       }
    };

    // UDP Server
    var udpServer = require("dgram").createSocket("udp4");

    udpServer.on("message", function(msg, rinfo) {
       socketServer.broadcast(msg, {binary:true});
       console.log("server got: " + msg + " from " + rinfo.address + ":" + rinfo.port);
    });

    udpServer.on("listening", function() {
       var address = udpServer.address();
       console.log("server listening " + address.address + ":" + address.port);
    });
    udpServer.bind(8082);

    // UDP Server for stream conversion
    var udpServer2 = require("dgram").createSocket("udp4");

    udpServer2.on("message", function(msg, rinfo) {
       // **********  THIS IS WHERE ERROR OCCURS **************
       var ffmpeg = require('child_process')
               .spawn('ffmpeg',['-f','video4linux2','-i','-','-f','mpeg1video','udp://127.0.0.1:8082']);
       ffmpeg.stdin.pipe(msg);
    });

    udpServer2.on("listening", function() {
       var address = udpServer2.address();
       console.log("server listening " + address.address + ":" + address.port);
    });
    udpServer2.bind(8083);
  • Translating Return To Ringworld

    17 août 2016, par Multimedia Mike — Game Hacking

    As indicated in my previous post, the Translator has expressed interest in applying his hobby towards another DOS adventure game from the mid 1990s : Return to Ringworld (henceforth R2RW) by Tsunami Media. This represents significantly more work than the previous outing, Phantasmagoria.


    Return to Ringworld Title Screen
    Return to Ringworld Title Screen

    I have been largely successful thus far in crafting translation tools. I have pushed the fruits of these labors to a Github repository named improved-spoon (named using Github’s random name generator because I wanted something more interesting than ‘game-hacking-tools’).

    Further, I have recorded everything I have learned about the game’s resource format (named RLB) at the XentaxWiki.

    New Challenges
    The previous project mostly involved scribbling subtitle text on an endless series of video files by leveraging a separate software library which took care of rendering fonts. In contrast, R2RW has at least 30k words of English text contained in various blocks which require translation. Further, the game encodes its own fonts (9 of them) which stubbornly refuse to be useful for rendering text in nearly any other language.

    Thus, the immediate 2 challenges are :

    1. Translating volumes of text to Spanish
    2. Expanding the fonts to represent Spanish characters

    Normally, “figuring out the file format data structures involved” is on the list as well. Thankfully, understanding the formats is not a huge challenge since the folks at the ScummVM project already did all the heavy lifting of reverse engineering the file formats.

    The Pitch
    Here was the plan :

    • Create a tool that can dump out the interesting data from the game’s master resource file.
    • Create a tool that can perform the elaborate file copy described in the previous post. The new file should be bit for bit compatible with the original file.
    • Modify the rewriting tool to repack some modified strings into the new resource file.
    • Unpack the fonts and figure out a way to add new characters.
    • Repack the new fonts into the resource file.
    • Repack message strings with Spanish characters.

    Showing The Work : Modifying Strings
    First, I created the tool to unpack blocks of message string resources. I elected to dump the strings to disk as JSON data since it’s easy to write and read JSON using Python, and it’s quick to check if any mistakes have crept in.

    The next step is to find a string to focus on. So I started the game and looked for the first string I could trigger :


    Return to Ringworld: Original text

    This shows up in the JSON string dump as :

      
        "Spanish" : " !0205Your quarters on the Lance of Truth are spartan, in accord with your mercenary lifestyle.",
        "English" : " !0205Your quarters on the Lance of Truth are spartan, in accord with your mercenary lifestyle."
      ,
    

    As you can see, many of the strings are encoded with an ID key as part of the string which should probably be left unmodified. I changed the Spanish string :

      
        "Spanish" : " !0205Hey, is this thing on ?",
        "English" : " !0205Your quarters on the Lance of Truth are spartan, in accord with your mercenary lifestyle."
      ,
    

    And then I wrote the repacking tool to substitute this message block for the original one. Look ! The engine liked it !


    Return to Ringworld: Modified text

    Little steps, little steps.

    Showing The Work : Modifying Fonts
    The next little step is to find a place to put the new characters. First, a problem definition : The immediate goal is to translate the game into Spanish. The current fonts encoded in the game resource only support 128 characters, corresponding to 7-bit ASCII. In order to properly express Spanish, 16 new characters are required : á, é, í, ó, ú, ü, ñ (each in upper and lower case for a total of 14 characters) as well as the inverted punctuation symbols : ¿, ¡.

    Again, ScummVM already documents (via code) the font coding format. So I quickly determined that each of the 9 fonts is comprised of 128 individual bitmaps with either 1 or 2 bits per pixel. I wrote a tool to unpack each character into an individual portable grey map (PGM) image. These can be edited with graphics editors or with text editors since they are just text files.

    Where to put the 16 new Spanish characters ? ASCII characters 1-31 are non-printable, so my first theory was that these characters would be empty and could be repurposed. However, after dumping and inspecting, I learned that they represent the same set of characters as seen in DOS Code Page 437. So that’s a no-go (so I assumed ; I didn’t check if any existing strings leveraged those characters).

    My next plan was hope that I could extend the font beyond index 127 and use positions 128-143. This worked superbly. This is the new example string :

      
        "Spanish" : " !0205¿Ves esto ? ¡La puntuacion se hace girar !",
        "English" : " !0205Your quarters on the Lance of Truth are spartan, in accord with your mercenary lifestyle."
      ,
    

    Fortunately, JSON understands UTF-8 and after mapping the 16 necessary characters down to the numeric range of 128-143, I repacked the new fonts and the new string :


    Return to Ringworld: Espanol
    Translation : “See this ? The punctuation is rotated !”

    Another victory. Notice that there are no diacritics in this string. None are required for this translation (according to Google Translate). But adding the diacritics to the 14 characters isn’t my department. My tool does help by prepopulating [aeiounAEIOUN] into the right positions to make editing easier for the Translator. But the tool does make the effort to rotate the punctuation since that is easy to automate.

    Next Steps and Residual Weirdness
    There is another method for storing ASCII text inside the R2RW resource called strip resources. These store conversation scripts. There are plenty of fields in the data structures that I don’t fully understand. So, following the lessons I learned from my previous translation outing, I was determined to modify as little as possible. This means copying over most of the original data structures intact, but changing the field representing the relative offset that points to the corresponding string. This works well since the strings are invariably stored NULL-terminated in a concatenated manner.

    I wanted to document for the record that the format that R2RW uses has some weirdness in they way it handles residual bytes in a resource. The variant of the resource format that R2RW uses requires every block to be aligned on a 16-byte boundary. If there is space between the logical end of the resource and the start of the next resource, there are random bytes in that space. This leads me to believe that these bytes were originally recorded from stale/uninitialized memory. This frustrates me because when I write the initial file copy tool which unpacks and repacks each block, I want the new file to be identical to the original. However, these apparent nonsense bytes at the end thwart that effort.

    But leaving those bytes as 0 produces an acceptable resource file.

    Text On Static Images
    There is one last resource type we are working on translating. There are various bits of text that are rendered as images. For example, from the intro :


    Return to Ringworld: Static text

    It’s possible to locate and extract the exact image that is overlaid on this scene, though without the colors :


    Original static text

    The palettes are stored in a separate resource type. So it seems the challenge is to figure out the palette in use for these frames and render a transparent image that uses the same palette, then repack the new text-image into the new resource file.

    The post Translating Return To Ringworld first appeared on Breaking Eggs And Making Omelettes.