Recherche avancée

Médias (1)

Mot : - Tags -/lev manovitch

Autres articles (55)

  • MediaSPIP en mode privé (Intranet)

    17 septembre 2013, par

    À partir de la version 0.3, un canal de MediaSPIP peut devenir privé, bloqué à toute personne non identifiée grâce au plugin "Intranet/extranet".
    Le plugin Intranet/extranet, lorsqu’il est activé, permet de bloquer l’accès au canal à tout visiteur non identifié, l’empêchant d’accéder au contenu en le redirigeant systématiquement vers le formulaire d’identification.
    Ce système peut être particulièrement utile pour certaines utilisations comme : Atelier de travail avec des enfants dont le contenu ne doit pas (...)

  • Formulaire personnalisable

    21 juin 2013, par

    Cette page présente les champs disponibles dans le formulaire de publication d’un média et il indique les différents champs qu’on peut ajouter. Formulaire de création d’un Media
    Dans le cas d’un document de type média, les champs proposés par défaut sont : Texte Activer/Désactiver le forum ( on peut désactiver l’invite au commentaire pour chaque article ) Licence Ajout/suppression d’auteurs Tags
    On peut modifier ce formulaire dans la partie :
    Administration > Configuration des masques de formulaire. (...)

  • Les formats acceptés

    28 janvier 2010, par

    Les commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
    ffmpeg -codecs ffmpeg -formats
    Les format videos acceptés en entrée
    Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
    Les formats vidéos de sortie possibles
    Dans un premier temps on (...)

Sur d’autres sites (7306)

  • How to Manage User Uploaded Content and Storage

    6 novembre 2014, par Ben

    I’m building an app in PHP (Laravel 4 framework) where a teacher in their account can create a digital lesson for a student. Digital lessons can contain the following content :

    • Text (text from form, .doc, .txt, .pdf, etc.)
    • Images (.gif, .png, .jpg etc.)
    • Video (.avi, .mov, .mp4, etc.)
    • Audio (.mp3, etc.)

    Raw text entered from forms can obviously be stored in the DB against the lesson_id. All the other content formats will need to be stored somewhere, where I can manage and read the files, as well as keep track of the teachers storage total as I plan to bill for storage thresholds at 5GB, 10GB etc.

    On the create a lesson page, content files need to be uploaded as lesson attachments before the lesson is saved, so a teacher can visually see all the lessons content, and then hit save to create the lesson instantly.

    Here’s what I’ve come up with :

    1. Upload all lesson file attachments to AWS S3 to the teachers dedicated bucket, before the lesson is created. Add the teachers ID and date time to each filename.

    2. Force all uploaded video / audio files to be converted to .mp4, .mp3, etc. if they are not in an iDevice friendly format or they exceed a file size limit. Use FFmpeg to do this.

    3. When the lesson is saved and created, record the S3 file URL’s against the lesson ID in the DB.

    4. If the lesson has not been created after a specific period of time, run a cron job to check for uploaded S3 files with no lesson and delete them.

    I am unsure what is the best way to solve this problem as user uploaded content management is really new to me.

    What do you think of this approach ? Can you recommend an improved or better way to solve this problem ?

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

  • mediastreamvalidator "Error injecting segment data" and Can't deal with multiple sample timings per sample buffer

    18 août 2016, par Dathan Vance Pattishall

    So using ffmpeg

    /usr/local/bin/ffmpeg -i track.m4a -vn -c:a aac -b:a 192k  -f segment -segment_list 93_jrf2niqb7n2s8pzjopkqvbbw1wmzz3foqrsa93bm.m3u8 -segment_time 120 -segment_format_options movflags=faststart  93_jrf2niqb7n2s8pzjopkqvbbw1wmzz3foqrsa93bm.%03d.m4a

    a playlist file is created where

    #EXTM3U
    #EXT-X-VERSION:3
    #EXT-X-MEDIA-SEQUENCE:0
    #EXT-X-ALLOW-CACHE:YES
    #EXT-X-TARGETDURATION:121
    #EXTINF:120.000726,
    93_jrf2niqb7n2s8pzjopkqvbbw1wmzz3foqrsa93bm.000.m4a
    #EXTINF:119.883175,
    93_jrf2niqb7n2s8pzjopkqvbbw1wmzz3foqrsa93bm.001.m4a
    #EXT-X-ENDLIST

    Then using mediastreamvalidator I get the following output which leads me to believe there are errors which I have no idea how to fix. I am assuming that ffmpeg is jacking up the segmenting.

    mediastreamvalidator http://**OMIT**/AMP/1/92_y7lu9u1qy5wsw2fqn61mankqof7lkuu5qvk7asv5.m3u8
    mediastreamvalidator: Version 1.2(160525)

    [/AMP/1/92_y7lu9u1qy5wsw2fqn61mankqof7lkuu5qvk7asv5.m3u8] Started root playlist download
    [/AMP/1/92_y7lu9u1qy5wsw2fqn61mankqof7lkuu5qvk7asv5.m3u8] Started media playlist download
    Error injecting segment data
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    Can't deal with multiple sample timings per sample buffer
    [/AMP/1/92_y7lu9u1qy5wsw2fqn61mankqof7lkuu5qvk7asv5.m3u8] All media files delivered and have end tag, stopping

    --------------------------------------------------------------------------------
    http://**OMIT**/AMP/1/92_y7lu9u1qy5wsw2fqn61mankqof7lkuu5qvk7asv5.m3u8
    --------------------------------------------------------------------------------
    Processed 1 out of 2 segments
    Average segment duration: 119.941950
    Total segment bitrates (all discontinuities): average: 130.88 kb/s, max: 131.25 kb/s


    Discontinuity: sequence: 0, parsed segment count: 1 of 2, duration: 239.884 sec, average: 130.88 kb/s, max: 131.25 kb/s
    Track ID: 1
    Audio Codec: AAC-LC
    Audio sample rate: 44100 Hz
    Audio channel layout: Stereo (L R)

    So, my question is what is "Error injecting segment data" and "Can’t deal with multiple sample timings per sample buffer" and why is the segment messed up ?