Recherche avancée

Médias (1)

Mot : - Tags -/Rennes

Autres articles (54)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

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

  • Ajouter notes et légendes aux images

    7 février 2011, par

    Pour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
    Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
    Modification lors de l’ajout d’un média
    Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...)

Sur d’autres sites (10427)

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

  • FFMPEG avi to streaming mp4

    29 mai 2013, par Vprnl

    I'm trying to get ffmpeg to encode various AVI files to mp4 for streaming purposes but my inexperience with the subject matter is making me doubt I'll ever get this to work.

    I use this commandline :

    ffmpeg -i test.avi -vcodec libx264 -r 24 -ac 2 -acodec ac3 -ab 128k -bt 240k -preset    fast -strict -2 -b:v 320K -bufsize 62000 -maxrate 62000 -movflags frag_keyframe+empty_moov test.mp4

    I use the " -movflags frag_keyframe+empty_moov" to make it possible to serve a fragmented mp4

    And this is the log I get :

       file conversion error ffmpeg version N-53577-gced0307 Copyright (c) 2000-2013 the FFmpeg developers
         built on May 28 2013 12:21:54 with gcc 4.7.3 (GCC)
         configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0
       r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetype --enable-libgsm --enable-libil
       bc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus -
       -enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvo-aacenc
        --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib
         libavutil      52. 34.100 / 52. 34.100
         libavcodec     55. 12.100 / 55. 12.100
         libavformat    55.  7.100 / 55.  7.100
         libavdevice    55.  1.101 / 55.  1.101
         libavfilter     3. 72.100 /  3. 72.100
         libswscale      2.  3.100 /  2.  3.100
         libswresample   0. 17.102 /  0. 17.102
         libpostproc    52.  3.100 / 52.  3.100
       [avi @ 002ce8c0] non-interleaved AVI
       Input #0, avi, from 'C:/temp/test.avi':
         Metadata:
           encoder         : MEncoder Sherpya-MT-SVN-r31027-4.2.5
         Duration: 01:15:15.47, start: 0.000000, bitrate: 4798 kb/s
           Stream #0:0: Video: mpeg4 (Simple Profile) (XVID / 0x44495658), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 23.98 tb
       n, 24k tbc
           Stream #0:1: Audio: ac3 ([0] [0][0] / 0x2000), 48000 Hz, 5.1(side), fltp, 640 kb/s
       [libx264 @ 03c57020] max bitrate less than average bitrate, assuming CBR
       [libx264 @ 03c57020] using SAR=1/1
       [libx264 @ 03c57020] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.1 Cache64
       [libx264 @ 03c57020] profile High, level 3.1
       [libx264 @ 03c57020] 264 - core 133 r2334 a3ac64b - H.264/MPEG-4 AVC codec - Copyleft 2003-2013 - http://www.videolan.org/x264.html - op
       tions: cabac=1 ref=2 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=6 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1
        8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=3 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlace
       d=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=1 keyint=250 keyi
       nt_min=24 scenecut=40 intra_refresh=0 rc_lookahead=30 rc=cbr mbtree=1 bitrate=320 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 vbv_m
       axrate=320 vbv_bufsize=62 nal_hrd=none ip_ratio=1.40 aq=1:1.00
       Output #0, mp4, to 'pipe:1':
         Metadata:
           encoder         : Lavf55.7.100
           Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], q=-1--1, 320 kb/s, 12288 tbn, 24
       tbc
           Stream #0:1: Audio: ac3 ([165][0][0][0] / 0x00A5), 48000 Hz, stereo, fltp, 128 kb/s
       Stream mapping:
         Stream #0:0 -> #0:0 (mpeg4 -> libx264)
         Stream #0:1 -> #0:1 (ac3 -> ac3)
       Press [q] to stop, [?] for help
       frame=   37 fps=0.0 q=0.0 size=       1kB time=00:00:01.97 bitrate=   4.7kbits/s
       frame=   41 fps= 36 q=27.0 size=       1kB time=00:00:01.97 bitrate=   4.7kbits/s
       frame=   51 fps= 31 q=22.0 size=       1kB time=00:00:02.49 bitrate=   3.7kbits/s
       frame=   63 fps= 27 q=21.0 size=       1kB time=00:00:02.97 bitrate=   3.1kbits/s
       frame=   82 fps= 29 q=21.0 size=       1kB time=00:00:03.48 bitrate=   2.7kbits/s
       frame=   91 fps= 26 q=21.0 size=       1kB time=00:00:03.99 bitrate=   2.3kbits/s
       frame=  101 fps= 25 q=23.0 size=       1kB time=00:00:04.47 bitrate=   2.1kbits/s
       frame=  114 fps= 25 q=21.0 size=       1kB time=00:00:04.98 bitrate=   1.9kbits/s
       frame=  128 fps= 25 q=26.0 size=       1kB time=00:00:05.46 bitrate=   1.7kbits/s
       frame=  135 fps= 24 q=38.0 size=       1kB time=00:00:05.97 bitrate=   1.6kbits/s
       frame=  141 fps= 23 q=45.0 size=       1kB time=00:00:05.97 bitrate=   1.6kbits/s

    I hope someone can point me in the right direction. The goal is to serve the file to a html5 player. But sadly that has not yet worked.
    Thanks !

    [EDIT]

    Sorry if I'm being unclear. I have two issues. First FFMPEG gives me an error (as you can see in the log) but I'm uncertain why I get this error and secondly, the stream does not actually work. The tanscoding starts, but the player never receives the video

  • How to convert any type of video in mp4

    23 décembre 2016, par Ankit Aneja

    I’m using meteor with blaze for development of web-app. I have used html 5 video tag for play video in browser. other types like mp4 and m4v is working fine in all browser but MOV format file is not play in any browser.

    So I think to convert MOV to mp4 before upload.

    Anyone have any idea about convert video before upload using js or meteor. OR any other way we can play MOV type video in any browser