Recherche avancée

Médias (2)

Mot : - Tags -/doc2img

Autres articles (43)

  • La file d’attente de SPIPmotion

    28 novembre 2010, par

    Une file d’attente stockée dans la base de donnée
    Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
    Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...)

  • Les vidéos

    21 avril 2011, par

    Comme les documents de type "audio", Mediaspip affiche dans la mesure du possible les vidéos grâce à la balise html5 .
    Un des inconvénients de cette balise est qu’elle n’est pas reconnue correctement par certains navigateurs (Internet Explorer pour ne pas le nommer) et que chaque navigateur ne gère en natif que certains formats de vidéos.
    Son avantage principal quant à lui est de bénéficier de la prise en charge native de vidéos dans les navigateur et donc de se passer de l’utilisation de Flash et (...)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

Sur d’autres sites (6891)

  • Using ffmpeg to mix two rtmp streams gives av_interleaved_write_frame() : Operation not permitted

    9 février 2014, par yazan jaber

    Using ffmpg I'm trying to mix an rtmp stream containing only audio data and another rtmp stream containing only video data then publish again to rtmp server. It works for a few seconds then I get av_interleaved_write_frame(): Operation not permitted Any idea what is wrong and how can I fix it ?
    Also I'm using RED5 for streaming.

      E:\Everything\ffmpeg\ffmpeg-20140207-git-9707b53-win64-static\bin>ffmpeg -i "rtm
       p://localhost:1935/oflaDemo/s2 live=1" -i "rtmp://localhost:1935/oflaDemo/s3 liv
       e=1" -codec:v copy  -codec:a copy  -f flv rtmp://localhost:1935/oflaDemo/s4
       ffmpeg version N-60393-g9707b53 Copyright (c) 2000-2014 the FFmpeg developers
         built on Feb  6 2014 22:07:13 with gcc 4.8.2 (GCC)
         configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-av
       isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab
       le-iconv --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetyp
       e --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --ena
       ble-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-l
       ibopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libsp
       eex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-aa
       cenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavp
       ack --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib
         libavutil      52. 63.101 / 52. 63.101
         libavcodec     55. 49.101 / 55. 49.101
         libavformat    55. 30.100 / 55. 30.100
         libavdevice    55.  7.100 / 55.  7.100
         libavfilter     4.  1.102 /  4.  1.102
         libswscale      2.  5.101 /  2.  5.101
         libswresample   0. 17.104 /  0. 17.104
         libpostproc    52.  3.100 / 52.  3.100
       rtmp server sent error
       rtmp server sent error
       Input #0, flv, from 'rtmp://localhost:1935/oflaDemo/s2 live=1':
         Duration: N/A, start: 2006.595000, bitrate: N/A
           Stream #0:0: Audio: nellymoser, 22050 Hz, mono, flt
       rtmp server sent error
       rtmp server sent error
       Input #1, flv, from 'rtmp://localhost:1935/oflaDemo/s3 live=1':
         Duration: N/A, start: 0.000000, bitrate: N/A
           Stream #1:0: Video: flv1, yuv420p, 320x240, 15 tbr, 1k tbn, 1k tbc
       Output #0, flv, to 'rtmp://localhost:1935/oflaDemo/s4':
         Metadata:
           encoder         : Lavf55.30.100
           Stream #0:0: Video: flv1 ([2][0][0][0] / 0x0002), yuv420p, 320x240, q=2-31,
       1k tbn, 1k tbc
           Stream #0:1: Audio: nellymoser ([6][0][0][0] / 0x0006), 22050 Hz, mono
       Stream mapping:
         Stream #1:0 -> #0:0 (copy)
         Stream #0:0 -> #0:1 (copy)
       Press [q] to stop, [?] for help
       frame=   82 fps=0.0 q=-1.0 size=      78kB time=00:33:43.67 bitrate=   0.3kbits/
       frame=   88 fps= 87 q=-1.0 size=      81kB time=00:33:44.14 bitrate=   0.3kbits/
       frame=   96 fps= 63 q=-1.0 size=      84kB time=00:33:44.66 bitrate=   0.3kbits/
       frame=  102 fps= 50 q=-1.0 size=      87kB time=00:33:45.14 bitrate=   0.4kbits/
       frame=  110 fps= 43 q=-1.0 size=      90kB time=00:33:45.67 bitrate=   0.4kbits/
       frame=  117 fps= 39 q=-1.0 size=      93kB time=00:33:46.14 bitrate=   0.4kbits/
       frame=  124 fps= 35 q=-1.0 size=      96kB time=00:33:46.67 bitrate=   0.4kbits/
       frame=  132 fps= 33 q=-1.0 size=      99kB time=00:33:47.21 bitrate=   0.4kbits/
       frame=  138 fps= 30 q=-1.0 size=     102kB time=00:33:47.67 bitrate=   0.4kbits/
       frame=  146 fps= 29 q=-1.0 size=     106kB time=00:33:48.20 bitrate=   0.4kbits/
       WriteN, RTMP send error 10053 (140 bytes)
       WriteN, RTMP send error 10053 (37 bytes)
       WriteN, RTMP send error 10038 (42 bytes)
       av_interleaved_write_frame(): Operation not permitted
       frame=  149 fps= 28 q=-1.0 Lsize=     125kB time=00:33:48.41 bitrate=   0.5kbits
       /s
       video:541kB audio:84kB subtitle:0 data:0 global headers:0kB muxing overhead -79.
       973789%
  • In FFmpeg, using -filter_complex, how can I overlay and blend at the same time ?

    5 mars 2014, par Kristian Boruff

    My code works to combine three videos, resize the videos to 1920X1080, resize the watermark to the correct size, and then overlays the watermark to the lower left hand side. Then converts to the intended codecs for Youtube.
    My question is how do I Blend at the same time using the -filter_complex workflow ?
    Currently, I have the following workflow that does everything but set the opacity

    ffmpeg -y -i fancy movie.mov -i logo.png -i in.mov -i out.mov -c:v libx264 -crf 18 -b:v 50000k -preset veryfast -tune film -profile:v high -x264opts cabac=1:keyint=16:bframes=2:keyint_min=15 -c:a libvo_aacenc -ab 128K -ar 48000 -filter_complex "[0:0] scale=1920X1080 [main]; [2:0] scale=1920X1080 [start]; [3:0] scale=1920X1080 [end]; [start] [2:1] [main] [0:1] [end] [3:1] concat=n=3:v=1:a=1 [prog]; [1:0] scale=480:90 [wm]; [prog] [wm] overlay=36:main_h-overlay_h-45" fart.mp4

    I'm trying to add "blend=all_opacity=0.7" in the last step so the watermark will screen against the background. If I just add

    [prog] [wm] overlay=36:main_h-overlay_h-45, blend=all_mode='overlay':all_opacity=0.7" fart.mp4

    I get the error, Cannot find a matching stream for unlabeled input pad 1 on filter Parsed_blend_6

    If I try a semicolon instead,

    [prog] [wm] overlay=36:main_h-overlay_h-45; blend=all_mode='overlay':all_opacity=0.7

    I get the error, Cannot find a matching stream for unlabeled input pad 0 on filter Parsed_blend_6 which makes me think that it's expecting something like [input 1] [input 2] blend command [output]. The problem is that I need it to overlay and blend.

    I tried simplifying the code to just test if the blend operation was working properly.

    ffmpeg -i test.mp4 -i logo.png -filter_complex "[0:0] scale=1920x1080 [wm]; [1:0] scale=1920x1080 [prog], [wm][prog] blend=all_mode='overlay':all_opacity=0.7" fart.mp4

    I got the error First input link top parameters (size 1920x1080, SAR 1:1) do not match the corresponding second input link bottom parameters (1920x1080, SAR 243:80)
    Failed to configure output pad on Parsed_blend_2

    So, in addition to the trouble with combining of filters, I'm also having an issue with resizing the watermark as FFMpeg sees it as a different aspect ratio than the other videos.

    This is my second day with FFmpeg, so any help would be appreciated.

    I'm currently working with FFMpeg version N-61061-gf34cceb

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