Recherche avancée

Médias (1)

Mot : - Tags -/école

Autres articles (36)

  • Support audio et vidéo HTML5

    10 avril 2011

    MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
    Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
    Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
    Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...)

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

  • De l’upload à la vidéo finale [version standalone]

    31 janvier 2010, par

    Le chemin d’un document audio ou vidéo dans SPIPMotion est divisé en trois étapes distinctes.
    Upload et récupération d’informations de la vidéo source
    Dans un premier temps, il est nécessaire de créer un article SPIP et de lui joindre le document vidéo "source".
    Au moment où ce document est joint à l’article, deux actions supplémentaires au comportement normal sont exécutées : La récupération des informations techniques des flux audio et video du fichier ; La génération d’une vignette : extraction d’une (...)

Sur d’autres sites (6437)

  • avformat : refactor ff_stream_encode_params_copy() to stream_params_copy()

    6 août 2022, par Pierre-Anthony Lemieux
    avformat : refactor ff_stream_encode_params_copy() to stream_params_copy()
    

    Addresses http://ffmpeg.org/pipermail/ffmpeg-devel/2022-August/299726.html

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

    • [DH] libavformat/avformat.c
    • [DH] libavformat/fifo.c
    • [DH] libavformat/internal.h
    • [DH] libavformat/mux.h
    • [DH] libavformat/mux_utils.c
    • [DH] libavformat/segment.c
    • [DH] libavformat/tee.c
    • [DH] libavformat/webm_chunk.c
  • ffmpeg crashes with "Internal bug", "Failed to inject frame into filter network" while trying to convert PNG files into an animated gif using filters

    12 août 2022, par EigentlichOracler

    ffmpeg version : ffmpeg version 4.2.7-0ubuntu0.1

    &#xA;

    Kernel : 5.4.0-122-lowlatency #138-Ubuntu SMP PREEMPT x86_64 x86_64 x86_64 GNU/Linux

    &#xA;

    PNG-Images : 996 pieces, all equal in size : 1000x50

    &#xA;

    Then trying to build palette using palettegen :

    &#xA;

    export filters="scale=1000:-1:flags=lanczos"&#xA;export palette=./stripes_palette.png&#xA;ffmpeg -v warning -i ./palette_source_stripes.png -vf "$filters,palettegen=stats_mode=diff" -y $palette&#xA;[Parsed_palettegen_1 @ 0x55f0eea30e00] Dupped color: FF63000D&#xA;

    &#xA;

    Palette file has been created, looks good so far. Then I tried to convert all 996 PNG files into one single (space optimized) animated GIF file using paletteuse :

    &#xA;

    ffmpeg -v warning -framerate 5 -thread_queue_size 2048 -i ./tmp/temp.%04d.png -i $palette -lavfi "$filters,paletteuse=dither=bayer:bayer_scale=5:diff_mode=rectangle" -r 5 -loop -1 -y testanim.gif&#xA;Error while filtering: Internal bug, should not have happened&#xA;Failed to inject frame into filter network: Internal bug, should not have happened&#xA;Error while processing the decoded data for stream #0:0&#xA;

    &#xA;

    The reason for "-framerate 5" for the input and "-r 5" for the output is : I wanted the animated GIF to use a determined time for running through animation. It already had worked out without using complex filtering, but the results were huge GIF files which are hard to handle.&#xA;But even when I avoid both framerate parameters, still the same error message occurs.

    &#xA;

    Should I look deeper into the "Dupped color" which has been mentioned ? Did anybody encounter a similar issue using ffmpeg ?&#xA;I'm not used to deal with filters (nor "complex filters") in ffmpeg, I'm very new at this, but I've found no tips regarding an ffmpeg crash like I've right here.

    &#xA;

    ------------------------------- EDIT 2022-08-12/1 ---------------------

    &#xA;

    Same error occurs with current stable version&#xA;ffmpeg version 4.4.2-0ubuntu0.22.04.1 Copyright (c) 2000-2021 the FFmpeg developers

    &#xA;

    ------------------------------- EDIT 2022-08-12/2 ---------------------

    &#xA;

    Found workaround, see answer below

    &#xA;

  • Format video to upload on instagram API (Nodejs)

    6 octobre 2022, par Rafael de Carvalho

    I'm trying to automate the process of posting photos and videos on instagram but I constantly get errors when uploading to instagram.

    &#xA;

    I will leave a video duration error here but several others happen, I need to follow the following requirements :

    &#xA;

      &#xA;
    • Container : MOV or MP4 (MPEG-4 Part 14), no edit lists, atom moov in front of file
    • &#xA;

    • Audio codec : AAC, 48 kHz maximum sampling rate, 1 or 2 channel (mono or stereo)
    • &#xA;

    • Video codec : HEVC or H.264, progressive scan, closed GOP, 4:2:0 chroma subsampling
    • &#xA;

    • Frame rate : from 23 to 60 FPS
    • &#xA;

    • photo size :&#xA;
        &#xA;
      • Maximum columns (horizontal pixels) : 1,920
      • &#xA;

      • Minimum aspect ratio [columns/rows] : 4/5
      • &#xA;

      • Maximum aspect ratio [columns/rows] : 9/16
      • &#xA;

      &#xA;

    • &#xA;

    • Video bitrate : 5Mbps maximum VBR
    • &#xA;

    • Audio bitrate : 128 kbps
    • &#xA;

    • Duration : maximum 60 seconds and minimum 3 seconds
    • &#xA;

    • File size : max 100 MB
    • &#xA;

    &#xA;

    My code :

    &#xA;

    import { S3 } from &#x27;aws-sdk&#x27;;&#xA;import { IgApiClient } from &#x27;instagram-private-api&#x27;;&#xA;import fs from &#x27;fs&#x27;;&#xA;&#xA;const s3 = new S3();&#xA;const ig = new IgApiClient();&#xA;const bucket = &#x27;posts&#x27;;&#xA;const { INSTA_USER, INSTA_PASS } = process.env;&#xA;&#xA;ig.state.generateDevice(INSTA_USER);&#xA;&#xA;export const main = async () => {&#xA;  try {&#xA;    await ig.account.login(INSTA_USER, INSTA_PASS);&#xA;&#xA;    const { Contents } = await s3.listObjectsV2({ Bucket: bucket, MaxKeys: 2, Prefix: &#x27;memes/geral&#x27; }).promise();&#xA;&#xA;    const files = await Promise.all(Contents.map(async ({ Key }) => {&#xA;      const file = await s3.getObject({&#xA;        Bucket: bucket,&#xA;        Key,&#xA;      }).promise();&#xA;&#xA;      return file.Body;&#xA;    }));&#xA;&#xA;    const publishResult = await ig.publish.video({&#xA;      video: files[0],&#xA;      coverImage: await fs.readFileAsync("../../src/assets/cover.png")&#xA;    });&#xA;&#xA;    console.dir({ publishResult }, { depth: null })&#xA;  } catch (error) {&#xA;    console.error(error);&#xA;    throw error;&#xA;  }&#xA;}&#xA;

    &#xA;

    When I get a file from s3, it comes in the following format.&#xA;I'm taking the content of the body property and put it in the video property of the publish method.&#xA;Is it right ?&#xA;I also tried to save the file with fs.writeFile and dps use readFileSync like in the example but it also gave the same error.

    &#xA;

    {&#xA;    AcceptRanges: &#x27;bytes&#x27;,&#xA;    LastModified: 2022-08-04T23:15:24.000Z,&#xA;    ContentLength: 3252472,&#xA;    ETag: &#x27;"c491cfe2fb5bc29777fc34391fc1d56a"&#x27;,&#xA;    ContentType: &#x27;application/octet-stream&#x27;,&#xA;    Body: Buffer(3252472) [Uint8Array] [&#xA;        0,   0,   0,  32, 102, 116, 121, 112, 105, 115, 111, 109,&#xA;        0,   0,   2,   0, 105, 115, 111, 109, 105, 115, 111,  50,&#xA;       97, 118,  99,  49, 109, 112,  52,  49,   0,   0, 209,   0,&#xA;      109, 111, 111, 118,   0,   0,   0, 108, 109, 118, 104, 100,&#xA;        0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,&#xA;        0,   0,   3, 232,   0,   0, 250,  17,   0,   1,   0,   0,&#xA;        1,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,&#xA;        0,   1,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,&#xA;        0,   0,   0,   0,&#xA;      ... 3252372 more items&#xA;    ]&#xA;  }&#xA;

    &#xA;

    Error :

    &#xA;

    {&#xA;    "errorMessage": "POST /api/v1/media/upload_finish/?video=1 - 400 Bad Request; server processing error: VideoSourceDurationCheckException",&#xA;    "errorType": "IgUploadVideoError",&#xA;    "stackTrace": [&#xA;        "IgUploadVideoError: POST /api/v1/media/upload_finish/?video=1 - 400 Bad Request; server processing error: VideoSourceDurationCheckException",&#xA;        "    at C:\\Users\\User\\Desktop\\dev\\Insta\\.webpack\\service\\src\\functions\\webpack:\\instagram-private-api\\dist\\services\\publish.service.js:26:1",  &#xA;        "    at tryCatcher (C:\\Users\\User\\Desktop\\dev\\Insta\\.webpack\\service\\src\\functions\\webpack:\\bluebird\\js\\release\\util.js:16:1)"&#xA;}&#xA;

    &#xA;

    when I try to post a video under 60 seconds (apparently within the requirements) :

    &#xA;

    {&#xA;    "errorMessage": "POST /api/v1/media/configure/?video=1 - 403 Forbidden; ",&#xA;    "errorType": "IgConfigureVideoError",&#xA;    "stackTrace": [&#xA;        "IgConfigureVideoError: POST /api/v1/media/configure/?video=1 - 403 Forbidden; ",&#xA;        "    at PublishService.video (C:\\Users\\User\\Desktop\\dev\\Insta\\.webpack\\service\\src\\functions\\webpack:\\instagram-private-api\\dist\\services\\publish.service.js:123:1)",        &#xA;        "    at C:\\Users\\User\\Desktop\\dev\\Insta\\.webpack\\service\\src\\functions\\webpack:\\src\\functions\\cronFreefireMemes.js:71:31",&#xA;        "    at async Promise.all (index 1)",&#xA;        "    at main (C:\\Users\\User\\Desktop\\dev\\Insta\\.webpack\\service\\src\\functions\\webpack:\\src\\functions\\cronFreefireMemes.js:47:5)"&#xA;    ]&#xA;}&#xA;

    &#xA;

    I know that the error above is happening because of the size of the video which is longer than 60 seconds.

    &#xA;

    But I would like to know if there is any way I can format any video to fit the instagram requirements.

    &#xA;

    Any nodejs library ?

    &#xA;