Recherche avancée

Médias (1)

Mot : - Tags -/censure

Autres articles (19)

  • 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

  • XMP PHP

    13 mai 2011, par

    Dixit Wikipedia, XMP signifie :
    Extensible Metadata Platform ou XMP est un format de métadonnées basé sur XML utilisé dans les applications PDF, de photographie et de graphisme. Il a été lancé par Adobe Systems en avril 2001 en étant intégré à la version 5.0 d’Adobe Acrobat.
    Étant basé sur XML, il gère un ensemble de tags dynamiques pour l’utilisation dans le cadre du Web sémantique.
    XMP permet d’enregistrer sous forme d’un document XML des informations relatives à un fichier : titre, auteur, historique (...)

  • (Dés)Activation de fonctionnalités (plugins)

    18 février 2011, par

    Pour gérer l’ajout et la suppression de fonctionnalités supplémentaires (ou plugins), MediaSPIP utilise à partir de la version 0.2 SVP.
    SVP permet l’activation facile de plugins depuis l’espace de configuration de MediaSPIP.
    Pour y accéder, il suffit de se rendre dans l’espace de configuration puis de se rendre sur la page "Gestion des plugins".
    MediaSPIP est fourni par défaut avec l’ensemble des plugins dits "compatibles", ils ont été testés et intégrés afin de fonctionner parfaitement avec chaque (...)

Sur d’autres sites (4283)

  • avcodec/libzvbi-teletextdec : fix txt_default_region limits

    9 juin 2020, par Marton Balint
    avcodec/libzvbi-teletextdec : fix txt_default_region limits
    

    Max region ID is 87. Also the region affects not only the G0 charset but G2 and
    the national subset as well.

    Signed-off-by : Marton Balint <cus@passwd.hu>

    • [DH] doc/decoders.texi
    • [DH] libavcodec/libzvbi-teletextdec.c
  • libav ffmpeg - streaming from both a mkv and input stream

    20 janvier 2020, par kealist

    I am trying to use ffmpeg libraries in C# with AutoGen bindings. The overall issue is that I am taking a collection of sources, some streams, and some .mkv containing recordings of a stream. As for now, they are all h264 and only video. For input streams, I am able to adjust the packets and broad cast them and that works fine, but any time I try to call av_interleaved_write_frame with packets from the MKV file, I get the error Error occurred: Invalid data found when processing input.

    Here is the main loop, where the error happens for mkv files. Is there an extra step ?

    /* read all packets */
    while (true)
    {
       if ((ret = ffmpeg.av_read_frame(ifmt_ctx, &amp;packet)) &lt; 0)
       {
           Console.WriteLine("Unable to read packet");
           break;
       }
       stream_index = (uint)packet.stream_index;
       type = ifmt_ctx->streams[packet.stream_index]->codecpar->codec_type;
       Console.WriteLine($"Demuxer gave frame of stream_index %{stream_index}");


       /* remux this frame without reencoding */
       ffmpeg.av_packet_rescale_ts(&amp;packet,
           ifmt_ctx->streams[stream_index]->time_base,
           ofmt_ctx->streams[stream_index]->time_base);

       if (packet.stream_index &lt; 0)
       {
           Console.WriteLine("Packet stream error");
       }



       ret = ffmpeg.av_write_frame(ofmt_ctx, &amp;packet);
       if (ret &lt; 0)
       {
           goto end;
       }
       else
       {
           ffmpeg.av_packet_unref(&amp;packet);
       }
    }

    Anything need to be different for MKV files ?

    I get some contradictory error output where it claims it is annex b but also isn’t :

    [AVBSFContext @ 00000220eb657080] The input looks like it is Annex B already
    Automatically inserted bitstream filter 'h264_mp4toannexb'; args=''
    [mpegts @ 00000220ebace300] H.264 bitstream malformed, no startcode found, use the video bitstream filter 'h264_mp4toannexb' to fix it ('-bsf:v h264_mp4toannexb' option with ffmpeg)

    Verbose output from ffplay from an MKV file :

    ffplay version git-2020-01-13-7225479 Copyright (c) 2003-2020 the FFmpeg developers
     built with gcc 9.2.1 (GCC) 20200111
     configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt --enable-amf
     libavutil      56. 38.100 / 56. 38.100
     libavcodec     58. 65.103 / 58. 65.103
     libavformat    58. 35.102 / 58. 35.102
     libavdevice    58.  9.103 / 58.  9.103
     libavfilter     7. 71.100 /  7. 71.100
     libswscale      5.  6.100 /  5.  6.100
     libswresample   3.  6.100 /  3.  6.100
     libpostproc    55.  6.100 / 55.  6.100
    Initialized direct3d renderer.
    [h264 @ 00000165ed18d140] Reinit context to 640x480, pix_fmt: yuv444p
    Input #0, matroska,webm, from '.\webcam_14_Test1.mkv':   0B f=0/0
     Metadata:
       ENCODER         : Lavf58.12.100
     Duration: 00:00:39.30, start: 0.000000, bitrate: 1943 kb/s
       Stream #0:0: Video: h264 (High 4:4:4 Predictive), 1 reference frame, yuv444p(progressive, left), 640x480 [SAR 1:1 DAR 4:3], 1k fps, 30 tbr, 1k tbn, 60 tbc (default)
       Metadata:
         DURATION        : 00:00:39.299000000
    [h264 @ 00000165f424e200] Reinit context to 640x480, pix_fmt: yuv444p
    [ffplay_buffer @ 00000165f52ea840] w:640 h:480 pixfmt:yuv444p tb:1/1000 fr:30/1 sar:1/1
    [auto_scaler_0 @ 00000165ed1d2c80] w:iw h:ih flags:'bicubic' interl:0
    [ffplay_buffersink @ 00000165f424ef00] auto-inserting filter 'auto_scaler_0' between the filter 'ffplay_buffer' and the filter 'ffplay_buffersink'
    [auto_scaler_0 @ 00000165ed1d2c80] w:640 h:480 fmt:yuv444p sar:1/1 -> w:640 h:480 fmt:yuv420p sar:1/1 flags:0x4
    Created 640x480 texture with SDL_PIXELFORMAT_IYUV.
    [AVIOContext @ 00000165ed179a40] Statistics: 9547965 bytes read, 0 seeks
  • Error : Cannot find ffmpeg in firebase cloud function

    6 novembre 2024, par Ahmed Wagdi

    i'm trying to compress some uploaded files to firebase storage .. using firebase cloud functions but it give me the error Error: Cannot find ffmpeg

    &#xA;

    here is my function :

    &#xA;

    const functions = require("firebase-functions");&#xA;const admin = require("firebase-admin");&#xA;const ffmpeg = require("fluent-ffmpeg");&#xA;const ffmpegStatic = require("ffmpeg-static");&#xA;const axios = require("axios");&#xA;&#xA;// const {onSchedule} = require("firebase-functions/v2/scheduler");&#xA;&#xA;admin.initializeApp();&#xA;&#xA;// Ensure fluent-ffmpeg uses the binary&#xA;ffmpeg.setFfmpegPath(ffmpegStatic.path);&#xA;&#xA;const db = admin.firestore();&#xA;const bucket = admin.storage().bucket();&#xA;const fs = require("fs");&#xA;const downloadVideo = async (url, outputPath) => {&#xA;  const response = await axios.get(url, {responseType: "stream"});&#xA;  const writer = fs.createWriteStream(outputPath);&#xA;  response.data.pipe(writer);&#xA;  return new Promise((resolve, reject) => {&#xA;    writer.on("finish", () => resolve(outputPath));&#xA;    writer.on("error", reject);&#xA;  });&#xA;};&#xA;&#xA;const compressVideo = (videoFullPath, outputFileName, targetSize) => {&#xA;  return new Promise((resolve, reject) => {&#xA;    ffmpeg.ffprobe(videoFullPath, (err, metadata) => {&#xA;      if (err) return reject(err);&#xA;      const duration = parseFloat(metadata.format.duration);&#xA;      const targetTotalBitrate =&#xA;      (targetSize * 1024 * 8) / (1.073741824 * duration);&#xA;&#xA;      let audioBitrate =&#xA;      metadata.streams.find((s) => s.codec_type === "audio").bit_rate;&#xA;      if (10 * audioBitrate > targetTotalBitrate) {&#xA;        audioBitrate = targetTotalBitrate / 10;&#xA;      }&#xA;&#xA;      const videoBitrate = targetTotalBitrate - audioBitrate;&#xA;      ffmpeg(videoFullPath)&#xA;          .output(outputFileName)&#xA;          .videoCodec("libx264")&#xA;          .audioCodec("aac")&#xA;          .videoBitrate(videoBitrate)&#xA;          .audioBitrate(audioBitrate)&#xA;          .on("end", resolve)&#xA;          .on("error", reject)&#xA;          .run();&#xA;    });&#xA;  });&#xA;};&#xA;&#xA;const uploadVideoWithResumableUpload = (filePath, destinationBlobName) => {&#xA;  const blob = bucket.file(destinationBlobName);&#xA;  const options = {resumable: true, validation: "crc32c"};&#xA;  return blob.createWriteStream(options).end(fs.readFileSync(filePath));&#xA;};&#xA;&#xA;exports.processLessonsOnDemand =&#xA;functions.https.onRequest({timeoutSeconds: 3600, memory: "2GB"}&#xA;    , async (context) => {&#xA;      console.log("Fetching lessons from Firestore...");&#xA;      const lessonsRef = db.collection("leassons");&#xA;      const lessonsSnapshot = await lessonsRef.get();&#xA;&#xA;      if (lessonsSnapshot.empty) {&#xA;        console.log("No lessons found in Firestore.");&#xA;        return; // Exit if no lessons are available&#xA;      }&#xA;&#xA;      const lessonDoc = lessonsSnapshot.docs[0]; // Get the first document&#xA;      const lessonData = lessonDoc.data();&#xA;&#xA;      if (lessonData.shrinked) {&#xA;        console.log(&#xA;            `Skipping lesson ID ${lessonDoc.id} as it&#x27;s already shrunk.`,&#xA;        );&#xA;        return; // Exit if the first lesson is already shrunk&#xA;      }&#xA;&#xA;      const videoURL = lessonData.videoURL;&#xA;      if (!videoURL) {&#xA;        console.log(&#xA;            `No video URL for lesson ID: ${lessonDoc.id}. Skipping...`,&#xA;        );&#xA;        return; // Exit if no video URL is available&#xA;      }&#xA;&#xA;      const tempVideoPath = "/tmp/temp_video.mp4";&#xA;&#xA;      try {&#xA;        await downloadVideo(videoURL, tempVideoPath);&#xA;&#xA;        const targetSize = (fs.statSync(tempVideoPath).size * 0.30) / 1024;&#xA;        const outputCompressedVideo = `/tmp/compressed_${lessonDoc.id}.mp4`;&#xA;&#xA;        await compressVideo(tempVideoPath, outputCompressedVideo, targetSize);&#xA;&#xA;        await uploadVideoWithResumableUpload(&#xA;            outputCompressedVideo,&#xA;            `compressed_videos/compressed_${lessonDoc.id}.mp4`,&#xA;        );&#xA;&#xA;        const newVideoURL = `https://storage.googleapis.com/${bucket.name}/compressed_videos/compressed_${lessonDoc.id}.mp4`;&#xA;&#xA;        const oldVideoPath = videoURL.replace(`https://storage.googleapis.com/${bucket.name}/`, "");&#xA;        const oldBlob = bucket.file(oldVideoPath);&#xA;        await oldBlob.delete();&#xA;&#xA;        await lessonsRef.doc(lessonDoc.id).update({&#xA;          videoURL: newVideoURL,&#xA;          shrinked: true,&#xA;        });&#xA;&#xA;        console.log(`Processed lesson ID: ${lessonDoc.id}`);&#xA;        fs.unlinkSync(tempVideoPath); // Clean up temporary files&#xA;        fs.unlinkSync(outputCompressedVideo); // Clean up compressed file&#xA;      } catch (error) {&#xA;        console.error(`Error processing lesson ID ${lessonDoc.id}:`, error);&#xA;      }&#xA;    });&#xA;&#xA;&#xA;

    &#xA;