Recherche avancée

Médias (0)

Mot : - Tags -/formulaire

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (26)

  • 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" (...)

  • Encoding and processing into web-friendly formats

    13 avril 2011, par

    MediaSPIP automatically converts uploaded files to internet-compatible formats.
    Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
    Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
    Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
    All uploaded files are stored online in their original format, so you can (...)

Sur d’autres sites (5670)

  • Why does OpenCV not compile with ffmpeg support ?

    19 février 2017, par kollo

    I ran the following command to compile opencv :

    cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/Users/user/work/repo/venv/local/ -D INSTALL_C_EXAMPLES=OFF -D PYTHON_PACKAGES_PATH=/Users/user/work/repo/venv/lib/python2.7/site-packages -D INSTALL_PYTHON_EXAMPLES=ON -D PYTHON_EXECUTABLE=/Users/user/work/repo/venv/bin/python -D WITH_CUDA=OFF -D FFMPEG_INCLUDE_DIR=/usr/include/ffmpeg -D FFMPEG_LIB_DIR=/usr/lib64 -D WITH_FFMPEG=YES ..

    Which resulted in :

    --   Video I/O:
    --     DC1394 1.x:                  NO
    --     DC1394 2.x:                  NO
    --     FFMPEG:                      NO
    --       avcodec:                   YES (ver 57.75.100)
    --       avformat:                  YES (ver 57.63.100)
    --       avutil:                    YES (ver 55.45.100)
    --       swscale:                   YES (ver 4.3.101)
    --       avresample:                NO

    Then any Python call to opencv using ffmpeg as a capture source will fail.

    I though I had the proper paths setup, since calling the ffmpeg command line returns :

    $ ffmpeg
    ffmpeg version n3.0.5-19-ga71d22d-rpmfusion Copyright (c) 2000-2016 the FFmpeg developers
     built with Apple LLVM version 8.0.0 (clang-800.0.42.1)
     configuration: --prefix=/usr --bindir=/usr/local/bin/ --shlibdir=/usr/lib64 --datadir=/usr/share/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --extra-cflags='-O2 -g' --extra-version=rpmfusion --enable-bzlib --enable-nonfree --enable-libopenjpeg --enable-libx264 --enable-avfilter --enable-postproc --enable-pthreads --disable-static --enable-shared --enable-gpl --enable-runtime-cpudetect --arch=x86_64

    And looking up in those dirs indeed give me the list of codecs listed in the cmakeoutput.

    I’m on OSX Sierra, and both opencv and ffmpeg are compiled manually.

    I can run the ffmpeg command line fine to convert any video file I need. I also can fire a Python shell and import using opencv and opening videos works correctly as long as I used the default capture source instead of cv2.CAP_FFMPEG. This means I can only open mp4 files right now.

  • Trouble understanding XHR streams and express

    17 janvier 2017, par Jon

    I’m having some trouble understanding how I can trigger an XHR response from an express server res.write.

    I’m creating a request on the client with the following code :

    var xhr = new XMLHttpRequest();

    xhr.open(opts.method || 'get', url);

    for (var k in opts.headers||{}) {
      xhr.setRequestHeader(k, opts.headers[k]);
    }

    xhr.onload = e => res(e.target.responseText);
    xhr.onerror = rej;

    if (xhr.upload && progressCb) {
      xhr.upload.onprogress = progressCb;
    }

    xhr.send(opts.body);

    On the node server, I’m doing multiple res.write() in response to this request.

    For example, I’m creating a video using ffmpeg() and throughout the creation process, I’ll res.write() a JSON.stringified status update.

    The client will receive the last .write(), but the xhr.upload.onprogress callback is not triggered, so I don’t think I understand how to use it correctly. I’m guessing that the xhr.upload.onprogress is meant solely for callbacks related to uploading data to the server, not for triggering a response to multiple writes

    Is there a way for an XHR request to fire a callback every time it receives a res.write() from express ? If not, what’s a better way of achieving this goal ?

  • Writing A Dreamcast Media Player

    6 janvier 2017, par Multimedia Mike — Sega Dreamcast

    I know I’m not the only person to have the idea to port a media player to the Sega Dreamcast video game console. But I did make significant progress on an implementation. I’m a little surprised to realize that I haven’t written anything about it on this blog yet, given my propensity for publishing my programming misadventures.


    3 Dreamcast consoles in a row

    This old effort had been on my mind lately due to its architectural similarities to something else I was recently brainstorming.

    Early Days
    Porting a multimedia player was one of the earliest endeavors that I embarked upon in the multimedia domain. It’s a bit fuzzy for me now, but I’m pretty sure that my first exposure to the MPlayer project in 2001 arose from looking for a multimedia player to port. I fed it through the Dreamcast development toolchain but encountered roadblocks pretty quickly. However, this got me looking at the MPlayer source code and made me wonder how I could contribute, which is how I finally broke into practical open source multimedia hacking after studying the concepts and technology for more than a year at that point.

    Eventually, I jumped over to the xine project. After hacking on that for awhile, I remembered my DC media player efforts and endeavored to compile xine to the console. The first attempt was to simply compile the codebase using the Dreamcast hobbyist community’s toolchain. This is when I came to fear the multithreaded snake pit in xine’s core. Again, my memories are hazy on the specifics, but I remember the engine having a bunch of threading hacks with comments along the lines of “this code deadlocks sometimes, so on shutdown, monitor this lock and deliberately break it if it has been more than 3 seconds”.

    Something Workable
    Eventually, I settled on a combination of FFmpeg’s libavcodec library for audio and video decoders, xine’s demuxer library, and xine’s input API, combined with my own engine code to tie it all together along with video and output drivers provided by the KallistiOS hobbyist OS for Dreamcast. Here is a simple diagram of the data movement through this player :


    Architecture diagram for a Sega Dreamcast media player

    Details and Challenges
    This is a rare occasion when I actually got to write the core of a media player engine. I made some mistakes.

    xine’s internal clock ran at 90000 Hz. At least, its internal timestamps were all in reference to a 90 kHz clock. I got this brilliant idea to trigger timer interrupts at 6000 Hz to drive the engine. Whatever the timer facilities on the Dreamcast, I found that 6 kHz was the greatest common divisor with 90 kHz. This means that if I could have found an even higher GCD frequency, I would have used that instead.

    So the idea was that, for a 30 fps video, the engine would know to render a frame on every 200th timer interrupt. I eventually realized that servicing 6000 timer interrupts every second would incur a ridiculous amount of overhead. After that, my engine’s philosophy was to set a timer to fire for the next frame while beginning to process the current frame. I.e., when rendering a frame, set a timer to call back in 1/30th of a second. That worked a lot better.

    As I was still keen on 8-bit paletted image codecs at the time (especially since they were simple and small for bootstrapping this project), I got to use output palette images directly thanks to the Dreamcast’s paletted textures. So that was exciting. The engine didn’t need to convert the paletted images to a different colorspace before rendering. However, I seem to recall that the Dreamcast’s PowerVR graphics hardware required that 8-bit textures be twiddled/swizzled. Thus, it was still required to manipulate the 8-bit image before rendering.

    I made good progress on this player concept. However, a huge blocker for me was that I didn’t know how to make a proper user interface for the media player. Obviously, programming the Dreamcast occurred at a very low level (at least with the approach I was using), so there were no UI widgets easily available.

    This was circa 2003. I assumed there must have been some embedded UI widget libraries with amenable open source licenses that I could leverage. I remember searching and checking out a library named libSTK. I think STK stood for “set-top toolkit” and was positioned specifically for doing things like media player UIs on low-spec embedded computing devices. The domain hosting the project is no longer useful but this appears to be a backup of the core code.

    It sounded promising, but the libSTK developers had a different definition of “low-spec embedded” device than I did. I seem to recall that they were targeting something along with likes of a Pentium III clocked at 800 MHz with 128 MB RAM. The Dreamcast, by contrast, has a 200 MHz SH-4 CPU and 16 MB RAM. LibSTK was also authored in C++ and leveraged the Boost library (my first exposure to that code), and this all had the effect of making binaries quite large while I was trying to keep the player in lean C.

    Regrettably, I never made any serious progress on a proper user interface. I think that’s when the player effort ran out of steam.

    The Code
    So, that’s another project that I never got around to finishing or publishing. I was able to find the source code so I decided to toss it up on github, along with 2 old architecture outlines that I was able to dig up. It looks like I was starting small, just porting over a few of the demuxers and decoders that I knew well.

    I’m wondering if it would still be as straightforward to separate out such components now, more than 13 years later ?

    The post Writing A Dreamcast Media Player first appeared on Breaking Eggs And Making Omelettes.