Recherche avancée

Médias (29)

Mot : - Tags -/Musique

Autres articles (99)

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
    Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.

  • Contribute to translation

    13 avril 2011

    You can help us to improve the language used in the software interface to make MediaSPIP more accessible and user-friendly. You can also translate the interface into any language that allows it to spread to new linguistic communities.
    To do this, we use the translation interface of SPIP where the all the language modules of MediaSPIP are available. Just subscribe to the mailing list and request further informantion on translation.
    MediaSPIP is currently available in French and English (...)

  • Multilang : améliorer l’interface pour les blocs multilingues

    18 février 2011, par

    Multilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
    Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela.

Sur d’autres sites (10340)

  • Converting from MXF to MPEG format with FFmpeg [migrated]

    2 mars 2013, par user2060812

    We're trying to convert .mxf video to .mpeg on ffmpeg-0.9.2 and looks like 0.9.2 version doesn't support .mxf conversion to .mpeg.

    We don't want to switch on latest 0.11 version of ffmpeg as the video result is too poor for latest version. Maybe we're not using the right command to convert .mxf format.

    Below is the error on conversion command :

    [root@localhost ~]# ffmpeg -i test.mxf  -ac 2 output.mpg                                                                                     ffmpeg version 0.9.2-syslint, Copyright (c) 2000-2012 the FFmpeg developers
     built on Mar  1 2013 22:34:33 with gcc 4.6.3
     configuration: --prefix=/usr/local/cpffmpeg --enable-shared --enable-nonfree --enable-gpl --enable-pthreads --enable-libopencore-amrnb --enable-decoder=liba52 --enable-libopencore-amrwb --enable-libfaac --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --extra-cflags=-I/usr/local/cpffmpeg/include/ --extra-ldflags=-L/usr/local/cpffmpeg/lib --enable-version3 --extra-version=syslint
     libavutil    51. 32. 0 / 51. 54.100
     libavcodec   53. 42. 4 / 53. 42. 4
     libavformat  53. 24. 2 / 53. 24. 2
     libavdevice  53.  4. 0 / 53.  4. 0
     libavfilter   2. 53. 0 /  2. 77.100
     libswscale    2.  1. 0 /  2.  1.100
     libpostproc  51.  2. 0 / 51.  2. 0
    Input #0, mxf, from `test.mxf`:
     Duration: 00:00:07.04, start: 0.000000, bitrate: 62580 kb/s
       Stream #0:0: Video: mpeg2video (4:2:2), yuv422p, 720x608 [SAR 608:405 DAR 16:9], 50000 kb/s, 25 fps, 25 tbr, 25 tbn, 50 tbc
       Stream #0:1: Audio: pcm_s16le, 48000 Hz, 8 channels, s16, 6144 kb/s
    File `output.mpg` already exists. Overwrite ? [y/N] y
    Incompatible pixel format `yuv422p` for codec `mpeg1video`, auto-selecting format `yuv420p`
    [buffer @ 0x8476e0] w:720 h:608 pixfmt:yuv422p tb:1/1000000 sar:608/405 sws_param:
    [buffersink @ 0x847b80] auto-inserting filter `auto-inserted scaler 0` between the filter `src` and the filter `out`
    [scale @ 0x848220] w:720 h:608 fmt:yuv422p sar:608/405 -> w:720 h:608 fmt:yuv420p sar:608/405 flags:0x4
    [mpeg @ 0x84a7a0] VBV buffer size not set, muxing may fail
    Output #0, mpeg, to `output.mpg`:
     Metadata:
       encoder         : Lavf53.24.2
       Stream #0:0: Video: mpeg1video, yuv420p, 720x608 [SAR 608:405 DAR 16:9], q=2-31, 200 kb/s, 90k tbn, 25 tbc
       Stream #0:1: Audio: mp2, 48000 Hz, 2 channels, s16, 128 kb/s
    Stream mapping:
     Stream #0:0 -> #0:0 (mpeg2video -> mpeg1video)
     Stream #0:1 -> #0:1 (pcm_s16le -> mp2)
    Press [q] to stop, [?] for help
    [buffer @ 0x8476e0] Changing frame properties on the fly is not supported.
    Failed to inject frame into filter network
  • ffmpeg m3u8 segment file and relative path for file names

    15 mars 2013, par Luuk D. Jansen

    This must be a simple issue, but I have a difficulty with the M3U8 file created by FFMPEG as it contains the absolute path to the files, and not just the file names which I need. I am trying to be able to view the stream while it is encoded, and this seems the last hurdle.

    My FFMPEG command is (ignore the comma's) :

    ffmpeg, -i, /Users/User/Documents/Java/server/data/media/1/1/Promo-2013.mov, -dn, -y, -f, mpegts, -c:a, libfdk_aac, -strict, -2, -ar, 48000, -b:a, 128000, -s, 640x360, -c:v, libx264, -b:v, 700000, -aspect, 640:360, -r, 25, -level, 3.0, -vprofile, baseline, -flags, +loop, -cmp, chroma, -coder, 0, -me_range, 16, -keyint_min, 25, -sc_threshold, 40, -i_qfactor, 0.71, -bt, 200k, -maxrate, 700000, -bufsize, 700000, -rc_eq, 'blurCplx^(1-qComp)', -qcomp, 0.6, -qmin, 10, -qmax, 51, -qdiff, 4, -level, 30, -g, 30, -async, 2, -partitions, +parti4x4+partp8x8+partb8x8, -subq, 5, -trellis, 1, -refs, 1, -vbsf, h264_mp4toannexb, -flags, -global_header, -map, 0, -f, segment, -segment_time, 10, -segment_list, /Users/User/Documents/Java/server/data/media/1/3/prog_index.m3u8, -segment_list_flags, +live, -segment_format, mpegts, /Users/User/Documents/Java/server/data/media/1/3/segment_%05d.ts

    The resulting file is :

    #EXTM3U
    #EXT-X-VERSION:3
    #EXT-X-MEDIA-SEQUENCE:0
    #EXT-X-ALLOW-CACHE:YES
    #EXT-X-TARGETDURATION:12
    #EXTINF:10.005333,
    /Users/User/Documents/Java/server/data/media/1/10/segment_00000.ts
    #EXTINF:11.952000,
    /Users/User/Documents/Java/server/data/media/1/10/segment_00001.ts
    #EXTINF:10.002667,
    /Users/User/Documents/Java/server/data/media/1/10/segment_00002.ts
    #EXTINF:10.008000,
    /Users/User/Documents/Java/server/data/media/1/10/segment_00003.ts
    #EXTINF:0.266667,
    /Users/User/Documents/Java/server/data/media/1/10/segment_00004.ts
    #EXT-X-ENDLIST

    It all works perfect, but I only want e.g. 'segment_00000.ts, and not the complete absolute path, as that is of no use for live streaming. As this is a very ordinary application, I must do something wrong.

  • Our latest improvement to QA : Screenshot Testing

    2 octobre 2013, par benaka — Development

    Introduction to QA in Piwik

    Like any piece of good software, Piwik comes with a comprehensive QA suite that includes unit and integration tests. The unit tests make sure core components of Piwik work properly. The integration tests make sure Piwik’s tracking and report aggregation and APIs work properly.

    To complete our QA suite, we’ve recently added a new type of tests : Screenshot tests, that we use to make sure Piwik’s controller and JavaScript code works properly.

    This blog post will explain how they work and describe our experiences setting them up ; we hope to show you an example of innovative QA practices in an active open source project.

    Screenshot Tests

    As the name implies, our screenshot tests (1) first capture a screenshot of a URL, then (2) compare the result with an expected image. This lets us test the code in Piwik’s controllers and Piwik’s JavaScript simply by specifying a URL.

    Contrast this with conventional UI tests that test for page content changes. Such tests require writing large amounts of test code that, at most, check for changes in HTML. Our tests, on the otherhand, will be able to show regressions in CSS and JavaScript rendering logic with a bare minimum of testing code.

    Capturing Screenshots

    Screenshots are captured using a 3rd party tool. We tried several tools before settling on PhantomJS. PhantomJS executes a JavaScript file with an environment that allows it to create WebKit powered web views. When capturing a screenshot, we supply PhantomJS with a script that :

    • opens a web page view,
    • loads a URL,
    • waits for all AJAX requests to be completed,
    • waits for all images to be loaded
    • waits for all JavaScript to be run.

    Then it renders the completed page to an PNG file.

    • To see how we use PhantomJS see capture.js.
    • To see how we wait for AJAX requests to complete and images to load see override.js.

    Comparing Screenshots

    Once a screenshot is generated we test for UI regressions by comparing it with an expected image. There is no sort of fuzzy matching involved. We just check that the images consist of the same bytes.

    If a screenshot test fails we use ImageMagick’s compare command line tool to generate an image diff :

    Showing differences QA tests screenshots pixel by pixel comparison

    In this example above, there was a change that caused the Search box to be hidden in the datatable. This resulted in the whole Data table report being shifted up a few pixels. The differences are visible in red color which gives rapid feedback to the developers what has changed in the last commit.

    Screenshot Tests on Travis

    We experienced trouble generating identical screenshots on different machines, so our tests were not initially automated by Travis. Once we surpassed this hurdle, we created a new github repo to store our UI tests and screenshots and then enabled the travis build for it. We also made sure that every time a commit is pushed to the Piwik repo, our travis build will push a commit to the UI test repo to run the UI tests.

    We decided to create a new repository so the main repository wouldn’t be burdened with the large screenshot files (which git would not handle very well). We also made sure the travis build would upload all the generated screenshots to a server so debugging failures would be easier.

    Problems we experienced

    Getting generated screenshots to render identically on separate machines was quite a challenge. It took months to figure out how to get it right. Here’s what we learned :

    Fonts will render identically on different machines, but different machines can pick the wrong fonts. When we first tried getting these tests to run on Travis, we noticed small differences in the way fonts were rendered on different machines. We thought this was an insurmountable problem that would occur due to the libraries installed on these machines. It turns out, the machines were just picking the wrong fonts. After installing certain fonts during our Travis build, everything started working.

    Different versions of GD can generate slightly different images. GD is used in Piwik to, among other things, generate sparkline images. Different versions of GD will result in slightly different images. They look the same to the naked eye, but some pixels will have slightly different colors. This is, unfortunately, a problem we couldn’t solve. We couldn’t make sure that everyone who runs the tests uses the same version of GD, so instead we disabled sparklines for UI testing.

    What we learned about existing screenshot capturing tools

    We tried several screenshot capturing tools before finding one that would work adequately. Here’s what we learned about them :

    • CutyCapt This is the first screenshot capturing tool we tried. CutyCapt is a C++ program that uses QtWebKit to load and take a screenshot of a page. It can’t be used to capture multiple screenshots in one run and it can’t be used to wait for all AJAX/Images/JavaScript to complete/load (at least not currently).

    • PhantomJS This is the solution we eventually chose. PhantomJS is a headless scriptable browser that currently uses WebKit as its rendering engine.

      For the most part, PhantomJS is the best solution we found. It reliably renders screenshots, allows JavaScript to be injected into pages it loads, and since it essentially just runs JavaScript code that you provide, it can be made to do whatever you want.

    • SlimerJS SlimerJS is a clone of PhantomJS that uses Gecko as the rendering engine. It is meant to function similarly to PhantomJS. Unfortunately, due to some limitations hard-coded in Mozilla’s software, we couldn’t use it.

      For one, SlimerJS is not headless. There is, apparently, no way to do that when embedding Mozilla. You can, however, run it through xvfb, however the fact that it has to create a window means some odd things can happen. When using SlimerJS, we would sometimes end up with images where tooltips would display as if the mouse was hovering over an element. This inconsistency meant we couldn’t use it for our tests.

    One tool we didn’t try was Selenium Webdriver. Although Selenium is traditionally used to create tests that check for HTML content, it can be used to generate screenshots. (Note : PhantomJS supports using a remote WebDriver.)

    Our Future Plans for Screenshot Testing

    At the moment we render a couple dozen screenshots. We test how our PHP code, JavaScript code and CSS makes Piwik’s UI look, but we don’t test how it behaves. This is our next step.

    We want to create Screenshot Unit Tests for each UI control Piwik uses (for example, the Data Table View or the Site Selector). These tests would use the Widgetize plugin to load a control by itself, then execute JavaScript that simulates events and user behavior, and finally take a screenshot. This way we can test how our code handles clicks and hovers and all sorts of other behavior.

    Screenshots Tests will make Piwik more stable and keep us agile and able to release early and often. Thank you for your support & Spreading the word about Piwik !