Recherche avancée

Médias (91)

Autres articles (35)

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

  • Possibilité de déploiement en ferme

    12 avril 2011, par

    MediaSPIP peut être installé comme une ferme, avec un seul "noyau" hébergé sur un serveur dédié et utilisé par une multitude de sites différents.
    Cela permet, par exemple : de pouvoir partager les frais de mise en œuvre entre plusieurs projets / individus ; de pouvoir déployer rapidement une multitude de sites uniques ; d’éviter d’avoir à mettre l’ensemble des créations dans un fourre-tout numérique comme c’est le cas pour les grandes plate-formes tout public disséminées sur le (...)

Sur d’autres sites (3178)

  • Zlib vs. XZ on 2SF

    21 juillet 2012, par Multimedia Mike — General, psf, saltygme, xz, zlib

    I recently released my Game Music Appreciation website. It allows users to play an enormous range of video game music directly in their browsers. To do this, the site has to host the music. And since I’m a compression bore, I have to know how small I can practically make these music files. I already published the results of my effort to see if XZ could beat RAR (RAR won, but only slightly, and I still went with XZ for the project) on the corpus of Super Nintendo chiptune sets. Next is the corpus of Nintendo DS chiptunes.

    Repacking Nintendo DS 2SF
    The prevailing chiptune format for storing Nintendo DS songs is the .2sf format. This is a subtype of the Portable Sound Format (PSF). The designers had the foresight to build compression directly into the format. Much of payload data in a PSF file is compressed with zlib. Since I already incorporated Embedded XZ into the player project, I decided to try repacking the PSF payload data from zlib -> xz.

    In an effort to not corrupt standards too much, I changed the ’PSF’ file signature (seen in the first 3 bytes of a file) to ’psf’.

    Results
    There are about 900 Nintendo DS games currently represented in my website’s archive. Total size of the original PSF archive, payloads packed with zlib : 2.992 GB. Total size of the same archive with payloads packed as xz : 2.059 GB.

    Using xz vs. zlib saved me nearly a gigabyte of storage. That extra storage doesn’t really impact my hosting plan very much (I have 1/2 TB, which is why I’m so nonchalant about hosting the massive MPlayer Samples Archive). However, smaller individual files translates to a better user experience since the files are faster to download.

    Here is a pretty picture to illustrate the space savings :



    The blue occasionally appears to dip below the orange but the data indicates that xz is always more efficient than zlib. Here’s the raw data (comes in vanilla CSV flavor too).

    Interface Impact
    So the good news for the end user is that the songs are faster to load up front. The downside is that there can be a noticeable delay when changing tracks. Even though all songs are packaged into one file for download, and the entire file is downloaded before playback begins, each song is individually compressed. Thus, changing tracks triggers another decompression operation. I’m toying the possibility of some sort of background process that decompresses song (n+1) while playing song (n) in order to help compensate for this.

    I don’t like the idea of decompressing everything up front because A) it would take even longer to start playing ; and B) it would take a huge amount of memory.

    Corner Case
    There was at least one case in which I found zlib to be better than xz. It looks like zlib’s minimum block size is smaller than xz’s. I think I discovered xz to be unable to compress a few bytes to a block any smaller than about 60-64 bytes while zlib got it down into the teens. However, in those cases, it was more efficient to just leave the data uncompressed anyway.

  • How to compress webcam videos recorded by html5 MediaRecorder api ?

    25 mai 2017, par JasonY

    I successfully recorded my webcam using MediaRecorder api and the resulting filesizes seemed far too big for their quality.

    For example, for an 8 second video that was 480x640 I got a 1mB file size. That does not seem right.

    My code to record()

    navigator.mediaDevices.getUserMedia({video: true, audio: true})
       .then(function(stream){
           var options = {
               mimeType : "video/webm;codecs=vp9"
               //I don't set bitrate here even if I do the quality is too bad
           }
           var media_recorder = new MediaRecorder(media_stream, options);
           var recorded_data = [];
           media_recorder.ondataavailable = function(e){
                recorded_data.push(e.data);
           }
           media_recorder.onstop = function(e){
               recorded_data.push(e.data);
               var recorded_blob = new Blob(recorded_data, { 'type' : 'video/webm; codecs=vp9' });
               var recorded_video_url = window.URL.createObjectURL(recorded_blob);
               //here I write some code to download the blob from this url through a href
           }
       })

    The file obtained by this method is unreasonably large which makes me wonder if it was even compressed when encoded by VP9 ? A 7 second video is about 870kB !

    Inspecting the file with a mediainfo tool gives me

    General
    Count                                    : 323
    Count of stream of this kind             : 1
    Kind of stream                           : General
    Kind of stream                           : General
    Stream identifier                        : 0
    Count of video streams                   : 1
    Count of audio streams                   : 1
    Video_Format_List                        : VP9
    Video_Format_WithHint_List               : VP9
    Codecs Video                             : V_VP9
    Video_Language_List                      : English
    Audio_Format_List                        : Opus
    Audio_Format_WithHint_List               : Opus
    Audio codecs                             : Opus
    Audio_Language_List                      : English
    Complete name                            : recorded_video.webm
    File name                                : recorded_video
    File extension                           : webm
    Format                                   : WebM
    Format                                   : WebM
    Format/Url                               : http://www.webmproject.org/
    Format/Extensions usually used           : webm
    Commercial name                          : WebM
    Format version                           : Version 2
    Internet media type                      : video/webm
    Codec                                    : WebM
    Codec                                    : WebM
    Codec/Url                                : http://www.webmproject.org/
    Codec/Extensions usually used            : webm
    File size                                : 867870
    File size                                : 848 KiB
    File size                                : 848 KiB
    File size                                : 848 KiB
    File size                                : 848 KiB
    File size                                : 847.5 KiB
    File last modification date              : UTC 2017-05-19 05:48:00
    File last modification date (local)      : 2017-05-19 17:48:00
    Writing application                      : Chrome
    Writing application                      : Chrome
    Writing library                          : Chrome
    Writing library                          : Chrome
    IsTruncated                              : Yes

    Video
    Count                                    : 332
    Count of stream of this kind             : 1
    Kind of stream                           : Video
    Kind of stream                           : Video
    Stream identifier                        : 0
    StreamOrder                              : 1
    ID                                       : 2
    ID                                       : 2
    Unique ID                                : 62101435245162993
    Format                                   : VP9
    Commercial name                          : VP9
    Codec ID                                 : V_VP9
    Codec ID/Url                             : http://www.webmproject.org/
    Codec                                    : V_VP9
    Codec                                    : V_VP9
    Width                                    : 640
    Width                                    : 640 pixels
    Height                                   : 480
    Height                                   : 480 pixels
    Pixel aspect ratio                       : 1.000
    Display aspect ratio                     : 1.333
    Display aspect ratio                     : 4:3
    Frame rate mode                          : VFR
    Frame rate mode                          : Variable
    Language                                 : en
    Language                                 : English
    Language                                 : English
    Language                                 : en
    Language                                 : eng
    Language                                 : en
    Default                                  : Yes
    Default                                  : Yes
    Forced                                   : No
    Forced                                   : No

    Audio
    Count                                    : 272
    Count of stream of this kind             : 1
    Kind of stream                           : Audio
    Kind of stream                           : Audio
    Stream identifier                        : 0
    StreamOrder                              : 0
    ID                                       : 1
    ID                                       : 1
    Unique ID                                : 32224324715799545
    Format                                   : Opus
    Format/Url                               : http://opus-codec.org/
    Commercial name                          : Opus
    Internet media type                      : audio/opus
    Codec ID                                 : A_OPUS
    Codec ID/Url                             : http://opus-codec.org
    Codec                                    : Opus
    Codec                                    : Opus
    Codec/Family                             : PCM
    Channel(s)                               : 1
    Channel(s)                               : 1 channel
    Channel positions                        : Front: C
    Channel positions                        : 1/0/0
    Sampling rate                            : 48000
    Sampling rate                            : 48.0 KHz
    Compression mode                         : Lossy
    Compression mode                         : Lossy
    Delay                                    : 718
    Delay                                    : 718ms
    Delay                                    : 718ms
    Delay                                    : 718ms
    Delay                                    : 00:00:00.718
    Delay, origin                            : Container
    Delay, origin                            : Container
    Language                                 : en
    Language                                 : English
    Language                                 : English
    Language                                 : en
    Language                                 : eng
    Language                                 : en
    Default                                  : Yes
    Default                                  : Yes
    Forced                                   : No
    Forced                                   : No

    What did I do wrong ? Do I have to re-encode it after the chunks get appended ? Is there some attribute I’m missing ? VP9 is supposed to reduce file sizes drastically.

  • How to compress webcam videos recorded by html5 MediaRecorder api ?

    19 mai 2017, par JasonY

    I successfully recorded my webcam using MediaRecorder api and the resulting filesizes seemed far too big for their quality.

    For example, for an 8 second video that was 480x640 I got a 1mB file size. That does not seem right.

    My code to record()

    navigator.mediaDevices.getUserMedia({video: true, audio: true})
       .then(function(stream){
           var options = {
               mimeType : "video/webm;codecs=vp9"
               //I don't set bitrate here even if I do the quality is too bad
           }
           var media_recorder = new MediaRecorder(media_stream, options);
           var recorded_data = [];
           media_recorder.ondataavailable = function(e){
                recorded_data.push(e.data);
           }
           media_recorder.onstop = function(e){
               recorded_data.push(e.data);
               var recorded_blob = new Blob(recorded_data, { 'type' : 'video/webm; codecs=vp9' });
               var recorded_video_url = window.URL.createObjectURL(recorded_blob);
               //here I write some code to download the blob from this url through a href
           }
       })

    The file obtained by this method is unreasonably large which makes me wonder if it was even compressed when encoded by VP9 ? A 7 second video is about 870kB !

    Inspecting the file with a mediainfo tool gives me

    General
    Count                                    : 323
    Count of stream of this kind             : 1
    Kind of stream                           : General
    Kind of stream                           : General
    Stream identifier                        : 0
    Count of video streams                   : 1
    Count of audio streams                   : 1
    Video_Format_List                        : VP9
    Video_Format_WithHint_List               : VP9
    Codecs Video                             : V_VP9
    Video_Language_List                      : English
    Audio_Format_List                        : Opus
    Audio_Format_WithHint_List               : Opus
    Audio codecs                             : Opus
    Audio_Language_List                      : English
    Complete name                            : recorded_video.webm
    File name                                : recorded_video
    File extension                           : webm
    Format                                   : WebM
    Format                                   : WebM
    Format/Url                               : http://www.webmproject.org/
    Format/Extensions usually used           : webm
    Commercial name                          : WebM
    Format version                           : Version 2
    Internet media type                      : video/webm
    Codec                                    : WebM
    Codec                                    : WebM
    Codec/Url                                : http://www.webmproject.org/
    Codec/Extensions usually used            : webm
    File size                                : 867870
    File size                                : 848 KiB
    File size                                : 848 KiB
    File size                                : 848 KiB
    File size                                : 848 KiB
    File size                                : 847.5 KiB
    File last modification date              : UTC 2017-05-19 05:48:00
    File last modification date (local)      : 2017-05-19 17:48:00
    Writing application                      : Chrome
    Writing application                      : Chrome
    Writing library                          : Chrome
    Writing library                          : Chrome
    IsTruncated                              : Yes

    Video
    Count                                    : 332
    Count of stream of this kind             : 1
    Kind of stream                           : Video
    Kind of stream                           : Video
    Stream identifier                        : 0
    StreamOrder                              : 1
    ID                                       : 2
    ID                                       : 2
    Unique ID                                : 62101435245162993
    Format                                   : VP9
    Commercial name                          : VP9
    Codec ID                                 : V_VP9
    Codec ID/Url                             : http://www.webmproject.org/
    Codec                                    : V_VP9
    Codec                                    : V_VP9
    Width                                    : 640
    Width                                    : 640 pixels
    Height                                   : 480
    Height                                   : 480 pixels
    Pixel aspect ratio                       : 1.000
    Display aspect ratio                     : 1.333
    Display aspect ratio                     : 4:3
    Frame rate mode                          : VFR
    Frame rate mode                          : Variable
    Language                                 : en
    Language                                 : English
    Language                                 : English
    Language                                 : en
    Language                                 : eng
    Language                                 : en
    Default                                  : Yes
    Default                                  : Yes
    Forced                                   : No
    Forced                                   : No

    Audio
    Count                                    : 272
    Count of stream of this kind             : 1
    Kind of stream                           : Audio
    Kind of stream                           : Audio
    Stream identifier                        : 0
    StreamOrder                              : 0
    ID                                       : 1
    ID                                       : 1
    Unique ID                                : 32224324715799545
    Format                                   : Opus
    Format/Url                               : http://opus-codec.org/
    Commercial name                          : Opus
    Internet media type                      : audio/opus
    Codec ID                                 : A_OPUS
    Codec ID/Url                             : http://opus-codec.org
    Codec                                    : Opus
    Codec                                    : Opus
    Codec/Family                             : PCM
    Channel(s)                               : 1
    Channel(s)                               : 1 channel
    Channel positions                        : Front: C
    Channel positions                        : 1/0/0
    Sampling rate                            : 48000
    Sampling rate                            : 48.0 KHz
    Compression mode                         : Lossy
    Compression mode                         : Lossy
    Delay                                    : 718
    Delay                                    : 718ms
    Delay                                    : 718ms
    Delay                                    : 718ms
    Delay                                    : 00:00:00.718
    Delay, origin                            : Container
    Delay, origin                            : Container
    Language                                 : en
    Language                                 : English
    Language                                 : English
    Language                                 : en
    Language                                 : eng
    Language                                 : en
    Default                                  : Yes
    Default                                  : Yes
    Forced                                   : No
    Forced                                   : No

    What did I do wrong ? Do I have to re-encode it after the chunks get appended ? Is there some attribute I’m missing ? VP9 is supposed to reduce file sizes drastically.