Recherche avancée

Médias (91)

Autres articles (76)

  • Mise à jour de la version 0.1 vers 0.2

    24 juin 2013, par

    Explications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
    Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1) ; Installation des dépendances pour Smush ; Installation de MediaInfo et FFprobe pour la récupération des métadonnées ; On n’utilise plus ffmpeg2theora ; On n’installe plus flvtool2 au profit de flvtool++ ; On n’installe plus ffmpeg-php qui n’est plus maintenu au (...)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • Ecrire une actualité

    21 juin 2013, par

    Présentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
    Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
    Vous pouvez personnaliser le formulaire de création d’une actualité.
    Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)

Sur d’autres sites (8953)

  • Merge commit 'fa1749dd34c55fb997c97dfc4da9383c9976ab91'

    25 avril 2017, par Clément Bœsch
    Merge commit 'fa1749dd34c55fb997c97dfc4da9383c9976ab91'
    

    * commit 'fa1749dd34c55fb997c97dfc4da9383c9976ab91' :
    vp9 : split superframes in the filtering stage before actual decoding

    This commit is a noop.

    2017-04-24 20:45:04 @ubitux BBB : btw, do you think you can get the bsf thing this week or we should skip it to give you more time and go on with the merges ?
    2017-04-24 20:45:20 @BBB I’m not sure I’ll finish it that soon
    2017-04-24 20:45:26 @BBB I’d skip it and leave it for later
    2017-04-24 20:45:35 @BBB I’ll do it, I promise, but I Can’t guarantee it’ll be done by $date

    Merged-by : Clément Bœsch <u@pkh.me>

    • [DH] doc/libav-merge.txt
  • Different ways of embedding the Piwik tracking code for faster website performance

    18 avril 2017, par InnoCraft — Community, Development

    Many studies have shown that performance matters a lot. For each 100ms a websites takes longer to load, a business may lose about 0.1% to 1% in revenue. It also matters because Google judges page speed as a ranking factor for search results page. At InnoCraft, we help our clients optimizing their Piwik integration and recommend different ways of embedding the tracking code tailored to their needs. The best way to embed the tracking code depends on your website, what you want to achieve, and how important tracking is to you.

    This technical blog post mainly focuses on improving the time to load your website. This is an important metric as for example Google usually measures the time it took to load a page. Many businesses therefore want to get to the page load event as quickly as possible.

    The regular way of embedding the tracking code

    By default, Piwik is embedded in the header or footer of your website. This is a sensible default. While it is loaded asynchronously and deferred, it still does delay the onload event. Depending on the performance of your Piwik, how fast your website loads, how your website’s resources are embedded, and other factors you may want to consider alternatives. Three of them I will introduce below.

    Embedding the tracker after the load event

    To ensure that your website will always load even if the Piwik server is un-available, you may want to load the tracking code only after the website is loaded like this :

    var _paq = _paq || [];
    _paq.push(["trackPageView"]);
    _paq.push(["enableLinkTracking"]);

    function embedTrackingCode() {
      var u="https://your.piwik.domain/";
      _paq.push(["setTrackerUrl", u+"piwik.php"]);
      _paq.push(["setSiteId", "1"]);

      var d=document, g=d.createElement("script"), s=d.getElementsByTagName("script")[0]; g.type="text/javascript";
      g.defer=true; g.async=true; g.src=u+"piwik.js"; s.parentNode.insertBefore(g,s);    
    }

    if (window.addEventListener) {
       window.addEventListener("load", embedTrackingCode, false);
    } else if (window.attachEvent) {
       window.attachEvent("onload",embedTrackingCode);
    } else {
       embedTrackingCode();
    }

    The downside is you won’t track all of your visitors because some will have already left your website by the time your website is fully loaded. Especially when you have a JavaScript-heavy website or when your website takes longer to load in general. To detect the load event correctly cross browser, you may want to use a library like jQuery.

    Delaying the tracking

    Another technique is to load the tracking with a little delay at the end of your website like this :

    setTimeout(function () {
       embedTrackingCode();
    }, 5);

    This time the tracking script will still track most of your visitors but does not slow down loading the rest of your website as much as it would do by default (at least perceived). In some cases, you will notice a performance improvement when looking at the “time to load” but it depends on your website.

    Not loading the JavaScript Tracker at all

    With Piwik you also have the option to not embed the tracking code into your websites at all and instead generate reports from the webserver logs using Piwik Log Analytics. This works very well but some data might not be available like the device resolution which can be only captured using JavaScript. On the bright side this solution also captures users with ad blockers or tracking blockers.

    Questions ?

    We invite you to test different ways to see what makes sense for you and how it affects your website performance as well as the perceived performance. If you have any questions, feel free to get in touch with us.

    Read on

    The last post in this series is Performance optimizations you can apply today to load the Piwik JavaScript tracker faster.

  • ffmpeg python subprocess error only on ubuntu

    19 avril 2017, par Wonger

    Im working on an application that is splitting videos from youtube into images. I work on a macbook pro for development, but our app servers run on an ubuntu 12.04 server. The current code on our servers running right now is the following

    ffmpeg -i {video_file} -vf fps={fps}

    which we run via a subprocess Popen function call in python. This has very slow performance because it is essentially playing back the whole video file to get the frames. I found another SO post that said you could use -accurate_seek -ss to grab single frames at a specific time, but I am facing some issues with that. When i run the command via command line when SSH into our dev server, it works fine, but when i run it via a subprocess Popen call in python, i get the following error :

    (standard_in) 1: syntax error
    ffmpeg version 3.2.4-static http://johnvansickle.com/ffmpeg/  Copyright (c) 2000-2017 the FFmpeg developers
     built with gcc 5.4.1 (Debian 5.4.1-5) 20170205
     configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc-5 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gray --enable-libass --enable-libfreetype --enable-libfribidi --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libzimg
     libavutil      55. 34.101 / 55. 34.101
     libavcodec     57. 64.101 / 57. 64.101
     libavformat    57. 56.101 / 57. 56.101
     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
    Option accurate_seek (enable/disable accurate seeking with -ss) cannot be applied to output url test.mkv -- you are trying to apply an input option to an output file or vice versa. Move this option before the file it belongs to.
    Error parsing options for output file test.mkv.
    Error opening output files: Invalid argument

    python code :

    import subprocess
    command = "for i in {0..3} ; do ffmpeg -accurate_seek -ss `echo $i*60.0 | bc` -i test.mkv -frames:v 1 images/test_img_$i.jpg ; done"
    process = subprocess.Popen(command, stdout=subprocess.PIPE, stderr = subprocess.STDOUT, shell=True)
    output = process.communicate()
    print output[0].replace('\\n' , '\n')

    The thing is, when i run this on my OSX terminal, it works fine, but there is some issue with doing it in ubuntu. Does anyone have experience with this issue ?

    Output when i run the same exact code in osx :

    ffmpeg version 3.0.2 Copyright (c) 2000-2016 the FFmpeg developers
     built with Apple LLVM version 7.3.0 (clang-703.0.31)
     configuration: --prefix=/usr/local/Cellar/ffmpeg/3.0.2 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-opencl --enable-libx264 --enable-libmp3lame --enable-libxvid --enable-libvpx --enable-vda
     libavutil      55. 17.103 / 55. 17.103
     libavcodec     57. 24.102 / 57. 24.102
     libavformat    57. 25.100 / 57. 25.100
     libavdevice    57.  0.101 / 57.  0.101
     libavfilter     6. 31.100 /  6. 31.100
     libavresample   3.  0.  0 /  3.  0.  0
     libswscale      4.  0.100 /  4.  0.100
     libswresample   2.  0.101 /  2.  0.101
     libpostproc    54.  0.100 / 54.  0.100
     Input #0, matroska,webm, from 'test.mkv':
     Metadata:
       COMPATIBLE_BRANDS: iso6avc1mp41
       MAJOR_BRAND     : dash
       MINOR_VERSION   : 0
       ENCODER         : Lavf57.25.100
     Duration: 00:02:10.20, start: 0.007000, bitrate: 2729 kb/s
       Stream #0:0: Video: h264 (High), yuv420p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)
       Metadata:
         HANDLER_NAME    : VideoHandler
         DURATION        : 00:02:10.172000000
       Stream #0:1(eng): Audio: opus, 48000 Hz, stereo, fltp (default)
       Metadata:
         DURATION        : 00:02:10.201000000
         [swscaler @ 0x7f9b4b008000] deprecated pixel format used, make sure you did set range correctly
    Output #0, image2, to 'images/test_img_0.jpg':
     Metadata:
       COMPATIBLE_BRANDS: iso6avc1mp41
       MAJOR_BRAND     : dash
       MINOR_VERSION   : 0
       encoder         : Lavf57.25.100
       Stream #0:0: Video: mjpeg, yuvj420p(pc), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 23.98 fps, 23.98 tbn, 23.98 tbc (default)
       Metadata:
         HANDLER_NAME    : VideoHandler
         DURATION        : 00:02:10.172000000
         encoder         : Lavc57.24.102 mjpeg
       Side data:
         unknown side data type 10 (24 bytes)
         Stream mapping:
     Stream #0:0 -> #0:0 (h264 (native) -> mjpeg (native))
     Press [q] to stop, [?] for help
    frame=    1 fps=0.0 q=7.2 Lsize=N/A time=00:00:00.04 bitrate=N/A speed=   1x    
    video:73kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
    ....

    One thing i forgot to mention is that on my mac i used homebrew to install ffmpeg, where as on Ubuntu i used a static build

    other stack overflow reference : Fastest way to extract frames using ffmpeg ?