
Recherche avancée
Médias (91)
-
MediaSPIP Simple : futur thème graphique par défaut ?
26 septembre 2013, par
Mis à jour : Octobre 2013
Langue : français
Type : Video
-
avec chosen
13 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
sans chosen
13 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
config chosen
13 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
SPIP - plugins - embed code - Exemple
2 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
GetID3 - Bloc informations de fichiers
9 avril 2013, par
Mis à jour : Mai 2013
Langue : français
Type : Image
Autres articles (44)
-
Publier sur MédiaSpip
13 juin 2013Puis-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 -
Organiser par catégorie
17 mai 2013, parDans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...) -
Les tâches Cron régulières de la ferme
1er décembre 2010, parLa gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
Le super Cron (gestion_mutu_super_cron)
Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...)
Sur d’autres sites (5352)
-
Error in converting raw yuv video into mp4
8 décembre 2020, par neetu siggerI am trying to convert raw yuv video into mp4 using ffmpeg.


ffmpeg -f rawvideo -vcodec rawvideo -s 1920x1080 -r 25 -pix_fmt yuv420p -i Beauty_3840x2160_120fps_420_10bit_YUV.yuv -c:v libx264 -preset slow -qp 0 bb/output.mp4



I got an error in video.


ffmpeg -f rawvideo -vcodec rawvideo -s 1920x1080 -r 25 -pix_fmt yuv420p -i Beauty_3840x2160_120fps_420_10bit_YUV.yuv -c:v libx264 -preset slow -qp 0 bb/output.mp4
ffmpeg version 4.2.4-1ubuntu0.1 Copyright (c) 2000-2020 the FFmpeg developers
 built with gcc 9 (Ubuntu 9.3.0-10ubuntu2)
 configuration: --prefix=/usr --extra-version=1ubuntu0.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-nvenc --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
 libavutil 56. 31.100 / 56. 31.100
 libavcodec 58. 54.100 / 58. 54.100
 libavformat 58. 29.100 / 58. 29.100
 libavdevice 58. 8.100 / 58. 8.100
 libavfilter 7. 57.100 / 7. 57.100
 libavresample 4. 0. 0 / 4. 0. 0
 libswscale 5. 5.100 / 5. 5.100
 libswresample 3. 5.100 / 3. 5.100
 libpostproc 55. 5.100 / 55. 5.100
[rawvideo @ 0x7fffe7e28440] Estimating duration from bitrate, this may be inaccurate
Input #0, rawvideo, from 'Beauty_3840x2160_120fps_420_10bit_YUV.yuv':
 Duration: 00:03:12.00, start: 0.000000, bitrate: 622080 kb/s
 Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 1920x1080, 622080 kb/s, 25 tbr, 25 tbn, 25 tbc
File 'bb/output.mp4' already exists. Overwrite ? [y/N] y
Stream mapping:
 Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264))
Press [q] to stop, [?] for help
[libx264 @ 0x7fffe7e35c00] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 0x7fffe7e35c00] profile High 4:4:4 Predictive, level 5.0, 4:2:0 8-bit
[libx264 @ 0x7fffe7e35c00] 264 - core 155 r2917 0a84d98 - H.264/MPEG-4 AVC codec - Copyleft 2003-2018 - http://www.videolan.org/x264.html - options: cabac=1 ref=5 deblock=1:0:0 analyse=0x1:0x111 me=hex subme=8 psy=0 mixed_ref=1 me_range=16 chroma_me=1 trellis=0 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=0 chroma_qp_offset=0 threads=9 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc=cqp mbtree=0 qp=0
Output #0, mp4, to 'bb/output.mp4':
 Metadata:
 encoder : Lavf58.29.100
 Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 1920x1080, q=-1--1, 25 fps, 12800 tbn, 25 tbc
 Metadata:
 encoder : Lavc58.54.100 libx264
 Side data:
 cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
frame= 4800 fps= 16 q=-1.0 Lsize=11907234kB time=00:03:11.96 bitrate=508147.7kbits/s speed=0.646x
video:11907177kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.000485%
[libx264 @ 0x7fffe7e35c00] frame I:2789 Avg QP: 0.00 size:2638070
[libx264 @ 0x7fffe7e35c00] frame P:2011 Avg QP: 0.00 size:2404461
[libx264 @ 0x7fffe7e35c00] mb I I16..4..PCM: 28.0% 0.0% 67.1% 4.9%
[libx264 @ 0x7fffe7e35c00] mb P I16..4..PCM: 5.6% 0.0% 6.2% 0.6% P16..4: 52.9% 23.9% 10.8% 0.0% 0.0% skip: 0.0%
[libx264 @ 0x7fffe7e35c00] 8x8 transform intra:0.0% inter:9.6%
[libx264 @ 0x7fffe7e35c00] coded y,uvDC,uvAC intra: 99.4% 100.0% 100.0% inter: 100.0% 100.0% 100.0%
[libx264 @ 0x7fffe7e35c00] i16 v,h,dc,p: 89% 0% 1% 10%
[libx264 @ 0x7fffe7e35c00] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 65% 0% 0% 0% 0% 0% 0% 0% 35%
[libx264 @ 0x7fffe7e35c00] i8c dc,h,v,p: 1% 0% 94% 4%
[libx264 @ 0x7fffe7e35c00] Weighted P-Frames: Y:31.1% UV:29.3%
[libx264 @ 0x7fffe7e35c00] ref P L0: 21.3% 16.1% 27.4% 14.4% 11.7% 5.5% 3.6%



I am getting the green video.




-
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.
-
Meta Receives a Record GDPR Fine from The Irish Data Protection Commission
29 mai 2023, par Erin — GDPR