Recherche avancée

Médias (1)

Mot : - Tags -/epub

Autres articles (80)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

  • MediaSPIP version 0.1 Beta

    16 avril 2011, par

    MediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • Amélioration de la version de base

    13 septembre 2013

    Jolie sélection multiple
    Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
    Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)

Sur d’autres sites (9867)

  • Subtitling Sierra RBT Files

    2 juin 2016, par Multimedia Mike — Game Hacking

    This is part 2 of the adventure started in my Subtitling Sierra VMD Files post. After I completed the VMD subtitling, The Translator discovered a wealth of animation files in a format called RBT (this apparently stands for “Robot” but I think “Ribbit” format could be more fun). What are we going to do ? We had come so far by solving the VMD subtitling problem for Phantasmagoria. It would be a shame if the effort ground to a halt due to this.

    Fortunately, the folks behind the ScummVM project already figured out enough of the format to be able to decode the RBT files in Phantasmagoria.

    In the end, I was successful in creating a completely standalone tool that can take a Robot file and a subtitle file and create a new Robot file with subtitles. The source code is here (subtitle-rbt.c). Here’s what the final result looks like :


    Spanish refrigerator
    “What’s in the refrigerator ?” I should note at this juncture that I am not sure if this particular Robot file even has sound or dialogue since I was conducting these experiments on a computer with non-working audio.

    The RBT Format
    I have created a new MultimediaWiki page describing the Robot Animation format based on the ScummVM source code. I have not worked with a format quite like this before. These are paletted animations which consist of a sequence of independent frames that are designed to be overlaid on top of static background. Because of these characteristics, each frame encodes its own unique dimensions and origin coordinate within the frame. While the Phantasmagoria VMD files are usually 288×144 (which are usually double-sized for the benefit of a 640×400 Super VGA canvas), these frames are meant to be plotted on a game field that was roughly 576×288 (288×144 doublesized).

    For example, 2 minimalist animation frames from a desk investigation Robot file :


    Robot Animation Frame #1
    100×147

    Robot Animation Frame #2
    101×149

    As for compression, my first impression was that the algorithm was the same as VMD. This is wrong. It evidently uses an unmodified version of a standard algorithm called Lempel-Ziv-Stac (LZS). It shows up in several RFCs and was apparently used in MS-DOS’s transparent disk compression scheme.

    Approach
    Thankfully, many of the lessons I learned from the previous project are applicable to this project, including : subtitle library interfacing, subtitling in the paletted colorspace, and replacing encoded frames from the original file instead of trying to create a new file.

    Here is the pitch for this project :

    • Create a C program that can traverse through an input file, piece by piece, and generate an output file. The result of this should be a bitwise identical file.
    • Adapt the LZS compression decoding algorithm from ScummVM into the new tool. Make the tool dump raw Portable NetMap (PNM) files of varying dimensions and ensure that they look correct.
    • Compress using LZS.
    • Stretch the frames and draw subtitles.
    • More compression. Find the minimum window for each frame.

    Compression
    Normally, my first goal is to decompress the video and store the data in a raw form. However, this turned out to be mathematically intractable. While the format does support both compressed and uncompressed frames (even though ScummVM indicates that the uncompressed path is yet unexercised), the goal of this project requires making the frames so large that they overflow certain parameters of the file.

    A Robot file has a sequence of frames and 2 tables describing the size of each frame. One table describes the entire frame size (audio + video) while the second table describes just the video frame size. Since these tables only use 16 bits to specify a size, the maximum frame size is 65536 bytes. Leaving space for the audio portion of the frame, this only leaves a per-frame byte budget of about 63000 bytes for the video. Expanding the frame to 576×288 (165,888 pixels) would overflow this limit.

    Anyway, the upshot is that I needed to compress the data up front.

    Fortunately, the LZS compressor is pretty straightforward, at least if you have experience writing VLC-oriented codecs. While the algorithm revolves around back references, my approach was to essentially write an RLE encoder. My compressor would search for runs of data (plentiful when I started to stretch the frame for subtitling purposes). When a run length of n=3 or more of the same pixel is found, encode the pixel by itself, and then store a back reference of offset -1 and length (n-1). It took a little while to iron out a few problems, but I eventually got it to work perfectly.

    I have to say, however, that the format is a little bit weird in how it codes very large numbers. The length encoding is somewhat Golomb-like, i.e., smaller values are encoded with fewer bits. However, when it gets to large numbers, it starts encoding counts of 15 as blocks of 1111. For example, 24 is bigger than 7. Thus, emit 1111 into the bitstream and subtract 8 from 23 -> 16. Still bigger than 15, so stuff another 1111 into the bitstream and subtract 15. Now we’re at 1, so stuff 0001. So 24 is 11111111 0001. 12 bits is not too horrible. But the total number of bytes (value / 30). So a value of 300 takes around 10 bytes (80 bits) to encode.

    Palette Slices
    As in the VMD subtitling project, I took the subtitle color offered in the subtitle spec file as a suggestion and used Euclidean distance to match to the closest available color in the palette. One problem, however, is that the palette is a lot smaller in these animations. According to my notes, for the set of animations I scanned, only about 80 colors were specified, starting at palette index 55. I hypothesize that different slices of the palette are reserved for different uses. E.g., animation, background, and user interface. Thus, there is a smaller number of colors to draw upon for subtitling purposes.

    Scaling
    One bit of residual weirdness in this format is the presence of a per-frame scale factor. While most frames set this to 100 (100% scale), I have observed 70%, 80%, and 90%. ScummVM is a bit unsure about how to handle these, so I am as well. However, I eventually realized I didn’t really need to care, at least not when decoding and re-encoding the frame. Just preserve the scale factor. I intend to modify the tool further to take scale factor into account when creating the subtitle.

    The Final Resolution
    Right around the time that I was composing this post, The Translator emailed me and notified me that he had found a better way to subtitle the Robot files by modifying the scripts, rendering my entire approach moot. The result is much cleaner :


    Proper RBT Subtitles
    Turns out that the engine supported subtitles all along

    It’s a good thing that I enjoyed the challenge or I might be annoyed at this point.

    See Also

    The post Subtitling Sierra RBT Files first appeared on Breaking Eggs And Making Omelettes.

  • How can we create a video by merging images with animation and music in php-ffmpeg ? or other way ?

    10 décembre 2016, par Hardik Joshi

    I am looking for some way where you can merge images with animation and music in background same as you see in facebook 2016 year in review video. I am not sure but Is it possible using php-ffmpeg or php video toolkit http://sourceforge.net/projects/phpvideotoolkit/ if yes then how ?
    Thanks

  • Record Webcam as single JPG files [on hold]

    2 décembre 2016, par clic

    I have to record a Windows Directshow Webcam video stream (UHD, 30fps, yuyv422) as single JPG images. Performance is important, so preferably by using NVIDIA GPU acceleration via CUDA or something..

    What is the most simple but powerful solution, without having to buy proprietary software ?

    I had a look at ffmpeg, by recording as MJPEG and then using something like jpegtran to get the JPGs. I tried :

    ffmpeg -f dshow -video_size 1920x1080 -framerate 50 -vcodec mjpeg -i video="XI100DUSB-HDMI Video" out.avi

    But it results in an I/O error saying ’Could not set video options’. Maybe because of the yuyv422 pixel format of my Magewell USB dongles..

    Or is ffmpeg able to record as single JPGs directly somehow ?

    If someone has any other idea/solution besides ffmpeg, please let me know too ! Thanks !

    EDIT :

    I was now able to save JPGs directly, using webcamimg%04d.jpg instead of out.avi. But it’s always claiming about full real-time buffer. Raising the rtbufsize parameter doesn’t really help..

    ffmpeg console output :

    ffmpeg version 3.2 Copyright (c) 2000-2016 the FFmpeg developers
     built with gcc 5.4.0 (GCC)
     configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-libebur128 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-li
    bopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-decklink --enable-zlib
     libavutil      55. 34.100 / 55. 34.100
     libavcodec     57. 64.100 / 57. 64.100
     libavformat    57. 56.100 / 57. 56.100
     libavdevice    57.  1.100 / 57.  1.100
     libavfilter     6. 65.100 /  6. 65.100
     libswscale      4.  2.100 /  4.  2.100
     libswresample   2.  3.100 /  2.  3.100
     libpostproc    54.  1.100 / 54.  1.100
    [dshow @ 0000000001c628a0] Could not set video options
    video=XI100DUSB-HDMI Video: I/O error

    Output of : ffmpeg -list_options true -f dshow -i video="XI100DUSB-HDMI Video"

    [dshow @ 00000000004d71e0] DirectShow video device options (from video devices)
    [dshow @ 00000000004d71e0]  Pin "Capture" (alternative pin name "0")
    [dshow @ 00000000004d71e0]   pixel_format=yuyv422  min s=1920x1080 fps=15 max s=1920x1080 fps=59.9999
    [dshow @ 00000000004d71e0]   pixel_format=yuyv422  min s=1920x1080 fps=15 max s=1920x1080 fps=59.9999
    [dshow @ 00000000004d71e0]   pixel_format=yuyv422  min s=640x360 fps=15 max s=640x360 fps=59.9999
    [dshow @ 00000000004d71e0]   pixel_format=yuyv422  min s=640x360 fps=15 max s=640x360 fps=59.9999
    [dshow @ 00000000004d71e0]   pixel_format=yuyv422  min s=640x480 fps=15 max s=640x480 fps=59.9999
    [dshow @ 00000000004d71e0]   pixel_format=yuyv422  min s=640x480 fps=15 max s=640x480 fps=59.9999
    [dshow @ 00000000004d71e0]   pixel_format=yuyv422  min s=720x480 fps=15 max s=720x480 fps=59.9999
    [dshow @ 00000000004d71e0]   pixel_format=yuyv422  min s=720x480 fps=15 max s=720x480 fps=59.9999
    [dshow @ 00000000004d71e0]   pixel_format=yuyv422  min s=720x576 fps=15 max s=720x576 fps=59.9999
    [dshow @ 00000000004d71e0]   pixel_format=yuyv422  min s=720x576 fps=15 max s=720x576 fps=59.9999
    [dshow @ 00000000004d71e0]   pixel_format=yuyv422  min s=768x576 fps=15 max s=768x576 fps=59.9999
    [dshow @ 00000000004d71e0]   pixel_format=yuyv422  min s=768x576 fps=15 max s=768x576 fps=59.9999
    [dshow @ 00000000004d71e0]   pixel_format=yuyv422  min s=800x600 fps=15 max s=800x600 fps=59.9999
    [dshow @ 00000000004d71e0]   pixel_format=yuyv422  min s=800x600 fps=15 max s=800x600 fps=59.9999
    [dshow @ 00000000004d71e0]   pixel_format=yuyv422  min s=856x480 fps=15 max s=856x480 fps=59.9999
    [dshow @ 00000000004d71e0]   pixel_format=yuyv422  min s=856x480 fps=15 max s=856x480 fps=59.9999
    [dshow @ 00000000004d71e0]   pixel_format=yuyv422  min s=960x540 fps=15 max s=960x540 fps=59.9999
    [dshow @ 00000000004d71e0]   pixel_format=yuyv422  min s=960x540 fps=15 max s=960x540 fps=59.9999
    [dshow @ 00000000004d71e0]   pixel_format=yuyv422  min s=1024x576 fps=15 max s=1024x576 fps=59.9999
    [dshow @ 00000000004d71e0]   pixel_format=yuyv422  min s=1024x576 fps=15 max s=1024x576 fps=59.9999
    [dshow @ 00000000004d71e0]   pixel_format=yuyv422  min s=1024x768 fps=15 max s=1024x768 fps=59.9999
    [dshow @ 00000000004d71e0]   pixel_format=yuyv422  min s=1024x768 fps=15 max s=1024x768 fps=59.9999
    [dshow @ 00000000004d71e0]   pixel_format=yuyv422  min s=1280x720 fps=15 max s=1280x720 fps=59.9999
    [dshow @ 00000000004d71e0]   pixel_format=yuyv422  min s=1280x720 fps=15 max s=1280x720 fps=59.9999
    [dshow @ 00000000004d71e0]   pixel_format=yuyv422  min s=1280x800 fps=15 max s=1280x800 fps=59.9999
    [dshow @ 00000000004d71e0]   pixel_format=yuyv422  min s=1280x800 fps=15 max s=1280x800 fps=59.9999
    [dshow @ 00000000004d71e0]   pixel_format=yuyv422  min s=1280x960 fps=15 max s=1280x960 fps=59.9999
    [dshow @ 00000000004d71e0]   pixel_format=yuyv422  min s=1280x960 fps=15 max s=1280x960 fps=59.9999
    [dshow @ 00000000004d71e0]   pixel_format=yuyv422  min s=1280x1024 fps=15 max s=1280x1024 fps=59.9999
    [dshow @ 00000000004d71e0]   pixel_format=yuyv422  min s=1280x1024 fps=15 max s=1280x1024 fps=59.9999
    [dshow @ 00000000004d71e0]   pixel_format=yuyv422  min s=1368x768 fps=15 max s=1368x768 fps=59.9999
    [dshow @ 00000000004d71e0]   pixel_format=yuyv422  min s=1368x768 fps=15 max s=1368x768 fps=59.9999
    [dshow @ 00000000004d71e0]   pixel_format=yuyv422  min s=1440x900 fps=15 max s=1440x900 fps=59.9999
    [dshow @ 00000000004d71e0]   pixel_format=yuyv422  min s=1440x900 fps=15 max s=1440x900 fps=59.9999
    [dshow @ 00000000004d71e0]   pixel_format=yuyv422  min s=1600x1200 fps=15 max s=1600x1200 fps=59.9999
    [dshow @ 00000000004d71e0]   pixel_format=yuyv422  min s=1600x1200 fps=15 max s=1600x1200 fps=59.9999
    [dshow @ 00000000004d71e0]   pixel_format=yuyv422  min s=1680x1050 fps=15 max s=1680x1050 fps=59.9999
    [dshow @ 00000000004d71e0]   pixel_format=yuyv422  min s=1680x1050 fps=15 max s=1680x1050 fps=59.9999
    [dshow @ 00000000004d71e0]   pixel_format=yuyv422  min s=1920x1200 fps=15 max s=1920x1200 fps=59.9999
    [dshow @ 00000000004d71e0]   pixel_format=yuyv422  min s=1920x1200 fps=15 max s=1920x1200 fps=59.9999
    [dshow @ 00000000004d71e0]   unknown compression type 0xE436EB7D  min s=1920x1080 fps=15 max s=1920x1080 fps=59.9999
    [dshow @ 00000000004d71e0]   unknown compression type 0xE436EB7D  min s=1920x1080 fps=15 max s=1920x1080 fps=59.9999
    [dshow @ 00000000004d71e0]   unknown compression type 0xE436EB7D  min s=640x360 fps=15 max s=640x360 fps=59.9999
    [dshow @ 00000000004d71e0]   unknown compression type 0xE436EB7D  min s=640x360 fps=15 max s=640x360 fps=59.9999
    [dshow @ 00000000004d71e0]   unknown compression type 0xE436EB7D  min s=640x480 fps=15 max s=640x480 fps=59.9999
    [dshow @ 00000000004d71e0]   unknown compression type 0xE436EB7D  min s=640x480 fps=15 max s=640x480 fps=59.9999
    [dshow @ 00000000004d71e0]   unknown compression type 0xE436EB7D  min s=720x480 fps=15 max s=720x480 fps=59.9999
    [dshow @ 00000000004d71e0]   unknown compression type 0xE436EB7D  min s=720x480 fps=15 max s=720x480 fps=59.9999
    [dshow @ 00000000004d71e0]   unknown compression type 0xE436EB7D  min s=720x576 fps=15 max s=720x576 fps=59.9999
    [dshow @ 00000000004d71e0]   unknown compression type 0xE436EB7D  min s=720x576 fps=15 max s=720x576 fps=59.9999
    [dshow @ 00000000004d71e0]   unknown compression type 0xE436EB7D  min s=768x576 fps=15 max s=768x576 fps=59.9999
    [dshow @ 00000000004d71e0]   unknown compression type 0xE436EB7D  min s=768x576 fps=15 max s=768x576 fps=59.9999
    [dshow @ 00000000004d71e0]   unknown compression type 0xE436EB7D  min s=800x600 fps=15 max s=800x600 fps=59.9999
    [dshow @ 00000000004d71e0]   unknown compression type 0xE436EB7D  min s=800x600 fps=15 max s=800x600 fps=59.9999
    [dshow @ 00000000004d71e0]   unknown compression type 0xE436EB7D  min s=856x480 fps=15 max s=856x480 fps=59.9999
    [dshow @ 00000000004d71e0]   unknown compression type 0xE436EB7D  min s=856x480 fps=15 max s=856x480 fps=59.9999
    [dshow @ 00000000004d71e0]   unknown compression type 0xE436EB7D  min s=960x540 fps=15 max s=960x540 fps=59.9999
    [dshow @ 00000000004d71e0]   unknown compression type 0xE436EB7D  min s=960x540 fps=15 max s=960x540 fps=59.9999
    [dshow @ 00000000004d71e0]   unknown compression type 0xE436EB7D  min s=1024x576 fps=15 max s=1024x576 fps=59.9999
    [dshow @ 00000000004d71e0]   unknown compression type 0xE436EB7D  min s=1024x576 fps=15 max s=1024x576 fps=59.9999
    [dshow @ 00000000004d71e0]   unknown compression type 0xE436EB7D  min s=1024x768 fps=15 max s=1024x768 fps=59.9999
    [dshow @ 00000000004d71e0]   unknown compression type 0xE436EB7D  min s=1024x768 fps=15 max s=1024x768 fps=59.9999
    [dshow @ 00000000004d71e0]   unknown compression type 0xE436EB7D  min s=1280x720 fps=15 max s=1280x720 fps=59.9999
    [dshow @ 00000000004d71e0]   unknown compression type 0xE436EB7D  min s=1280x720 fps=15 max s=1280x720 fps=59.9999
    [dshow @ 00000000004d71e0]   unknown compression type 0xE436EB7D  min s=1280x800 fps=15 max s=1280x800 fps=59.9999
    [dshow @ 00000000004d71e0]   unknown compression type 0xE436EB7D  min s=1280x800 fps=15 max s=1280x800 fps=59.9999
    [dshow @ 00000000004d71e0]   unknown compression type 0xE436EB7D  min s=1280x960 fps=15 max s=1280x960 fps=59.9999
    [dshow @ 00000000004d71e0]   unknown compression type 0xE436EB7D  min s=1280x960 fps=15 max s=1280x960 fps=59.9999
    [dshow @ 00000000004d71e0]   unknown compression type 0xE436EB7D  min s=1280x1024 fps=15 max s=1280x1024 fps=59.9999
    [dshow @ 00000000004d71e0]   unknown compression type 0xE436EB7D  min s=1280x1024 fps=15 max s=1280x1024 fps=59.9999
    [dshow @ 00000000004d71e0]   unknown compression type 0xE436EB7D  min s=1368x768 fps=15 max s=1368x768 fps=59.9999
    [dshow @ 00000000004d71e0]   unknown compression type 0xE436EB7D  min s=1368x768 fps=15 max s=1368x768 fps=59.9999
    [dshow @ 00000000004d71e0]   unknown compression type 0xE436EB7D  min s=1440x900 fps=15 max s=1440x900 fps=59.9999
    [dshow @ 00000000004d71e0]   unknown compression type 0xE436EB7D  min s=1440x900 fps=15 max s=1440x900 fps=59.9999
    [dshow @ 00000000004d71e0]   unknown compression type 0xE436EB7D  min s=1600x1200 fps=15 max s=1600x1200 fps=59.9999
    [dshow @ 00000000004d71e0]   unknown compression type 0xE436EB7D  min s=1600x1200 fps=15 max s=1600x1200 fps=59.9999
    [dshow @ 00000000004d71e0]   unknown compression type 0xE436EB7D  min s=1680x1050 fps=15 max s=1680x1050 fps=59.9999
    [dshow @ 00000000004d71e0]   unknown compression type 0xE436EB7D  min s=1680x1050 fps=15 max s=1680x1050 fps=59.9999
    [dshow @ 00000000004d71e0]   unknown compression type 0xE436EB7D  min s=1920x1200 fps=15 max s=1920x1200 fps=59.9999
    [dshow @ 00000000004d71e0]   unknown compression type 0xE436EB7D  min s=1920x1200 fps=15 max s=1920x1200 fps=59.9999
    video=XI100DUSB-HDMI Video: Immediate exit requested