Recherche avancée

Médias (2)

Mot : - Tags -/media

Autres articles (111)

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

  • Participer à sa traduction

    10 avril 2011

    Vous pouvez nous aider à améliorer les locutions utilisées dans le logiciel ou à traduire celui-ci dans n’importe qu’elle nouvelle langue permettant sa diffusion à de nouvelles communautés linguistiques.
    Pour ce faire, on utilise l’interface de traduction de SPIP où l’ensemble des modules de langue de MediaSPIP sont à disposition. ll vous suffit de vous inscrire sur la liste de discussion des traducteurs pour demander plus d’informations.
    Actuellement MediaSPIP n’est disponible qu’en français et (...)

  • MediaSPIP Core : La Configuration

    9 novembre 2010, par

    MediaSPIP Core fournit par défaut trois pages différentes de configuration (ces pages utilisent le plugin de configuration CFG pour fonctionner) : une page spécifique à la configuration générale du squelettes ; une page spécifique à la configuration de la page d’accueil du site ; une page spécifique à la configuration des secteurs ;
    Il fournit également une page supplémentaire qui n’apparait que lorsque certains plugins sont activés permettant de contrôler l’affichage et les fonctionnalités spécifiques (...)

Sur d’autres sites (12848)

  • avformat/matroskadec : Improve forward compability

    25 mars 2020, par Andreas Rheinhardt
    avformat/matroskadec : Improve forward compability
    

    Matroska is built around the principle that a reader does not need to
    understand everything in a file in order to be able to make use of it ;
    it just needs to ignore the data it doesn't know about.

    Our demuxer typically follows this principle, but there is one important
    instance where it does not : A Block belonging to a TrackEntry with no
    associated stream is treated as invalid data (i.e. the demuxer will try
    to resync to the next level 1 element because it takes this as a sign
    that it has lost sync). Given that we do not create streams if we don't
    know or don't support the type of the TrackEntry, this impairs this
    demuxer's forward compability.

    Furthermore, ignoring Blocks belonging to a TrackEntry without
    corresponding stream can (in future commits) also be used to ignore
    TrackEntries with obviously bogus entries without affecting the other
    TrackEntries (by not creating a stream for said TrackEntry).

    Finally, given that matroska_find_track_by_num() already emits its own
    error message in case there is no TrackEntry with a given TrackNumber,
    the error message (with level AV_LOG_INFO) for this can be removed.

    Signed-off-by : Andreas Rheinhardt <andreas.rheinhardt@gmail.com>

    • [DH] libavformat/matroskadec.c
  • Revision 229 : Fixed line endings and file properties.

    16 juin 2011, par marc.noirot

    Changed Paths :
     Modify /trunk/AUTHORS


     Modify /trunk/CMakeLists.txt


     Modify /trunk/COPYING


     Modify /trunk/ChangeLog


     Modify /trunk/INSTALL


     Modify /trunk/Makefile.am


     Modify /trunk/NEWS


     Modify /trunk/README


     Modify /trunk/THANKS


     Modify /trunk/TODO


     Modify /trunk/config-cmake.h.in


     Modify /trunk/configure.ac


     Modify /trunk/schemas/Amf0.xsd


     Modify /trunk/schemas/Makefile.am


     Modify /trunk/schemas/TestAmf0.xml


     Modify /trunk/schemas/TestFlv.xml


     Modify /trunk/schemas/TestReport.xml


     Modify /trunk/schemas/flv.xsd


     Modify /trunk/schemas/report.xsd


     Modify /trunk/src/CMakeLists.txt


     Modify /trunk/src/check.c


     Modify /trunk/src/check.h


     Modify /trunk/src/compat/getopt.c


     Modify /trunk/src/compat/getopt.h


     Modify /trunk/src/compat/getopt1.c


     Modify /trunk/src/compat/gettext.h


     Modify /trunk/src/compat/win32_tmpfile.c


     Modify /trunk/src/compat/win32_tmpfile.h


     Modify /trunk/src/dump_raw.c


     Modify /trunk/src/dump_raw.h


     Modify /trunk/src/libyaml/CMakeLists.txt


     Modify /trunk/src/libyaml/Makefile.am


     Modify /trunk/src/libyaml/api.c


     Modify /trunk/src/libyaml/config.h


     Modify /trunk/src/libyaml/dumper.c


     Modify /trunk/src/libyaml/emitter.c


     Modify /trunk/src/libyaml/loader.c


     Modify /trunk/src/libyaml/parser.c


     Modify /trunk/src/libyaml/reader.c


     Modify /trunk/src/libyaml/scanner.c


     Modify /trunk/src/libyaml/writer.c


     Modify /trunk/src/libyaml/yaml.h


     Modify /trunk/src/libyaml/yaml_private.h


     Modify /trunk/src/update.c


     Modify /trunk/src/update.h


     Modify /trunk/src/util.c


     Modify /trunk/src/util.h


     Modify /trunk/tests/Makefile.am


     Modify /trunk/tests/check_amf.c


     Modify /trunk/tests/check_flv.c



    Fixed line endings and file properties.

  • FFMPEG throws error while converting WEBM/MP4 audio files from MediaRecorder to MP3

    27 septembre 2022, par Sahil Malik

    I use MediaRecorder to record the audio from the browser and then upload it to my server (ARM-based Linux machine - AWS Lambda Function, if it matters). Based on the browser type, I get either an MP4 file (for the Safari browser) OR a WEBM file (for every other browser) from the MediaRecorder. The audio is converted to Base64 string and posted to my server with FFMPEG.

    &#xA;

    MediaRecorder implementation

    &#xA;

    const audioStream = await navigator.mediaDevices.getUserMedia(mediaConstraints);&#xA;const MediaRecorder = window[&#x27;MediaRecorder&#x27;];&#xA;const mimeType = MediaRecorder.isTypeSupported(&#x27;audio/webm&#x27;) ? &#x27;audio/webm&#x27; : &#x27;audio/mp4&#x27;;&#xA;const recordingFileExtension = MediaRecorder.isTypeSupported(&#x27;audio/webm&#x27;) ? &#x27;webm&#x27; : &#x27;mp4&#x27;;&#xA;mediaRecorder = new MediaRecorder(audioStream, { mimeType });&#xA;mediaRecorder.ondataavailable = convertBlobAndUploadChunk;&#xA;mediaRecorder.start(30 * 1000); // timeslice needs to be in ms&#xA;// When user stops recording&#xA;mediaRecorder.stop();&#xA;audioStream.getTracks().forEach( t => { t.stop(); });&#xA;// To convert the audio blob to string&#xA;function convertBlobToBase64(blob) {&#xA;    return new Promise((resolve, reject) => {&#xA;        const reader = new FileReader();&#xA;        reader.readAsDataURL(blob);&#xA;        reader.onload = () => {&#xA;            const tmpStr = reader.result.toString();&#xA;            resolve(tmpStr.substring(tmpStr.indexOf(&#x27;base64,&#x27;) &#x2B; 7));&#xA;        };&#xA;        reader.onerror = error => reject(error);&#xA;    });&#xA;}&#xA;&#xA;let blobCount = 0;&#xA;async function convertBlobAndUploadChunk(blobEvent) {&#xA;    if (!blobEvent.data || blobEvent.data.size === 0) return;&#xA;&#xA;    blobCount&#x2B;&#x2B;;&#xA;&#xA;    const recordData = JSON.stringify({&#xA;        M: {&#xA;            blobCount,&#xA;            //some other meta data&#xA;        },&#xA;        D: await convertBlobToBase64(audioBlob),&#xA;    });&#xA;&#xA;    await angularHttpClient.post(apiUrl, recordData, new HttpHeaders({&#xA;        &#x27;Content-Type&#x27;: &#x27;application/json&#x27;,&#xA;        &#x27;x-api-key&#x27;: apiKey,&#xA;    })).toPromise();&#xA;}&#xA;

    &#xA;

    On my server, I convert the WEBM/MP4 file to an MP3 file for better cross-browser compatibility and to enable scrubbing.

    &#xA;

    Backend Lambda Implementation

    &#xA;

    const FFMpegCommand = require(&#x27;fluent-ffmpeg&#x27;); // v2.1.2&#xA;new FFMpegCommand()&#xA;        .input(originalFile)&#xA;        .on(&#x27;end&#x27;, (error, stdOut, stdError) => {&#xA;            if (error) {&#xA;                console.error(error);&#xA;            }&#xA;        })&#xA;        .save(convertedFile);&#xA;

    &#xA;

    This works perfectly fine 99.9% of the time but FFMPEG throws one of the following errors for 0.1% of the time :

    &#xA;

    Error 1 : Invalid data found when processing input

    &#xA;

    error reading header

    &#xA;

    ffmpeg version 4.4-static https://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2021 the &#xA;FFmpeg developers&#xA;built with gcc 8 (Debian 8.3.0-6)&#xA;configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gmp --enable-libgme --enable-gray --enable-libaom --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libdav1d --enable-libxvid --enable-libzvbi --enable-libzimg&#xA;libavutil 56. 70.100 / 56. 70.100&#xA;libavcodec 58.134.100 / 58.134.100&#xA;libavformat 58. 76.100 / 58. 76.100&#xA;libavdevice 58. 13.100 / 58. 13.100&#xA;libavfilter 7.110.100 / 7.110.100&#xA;libswscale 5. 9.100 / 5. 9.100&#xA;libswresample 3. 9.100 / 3. 9.100&#xA;libpostproc 55. 9.100 / 55. 9.100&#xA;[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7232f40] could not find corresponding trex (id 1)&#xA;[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7232f40] could not find corresponding track id 0&#xA;[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7232f40] trun track id unknown, no tfhd was found&#xA;[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7232f40] error reading header&#xA;/tmp/long-filename-of-140chars-to-keep-files-unique.mp4: Invalid data found when processing input&#xA;

    &#xA;

    EBML Header parsing failed

    &#xA;

    ffmpeg version 4.4-static https://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2021 the FFmpeg developers&#xA;built with gcc 8 (Debian 8.3.0-6)&#xA;configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gmp --enable-libgme --enable-gray --enable-libaom --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libdav1d --enable-libxvid --enable-libzvbi --enable-libzimg&#xA;libavutil 56. 70.100 / 56. 70.100&#xA;libavcodec 58.134.100 / 58.134.100&#xA;libavformat 58. 76.100 / 58. 76.100&#xA;libavdevice 58. 13.100 / 58. 13.100&#xA;libavfilter 7.110.100 / 7.110.100&#xA;libswscale 5. 9.100 / 5. 9.100&#xA;libswresample 3. 9.100 / 3. 9.100&#xA;libpostproc 55. 9.100 / 55. 9.100&#xA;[matroska,webm @ 0x7595f40] Format matroska,webm detected only with low score of 1, misdetection possible!&#xA;[matroska,webm @ 0x7595f40] EBML header parsing failed&#xA;/tmp/long-filename-of-140chars-to-keep-files-unique.webm: Invalid data found when processing input&#xA;

    &#xA;

    No specific details

    &#xA;

    ffmpeg version 4.4-static https://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2021 the FFmpeg developers&#xA;built with gcc 8 (Debian 8.3.0-6)&#xA;configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gmp --enable-libgme --enable-gray --enable-libaom --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libdav1d --enable-libxvid --enable-libzvbi --enable-libzimg&#xA;libavutil 56. 70.100 / 56. 70.100&#xA;libavcodec 58.134.100 / 58.134.100&#xA;libavformat 58. 76.100 / 58. 76.100&#xA;libavdevice 58. 13.100 / 58. 13.100&#xA;libavfilter 7.110.100 / 7.110.100&#xA;libswscale 5. 9.100 / 5. 9.100&#xA;libswresample 3. 9.100 / 3. 9.100&#xA;libpostproc 55. 9.100 / 55. 9.100&#xA;/tmp/long-filename-of-140chars-to-keep-files-unique.webm: Invalid data found when processing input&#xA;

    &#xA;

    Error 2 : Output file #0 does not contain any stream

    &#xA;

    ffmpeg version 4.4-static https://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2021 the FFmpeg developers&#xA;built with gcc 8 (Debian 8.3.0-6)&#xA;configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gmp --enable-libgme --enable-gray --enable-libaom --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libdav1d --enable-libxvid --enable-libzvbi --enable-libzimg&#xA;libavutil 56. 70.100 / 56. 70.100&#xA;libavcodec 58.134.100 / 58.134.100&#xA;libavformat 58. 76.100 / 58. 76.100&#xA;libavdevice 58. 13.100 / 58. 13.100&#xA;libavfilter 7.110.100 / 7.110.100&#xA;libswscale 5. 9.100 / 5. 9.100&#xA;libswresample 3. 9.100 / 3. 9.100&#xA;libpostproc 55. 9.100 / 55. 9.100&#xA;[mpegts @ 0x5d19f40] Format mpegts detected only with low score of 2, misdetection possible!&#xA;[mpegts @ 0x5d19f40] Could not detect TS packet size, defaulting to non-FEC/DVHS&#xA;Input #0, mpegts, from &#x27;/tmp/long-filename-of-140chars-to-keep-files-unique.webm&#x27;:&#xA;Duration: N/A, bitrate: N/A&#xA;Output #0, mp3, to &#x27;/tmp/long-filename-of-140chars-to-keep-files-unique.mp3&#x27;:&#xA;Output file #0 does not contain any stream&#xA;

    &#xA;

    Thanks for reading, any help/suggestion is highly appreciated.

    &#xA;