Recherche avancée

Médias (1)

Mot : - Tags -/ipad

Autres articles (107)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • Multilang : améliorer l’interface pour les blocs multilingues

    18 février 2011, par

    Multilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
    Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela.

Sur d’autres sites (10558)

  • Linkedin API video split upload

    25 octobre 2024, par Natalia

    I'm working on Linkedin api integration in next.js app. Short videos I upload successfully, the problem is with video splitting. My finction split video if necessary and upload it to temp folder. I use ffmpeg from 'fluent-ffmpeg' ;

    


    export async function splitVideoToTemp(fileName: string): Promise<boolean> {&#xA;&#xA;const inputPath = path.join(process.cwd(), &#x27;tmp&#x27;, &#x27;input&#x27;, fileName);&#xA;ensureFolderExists(&#x27;chunks&#x27;);&#xA;const outputDir = path.join(process.cwd() &#x2B; &#x27;/tmp/chunks&#x27;);&#xA;const bytes = 4194303;&#xA;await splitVideo(inputPath as string, bytes, outputDir);&#xA;await deleteFileFromTemp(inputPath);&#xA;&#xA;return true;&#xA;}&#xA;&#xA;export async function splitVideo(inputPath: string, chunkSize: number, outputDir: &#xA;string): Promise<void> {&#xA; try {&#xA;    await fs.mkdir(outputDir, { recursive: true });&#xA;&#xA;    const metadata: FFmpegMetadata = await new Promise((resolve, reject) => {&#xA;        ffmpeg.ffprobe(inputPath, (err, metadata) => {&#xA;            if (err) reject(err);&#xA;            else resolve(metadata as FFmpegMetadata);&#xA;        });&#xA;    });&#xA;&#xA;    const duration = metadata.format.duration;&#xA;    const chunkDuration = chunkSize / (metadata.format.size / duration);&#xA;    const promises = [];&#xA;&#xA;    for (let startTime = 0, chunkIndex = 0; startTime &lt; duration; startTime &#x2B;= &#xA; chunkDuration, chunkIndex&#x2B;&#x2B;) {&#xA;        const outputPath = path.join(outputDir, `chunk_${chunkIndex}.mp4`);&#xA;        promises.push(processChunk(inputPath, startTime, chunkDuration, outputPath));&#xA;    }&#xA;&#xA;    await Promise.all(promises);&#xA;    console.log(&#x27;Video split successfully&#x27;);&#xA;} catch (error) {&#xA;    console.error(&#x27;Error splitting video:&#x27;, error);&#xA;}&#xA;}&#xA;&#xA; function processChunk(inputPath: string, startTime: number, chunkDuration: number, &#xA; outputPath: string): Promise<void> {&#xA; return new Promise((resolve, reject) => {&#xA;    ffmpeg(inputPath)&#xA;        .setStartTime(startTime)&#xA;        .setDuration(chunkDuration)&#xA;        .output(outputPath)&#xA;        .on(&#x27;end&#x27;, () => resolve())&#xA;        .on(&#x27;error&#x27;, reject)&#xA;        .run();&#xA; });&#xA; }&#xA;</void></void></boolean>

    &#xA;

    calling this functions nicely split my video to chuks, they are not corrupted, I can play them one by one.

    &#xA;

    then I call

    &#xA;

    const response = await fetch(&#xA;        `${LN_API_BASE_URL}/${LN_API_VERSION}/videos?action=initializeUpload`,&#xA;        requestOptions&#xA;    );&#xA;    const result = await response.json();&#xA;

    &#xA;

    I receive upload isntructions.

    &#xA;

                await splitVideoToTemp(fileName);&#xA;            await Promise.all(&#xA;                instructions?.map(async (instruction, index) => {&#xA;                    const chunkName = `chunk_${index}.mp4`;&#xA;                    const outputPath = path.join(&#xA;                        process.cwd() &#x2B; &#x27;/tmp/chunks&#x27;,&#xA;                        chunkName&#xA;                    );&#xA;                    const blob = await getFileAsBlob(outputPath);&#xA;                    const result = uploadVideo(&#xA;                        instruction.uploadUrl,&#xA;                        blob,&#xA;                        params.pageAccessToken&#xA;                    );&#xA;                    const uploadedChunkId = await result;&#xA;                    if (uploadedChunkId) {&#xA;                        uploadedChunksIds.push(uploadedChunkId);&#xA;                        // delete file&#xA;                       await deleteFileFromTemp(outputPath);&#xA;                    }&#xA;                })&#xA;            );&#xA;

    &#xA;

    all nice and well, when I upload, i receive bunch of chunk ids with each call, I put them in array, call finalize upload with obj

    &#xA;

     finalizeUploadRequest: {&#xA;   video: &#x27;urn:li:video:videoId&#x27;,&#xA;    uploadToken: &#x27;&#x27;,&#xA;   uploadedPartIds: [ .. &#x27;ids i received&#x27;, &#x27;&#x27;, &#x27;&#x27;, &#x27;&#x27;]&#xA;  }&#xA;

    &#xA;

    then I poll result, its available, then I post. it success. But on the page I get one random chank from all of them.

    &#xA;

    Any Idea why ? I dont get any error. Upload process is smooth. All videos go through this logic, if video short and dont need to be splitted, it uploads perfectly, but whats wrong with partial uploading ? Why it post only one of the chunks and random one ?

    &#xA;

    I'll appreciate any tips

    &#xA;

  • Anomalie #3630 : Logo d’auteur et fonction de recherche de logo

    29 décembre 2015, par b b

    Salut, je ne comprends pas quand tu dis :

    Or la description parle de "type", et non pas d’id.

    Le phpdoc de la fonction mentionne bien l’id, cf : http://code.spip.net/autodoc/tree/ecrire/public/quete.php.html#function_quete_logo

    Quel code utilises-tu et quel résultat attends-tu ?

  • avcodec/ralf : Check num_blocks before use

    11 mai 2020, par Michael Niedermayer
    avcodec/ralf : Check num_blocks before use
    

    Fixes : out of array access
    Fixes : 20659/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_RALF_fuzzer-5739471895265280

    Found-by : continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
    Signed-off-by : Michael Niedermayer <michael@niedermayer.cc>

    • [DH] libavcodec/ralf.c