Recherche avancée

Médias (91)

Autres articles (27)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

  • Creating farms of unique websites

    13 avril 2011, par

    MediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
    This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)

  • 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

Sur d’autres sites (6057)

  • Parsing The Clue Chronicles

    30 décembre 2018, par Multimedia Mike — Game Hacking

    A long time ago, I procured a 1999 game called Clue Chronicles : Fatal Illusion, based on the classic board game Clue, a.k.a. Cluedo. At the time, I was big into collecting old, unloved PC games so that I could research obscure multimedia formats.



    Surveying the 3 CD-ROMs contained in the box packaging revealed only Smacker (SMK) videos for full motion video which was nothing new to me or the multimedia hacking community at the time. Studying the mix of data formats present on the discs, I found a selection of straightforward formats such as WAV for audio and BMP for still images. I generally find myself more fascinated by how computer games are constructed rather than by playing them, and this mix of files has always triggered a strong “I could implement a new engine for this !” feeling in me, perhaps as part of the ScummVM project which already provides the core infrastructure for reimplementing engines for 2D adventure games.

    Tying all of the assets together is a custom high-level programming language. I have touched on this before in a blog post over a decade ago. The scripts are in a series of files bearing the extension .ini (usually reserved for configuration scripts, but we’ll let that slide). A representative sample of such a script can be found here :

    clue-chronicles-scarlet-1.txt

    What Is This Language ?
    At the time I first analyzed this language, I was still primarily a C/C++-minded programmer, with a decent amount of Perl experience as a high level language, and had just started to explore Python. I assessed this language to be “mildly object oriented with C++-type comments (‘//’) and reliant upon a number of implicit library functions”. Other people saw other properties. When I look at it nowadays, it reminds me a bit more of JavaScript than C++. I think it’s sort of a Rorschach test for programming languages.

    Strangely, I sort of had this fear that I would put a lot of effort into figuring out how to parse out the language only for someone to come along and point out that it’s a well-known yet academic language that already has a great deal of supporting code and libraries available as open source. Google for “spanish dolphins far side comic” for an illustration of the feeling this would leave me with.

    It doesn’t matter in the end. Even if such libraries exist, how easy would they be to integrate into something like ScummVM ? Time to focus on a workable approach to understanding and processing the format.

    Problem Scope
    So I set about to see if I can write a program to parse the language seen in these INI files. Some questions :

    1. How large is the corpus of data that I need to be sure to support ?
    2. What parsing approach should I take ?
    3. What is the exact language format ?
    4. Other hidden challenges ?

    To figure out how large the data corpus is, I counted all of the INI files on all of the discs. There are 138 unique INI files between the 3 discs. However, there are 146 unique INI files after installation. This leads to a hidden challenge described a bit later.

    What parsing approach should I take ? I worried a bit too much that I might not be doing this the “right” way. I’m trying to ignore doubts like this, like how “SQL Shame” blocked me on a task for a little while a few years ago as I concerned myself that I might not be using the purest, most elegant approach to the problem. I know I covered language parsing a lot time ago in university computer science education and there is a lot of academic literature to the matter. But sometimes, you just have to charge in and experiment and prototype and see what falls out. In doing so, I expect to have a better understanding of the problems that need to solved and the right questions to ask, not unlike that time that I wrote a continuous integration system from scratch because I didn’t actually know that “continuous integration” was the keyword I needed.

    Next, what is the exact language format ? I realized that parsing the language isn’t the first and foremost problem here– I need to know exactly what the language is. I need to know what the grammar are keywords are. In essence, I need to reverse engineer the language before I write a proper parser for it. I guess that fits in nicely with the historical aim of this blog (reverse engineering).

    Now, about the hidden challenges– I mentioned that there are 8 more INI files after the game installs itself. Okay, so what’s the big deal ? For some reason, all of the INI files are in plaintext on the CD-ROM but get compressed (apparently, according to file size ratios) when installed to the hard drive. This includes those 8 extra INI files. I thought to look inside the CAB installation archive file on the CD-ROM and the files were there… but all in compressed form. I suspect that one of the files forms the “root” of the program and is the launching point for the game.

    Parsing Approach
    I took a stab at parsing an INI file. My approach was to first perform lexical analysis on the file and create a list of 4 types : symbols, numbers, strings, and language elements ([]{}()=., :). Apparently, this is the kind of thing that Lex/Flex are good at. This prototyping tool is written in Python, but when I port this to ScummVM, it might be useful to call upon the services of Lex/Flex, or another lexical analyzer, for there are many. I have a feeling it will be easier to use better tools when I understand the full structure of the language based on the data available.

    The purpose of this tool is to explore all the possibilities of the existing corpus of INI files. To that end, I ran all 138 of the plaintext files through it, collected all of the symbols, and massaged the results, assuming that the symbols that occurred most frequently are probably core language features. These are all the symbols which occur more than 1000 times among all the scripts :

       6248 false
       5734 looping
       4390 scripts
       3877 layer
       3423 sequentialscript
       3408 setactive
       3360 file
       3257 thescreen
       3239 true
       3008 autoplay
       2914 offset
       2599 transparent
       2441 text
       2361 caption
       2276 add
       2205 ge
       2197 smackanimation
       2196 graphicscript
       2196 graphic
       1977 setstate
       1642 state
       1611 skippable
       1576 desc
       1413 delayscript
       1298 script
       1267 seconds
       1019 rect
    

    About That Compression
    I have sorted out at least these few details of the compression :

    bytes 0-3    "COMP" (a pretty strong sign that this is, in fact, compressed data)
    bytes 4-11   unknown
    bytes 12-15  size of uncompressed data
    bytes 16-19  size of compressed data (filesize - 20)
    bytes 20-    compressed payload
    

    The compression ratios are on the same order of gzip. I was hoping that it was stock zlib data. However, I have been unable to prove this. I wrote a Python script that scrubbed through the first 100 bytes of payload data and tried to get Python’s zlib.decompress to initialize– no luck. It’s frustrating to know that I’ll have to reverse engineer a compression algorithm that deals with just 8 total text files if I want to see this effort through to fruition.

    Update, January 15, 2019
    Some folks expressed interest in trying to sort out the details of the compression format. So I have posted a followup in which I post some samples and go into deeper details about things I have tried :

    Reverse Engineering Clue Chronicles Compression

    The post Parsing The Clue Chronicles first appeared on Breaking Eggs And Making Omelettes.

  • Overlay a video on another video at specific time with FFmpeg

    4 janvier 2019, par Tina J

    I am trying to overlay a video with another video. I followed the original command OP posted here. And it works, but it overlays the video from time 0 :

    ffmpeg -i 720480.mp4 -i sdbug.mov -filter_complex "[0:0][1:0]overlay[out]" -shortest -map [out] -map 0:1 -pix_fmt yuv420p -c:a copy -c:v libx264 -crf 18  new.mp4

    I tried the correct answer to specify a time, but it is not working for me : 1) the overlay starts at around second 12, and 2) video is not played after the overlay is finished.

    ffmpeg -i 720480.mp4 -i sdbug.mov -filter_complex "[1:v]setpts=PTS+10/TB[a]; [0:v][a]overlay=enable=gte(t\,5):shortest=1[out]" -map [out] -map 0:a -c:v libx264 -crf 18 -pix_fmt yuv420p -c:a copy new.mp4

    Anything changed recently on FFmpeg ?! Why isn’t it working ?

    Here is the output of this command (it finishes very fast) :

    ffmpeg version N-92906-g54109b1d14 Copyright (c) 2000-2019 the FFmpeg developers
     built with gcc 8.2.1 (GCC) 20181201
     configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt
     libavutil      56. 25.100 / 56. 25.100
     libavcodec     58. 43.100 / 58. 43.100
     libavformat    58. 25.100 / 58. 25.100
     libavdevice    58.  6.101 / 58.  6.101
     libavfilter     7. 46.101 /  7. 46.101
     libswscale      5.  4.100 /  5.  4.100
     libswresample   3.  4.100 /  3.  4.100
     libpostproc    55.  4.100 / 55.  4.100
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '720480.mp4':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2avc1mp41
       creation_time   : 2018-07-26T09:23:16.000000Z
     Duration: 00:01:50.17, start: 0.000000, bitrate: 3181 kb/s
       Stream #0:0: Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, smpte170m/smpte170m/bt709), 720x480 [SAR 8:9 DAR 4:3], 2785 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc (default)
       Metadata:
         creation_time   : 2018-07-26T09:23:16.000000Z
         handler_name    : VideoHandler
         timecode        : 00:59:55:12
       Stream #0:1: Audio: aac (HE-AAC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 98 kb/s (default)
       Metadata:
         creation_time   : 2018-07-26T09:23:16.000000Z
         handler_name    : SoundHandler
       Stream #0:2: Audio: aac (HE-AAC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 98 kb/s (default)
       Metadata:
         creation_time   : 2018-07-26T09:23:16.000000Z
         handler_name    : SoundHandler
       Stream #0:3: Audio: aac (HE-AAC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 98 kb/s (default)
       Metadata:
         creation_time   : 2018-07-26T09:23:16.000000Z
         handler_name    : SoundHandler
       Stream #0:4: Audio: aac (HE-AAC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 98 kb/s (default)
       Metadata:
         creation_time   : 2018-07-26T09:23:16.000000Z
         handler_name    : SoundHandler
       Stream #0:5: Data: none (tmcd / 0x64636D74) (default)
       Metadata:
         creation_time   : 2018-07-26T09:23:16.000000Z
         handler_name    : TimecodeMediaHandler
         timecode        : 00:59:55:12
    Input #1, mov,mp4,m4a,3gp,3g2,mj2, from 'sdbug.mov':
     Metadata:
       major_brand     : qt
       minor_version   : 537199360
       compatible_brands: qt
       creation_time   : 2018-08-29T14:50:13.000000Z
     Duration: 00:00:10.01, start: 0.000000, bitrate: 10504 kb/s
       Stream #1:0(eng): Video: qtrle (rle  / 0x20656C72), bgra(progressive), 720x486, 9666 kb/s, SAR 109:120 DAR 109:81, 29.97 fps, 29.97 tbr, 30k tbn, 30k tbc (default)
       Metadata:
         creation_time   : 2018-08-29T14:50:13.000000Z
         handler_name    : Apple Video Media Handler
         encoder         : Animation
         timecode        : 00:00:00;00
       Stream #1:1(eng): Data: none (tmcd / 0x64636D74), 0 kb/s (default)
       Metadata:
         creation_time   : 2018-08-29T14:50:13.000000Z
         handler_name    : Time Code Media Handler
         timecode        : 00:00:00;00
    Stream mapping:
     Stream #0:0 (h264) -> overlay:main
     Stream #1:0 (qtrle) -> setpts
     overlay -> Stream #0:0 (libx264)
     Stream #0:1 -> #0:1 (copy)
     Stream #0:2 -> #0:2 (copy)
     Stream #0:3 -> #0:3 (copy)
     Stream #0:4 -> #0:4 (copy)
    Press [q] to stop, [?] for help
    [libx264 @ 000002b902a3f480] using SAR=8/9
    [libx264 @ 000002b902a3f480] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
    [libx264 @ 000002b902a3f480] profile High, level 3.0, 4:2:0, 8-bit
    [libx264 @ 000002b902a3f480] 264 - core 157 r2935 545de2f - H.264/MPEG-4 AVC codec - Copyleft 2003-2018 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 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=12 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=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=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=18.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
    Output #0, mp4, to 'new.mp4':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2avc1mp41
       encoder         : Lavf58.25.100
       Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 720x480 [SAR 8:9 DAR 4:3], q=-1--1, 29.97 fps, 30k tbn, 29.97 tbc (default)
       Metadata:
         encoder         : Lavc58.43.100 libx264
       Side data:
         cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
       Stream #0:1: Audio: aac (HE-AAC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 98 kb/s (default)
       Metadata:
         creation_time   : 2018-07-26T09:23:16.000000Z
         handler_name    : SoundHandler
       Stream #0:2: Audio: aac (HE-AAC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 98 kb/s (default)
       Metadata:
         creation_time   : 2018-07-26T09:23:16.000000Z
         handler_name    : SoundHandler
       Stream #0:3: Audio: aac (HE-AAC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 98 kb/s (default)
       Metadata:
         creation_time   : 2018-07-26T09:23:16.000000Z
         handler_name    : SoundHandler
       Stream #0:4: Audio: aac (HE-AAC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 98 kb/s (default)
       Metadata:
         creation_time   : 2018-07-26T09:23:16.000000Z
         handler_name    : SoundHandler
    frame=  599 fps= 92 q=-1.0 Lsize=   11556kB time=00:01:50.01 bitrate= 860.5kbits/s speed=16.8x
    video:6173kB audio:5288kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.828358%
    [libx264 @ 000002b902a3f480] frame I:8     Avg QP:13.24  size: 44134
    [libx264 @ 000002b902a3f480] frame P:174   Avg QP:18.62  size: 20916
    [libx264 @ 000002b902a3f480] frame B:417   Avg QP:21.31  size:  5583
    [libx264 @ 000002b902a3f480] consecutive B-frames:  6.0%  1.7%  5.5% 86.8%
    [libx264 @ 000002b902a3f480] mb I  I16..4: 15.9% 58.9% 25.2%
    [libx264 @ 000002b902a3f480] mb P  I16..4:  1.4% 13.6%  4.2%  P16..4: 36.6% 22.8% 12.3%  0.0%  0.0%    skip: 9.0%
    [libx264 @ 000002b902a3f480] mb B  I16..4:  0.1%  0.9%  0.3%  B16..8: 46.4% 10.6%  2.9%  direct: 5.5%  skip:33.3%  L0:53.4% L1:36.9% BI: 9.7%
    [libx264 @ 000002b902a3f480] 8x8 transform intra:68.5% inter:65.1%
    [libx264 @ 000002b902a3f480] coded y,uvDC,uvAC intra: 77.5% 89.5% 77.2% inter: 26.8% 48.1% 10.1%
    [libx264 @ 000002b902a3f480] i16 v,h,dc,p: 50% 13% 13% 23%
    [libx264 @ 000002b902a3f480] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 24% 12% 17%  6%  8% 10%  7%  9%  7%
    [libx264 @ 000002b902a3f480] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 21% 13% 10%  7% 12% 11%  9%  9%  7%
    [libx264 @ 000002b902a3f480] i8c dc,h,v,p: 51% 15% 24% 10%
    [libx264 @ 000002b902a3f480] Weighted P-Frames: Y:5.2% UV:2.9%
    [libx264 @ 000002b902a3f480] ref P L0: 60.1% 19.6% 15.8%  4.4%  0.1%
    [libx264 @ 000002b902a3f480] ref B L0: 91.6%  7.3%  1.1%
    [libx264 @ 000002b902a3f480] ref B L1: 97.2%  2.8%
    [libx264 @ 000002b902a3f480] kb/s:2529.97
  • FFMPEG streaming ip cam get delay from start record to first frame

    4 janvier 2019, par Vincent Carretero

    I’m recording stream from IP CAM with FFMPEG.
    I would like to know the exact timestamp when start the output video.

    Example :
    I have an output mp4 file created at 2019/01/04 09:10:15 (file created).
    FFMpeg take few seconds to really start streaming (initialising, etc...)
    The first frame really start at 2019/01/04 09:10:19 (just supposed, I would like to get this info).

    Thanks !