Recherche avancée

Médias (91)

Autres articles (112)

  • Soumettre améliorations et plugins supplémentaires

    10 avril 2011

    Si vous avez développé une nouvelle extension permettant d’ajouter une ou plusieurs fonctionnalités utiles à MediaSPIP, faites le nous savoir et son intégration dans la distribution officielle sera envisagée.
    Vous pouvez utiliser la liste de discussion de développement afin de le faire savoir ou demander de l’aide quant à la réalisation de ce plugin. MediaSPIP étant basé sur SPIP, il est également possible d’utiliser le liste de discussion SPIP-zone de SPIP pour (...)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

  • Ajouter notes et légendes aux images

    7 février 2011, par

    Pour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
    Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
    Modification lors de l’ajout d’un média
    Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...)

Sur d’autres sites (2894)

  • Merge file without data loss using FFmpeg inside of WASM

    9 septembre 2023, par Deji

    Edit : I'm rewriting this entire question

    


    Goal : To reconstruct a video from its pieces/chunks from a network stream inside of an @ffmpeg/ffmpeg worker

    


    Problems :

    


      

    1. Video chunks/pieces which come after the first piece/chunk are reported by @ffmpeg/ffmpeg to have invalid data, as seen in the log below :
    2. 


    


    {
  "type": "stderr",
  "message": "video-0_chunk-1.part: Invalid data found when processing input"
}


    


      

    1. How would I merge these chunks/pieces to reconstruct the full video using @ffmpeg/ffmpeg (after solving the first issue above)
    2. 


    


    My current code situation :

    


      

    1. For merging the video pieces
    2. 


    


    const constructFile = async (chunks: Uint8Array[], queueId: number) => {
  await Promise.all(
    chunks.map(async (chunk, index) => {
      const chunkFile = `video-${queueId}_chunk-${index}`;
      await ffmpeg.writeFile(chunkFile, chunk);

      // Return information about newly created file
      ffmpeg.exec(["-i", chunkFile]);
    })
  );
};


    


    I'm reading the logs/output for

    


    ffmpeg.exec(['-i', chunkFile])


    


    using

    


    ffmpeg.on('log', (log) => console.log(log))


    


      

    1. For fetching the videos using streams
    2. 


    


    await useFetch(Capacitor.convertFileSrc(file.path), {
  responseType: "stream",

  onResponse: async ({ response }) => {
    if (response.body) {
      const reader = response.body.getReader();

      while (true) {
        const { done, value } = await reader.read();

        if (done) break;
        file.chunks.push(value);
      }
      reader.releaseLock();
    }
  },
});


    


    Note : file.chunks is linked to a reactive value which is passed to constructFile() when initialized

    


    These are the logs I get from the code currently above :

    


    chunk-4OF65L5M.js:2710 <suspense> is an experimental feature and its API will likely change.&#xA;(index):298 native App.addListener (#25407936)&#xA;(index):298 native FilePicker.pickVideos (#25407937)&#xA;(index):272 result FilePicker.pickVideos (#25407937)&#xA;(index):298 native VideoEditor.thumbnail (#25407938)&#xA;(index):272 result VideoEditor.thumbnail (#25407938)&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;ffmpeg version 5.1.3 Copyright (c) 2000-2022 the FFmpeg developers&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  built with emcc (Emscripten gcc/clang-like repla…3.1.40 (5c27e79dd0a9c4e27ef2326841698cdd4f6b5784)&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  configuration: --target-os=none --arch=x86_32 --…e-libfreetype --enable-libfribidi --enable-libass&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  libavutil      57. 28.100 / 57. 28.100&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  libavcodec     59. 37.100 / 59. 37.100&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  libavformat    59. 27.100 / 59. 27.100&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  libavdevice    59.  7.100 / 59.  7.100&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  libavfilter     8. 44.100 /  8. 44.100&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  libswscale      6.  7.100 /  6.  7.100&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  libswresample   4.  7.100 /  4.  7.100&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  libpostproc    56.  6.100 / 56.  6.100&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: "Input #0, mov,mp4,m4a,3gp,3g2,mj2, from &#x27;video-0_chunk-0&#x27;:"}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  Metadata:&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;    major_brand     : mp42&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;    minor_version   : 0&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;    compatible_brands: isommp42&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;    creation_time   : 2022-11-29T14:46:32.000000Z&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  Duration: 00:00:51.50, start: 0.000000, bitrate: 81 kb/s&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  Stream #0:0[0x1](und): Video: h264 (High) (avc1 …6], 259 kb/s, 30 fps, 30 tbr, 15360 tbn (default)&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;    Metadata:&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;      creation_time   : 2022-11-29T14:46:32.000000Z&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;      handler_name    : ISO Media file produced by Google Inc. Created on: 11/29/2022.&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;      vendor_id       : [0][0][0][0]&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  Stream #0:1[0x2](und): Audio: aac (LC) (mp4a / 0…706D), 44100 Hz, stereo, fltp, 127 kb/s (default)&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;    Metadata:&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;      creation_time   : 2022-11-29T14:46:32.000000Z&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;      handler_name    : ISO Media file produced by Google Inc. Created on: 11/29/2022.&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;      vendor_id       : [0][0][0][0]&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;At least one output file must be specified&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;Aborted()&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;ffmpeg version 5.1.3 Copyright (c) 2000-2022 the FFmpeg developers&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  built with emcc (Emscripten gcc/clang-like repla…3.1.40 (5c27e79dd0a9c4e27ef2326841698cdd4f6b5784)&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  configuration: --target-os=none --arch=x86_32 --…e-libfreetype --enable-libfribidi --enable-libass&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  libavutil      57. 28.100 / 57. 28.100&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  libavcodec     59. 37.100 / 59. 37.100&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  libavformat    59. 27.100 / 59. 27.100&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  libavdevice    59.  7.100 / 59.  7.100&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  libavfilter     8. 44.100 /  8. 44.100&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  libswscale      6.  7.100 /  6.  7.100&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  libswresample   4.  7.100 /  4.  7.100&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  libpostproc    56.  6.100 / 56.  6.100&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;video-0_chunk-1: Invalid data found when processing input&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;Aborted()&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;ffmpeg version 5.1.3 Copyright (c) 2000-2022 the FFmpeg developers&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  built with emcc (Emscripten gcc/clang-like repla…3.1.40 (5c27e79dd0a9c4e27ef2326841698cdd4f6b5784)&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  configuration: --target-os=none --arch=x86_32 --…e-libfreetype --enable-libfribidi --enable-libass&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  libavutil      57. 28.100 / 57. 28.100&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  libavcodec     59. 37.100 / 59. 37.100&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  libavformat    59. 27.100 / 59. 27.100&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  libavdevice    59.  7.100 / 59.  7.100&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  libavfilter     8. 44.100 /  8. 44.100&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  libswscale      6.  7.100 /  6.  7.100&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  libswresample   4.  7.100 /  4.  7.100&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  libpostproc    56.  6.100 / 56.  6.100&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;video-0_chunk-2: Invalid data found when processing input&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;Aborted()&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;ffmpeg version 5.1.3 Copyright (c) 2000-2022 the FFmpeg developers&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  built with emcc (Emscripten gcc/clang-like repla…3.1.40 (5c27e79dd0a9c4e27ef2326841698cdd4f6b5784)&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  configuration: --target-os=none --arch=x86_32 --…e-libfreetype --enable-libfribidi --enable-libass&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  libavutil      57. 28.100 / 57. 28.100&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  libavcodec     59. 37.100 / 59. 37.100&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  libavformat    59. 27.100 / 59. 27.100&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  libavdevice    59.  7.100 / 59.  7.100&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  libavfilter     8. 44.100 /  8. 44.100&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  libswscale      6.  7.100 /  6.  7.100&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  libswresample   4.  7.100 /  4.  7.100&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  libpostproc    56.  6.100 / 56.  6.100&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;video-0_chunk-3: Invalid data found when processing input&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;Aborted()&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;ffmpeg version 5.1.3 Copyright (c) 2000-2022 the FFmpeg developers&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  built with emcc (Emscripten gcc/clang-like repla…3.1.40 (5c27e79dd0a9c4e27ef2326841698cdd4f6b5784)&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  configuration: --target-os=none --arch=x86_32 --…e-libfreetype --enable-libfribidi --enable-libass&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  libavutil      57. 28.100 / 57. 28.100&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  libavcodec     59. 37.100 / 59. 37.100&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  libavformat    59. 27.100 / 59. 27.100&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  libavdevice    59.  7.100 / 59.  7.100&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  libavfilter     8. 44.100 /  8. 44.100&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  libswscale      6.  7.100 /  6.  7.100&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  libswresample   4.  7.100 /  4.  7.100&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;  libpostproc    56.  6.100 / 56.  6.100&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;video-0_chunk-4: Invalid data found when processing input&#x27;}&#xA;Processing.vue:135 {type: &#x27;stderr&#x27;, message: &#x27;Aborted()&#x27;}&#xA;</suspense>

    &#xA;

    Notes :

    &#xA;

      &#xA;
    1. The sections which start with Processing.vue come from the logging system I've setup.
    2. &#xA;

    3. The pieces/chunks gotten from the network where stored in exactly the same order in which they came
    4. &#xA;

    5. If you've seen the old question, the ReferenceError happens as a result of HMR by Vite&#xA;
        &#xA;
      1. Similar to this, some logs were repeated twice because I was actively changing some things and the component had to rerun from the start
      2. &#xA;

      &#xA;

    6. &#xA;

    &#xA;

    Summary : If my problem is still not clear, you could provide another way of fetching a large file (video) from a network, loading the file into memory and passing the file data to @ffmpeg/ffmpeg for further processing

    &#xA;

  • when using ffmpeg encode to hevc , but got 'rawvideo' [closed]

    3 septembre 2023, par 112292454

    i tried use ffmpeg to convert some types video to h265 to save disk space&#xA;but for some video, successfully converted and the file size smaller, but cannot play。&#xA;the result video codec name is "rawvideo",not hevc.

    &#xA;

    the ffporbe of raw video is

    &#xA;

    ffprobe version 5.1.2-3ubuntu1 Copyright (c) 2007-2022 the FFmpeg developers&#xA;  built with gcc 12 (Ubuntu 12.2.0-14ubuntu2)&#xA;  configuration: --prefix=/usr --extra-version=3ubuntu1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libglslang --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librist --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --disable-sndio --enable-libjxl --enable-pocketsphinx --enable-librsvg --enable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-libplacebo --enable-librav1e --enable-shared&#xA;  libavutil      57. 28.100 / 57. 28.100&#xA;  libavcodec     59. 37.100 / 59. 37.100&#xA;  libavformat    59. 27.100 / 59. 27.100&#xA;  libavdevice    59.  7.100 / 59.  7.100&#xA;  libavfilter     8. 44.100 /  8. 44.100&#xA;  libswscale      6.  7.100 /  6.  7.100&#xA;  libswresample   4.  7.100 /  4.  7.100&#xA;  libpostproc    56.  6.100 / 56.  6.100&#xA;Input #0, avi, from &#x27;xxx.avi&#x27;:&#xA;  Duration: 00:06:11.62, start: 0.000000, bitrate: 5196 kb/s&#xA;  Stream #0:0: Video: mpeg4 (Advanced Simple Profile) (XVID / 0x44495658), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 5057 kb/s, 29 fps, 29 tbr, 29 tbn&#xA;  Stream #0:1: Audio: mp3 (U[0][0][0] / 0x0055), 44100 Hz, stereo, fltp, 128 kb/s&#xA;

    &#xA;

    or

    &#xA;

     ffprobe  -v error -show_entries stream=duration,r_frame_rate,bit_rate,width,height,codec_name:stream=codec_name,bit_rate:stream=sample_rate -of json &#x27;xxx.avi&#x27;&#xA;{&#xA;    "programs": [&#xA;&#xA;    ],&#xA;    "streams": [&#xA;        {&#xA;            "codec_name": "mpeg4",&#xA;            "width": 1280,&#xA;            "height": 720,&#xA;            "r_frame_rate": "29/1",&#xA;            "duration": "371.620058",&#xA;            "bit_rate": "5057186"&#xA;        },&#xA;        {&#xA;            "codec_name": "mp3",&#xA;            "sample_rate": "44100",&#xA;            "r_frame_rate": "0/0",&#xA;            "bit_rate": "128000"&#xA;        }&#xA;    ]&#xA;}&#xA;

    &#xA;

    then, i used ffmpeg simple&#xA;(I'm guessing that this problem is just a stupid mistake of newbie,maybe like not use avi ? And the raw video is nsfw, maybe not suitable for release, XD--------but if really need it,can also supply)

    &#xA;

    ffmpeg -i xxx.avi -c:v libx265 &#x27;compressed_xxx.avi&#x27;&#xA;&#xA;ffmpeg version 5.1.2-3ubuntu1 Copyright (c) 2000-2022 the FFmpeg developers&#xA;  built with gcc 12 (Ubuntu 12.2.0-14ubuntu2)&#xA;  configuration: --prefix=/usr --extra-version=3ubuntu1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libglslang --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librist --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --disable-sndio --enable-libjxl --enable-pocketsphinx --enable-librsvg --enable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-libplacebo --enable-librav1e --enable-shared&#xA;  libavutil      57. 28.100 / 57. 28.100&#xA;  libavcodec     59. 37.100 / 59. 37.100&#xA;  libavformat    59. 27.100 / 59. 27.100&#xA;  libavdevice    59.  7.100 / 59.  7.100&#xA;  libavfilter     8. 44.100 /  8. 44.100&#xA;  libswscale      6.  7.100 /  6.  7.100&#xA;  libswresample   4.  7.100 /  4.  7.100&#xA;  libpostproc    56.  6.100 / 56.  6.100&#xA;Input #0, avi, from &#x27;xxx.avi&#x27;:&#xA;  Duration: 00:06:11.62, start: 0.000000, bitrate: 5196 kb/s&#xA;  Stream #0:0: Video: mpeg4 (Advanced Simple Profile) (XVID / 0x44495658), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 5057 kb/s, 29 fps, 29 tbr, 29 tbn&#xA;  Stream #0:1: Audio: mp3 (U[0][0][0] / 0x0055), 44100 Hz, stereo, fltp, 128 kb/s&#xA;File &#x27;compressed_xxx.avi&#x27; already exists. Overwrite? [y/N] y&#xA;&#xA;Stream mapping:&#xA;  Stream #0:0 -> #0:0 (mpeg4 (native) -> hevc (libx265))&#xA;  Stream #0:1 -> #0:1 (mp3 (mp3float) -> mp3 (libmp3lame))&#xA;Press [q] to stop, [?] for help&#xA;x265 [info]: HEVC encoder version 3.5&#x2B;1-f0c1022b6&#xA;x265 [info]: build info [Linux][GCC 11.2.0][64 bit] 8bit&#x2B;10bit&#x2B;12bit&#xA;x265 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX&#xA;x265 [info]: Main profile, Level-3.1 (Main tier)&#xA;x265 [info]: Thread pool 0 using 40 threads on numa nodes 0,1&#xA;x265 [info]: Slices                              : 1&#xA;x265 [info]: frame threads / pool features       : 5 / wpp(12 rows)&#xA;x265 [info]: Coding QT: max CU size, min CU size : 64 / 8&#xA;x265 [info]: Residual QT: max TU size, max depth : 32 / 1 inter / 1 intra&#xA;x265 [info]: ME / range / subpel / merge         : hex / 57 / 2 / 3&#xA;x265 [info]: Keyframe min / max / scenecut / bias  : 25 / 250 / 40 / 5.00&#xA;x265 [info]: Lookahead / bframes / badapt        : 20 / 4 / 2&#xA;x265 [info]: b-pyramid / weightp / weightb       : 1 / 1 / 0&#xA;x265 [info]: References / ref-limit  cu / depth  : 3 / off / on&#xA;x265 [info]: AQ: mode / str / qg-size / cu-tree  : 2 / 1.0 / 32 / 1&#xA;x265 [info]: Rate Control / qCompress            : CRF-28.0 / 0.60&#xA;x265 [info]: tools: rd=3 psy-rd=2.00 early-skip rskip mode=1 signhide tmvp&#xA;x265 [info]: tools: b-intra strong-intra-smoothing lslices=4 deblock sao&#xA;Output #0, avi, to &#x27;compressed_xxx.avi&#x27;:&#xA;  Metadata:&#xA;    ISFT            : Lavf59.27.100&#xA;  Stream #0:0: Video: hevc, yuv420p(progressive), 1280x720 [SAR 1:1 DAR 16:9], q=2-31, 29 fps, 29 tbn&#xA;    Metadata:&#xA;      encoder         : Lavc59.37.100 libx265&#xA;    Side data:&#xA;      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A&#xA;  Stream #0:1: Audio: mp3 (U[0][0][0] / 0x0055), 44100 Hz, stereo, fltp&#xA;    Metadata:&#xA;      encoder         : Lavc59.37.100 libmp3lame&#xA;frame=10776 fps= 33 q=36.0 Lsize=   42885kB time=00:06:11.59 bitrate= 945.4kbits/s speed=1.15x&#xA;video:36477kB audio:5807kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.422882%&#xA;x265 [info]: frame I:     63, Avg QP:26.58  kb/s: 5832.53&#xA;x265 [info]: frame P:   3716, Avg QP:28.99  kb/s: 1837.94&#xA;x265 [info]: frame B:   6997, Avg QP:35.36  kb/s: 203.80&#xA;x265 [info]: Weighted P-Frames: Y:0.1% UV:0.0%&#xA;x265 [info]: consecutive B-frames: 2.8% 53.6% 2.0% 39.0% 2.7%&#xA;&#xA;encoded 10776 frames in 322.72s (33.39 fps), 800.22 kb/s, Avg QP:33.11&#xA;

    &#xA;

    ffprobe to the result :

    &#xA;

    Input #0, avi, from &#x27;compressed_xxx.avi&#x27;:&#xA;  Metadata:&#xA;    software        : Lavf59.27.100&#xA;  Duration: 00:06:11.62, start: 0.000000, bitrate: 945 kb/s&#xA;  Stream #0:0: Video: rawvideo, bgr24, 1280x720, 804 kb/s, SAR 1:1 DAR 16:9, 29 fps, 29 tbr, 29 tbn&#xA;  Stream #0:1: Audio: mp3 (U[0][0][0] / 0x0055), 44100 Hz, stereo, fltp, 128 kb/s&#xA;&#xA;or:&#xA;&#xA;{&#xA;    "programs": [&#xA;&#xA;    ],&#xA;    "streams": [&#xA;        {&#xA;            "codec_name": "rawvideo",&#xA;            "width": 1280,&#xA;            "height": 720,&#xA;            "r_frame_rate": "30/1",&#xA;            "duration": "371.633333",&#xA;            "bit_rate": "792222"&#xA;        },&#xA;        {&#xA;            "codec_name": "aac",&#xA;            "sample_rate": "44100",&#xA;            "r_frame_rate": "0/0",&#xA;            "duration": "371.635374",&#xA;            "bit_rate": "128000"&#xA;        }&#xA;    ]&#xA;}&#xA;

    &#xA;

    the cedec show like 'rawvideo', not for other video that can correct play, like :

    &#xA;

    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from &#x27;compressed_yyy.mp4&#x27;:&#xA;  Metadata:&#xA;    major_brand     : isom&#xA;    minor_version   : 512&#xA;    compatible_brands: isomiso2mp41&#xA;    encoder         : Lavf59.27.100&#xA;  Duration: 00:32:16.26, start: 0.000000, bitrate: 604 kb/s&#xA;  Stream #0:0[0x1](und): Video: hevc (Main) (hev1 / 0x31766568), yuv420p(tv, progressive), 1280x720, 468 kb/s, 30 fps, 30 tbr, 15360 tbn (default)&#xA;    Metadata:&#xA;      handler_name    : VideoHandler&#xA;      vendor_id       : [0][0][0][0]&#xA;      encoder         : Lavc59.37.100 libx265&#xA;  Stream #0:1[0x2](und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 127 kb/s (default)&#xA;    Metadata:&#xA;      handler_name    : SoundHandler&#xA;      vendor_id       : [0][0][0][0]&#xA;&#xA;or:&#xA;&#xA;{&#xA;    "programs": [&#xA;&#xA;    ],&#xA;    "streams": [&#xA;        {&#xA;            "codec_name": "hevc",&#xA;            "width": 1280,&#xA;            "height": 720,&#xA;            "r_frame_rate": "30/1",&#xA;            "duration": "1936.233333",&#xA;            "bit_rate": "468393"&#xA;        },&#xA;        {&#xA;            "codec_name": "aac",&#xA;            "sample_rate": "48000",&#xA;            "r_frame_rate": "0/0",&#xA;            "duration": "1936.256000",&#xA;            "bit_rate": "127151"&#xA;        }&#xA;    ]&#xA;}&#xA;

    &#xA;

    does i need any config to specify in ffmpeg commands to get the right codec ?&#xA;(btw, does this video bitrate is normally ?)

    &#xA;

  • LGPD : Demystifying Brazil’s New Data Protection Law

    31 août 2023, par Erin — Privacy

    The General Personal Data Protection Law (LGPD or Lei Geral de Proteção de Dados Pessoais) is a relatively new legislation passed by the Brazilian government in 2018. The law officially took effect on September 18, 2020, but was not enforced until August 1, 2021, due to complications from the COVID-19 pandemic.

    For organisations that do business in Brazil and collect personal data, the LGPD has far-reaching implications, with 65 separate articles that outline how organisations must collect, process, disclose and erase personal data.

    In this article, you’ll learn what the LGPD is, including its contents and how a legal entity can be compliant.

    What is the LGPD ?

    The LGPD is a new data protection and privacy law passed by the Federal Brazilian Government on May 29, 2018. The purpose of the law is to unify the 40 previous Brazilian laws that regulated the processing of personal data.

    The LGPD explained

    Many of the older laws have been either updated or removed to accommodate this change. The LGPD comprises 65 separate articles, and each covers a different area of the legislation, such as the rights of data subjects and the legal bases on which personal data may be collected. It also sets out the responsibilities of the National Data Protection Authority (ANPD), a newly created agency responsible for the guidance, supervision and enforcement of the LGPD.

    LGPD compliance is essential for organisations wishing to operate in Brazil and collect personal data for commercial purposes, whether online or offline. However, understanding the different rules and regulations and even figuring out if the LGPD applies to you can be challenging.

    Fortunately, the LGPD is relatively easy to understand and shares many similarities with the General Data Protection Regulation (GDPR), the data protection law implemented on May 25, 2018, by the European Union. This may help you better understand why the LGPD was enacted, the policies it contains and the goals it hopes to achieve. Both laws are very similar, but some items are unique to Brazil, such as what qualifies as a legal basis for collecting personal data.

    For these reasons, organisations should not apply a one-size-fits-all approach to GDPR and LGPD compliance, for they are different laws with different guiding principles and requirements.

    Who does the LGPD apply to, and who is exempt ?

    The LGPD applies to any natural person, public entity and private entity that collects, processes and stores personal data for commercial purposes within the national territory of Brazil. The same also applies to those who process the personal data of Brazilian and non-Brazilian citizens within the national territory of Brazil, even if the data processor is outside of Brazil. It also applies to those who process personal data collected from the national territory of Brazil.

    So, what does this all mean ? 

    Regardless of your location, if you conduct any personal data processing activities in Brazil or you process data that was collected from Brazil, then there is a high possibility that the LGPD applies to you. This is especially true if the data processing is for commercial purposes ; or, to be more precise, for the offering or provision of goods or services. It also means that subjects whose personal data is collected under these conditions are protected by the nine data subject rights.

    There are exceptions where the LGPD does not apply to data processors. These include if you process personal data for private or non-commercial reasons ; for artistic, journalistic and select academic purposes ; and for the purpose of state security, public safety, national defence and activities related to the investigation and prosecution of criminal offenders. Also, if the processed data originates from a country with similar data protection laws to Brazil, such as any country in the European Union (where the GDPR applies), then the LGPD will not apply to that individual or organisation.

    For these reasons, it is vital that you are familiar with the LGPD so that your data processing activities comply with the new standards. This is also important for the future, as an estimated 75% of the global population’s personal data will be protected by a privacy regulation. Getting things right now will make life easier moving forward.

    What are the nine LGPD data subject rights ?

    The LGPD has nine data subject rights. These protect the rights and freedoms of subjects, regardless of their political opinion and religious belief.

    What are the LGPD consumer rights?

    These rights, listed under Article 19 of the LGPD, confirm that a data subject has the right to :

    1. Confirm the processing of their data.
    2. Access their data.
    3. Correct data that is incomplete, not accurate and out of date.
    4. Anonymize, block and delete data that is excessive, unnecessary and was not processed in compliance with the law.
    5. Move their data to a different service provider or product provider by special request.
    6. Delete or stop using personal data under certain circumstances.
    7. Gain information about who the data processor has shared the processed data with, including private and public entities.
    8. Be informed as to what the consequences may be for denying consent to the collection of personal data.
    9. Revoke consent to have their personal data processed under certain conditions.

    Many of these data subject rights are like the GDPR. For example, both the GDPR and LGPD give data subjects the right to be informed, the right to access, the right to data portability and the right to rectify false data. However, while the LGPD has nine data subject rights, the GDPR has only eight. What is the extra data subject right ? The right to gain information on who a data processor has shared your data with.

    There are other slight differences between the GDPR and LGPD with regard to data subject rights. For instance, the GDPR has a clear right to restrict certain data processing activities, such as those related to automation. The LGPD has this, too. But the subject of data collection automation is under Article 20, separate from all the data subject rights listed under Article 19.

    Under what conditions can personal data in Brazil be processed ?

    There are various conditions under which organisations can legally conduct personal data processing in Brazil. The aim of these conditions is to give data subjects confidence — that their personal data is processed for only safe, legal and ethical reasons. Also, the conditions help data processors, both individuals and organisations, determine if they have a legal basis for processing personal data in or in relation to Brazil.

    Legal basis of data collection in Brazil

    According to Article 7 of the LGPD, data processing may only be carried out if done :

    1. With consent by the data subject.
    2. To comply with a legal or regulatory obligation.
    3. By public authorities to assist with the execution of a public policy, one established by law or regulation.
    4. To help research entities carry out studies ; granted, when possible, subjects can anonymize their data.
    5. To carry out a contract or preliminary procedure, in particular, one related to a contract where the data subject is a party.
    6. To exercise the right of an arbitration, administration or judicial procedure.
    7. To protect the physical safety or life of someone
    8. To protect the health of someone about to undergo a procedure performed by health entities
    9. To fulfill the legitimate interests of a data processor, unless doing so would compromise a data subject’s fundamental rights and liberties.
    10. To protect one’s credit score.

    Much like the nine data subject rights, there are key differences between the LGPD and GDPR. The GDPR has six lawful bases for data processing, while the LGPD has ten. One notable addition to the LGPD is for the protection of one’s credit score, which is not covered by the GDPR. Another reason to ensure compliance with both data protection laws separately.

    LGPD vs. GDPR : How do they differ ?

    The LGPD was modeled closely on the GDPR, so it’s no surprise the two are similar. 

    Both laws ensure a high level of protection for the rights and freedoms of data subjects. They outline the legal justifications for data processing, establish the responsibilities of a data protection authority and lay out the penalties for non-compliance. That said, there are key differences between them.

    First, data subject rights ; the LGPD has nine, while the GDPR has eight. The GDPR gives data subjects the right to request a human review of automated decision-making, while the LGPD does not. Second, the legal bases for processing ; the LGPD has ten, while the GDPR has six. The four legal bases unique to the LGPD are : for protection of credit, for protection of health, for protection of life and for research entities carrying out studies.

    Both the LGPD and GDPR have different non-compliance penalties. The maximum fine for an infraction under the GDPR is up to €20 million (or 4% of the offender’s annual global revenue, whichever is higher). The maximum fine for an LGPD infraction is up to 50 million reais (around €9.2 million), or up to 2% of an offender’s revenue in Brazil, whichever is higher.

    6 steps to LGPD compliance with Matomo

    Below are steps you can follow to ensure your organisation is LGPD compliant. You’ll also learn how Matomo can help you comply quickly and easily.

    How to ensure compliance with LGPD

    Let’s dive in.

    1. Appoint a DPO

    A DPO is a person, group, or organisation that communicates with data processors, data subjects, and the ANDP.

    Curiously, the LGPD lets you appoint your own DPO — even if they reside out of Brazil. So if the LGPD applies to you, you can appoint someone in your organisation to be a DPO. Just make sure that the nominated person has the understanding and capacity to perform the role’s duties.

    2. Assess your data

    Once you’re familiar with the LGPD and confirm your eligibility for LGPD compliance, take the time to assess your data. If you plan to collect data within the territory of Brazil, you’ll need to confirm the exact location of your data subjects. 

    To do this in Matomo, simply go to the previous year’s calendar. Then click on visitors, go to locations, and look for Brazil under the “Region” section. This will tell you how many of your web visitors are located in Brazil.

    Matomo data subject locations

    3. Review privacy practices

    Review your existing privacy policies and practices, as there’s a good chance they’ll need to be updated to comply with the LGPD. Also, review your data sharing and third-party agreements, as you may need to communicate these new policies to partners that you rely on to deliver your services. 

    Lastly, review your procedures for tracking personal data and Personally Identifiable Information (PII). You may need to modify the type of data that you track to comply with the LGPD. You may even be tracking this data without your knowledge.

    4. Anonymize tracking data

    Data subjects under the LGPD have the right to request data anonymity. Therefore, to be LGPD compliant, your organisation must be able to accommodate for such a request.

    Fortunately, Matomo has various data anonymization techniques that help you protect your data subject’s privacy and comply with the LGPD. These techniques include the ability to anonymize previously tracked raw data, anonymize visitor IP addresses, and anonymize relevant geo-location data such as regions, cities and countries.

    Matomo data anonymity feature

    You can find these features and more under the Anonymize data tab within the Privacy menu on the Matomo Settings page. Learn more about how to configure privacy settings in Matomo.

    5. Comply with LGPD consent laws without cookies

    By using Matomo to anonymize the data of your data subjects, this enables you to comply with LGPD consent laws and remove the need to display cookie consent banners on your website. This is made possible by the fact that Matomo is a cookieless tracking web analytics platform.

    Unlike other web analytics platforms like Google Analytics, which collect and use third-party cookies (persistent data that remains on your device, until that data expires or until you manually delete it) for their “own purposes,” Matomo is different. We use alternative means to identify web visitors, such as count the number of unique IP addresses and perform browser fingerprinting, neither of which involve the collection of personal data.

    As a result, you don’t have to display cookie consent banners on your website, and you can track your web visitors even if they disable cookies.

    6. Give users the right to opt-out

    Under the LGPD, data subjects have the right to opt-out of your data collection procedures. For this reason, make sure that your web visitors can do this on your website.

    Matomo tracking opt-out feature

    You can do this in Matomo by adding an opt-out from tracking form to your website. To do this, click on the cog icon in the top menu, load the settings page, and click on the Users opt-out menu item in the Privacy section. Then follow the instructions to customise and publish the Matomo opt-out form.

    Achieve LGPD compliance with Matomo

    Like GDPR for Europe, the LGPD will impact organisations doing business in Brazil. And while they both share much of the same definitions and data subject rights, they differ on what qualifies as a legal basis for processing sensitive data. Complying with the GDPR and LGPD separately is non-negotiable and essential to avoiding maximum fines of €20 million and €9.2 million, respectively.

    Comply with LGPD with Matomo

    As a web analytics platform with LGPD compliance, Matomo prioritises data privacy without compromising performance. Switch to a powerful LGPD-compliant web analytics platform that respects users’ privacy. 

    Get a 21-day free trial of Matomo today. No credit card required.

    Disclaimer

    We are not lawyers and don’t claim to be. The information provided here is to help give an introduction to LGPD. We encourage every business and website to take data privacy seriously and discuss these issues with your lawyer if you have any concerns.