
Recherche avancée
Autres articles (42)
-
Des sites réalisés avec MediaSPIP
2 mai 2011, parCette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page. -
HTML5 audio and video support
13 avril 2011, parMediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
For older browsers the Flowplayer flash fallback is used.
MediaSPIP allows for media playback on major mobile platforms with the above (...) -
Support audio et vidéo HTML5
10 avril 2011MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...)
Sur d’autres sites (5316)
-
Approaches To Modifying Game Resource Files
16 août 2016, par Multimedia Mike — Game HackingI have been assisting The Translator in the translation of another mid-1990s adventure game. This one isn’t quite as multimedia-heavy as the last title, and the challenges are a bit different. I wanted to compose this post in order to describe my thought process and mental model in approaching this problem. Hopefully, this will help some others understand my approach since what I’m doing here often appears as magic to some of my correspondents.
High Level Model
At the highest level, it is valuable to understand the code and the data at play. The code is the game’s engine and the data refers to the collection of resources that comprise the game’s graphics, sound, text, and other assets.
Simplistic high-level game engine model
Ideally, we want to change the data in such a way that the original game engine adopts it as its own because it has the same format as the original data. It is very undesirable to have to modify the binary engine executable in any way.
Modifying The Game Data Directly
How to modify the data ? If we modify the text strings for the sake of language translation, one approach might be to search for strings within the game data files and change them directly. This model assumes that the text strings are stored in a plain, uncompressed format. Some games might store these strings in a text format which can be easily edited with any text editor. Other games will store them as binary data.
In the latter situation, a game hacker can scan through data files with utilities like Unix ‘strings’ to find the resources with the desired strings. Then, use a hex editor to edit the strings directly. For example, change “Original String”…
0098F800 00 00 00 00 00 00 00 4F 72 69 67 69 6E 61 6C 20 .......Original 0098F810 53 74 72 69 6E 67 00 00 00 00 00 00 00 00 00 00 String..........
…to “Short String” and pad the difference in string lengths using spaces (0x20) :
0098F800 00 00 00 00 00 00 00 53 68 6F 72 74 20 53 74 72 .......Short Str 0098F810 69 6E 67 20 20 20 00 00 00 00 00 00 00 00 00 00 ing ..........
This has some obvious problems. First, translated strings need to be of equal our smaller length compared to the original. What if we want to encode “Much Longer String” ?
0098F800 00 00 00 00 00 00 00 4D 75 63 68 20 4C 6F 6E 67 .......Much Long 0098F810 65 72 20 53 74 72 00 00 00 00 00 00 00 00 00 00 er Str..........
It won’t fit. The second problem pertains to character set limitations. If the font in use was only designed for ASCII, it’s going to be inadequate for expressing nearly any other language.
So a better approach is needed.
Understanding The Data Structures
An alternative to the approach outlined above is to understand the game’s resources so they can be modified at a deeper level. Here’s a model to motivate this investigation :
Model of the game resource archive format
This is a very common layout for such formats : there is a file header, a sequence of resource blocks, and a trailing index which describes the locations and types of the foregoing blocks.
What use is understanding the data structures ? In doing so, it becomes possible to write new utilities that disassemble the data into individual pieces, modify the necessary pieces, and then reassemble them into a form that the original game engine likes.
It’s important to take a careful, experimental approach to this since mistakes can be ruthlessly difficult to debug (unless you relish the thought of debugging the control flow through an opaque DOS executable). Thus, the very first goal in all of this is to create a program that can disassemble and reassemble the resource, thus creating an identical resource file. This diagram illustrates this complex initial process :
Rewriting the game resource file
So, yeah, this is one of the most complicated “copy file” operations that I can possibly code. But it forms an important basis, since the next step is to carefully replace one piece at a time.
Modifying a specific game resource
This diagram shows a simplistic model of a resource block that contains a series of message strings. The header contains pointers to each of the strings within the block. Instead of copying this particular resource block directly to the new file, a proposed modification utility will intercept it and rewrite the entire thing, writing new strings of arbitrary length and creating an adjusted header which will correctly point to the start of each new string. Thus, translated strings can be longer than the original strings.
Further Work
Exploiting this same approach, we can intercept and modify other game resources including fonts, images, and anything else that might need to be translated. I will explore specific examples in a later blog post.Followup
- Translating Return to Ringworld, in which I apply the ideas expressed in this post.
-
ffmpeg concat : "Unsafe file name"
17 août 2016, par sersTrying to convert a bunch of mts-files into a big mp4-file :
stephan@rechenmonster:/mnt/backupsystem/archive2/Videos/20151222/PRIVATE/AVCHD/BDMV$ ~/bin/ffmpeg-git-20160817-64bit-static/ffmpeg -v info -f concat -i <(find STREAM -name '*' -printf "file '$PWD/%p'\n") -deinterlace -r 25 -s hd720 -c:v libx264 -crf 23 -acodec copy -strict -2 ~/tmp/Videos/20151222.mp4
ffmpeg version N-81364-gf85842b-static http://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 5.4.1 (Debian 5.4.1-1) 20160803
configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --enable-libmp3lame --enable-libx264 --enable-libx265 --enable-libwebp --enable-libspeex --enable-libvorbis --enable-libvpx --enable-libfreetype --enable-fontconfig --enable-libxvid --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvo-amrwbenc --enable-gray --enable-libopenjpeg --enable-libopus --enable-libass --enable-gnutls --enable-libvidstab --enable-libsoxr --enable-frei0r --enable-libfribidi --disable-indev=sndio --disable-outdev=sndio --enable-librtmp --enable-libmfx --enable-libzimg --cc=gcc-5
libavutil 55. 28.100 / 55. 28.100
libavcodec 57. 53.100 / 57. 53.100
libavformat 57. 46.101 / 57. 46.101
libavdevice 57. 0.102 / 57. 0.102
libavfilter 6. 51.100 / 6. 51.100
libswscale 4. 1.100 / 4. 1.100
libswresample 2. 1.100 / 2. 1.100
libpostproc 54. 0.100 / 54. 0.100
[concat @ 0x56054a0] Unsafe file name '/mnt/backupsystem/archive2/Videos/20151222/PRIVATE/AVCHD/BDMV/STREAM'
/dev/fd/63: Operation not permittedAny ideas what goes wrong here ? What does the term "unsafe file" mean in this context ?
Thanks,
Stephan -
Anomalie #3814 : Onglet {Mes articles} erroné en SPIP3.0
9 août 2016, par Olivier DutertreJ’ai effectivement un ensemble de plugins installés, mais j’ai déja pu
évacuer agenda et inscription 2.5 comme source puisqu’un autre
internaute à testé avec ces deux plugins et ne reproduis pas.Le 09/08/2016 21:01, redmine@spip.org a écrit :
La demande #3814 a été mise à jour par Pierre KUHN.
Bonsoir,
Tu utilises des plugins précis pour avoir ce problème ?
Anomalie #3814 : Onglet Mes articles erroné en SPIP3.0
<https://core.spip.net/issues/3814#change-11946>- Auteur : Olivier Dutertre
- Statut : Nouveau
- Priorité : Normal
- Assigné à :
- Catégorie : base de données
- Version cible : 3.0
- Resolution :
- Navigateur :
Je rencontre le soucis avec SPIP 3.0.22 reproduis sur deux versions du
même site (prod et dev). Je n’ai pas eu de réponse sur la liste.
J’ignore si ici est le bon endroit pour signaler ce genre de problème,
alors merci de votre bienveillance.Dans la partie privée, l’onglet /mes articles/ de la page /articles/
affiche des information incorrectes, c’est à dire des article qui ne
sont pas forcément de l’auteur passé en paramètre.En explorant avec le mode debug, voila ce que j’ai découvert :
la boucle telle que prévue initialement est :
Elle donne le code suivant :
SELECT articles.id_article, 0 as points, ’’, articles.titre, articles.statut, articles.id_rubrique, articles.titre AS titre_rang, articles.lang, articles.date, articles.id_rubrique, articles.id_article
FROM info_articles AS `articles`
INNER JOIN info_evenements AS L2 ON ( L2.id_article = articles.id_article )
WHERE (L2.id_auteur = 3)
AND ((articles.statut IN (’prepa’,’publie’,’refuse’,’prepa’)))
GROUP BY articles.id_article
ORDER BY articles.date DESC, articles.titreJe ne comprends pas la raison du recours à la table événements. et j’y
vois une raison des résultats aberrant de la boucleSi par contre Je modifie la boucle avec une jointure :
auteurs_liens)id_article ?id_rubrique ?id_mot ?id_auteur ?where ?statut ?recherche ?tri #ENVpar,date,#GETdefaut_tripar titrepagination #ENVnb,10 !lang_select>
Cela me donne un code plus encourageant :
SELECT articles.id_article, 0 as points, ’’, articles.titre, articles.statut, articles.id_rubrique, articles.titre AS titre_rang, articles.lang, articles.date, articles.id_rubrique, articles.id_article
FROM info_articles AS `articles`
INNER JOIN info_auteurs_liens AS L2 ON ( L2.id_objet = articles.id_article AND L2.objet=’article’)
WHERE (L2.id_auteur = 3)
AND ((articles.statut IN (’prepa’,’publie’,’refuse’,’prepa’)))
GROUP BY articles.id_article
ORDER BY articles.date DESC, articles.titreet surtout le résultat est conforme à mes attentes.
Quelqu’un pourra-t’il éclaircir la raison de ce mystère ?
Vous recevez ce mail car vous êtes impliqués sur ce projet.
Pour changer les préférences d’envoi de mail, allez sur
http://core.spip.org/my/account