Recherche avancée

Médias (1)

Mot : - Tags -/biographie

Autres articles (9)

  • Organiser par catégorie

    17 mai 2013, par

    Dans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
    Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
    Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...)

  • Les thèmes de MediaSpip

    4 juin 2013

    3 thèmes sont proposés à l’origine par MédiaSPIP. L’utilisateur MédiaSPIP peut rajouter des thèmes selon ses besoins.
    Thèmes MediaSPIP
    3 thèmes ont été développés au départ pour MediaSPIP : * SPIPeo : thème par défaut de MédiaSPIP. Il met en avant la présentation du site et les documents média les plus récents ( le type de tri peut être modifié - titre, popularité, date) . * Arscenic : il s’agit du thème utilisé sur le site officiel du projet, constitué notamment d’un bandeau rouge en début de page. La structure (...)

  • Déploiements possibles

    31 janvier 2010, par

    Deux types de déploiements sont envisageable dépendant de deux aspects : La méthode d’installation envisagée (en standalone ou en ferme) ; Le nombre d’encodages journaliers et la fréquentation envisagés ;
    L’encodage de vidéos est un processus lourd consommant énormément de ressources système (CPU et RAM), il est nécessaire de prendre tout cela en considération. Ce système n’est donc possible que sur un ou plusieurs serveurs dédiés.
    Version mono serveur
    La version mono serveur consiste à n’utiliser qu’une (...)

Sur d’autres sites (2816)

  • Error transcoding with FFmpeg : Error : Output format hls is not available

    6 mai 2024, par asif mohmd

    I am using FFmpeg library to transcode a video file into multiple resolutions and create an HLS (HTTP Live Streaming) master playlist.

    


    It takes a video file as input but its does give me the output with HLS playlist.I got a error called "Output format hls is not available". Only the Output directory is creating

    


    I am using FFMpeg 7.0 full build version and also tried older versions and ffmpeg essentials and also tried chocolatey.

    


    if i remove the implementation of HLS from this code.it will create 4 different resolution videos in my output.

    


    Note:I just tried this same code on my friend MAC Book by only changing the setffmpegPath : "ffmpeg.setFfmpegPath("C :\ffmpeg\bin\ffmpeg.exe") ;" to his ffmpeg directory.
Its working perfectly in his mac book

    


    import "dotenv/config";&#xA;import * as fs from "fs";&#xA;import * as path from "path";&#xA;import ffmpeg from "fluent-ffmpeg";&#xA;import crypto from "crypto";&#xA;&#xA;ffmpeg.setFfmpegPath("C:\\ffmpeg\\bin\\ffmpeg.exe");&#xA;&#xA;export const FFmpegTranscoder = async (file: any): Promise<any> => {&#xA;  try {&#xA;    console.log("Starting script");&#xA;    console.time("req_time");&#xA;&#xA;    const randomName = (bytes = 32) =>&#xA;      crypto.randomBytes(bytes).toString("hex");&#xA;    const fileName = randomName();&#xA;    const directoryPath = path.join(__dirname, "..", "..", "input");&#xA;    const filePath = path.join(directoryPath, `${fileName}.mp4`);&#xA;&#xA;    if (!fs.existsSync(directoryPath)) {&#xA;      fs.mkdirSync(directoryPath, { recursive: true });&#xA;    }&#xA;&#xA;    const paths = await new Promise<any>((resolve, reject) => {&#xA;      fs.writeFile(filePath, file, async (err) => {&#xA;        if (err) {&#xA;          console.error("Error saving file:", err);&#xA;          throw err;&#xA;        }&#xA;        console.log("File saved successfully:", filePath);&#xA;&#xA;        try {&#xA;          const outputDirectoryPath = await transcodeWithFFmpeg(&#xA;            fileName,&#xA;            filePath&#xA;          );&#xA;          resolve({ directoryPath, filePath, fileName, outputDirectoryPath });&#xA;        } catch (error) {&#xA;          console.error("Error transcoding with FFmpeg:", error);&#xA;        }&#xA;      });&#xA;    });&#xA;    return paths;&#xA;  } catch (e: any) {&#xA;    console.log(e);&#xA;  }&#xA;};&#xA;&#xA;const transcodeWithFFmpeg = async (fileName: string, filePath: string) => {&#xA;  const directoryPath = path.join(&#xA;    __dirname,&#xA;    "..",&#xA;    "..",&#xA;    `output/hls/${fileName}`&#xA;  );&#xA;&#xA;  if (!fs.existsSync(directoryPath)) {&#xA;    fs.mkdirSync(directoryPath, { recursive: true });&#xA;  }&#xA;&#xA;  const resolutions = [&#xA;    {&#xA;      resolution: "256x144",&#xA;      videoBitrate: "200k",&#xA;      audioBitrate: "64k",&#xA;    },&#xA;    {&#xA;      resolution: "640x360",&#xA;      videoBitrate: "800k",&#xA;      audioBitrate: "128k",&#xA;    },&#xA;    {&#xA;      resolution: "1280x720",&#xA;      videoBitrate: "2500k",&#xA;      audioBitrate: "192k",&#xA;    },&#xA;    {&#xA;      resolution: "1920x1080",&#xA;      videoBitrate: "5000k",&#xA;      audioBitrate: "256k",&#xA;    },&#xA;  ];&#xA;&#xA;  const variantPlaylists: { resolution: string; outputFileName: string }[] = [];&#xA;&#xA;  for (const { resolution, videoBitrate, audioBitrate } of resolutions) {&#xA;    console.log(`HLS conversion starting for ${resolution}`);&#xA;    const outputFileName = `${fileName}_${resolution}.m3u8`;&#xA;    const segmentFileName = `${fileName}_${resolution}_%03d.ts`;&#xA;&#xA;    await new Promise<void>((resolve, reject) => {&#xA;      ffmpeg(filePath)&#xA;        .outputOptions([&#xA;          `-c:v h264`,&#xA;          `-b:v ${videoBitrate}`,&#xA;          `-c:a aac`,&#xA;          `-b:a ${audioBitrate}`,&#xA;          `-vf scale=${resolution}`,&#xA;          `-f hls`,&#xA;          `-hls_time 10`,&#xA;          `-hls_list_size 0`,&#xA;          `-hls_segment_filename ${directoryPath}/${segmentFileName}`,&#xA;        ])&#xA;        .output(`${directoryPath}/${outputFileName}`)&#xA;        .on("end", () => resolve())&#xA;        .on("error", (err) => reject(err))&#xA;        .run();&#xA;    });&#xA;    const variantPlaylist = {&#xA;      resolution,&#xA;      outputFileName,&#xA;    };&#xA;    variantPlaylists.push(variantPlaylist);&#xA;    console.log(`HLS conversion done for ${resolution}`);&#xA;  }&#xA;  console.log(`HLS master m3u8 playlist generating`);&#xA;&#xA;  let masterPlaylist = variantPlaylists&#xA;    .map((variantPlaylist) => {&#xA;      const { resolution, outputFileName } = variantPlaylist;&#xA;      const bandwidth =&#xA;        resolution === "256x144"&#xA;          ? 264000&#xA;          : resolution === "640x360"&#xA;          ? 1024000&#xA;          : resolution === "1280x720"&#xA;          ? 3072000&#xA;          : 5500000;&#xA;      ``;&#xA;      return `#EXT-X-STREAM-INF:BANDWIDTH=${bandwidth},RESOLUTION=${resolution}\n${outputFileName}`;&#xA;    })&#xA;    .join("\n");&#xA;  masterPlaylist = `#EXTM3U\n` &#x2B; masterPlaylist;&#xA;&#xA;  const masterPlaylistFileName = `${fileName}_master.m3u8`;&#xA;&#xA;  const masterPlaylistPath = `${directoryPath}/${masterPlaylistFileName}`;&#xA;  fs.writeFileSync(masterPlaylistPath, masterPlaylist);&#xA;  console.log(`HLS master m3u8 playlist generated`);&#xA;  return directoryPath;&#xA;};&#xA;</void></any></any>

    &#xA;

    My console.log is :

    &#xA;

        Starting script&#xA;    HLS conversion starting for 256x144&#xA;    Error transcoding with FFmpeg: Error: Output format hls is not available&#xA;        at C:\Users\asifa\Desktop\Genius Grid\Transcode-service\node_modules\fluent-ffmpeg\lib\capabilities.js:589:21&#xA;        at nextTask (C:\Users\asifa\Desktop\Genius Grid\Transcode-service\node_modules\async\dist\async.js:5791:13)&#xA;        at next (C:\Users\asifa\Desktop\Genius Grid\Transcode-service\node_modules\async\dist\async.js:5799:13)&#xA;        at C:\Users\asifa\Desktop\Genius Grid\Transcode-service\node_modules\async\dist\async.js:329:20&#xA;        at C:\Users\asifa\Desktop\Genius Grid\Transcode-service\node_modules\fluent-ffmpeg\lib\capabilities.js:549:7&#xA;        at handleExit (C:\Users\asifa\Desktop\Genius Grid\Transcode-service\node_modules\fluent-ffmpeg\lib\processor.js:170:11)&#xA;        at ChildProcess.<anonymous> (C:\Users\asifa\Desktop\Genius Grid\Transcode-service\node_modules\fluent-ffmpeg\lib\processor.js:184:11)&#xA;        at ChildProcess.emit (node:events:518:28)&#xA;        at ChildProcess.emit (node:domain:488:12)&#xA;        at Process.ChildProcess._handle.onexit (node:internal/child_process:294:12) &#xA;</anonymous>

    &#xA;

    I am using Windows 11 and FFMpeg version 7.0. I repeatedly checked, using CMD commands, that my FFMpeg was installed correctly and confirmed the environment variables path, experimented with various FFMpeg versions, and tried with FFMpeg full build Chocolatey package.

    &#xA;

    In Command Line its working perfectly :

    &#xA;

    PS C:\Users\asifa\Desktop\test fmmpeg> ffmpeg -hide_banner -y -i .\SampleVideo_1280x720_30mb.mp4 -vf scale=w=640:h=360:force_original_aspect_ratio=decrease -c:a aac -b:v 800k -c:v h264 -b:a 128k -f hls -hls_time 14 -hls_list_size 0 -hls_segment_filename beach/480p_%03d.ts beach/480p.m3u8&#xA;Input #0, mov,mp4,m4a,3gp,3g2,mj2, from &#x27;.\SampleVideo_1280x720_30mb.mp4&#x27;:&#xA;  Metadata:&#xA;    major_brand     : isom&#xA;    minor_version   : 512&#xA;    compatible_brands: isomiso2avc1mp41&#xA;    creation_time   : 1970-01-01T00:00:00.000000Z&#xA;    encoder         : Lavf53.24.2&#xA;  Duration: 00:02:50.86, start: 0.000000, bitrate: 1474 kb/s&#xA;  Stream #0:0[0x1](und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(progressive), 1280x720 [SAR 1:1 DAR 16:9], 1086 kb/s, 25 fps, 25 tbr, 12800 tbn (default)&#xA;      Metadata:&#xA;        creation_time   : 1970-01-01T00:00:00.000000Z&#xA;        handler_name    : VideoHandler&#xA;        vendor_id       : [0][0][0][0]&#xA;  Stream #0:1[0x2](und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, 5.1, fltp, 383 kb/s (default)&#xA;      Metadata:&#xA;        creation_time   : 1970-01-01T00:00:00.000000Z&#xA;        handler_name    : SoundHandler&#xA;        vendor_id       : [0][0][0][0]&#xA;Stream mapping:&#xA;  Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))&#xA;  Stream #0:1 -> #0:1 (aac (native) -> aac (native))&#xA;Press [q] to stop, [?] for help&#xA;[libx264 @ 000001ef1288ec00] using SAR=1/1&#xA;[libx264 @ 000001ef1288ec00] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2&#xA;[libx264 @ 000001ef1288ec00] profile High, level 3.0, 4:2:0, 8-bit&#xA;[libx264 @ 000001ef1288ec00] 264 - core 164 r3190 7ed753b - H.264/MPEG-4 AVC codec - Copyleft 2003-2024 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=11 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=abr mbtree=1 bitrate=800 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00&#xA;Output #0, hls, to &#x27;beach/480p.m3u8&#x27;:&#xA;  Metadata:&#xA;    major_brand     : isom&#xA;    minor_version   : 512&#xA;    compatible_brands: isomiso2avc1mp41&#xA;    encoder         : Lavf61.1.100&#xA;  Stream #0:0(und): Video: h264, yuv420p(progressive), 640x360 [SAR 1:1 DAR 16:9], q=2-31, 800 kb/s, 25 fps, 90k tbn (default)&#xA;      Metadata:&#xA;        creation_time   : 1970-01-01T00:00:00.000000Z&#xA;        handler_name    : VideoHandler&#xA;        vendor_id       : [0][0][0][0]&#xA;        encoder         : Lavc61.3.100 libx264&#xA;      Side data:&#xA;        cpb: bitrate max/min/avg: 0/0/800000 buffer size: 0 vbv_delay: N/A&#xA;  Stream #0:1(und): Audio: aac (LC), 48000 Hz, 5.1, fltp, 128 kb/s (default)&#xA;      Metadata:&#xA;        creation_time   : 1970-01-01T00:00:00.000000Z&#xA;        handler_name    : SoundHandler&#xA;        vendor_id       : [0][0][0][0]&#xA;        encoder         : Lavc61.3.100 aac&#xA;[hls @ 000001ef12482040] Opening &#x27;beach/480p_000.ts&#x27; for writing speed=15.5x&#xA;[hls @ 000001ef12482040] Opening &#x27;beach/480p.m3u8.tmp&#x27; for writing&#xA;[hls @ 000001ef12482040] Opening &#x27;beach/480p_001.ts&#x27; for writing speed=17.9x&#xA;[hls @ 000001ef12482040] Opening &#x27;beach/480p.m3u8.tmp&#x27; for writing&#xA;[hls @ 000001ef12482040] Opening &#x27;beach/480p_002.ts&#x27; for writing speed=17.3x&#xA;[hls @ 000001ef12482040] Opening &#x27;beach/480p.m3u8.tmp&#x27; for writing&#xA;[hls @ 000001ef12482040] Opening &#x27;beach/480p_003.ts&#x27; for writing speed=19.4x&#xA;[hls @ 000001ef12482040] Opening &#x27;beach/480p.m3u8.tmp&#x27; for writing&#xA;[hls @ 000001ef12482040] Opening &#x27;beach/480p_004.ts&#x27; for writing speed=19.3x&#xA;[hls @ 000001ef12482040] Opening &#x27;beach/480p.m3u8.tmp&#x27; for writing&#xA;[hls @ 000001ef12482040] Opening &#x27;beach/480p_005.ts&#x27; for writing speed=19.2x&#xA;[hls @ 000001ef12482040] Opening &#x27;beach/480p.m3u8.tmp&#x27; for writing&#xA;[hls @ 000001ef12482040] Opening &#x27;beach/480p_006.ts&#x27; for writing&#xA;[hls @ 000001ef12482040] Opening &#x27;beach/480p.m3u8.tmp&#x27; for writing&#xA;[hls @ 000001ef12482040] Opening &#x27;beach/480p_007.ts&#x27; for writing speed=19.4x&#xA;[hls @ 000001ef12482040] Opening &#x27;beach/480p.m3u8.tmp&#x27; for writing&#xA;[hls @ 000001ef12482040] Opening &#x27;beach/480p_008.ts&#x27; for writing speed=19.5x&#xA;[hls @ 000001ef12482040] Opening &#x27;beach/480p.m3u8.tmp&#x27; for writing&#xA;[hls @ 000001ef12482040] Opening &#x27;beach/480p_009.ts&#x27; for writing speed=19.5x&#xA;[hls @ 000001ef12482040] Opening &#x27;beach/480p.m3u8.tmp&#x27; for writing&#xA;[hls @ 000001ef12482040] Opening &#x27;beach/480p_010.ts&#x27; for writing speed=19.4x&#xA;[hls @ 000001ef12482040] Opening &#x27;beach/480p.m3u8.tmp&#x27; for writing&#xA;[hls @ 000001ef12482040] Opening &#x27;beach/480p_011.ts&#x27; for writing/A    =19.4x&#xA;[hls @ 000001ef12482040] Opening &#x27;beach/480p.m3u8.tmp&#x27; for writing&#xA;[out#0/hls @ 000001ef11d4e880] video:17094KiB audio:2680KiB subtitle:0KiB other streams:0KiB global headers:0KiB muxing overhead: unknown&#xA;frame= 4271 fps=485 q=-1.0 Lsize=N/A time=00:02:50.76 bitrate=N/A speed=19.4x&#xA;[libx264 @ 000001ef1288ec00] frame I:45    Avg QP:10.29  size: 60418&#xA;[libx264 @ 000001ef1288ec00] frame P:1914  Avg QP:14.53  size:  5582&#xA;[libx264 @ 000001ef1288ec00] frame B:2312  Avg QP:20.63  size:  1774&#xA;[libx264 @ 000001ef1288ec00] consecutive B-frames: 22.9% 11.9%  8.6% 56.6%&#xA;[libx264 @ 000001ef1288ec00] mb I  I16..4: 15.6% 32.1% 52.2%&#xA;[libx264 @ 000001ef1288ec00] mb P  I16..4:  0.3%  3.4%  1.2%  P16..4: 20.3% 10.0% 13.1%  0.0%  0.0%    skip:51.8%&#xA;[libx264 @ 000001ef1288ec00] mb B  I16..4:  0.1%  0.9%  0.4%  B16..8: 17.2%  5.6%  2.8%  direct: 2.0%  skip:71.0%  L0:41.5% L1:44.1% BI:14.4%&#xA;[libx264 @ 000001ef1288ec00] final ratefactor: 16.13&#xA;[libx264 @ 000001ef1288ec00] 8x8 transform intra:58.4% inter:51.7%&#xA;[libx264 @ 000001ef1288ec00] coded y,uvDC,uvAC intra: 86.7% 94.3% 78.8% inter: 12.6% 15.0% 4.5%&#xA;[libx264 @ 000001ef1288ec00] i16 v,h,dc,p: 17% 42% 14% 28%&#xA;[libx264 @ 000001ef1288ec00] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 23% 19% 11%  6%  7%  8%  8%  9%  9%&#xA;[libx264 @ 000001ef1288ec00] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 23% 18% 12%  6%  9%  9%  8%  8%  7%&#xA;[libx264 @ 000001ef1288ec00] i8c dc,h,v,p: 44% 24% 20% 12%&#xA;[libx264 @ 000001ef1288ec00] Weighted P-Frames: Y:0.0% UV:0.0%&#xA;[libx264 @ 000001ef1288ec00] ref P L0: 78.3%  9.7%  8.8%  3.2%&#xA;[libx264 @ 000001ef1288ec00] ref B L0: 92.5%  6.0%  1.5%&#xA;[libx264 @ 000001ef1288ec00] ref B L1: 97.1%  2.9%&#xA;[libx264 @ 000001ef1288ec00] kb/s:819.63&#xA;[aac @ 000001ef128f7c80] Qavg: 452.137&#xA;

    &#xA;

    When I use the .on(&#x27;start&#x27;, (cmdline) => console.log(cmdline))} code with the -f hls command, the error "Output format hls is not available" appears, as previously mentioned. But my Console.log looks like this if I run my code without using -f hls command :

    &#xA;

    Without -f hls command

    &#xA;

    await new Promise<void>((resolve, reject) => {&#xA;  ffmpeg(filePath)&#xA;    .outputOptions([&#xA;      `-c:v h264`,&#xA;      `-b:v ${videoBitrate}`,&#xA;      `-c:a aac`,&#xA;      `-b:a ${audioBitrate}`,&#xA;      `-vf scale=${resolution}`,&#xA; &#xA;      `-hls_time 10`,&#xA;      `-hls_list_size 0`,&#xA;      `-hls_segment_filename ${directoryPath}/${segmentFileName}`,&#xA;    ])&#xA;    .output(`${directoryPath}/${outputFileName}`)&#xA;    .on(&#x27;start&#x27;, (cmdline) => console.log(cmdline)) &#xA;    .on("end", () => resolve())&#xA;    .on("error", (err) => reject(err))&#xA;    .run();&#xA;});&#xA;</void>

    &#xA;

    Console.log is :

    &#xA;

    `Starting script&#xA;File saved successfully: C:\Users\asifa\Desktop\Genius Grid\Transcode-service\input\c9fcf43726e617a295b203d5acb7b81658b5f05f80eafc74cee21b053422fef1.mp4&#xA;HLS conversion starting for 256x144&#xA;ffmpeg -i C:\Users\asifa\Desktop\Genius Grid\Transcode-service\input\c9fcf43726e617a295b203d5acb7b81658b5f05f80eafc74cee21b053422fef1.mp4 -y -c:v h264 -b:v 200k -c:a aac -b:a 64k -vf scale=256x144 -hls_time 10 -hls_list_size 0 -hls_segment_filename C:\Users\asifa\Desktop\Genius Grid\Transcode-service\output\hls\c9fcf43726e617a295b203d5acb7b81658b5f05f80eafc74cee21b053422fef1/c9fcf43726e617a295b203d5acb7b81658b5f05f80eafc74cee21b053422fef1_256x144_%03d.ts C:\Users\asifa\Desktop\Genius Grid\Transcode-service\output\hls\c9fcf43726e617a295b203d5acb7b81658b5f05f80eafc74cee21b053422fef1/c9fcf43726e617a295b203d5acb7b81658b5f05f80eafc74cee21b053422fef1_256x144.m3u8&#xA;Error transcoding with FFmpeg: Error: ffmpeg exited with code 2880417800: Unrecognized option &#x27;hls_segment_filename C:\Users\asifa\Desktop\Genius Grid\Transcode-service\output\hls\c9fcf43726e617a295b203d5acb7b81658b5f05f80eafc74cee21b053422fef1/c9fcf43726e617a295b203d5acb7b81658b5f05f80eafc74cee21b053422fef1_256x144_%03d.ts&#x27;.&#xA;Error splitting the argument list: Option not found`&#xA;

    &#xA;

  • Convert Webm to MP4 on the fly using ffmpeg for a Telegram bot using Typescript

    23 novembre 2022, par Hex

    I'm trying to make a very primitive telegram bot that get's a json and uploads the urls that are in the json to telegram.

    &#xA;

    The problem is that there are urls that point to webm files I tried to see if there is a simple way to do this and I found this : https://www.npmjs.com/package/webm-to-mp4&#xA;but it doesn't seem to work sadly, it runs into this error : "

    &#xA;

    &#xA;

    &#xA;

    throw new Error(`Conversion error: ${stderr}`)&#xA;                                ^&#xA;&#xA;Error: Conversion error: ffmpeg version n4.2.2 Copyright (c) 2000-2019 the FFmpeg developers&#xA;  built with emcc (Emscripten gcc/clang-like replacement) 1.39.11&#xA;  configuration: --cc=emcc --ranlib=emranlib --enable-cross-compile --target-os=none --arch=x86 --disable-runtime-cpudetect --disable-asm --disable-fast-unaligned --disable-pthreads --disable-w32threads --disable-os2threads --disable-debug --disable-stripping --disable-safe-bitstream-reader --disable-all --enable-ffmpeg --enable-avcodec --enable-avformat --enable-avfilter --enable-swresample --enable-swscale --disable-network --disable-d3d11va --disable-dxva2 --disable-vaapi --disable-vdpau --enable-decoder=vp8 --enable-decoder=h264 --enable-decoder=vorbis --enable-decoder=opus --enable-decoder=mp3 --enable-decoder=aac --enable-decoder=pcm_s16le --enable-decoder=mjpeg --enable-decoder=png --enable-demuxer=matroska --enable-demuxer=ogg --enable-demuxer=mov --enable-demuxer=mp3 --enable-demuxer=wav --enable-demuxer=image2 --enable-demuxer=concat --enable-protocol=file --enable-filter=aresample --enable-filter=scale --enable-filter=crop --enable-filter=overlay --enable-filter=hstack --enable-filter=vstack --disable-bzlib --disable-iconv --disable-libxcb --disable-lzma --disable-sdl2 --disable-securetransport --disable-xlib --enable-zlib --enable-encoder=libx264 --enable-encoder=libmp3lame --enable-encoder=aac --enable-muxer=mp4 --enable-muxer=mp3 --enable-muxer=null --enable-gpl --enable-libmp3lame --enable-libx264 --extra-cflags=&#x27;-s USE_ZLIB=1 -I../lame/dist/include&#x27; --extra-ldflags=-L../lame/dist/lib&#xA;  libavutil      56. 31.100 / 56. 31.100&#xA;  libavcodec     58. 54.100 / 58. 54.100&#xA;  libavformat    58. 29.100 / 58. 29.100&#xA;  libavfilter     7. 57.100 /  7. 57.100&#xA;  libswscale      5.  5.100 /  5.  5.100&#xA;  libswresample   3.  5.100 /  3.  5.100&#xA;input.webm: Invalid data found when processing input&#xA;exception thrown: Error: Conversion error: ffmpeg version n4.2.2 Copyright (c) 2000-2019 the FFmpeg developers&#xA;  built with emcc (Emscripten gcc/clang-like replacement) 1.39.11&#xA;  configuration: --cc=emcc --ranlib=emranlib --enable-cross-compile --target-os=none --arch=x86 --disable-runtime-cpudetect --disable-asm --disable-fast-unaligned --disable-pthreads --disable-w32threads --disable-os2threads --disable-debug --disable-stripping --disable-safe-bitstream-reader --disable-all --enable-ffmpeg --enable-avcodec --enable-avformat --enable-avfilter --enable-swresample --enable-swscale --disable-network --disable-d3d11va --disable-dxva2 --disable-vaapi --disable-vdpau --enable-decoder=vp8 --enable-decoder=h264 --enable-decoder=vorbis --enable-decoder=opus --enable-decoder=mp3 --enable-decoder=aac --enable-decoder=pcm_s16le --enable-decoder=mjpeg --enable-decoder=png --enable-demuxer=matroska --enable-demuxer=ogg --enable-demuxer=mov --enable-demuxer=mp3 --enable-demuxer=wav --enable-demuxer=image2 --enable-demuxer=concat --enable-protocol=file --enable-filter=aresample --enable-filter=scale --enable-filter=crop --enable-filter=overlay --enable-filter=hstack --enable-filter=vstack --disable-bzlib --disable-iconv --disable-libxcb --disable-lzma --disable-sdl2 --disable-securetransport --disable-xlib --enable-zlib --enable-encoder=libx264 --enable-encoder=libmp3lame --enable-encoder=aac --enable-muxer=mp4 --enable-muxer=mp3 --enable-muxer=null --enable-gpl --enable-libmp3lame --enable-libx264 --extra-cflags=&#x27;-s USE_ZLIB=1 -I../lame/dist/include&#x27; --extra-ldflags=-L../lame/dist/lib&#xA;  libavutil      56. 31.100 / 56. 31.100&#xA;  libavcodec     58. 54.100 / 58. 54.100&#xA;  libavformat    58. 29.100 / 58. 29.100&#xA;  libavfilter     7. 57.100 /  7. 57.100&#xA;  libswscale      5.  5.100 /  5.  5.100&#xA;  libswresample   3.  5.100 /  3.  5.100&#xA;input.webm: Invalid data found when processing input&#xA;,Error: Conversion error: ffmpeg version n4.2.2 Copyright (c) 2000-2019 the FFmpeg developers&#xA;  built with emcc (Emscripten gcc/clang-like replacement) 1.39.11&#xA;  configuration: --cc=emcc --ranlib=emranlib --enable-cross-compile --target-os=none --arch=x86 --disable-runtime-cpudetect --disable-asm --disable-fast-unaligned --disable-pthreads --disable-w32threads --disable-os2threads --disable-debug --disable-stripping --disable-safe-bitstream-reader --disable-all --enable-ffmpeg --enable-avcodec --enable-avformat --enable-avfilter --enable-swresample --enable-swscale --disable-network --disable-d3d11va --disable-dxva2 --disable-vaapi --disable-vdpau --enable-decoder=vp8 --enable-decoder=h264 --enable-decoder=vorbis --enable-decoder=opus --enable-decoder=mp3 --enable-decoder=aac --enable-decoder=pcm_s16le --enable-decoder=mjpeg --enable-decoder=png --enable-demuxer=matroska --enable-demuxer=ogg --enable-demuxer=mov --enable-demuxer=mp3 --enable-demuxer=wav --enable-demuxer=image2 --enable-demuxer=concat --enable-protocol=file --enable-filter=aresample --enable-filter=scale --enable-filter=crop --enable-filter=overlay --enable-filter=hstack --enable-filter=vstack --disable-bzlib --disable-iconv --disable-libxcb --disable-lzma --disable-sdl2 --disable-securetransport --disable-xlib --enable-zlib --enable-encoder=libx264 --enable-encoder=libmp3lame --enable-encoder=aac --enable-muxer=mp4 --enable-muxer=mp3 --enable-muxer=null --enable-gpl --enable-libmp3lame --enable-libx264 --extra-cflags=&#x27;-s USE_ZLIB=1 -I../lame/dist/include&#x27; --extra-ldflags=-L../lame/dist/lib&#xA;  libavutil      56. 31.100 / 56. 31.100&#xA;  libavcodec     58. 54.100 / 58. 54.100&#xA;  libavformat    58. 29.100 / 58. 29.100&#xA;  libavfilter     7. 57.100 /  7. 57.100&#xA;  libswscale      5.  5.100 /  5.  5.100&#xA;  libswresample   3.  5.100 /  3.  5.100&#xA;input.webm: Invalid data found when processing input&#xA;

    &#xA;

    I'm not sure what is causing it, my guess is that the webm-to.mp4 package was updated 2 years ago and something broke in the meantime.

    &#xA;

    Is there a better way to do this then downloading the webm converting it and then sending it up to telegram ? If not how could I do the conversion using just ffmpeg ?

    &#xA;

    Here is my current code :

    &#xA;

    import { Telegram, MediaSource, HTML } from &#x27;puregram&#x27;&#xA;import { HearManager } from &#x27;@puregram/hear&#x27;&#xA;import { createReadStream } from &#x27;fs&#x27;&#xA;import postsJson from &#x27;./posts.json&#x27;;&#xA;const { promises: fs } = require("fs");&#xA;const webmToMp4 = require("webm-to-mp4");&#xA;&#xA;const telegram = new Telegram({&#xA;  token: &#x27;********:AAEzriis6zNNjEQuw0BxF9M2RPA9V4lEqLA&#x27;&#xA;})&#xA;const hearManager = new HearManager()&#xA;&#xA;telegram.updates.startPolling()&#xA;  .then(() => console.log(`started polling @${telegram.bot.username}`))&#xA;  .catch(console.error)&#xA;&#xA;telegram.updates.on(&#x27;message&#x27;, hearManager.middleware)&#xA;&#xA;var posts = postsJson;&#xA;&#xA;telegram.updates.on(&#x27;message&#x27;, (context) => {&#xA;    posts.forEach( async data => {&#xA;      console.error(data.ext);&#xA;        if(data.ext == "jpg" || data.ext == "png"){&#xA;          context.sendPhoto(MediaSource.url(data.image), { caption: data.content  } );&#xA;          delay(1000);&#xA;        }&#xA;        if(data.ext == "gif"){&#xA;          context.sendAnimation(MediaSource.url(data.image), { caption: data.content  } );&#xA;          delay(1000);&#xA;        }&#xA;        if(data.ext == "webm"){&#xA;          //context.sendDocument(MediaSource.url(data.image), { caption: data.content  } );&#xA;          delay(1000);&#xA;        }&#xA;        delay(1000);&#xA;    })&#xA;})&#xA;fs.writeFile("file.mp4", Buffer.from(webmToMp4( fs.readFile("./file.webm"))));&#xA;&#xA;function delay(ms: number) {&#xA;  return new Promise( resolve => setTimeout(resolve, ms) ); //This does not work either&#xA;}&#xA;

    &#xA;

    I wish everoyne a nice day !

    &#xA;

  • A Guide to GDPR Sensitive Personal Data

    13 mai 2024, par Erin

    The General Data Protection Regulation (GDPR) is one of the world’s most stringent data protection laws. It provides a legal framework for collection and processing of the personal data of EU individuals.

    The GDPR distinguishes between “special categories of personal data” (also referred to as “sensitive”) and other personal data and imposes stricter requirements on collection and processing of sensitive data. Understanding these differences will help your company comply with the requirements and avoid heavy penalties.

    In this article, we’ll explain what personal data is considered “sensitive” according to the GDPR. We’ll also examine how a web analytics solution like Matomo can help you maintain compliance.

    What is sensitive personal data ?

    The following categories of data are treated as sensitive :

      1. Personal data revealing :
        • Racial or ethnic origin ;
        • Political opinions ;
        • Religious or philosophical beliefs ;
        • Trade union membership ;
      2. Genetic and biometric data ;
      3. Data concerning a person’s :
        • Health ; or
        • Sex life or sexual orientation.
    Examples of GDPR Sensitive Personal Data

    Sensitive vs. non-sensitive personal data : What’s the difference ?

    While both categories include information about an individual, sensitive data is seen as more private, or requiring a greater protection. 

    Sensitive data often carries a higher degree of risk and harm to the data subject, if the data is exposed. For example, a data breach exposing health records could lead to discrimination for the individuals involved. An insurance company could use the information to increase premiums or deny coverage. 

    In contrast, personal data like name or gender is considered less sensitive because it doesn’t carry the same degree of harm as sensitive data. 

    Unauthorised access to someone’s name alone is less likely to harm them or infringe on their fundamental rights and freedoms than an unauthorised access to their health records or biometric data. Note that financial information (e.g. credit card details) does not fall into the special categories of data.

    Table displaying different sensitive data vs non-sensitive data

    Legality of processing

    Under the GDPR, both sensitive and nonsensitive personal data are protected. However, the rules and conditions for processing sensitive data are more stringent.

    Article 6 deals with processing of non-sensitive data and it states that processing is lawful if one of the six lawful bases for processing applies. 

    In contrast, Art. 9 of the GDPR states that processing of sensitive data is prohibited as a rule, but provides ten exceptions. 

    It is important to note that the lawful bases in Art. 6 are not the same as exceptions in Art. 9. For example, while performance of a contract or legitimate interest of the controller are a lawful basis for processing non-sensitive personal data, they are not included as an exception in Art. 9. What follows is that controllers are not permitted to process sensitive data on the basis of contract or legitimate interest. 

    The exceptions where processing of sensitive personal data is permitted (subject to additional requirements) are : 

    • Explicit consent : The individual has given explicit consent to processing their sensitive personal data for specified purpose(s), except where an EU member state prohibits such consent. See below for more information about explicit consent. 
    • Employment, social security or social protection : Processing sensitive data is necessary to perform tasks under employment, social security or social protection law.
    • Vital interests : Processing sensitive data is necessary to protect the interests of a data subject or if the individual is physically or legally incapable of consenting. 
    • Non-for-profit bodies : Foundations, associations or nonprofits with a political, philosophical, religious or trade union aim may process the sensitive data of their members or those they are in regular contact with, in connection with their purposes (and no disclosure of the data is permitted outside the organisation, without the data subject’s consent).
    • Made public : In some cases, it may be permissible to process the sensitive data of a data subject if the individual has already made it public and accessible. 
    • Legal claims : Processing sensitive data is necessary to establish, exercise or defend legal claims, including legal or in court proceedings.
    • Public interest : Processing is necessary for reasons of substantial public interest, like preventing unlawful acts or protecting the public.
    • Health or social care : Processing special category data is necessary for : preventative or occupational medicine, providing health and social care, medical diagnosis or managing healthcare systems.
    • Public health : It is permissible to process sensitive data for public health reasons, like protecting against cross-border threats to health or ensuring the safety of medicinal products or medical devices. 
    • Archiving, research and statistics : You may process sensitive data if it’s done for archiving purposes in the public interest, scientific or historical research purposes or statistical purposes.

    In addition, you must adhere to all data handling requirements set by the GDPR.

    Important : Note that for any data sent that you are processing, you always need to identify a lawful basis under Art. 6. In addition, if the data sent contains sensitive data, you must comply with Art. 9.

    Explicit consent

    While consent is a valid lawful basis for processing non-sensitive personal data, controllers are permitted to process sensitive data only with an “explicit consent” of the data subject.

    The GDPR does not define “explicit” consent, but it is accepted that it must meet all Art. 7 conditions for consent, at a higher threshold. To be “explicit” a consent requires a clear statement (oral or written) of the data subject. Consent inferred from the data subject’s actions does not meet the threshold. 

    The controller must retain records of the explicit consent and provide appropriate consent withdrawal method to allow the data subject to exercise their rights.

    Examples of compliant and non-compliant sensitive data processing

    Here are examples of when you can and can’t process sensitive data :

    • When you can process sensitive data : A doctor logs sensitive data about a patient, including their name, symptoms and medicine prescribed. The hospital can process this data to provide appropriate medical care to their patients. An IoT device and software manufacturer processes their customers’ health data based on explicit consent of each customer. 
    • When you can’t process sensitive data : One example is when you don’t have explicit consent from a data subject. Another is when there’s no lawful basis for processing it or you are collecting personal data you simply do not need. For example, you don’t need your customer’s ethnic origin to fulfil an online order.

    Other implications of processing sensitive data

    If you process sensitive data, especially on a large scale, GDPR imposes additional requirements, such as having Data Privacy Impact Assessments, appointing Data Protection Officers and EU Representatives, if you are a controller based outside the EU.

    Penalties for GDPR non-compliance

    Mishandling sensitive data (or processing it when you’re not allowed to) can result in huge penalties. There are two tiers of GDPR fines :

    • €10 million or 2% of a company’s annual revenue for less severe infringements
    • €20 million or 4% of a company’s annual revenue for more severe infringements

    In the first half of 2023 alone, fines imposed in the EU due to GDPR violations exceeded €1.6 billion, up from €73 million in 2019.

    Examples of high-profile violations in the last few years include :

    • Amazon : The Luxembourg National Commission fined the retail giant with a massive $887 million fine in 2021 for not processing personal data per the GDPR. 
    • Google : The National Data Protection Commission (CNIL) fined Google €50 million for not getting proper consent to display personalised ads.
    • H&M : The Hamburg Commissioner for Data Protection and Freedom of Information hit the multinational clothing company with a €35.3 million fine in 2020 for unlawfully gathering and storing employees’ data in its service centre.

    One of the criteria that affects the severity of a fine is “data category” — the type of personal data being processed. Companies need to take extra precautions with sensitive data, or they risk receiving more severe penalties.

    What’s more, GDPR violations can negatively affect your brand’s reputation and cause you to lose business opportunities from consumers concerned about your data practices. 76% of consumers indicated they wouldn’t buy from companies they don’t trust with their personal data.

    Organisations should lay out their data practices in simple terms and make this information easily accessible so customers know how their data is being handled.

    Get started with GDPR-compliant web analytics

    The GDPR offers a framework for securing and protecting personal data. But it also distinguishes between sensitive and non-sensitive data. Understanding these differences and applying the lawful basis for processing this data type will help ensure compliance.

    Looking for a GDPR-compliant web analytics solution ?

    At Matomo, we take data privacy seriously. 

    Our platform ensures 100% data ownership, putting you in complete control of your data. Unlike other web analytics solutions, your data remains solely yours and isn’t sold or auctioned off to advertisers. 

    Additionally, with Matomo, you can be confident in the accuracy of the insights you receive, as we provide reliable, unsampled data.

    Matomo also fully complies with GDPR and other data privacy laws like CCPA, LGPD and more.

    Start your 21-day free trial 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 GDPR. We encourage every business and website to take data privacy seriously and discuss these issues with your lawyer if you have any concerns.