Recherche avancée

Médias (1)

Mot : - Tags -/lev manovitch

Autres articles (94)

  • Librairies et logiciels spécifiques aux médias

    10 décembre 2010, par

    Pour un fonctionnement correct et optimal, plusieurs choses sont à prendre en considération.
    Il est important, après avoir installé apache2, mysql et php5, d’installer d’autres logiciels nécessaires dont les installations sont décrites dans les liens afférants. Un ensemble de librairies multimedias (x264, libtheora, libvpx) utilisées pour l’encodage et le décodage des vidéos et sons afin de supporter le plus grand nombre de fichiers possibles. Cf. : ce tutoriel ; FFMpeg avec le maximum de décodeurs et (...)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

  • Changer son thème graphique

    22 février 2011, par

    Le thème graphique ne touche pas à la disposition à proprement dite des éléments dans la page. Il ne fait que modifier l’apparence des éléments.
    Le placement peut être modifié effectivement, mais cette modification n’est que visuelle et non pas au niveau de la représentation sémantique de la page.
    Modifier le thème graphique utilisé
    Pour modifier le thème graphique utilisé, il est nécessaire que le plugin zen-garden soit activé sur le site.
    Il suffit ensuite de se rendre dans l’espace de configuration du (...)

Sur d’autres sites (6334)

  • 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.

    


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

    


      

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


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


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


    • Frame rate : from 23 to 60 FPS
    • 


    • photo size :

        

      • Maximum columns (horizontal pixels) : 1,920
      • 


      • Minimum aspect ratio [columns/rows] : 4/5
      • 


      • Maximum aspect ratio [columns/rows] : 9/16
      • 


      


    • 


    • Video bitrate : 5Mbps maximum VBR
    • 


    • Audio bitrate : 128 kbps
    • 


    • Duration : maximum 60 seconds and minimum 3 seconds
    • 


    • File size : max 100 MB
    • 


    


    My code :

    


    import { S3 } from 'aws-sdk';
import { IgApiClient } from 'instagram-private-api';
import fs from 'fs';

const s3 = new S3();
const ig = new IgApiClient();
const bucket = 'posts';
const { INSTA_USER, INSTA_PASS } = process.env;

ig.state.generateDevice(INSTA_USER);

export const main = async () => {
  try {
    await ig.account.login(INSTA_USER, INSTA_PASS);

    const { Contents } = await s3.listObjectsV2({ Bucket: bucket, MaxKeys: 2, Prefix: 'memes/geral' }).promise();

    const files = await Promise.all(Contents.map(async ({ Key }) => {
      const file = await s3.getObject({
        Bucket: bucket,
        Key,
      }).promise();

      return file.Body;
    }));

    const publishResult = await ig.publish.video({
      video: files[0],
      coverImage: await fs.readFileAsync("../../src/assets/cover.png")
    });

    console.dir({ publishResult }, { depth: null })
  } catch (error) {
    console.error(error);
    throw error;
  }
}


    


    When I get a file from s3, it comes in the following format.
I'm taking the content of the body property and put it in the video property of the publish method.
Is it right ?
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.

    


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


    


    Error :

    


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


    


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

    


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


    


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

    


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

    


    Any nodejs library ?

    


  • Batch Convert .264 files to any Video Format

    9 août 2022, par Reydan Gatchalian

    I've been trying to find a software that will batch convert .264 files to any video format. The source of the video files is from an IP Camera. I found a software from HiP2P Client that has a converter.exe but only converts 1 file at a time.

    


    enter image description here

    


    I tried checking if it can be run in the Command Line and just pass parameteres but it doesn't. Then I tried referrencing the DLL files included on the application but I got the error below.

    


    enter image description here

    


    Then I found ffmpeg (version : 2022-08-08-git-56973eb687-full_build-www.gyan.dev) and tried different commands but to no avail.

    


    ffmpeg -f h264 -i A220806_000015_000029.264 -c:v copy libx264 -an dest.avi


    


    enter image description here
enter image description here

    


    I also tried looking for libraries so I can develop it using C# but I still can't find a library that works.

    


    I also tried VLC just to play it but I can't even play the files.

    


  • Terminal : How to extract vobsub subtitles to bitmap images (jpg, png) ?

    5 août 2022, par DevonDahon

    How to extract image-based subtitles to bitmap images (jpg, png) ?

    


    I tried with ffmpeg, but it seems to work only with text-based subtitles.

    


    $ ffmpeg -i myvideo.mp4 -map "0:2" output.bre.srt
ffmpeg version 5.0.1 Copyright (c) 2000-2022 the FFmpeg developers
  built with Apple clang version 13.1.6 (clang-1316.0.21.2.5)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/5.0.1_3 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librist --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox
  libavutil      57. 17.100 / 57. 17.100
  libavcodec     59. 18.100 / 59. 18.100
  libavformat    59. 16.100 / 59. 16.100
  libavdevice    59.  4.100 / 59.  4.100
  libavfilter     8. 24.100 /  8. 24.100
  libswscale      6.  4.100 /  6.  4.100
  libswresample   4.  3.100 /  4.  3.100
  libpostproc    56.  3.100 / 56.  3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'myvideo.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 512
    compatible_brands: mp42iso2avc1mp41
    creation_time   : 2022-08-03T21:58:07.000000Z
    encoder         : HandBrake 1.5.1 2022011000
  Duration: 00:11:05.40, start: 0.000000, bitrate: 1635 kb/s
  Stream #0:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, smpte170m/bt470bg/bt470bg, progressive), 712x576 [SAR 16:15 DAR 178:135], 1454 kb/s, 25 fps, 25 tbr, 90k tbn (default)
    Metadata:
      creation_time   : 2022-08-03T21:58:07.000000Z
      handler_name    : VideoHandler
      vendor_id       : [0][0][0][0]
  Stream #0:1[0x2](bre): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 162 kb/s (default)
    Metadata:
      creation_time   : 2022-08-03T21:58:07.000000Z
      handler_name    : Stereo
      vendor_id       : [0][0][0][0]
  Stream #0:2[0x3](bre): Subtitle: dvd_subtitle (mp4s / 0x7334706D), 720x576, 6 kb/s (default)
    Metadata:
      creation_time   : 2022-08-03T21:58:07.000000Z
      handler_name    : Brezhoneg
  Stream #0:3[0x4](fra): Subtitle: dvd_subtitle (mp4s / 0x7334706D), 720x576, 6 kb/s
    Metadata:
      creation_time   : 2022-08-03T21:58:07.000000Z
      handler_name    : Français
Error initializing output stream 0:0 -- Subtitle encoding currently only possible from text to text or bitmap to bitmap
Stream mapping:
  Stream #0:2 -> #0:0 (dvd_subtitle (dvdsub) -> subrip (srt))
    Last message repeated 1 times