Recherche avancée

Médias (2)

Mot : - Tags -/map

Autres articles (60)

  • Keeping control of your media in your hands

    13 avril 2011, par

    The vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
    While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
    MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
    MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...)

  • Les formats acceptés

    28 janvier 2010, par

    Les commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
    ffmpeg -codecs ffmpeg -formats
    Les format videos acceptés en entrée
    Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
    Les formats vidéos de sortie possibles
    Dans un premier temps on (...)

  • 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

Sur d’autres sites (9552)

  • Piping images to FFMPEG using stdin causes artifacts

    15 avril 2021, par Michael Joseph Aubry

    I am sending images from puppeteer as a base64 buffer to stdin childProcess.stdin.write(frame); The images are piped one frame at a time inside a loop.

    


    This works well except I am getting weird artifacts and frames flickering — here is an example https://s3.us-west-2.amazonaws.com/storycreator.v2.rendered/cknhtqu2e0016niuuqmtu5u7b?t=0

    


    I've found when hardcoding a delay between each frames being piped that the artifacts/flickering is reduced.

    


    await new Promise((resolve) => {
  setTimeout(() => {
    resolve("done");
  }, 3000);
});

// then after 3s pipe the buffer
childProcess.stdin.write(frame);


    


    Another solution I found to solve the issue is to encode it as a .h264 then convert it to a .mp4. The problem is the video timing is drastically off.

    


    // The ffmpeg command
const childProcess = spawn(ffmpeg, [
  "-y",
  "-f",
  "image2pipe",
  "-pix_fmt",
  "argb",
  "-s",
  "1920x1080",
  "-r",
  `${fps ? `${fps}` : 100}`,
  "-i",
  "async:cache:pipe:0",
  "-an",
  "-vcodec",
  "libx264",
  "-pix_fmt",
  "yuv420p",
  "-r",
  `${fps ? `${fps}` : 100}`,
  "-y",
  `/tmp/${renderId}.mp4` // using .h264 seems to solve flicker but causes a weird framerate
]);


    


  • FFmpeg image2pipe write buffer wait until done

    20 décembre 2020, par Michael Joseph Aubry

    I'm extracting frames from an external source and passing it in as a buffer to FFMPEG using image2pipe and -i -

    


    const childProcess = spawn(ffmpeg, [
  "-y",
  "-f",
  "image2pipe",
  "-i",
  "-",
  "-vcodec",
  "libx264",
  "-pix_fmt",
  "yuv420p",
  output
]);


    


    Then I have a loop that does the job.

    


    for (let i = 0; i < 250; i++) {
  // ...await
}


    


    Inside the promise

    


    // ... do the job to get buffer

childProcess.stdin.write(frame); // frame === buffer

// frame done
resolve("success!");


    


    The problem is in some videos the frames jump and is janky. This is because FFmpeg is not fully done writing to the file before moving onto the next frame.

    


    Is there a way to write a buffer to a file through FFmpeg and make sure the frame is done writing before moving on ?

    


    Some more information

    


    Here is the source file https://s3.us-west-2.amazonaws.com/storycreator.v2.uploads/ckigi4kro00160vlfjmt74afp

    


    Here is the rendered file https://s3.us-west-2.amazonaws.com/storycreator.testing/607715f0-3ab9-11eb-a139-3bb84618c6c5.mp4?t=1607585343922

    


    Here are logs

    


    2020-12-10T07:28:48.942Z    0ae0c435-54d3-416f-9d1a-8ddf595a7e83    INFO    frame=  130 fps= 16 q=-1.0 Lsize=      83kB time=00:00:05.08 bitrate= 133.6kbits/s speed=0.641x    video:80kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 2.928688%


    


    2020-12-10T07:28:48.942Z    0ae0c435-54d3-416f-9d1a-8ddf595a7e83    INFO    [libx264 @ 0x640d6c0] frame I:1     Avg QP:15.47  size: 68227[libx264 @ 0x640d6c0] frame P:33    Avg QP:15.07  size:   246[libx264 @ 0x640d6c0] frame B:96    Avg QP:18.75  size:    56[libx264 @ 0x640d6c0] consecutive B-frames:  1.5%  0.0%  0.0% 98.5%


    


    2020-12-10T07:28:48.943Z    0ae0c435-54d3-416f-9d1a-8ddf595a7e83    INFO    [libx264 @ 0x640d6c0] mb I  I16..4: 24.6% 60.5% 14.9%[libx264 @ 0x640d6c0] mb P  I16..4:  0.0%  0.2%  0.0%  P16..4:  0.8%  0.0%  0.0%  0.0%  0.0%    skip:98.9%[libx264 @ 0x640d6c0] mb B  I16..4:  0.0%  0.0%  0.0%  B16..8:  0.3%  0.0%  0.0%  direct: 0.0%  skip:99.7%  L0:26.7% L1:73.3% BI: 0.0%[libx264 @ 0x640d6c0] 8x8 transform intra:62.0% inter:83.6%[libx264 @ 0x640d6c0] coded y,uvDC,uvAC intra: 49.2% 44.3% 32.1% inter: 0.0% 0.2% 0.0%[libx264 @ 0x640d6c0] i16 v,h,dc,p: 53% 38%  7%  2%[libx264 @ 0x640d6c0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 26% 24% 29%  3%  3%  3%  5%  3%  4%[libx264 @ 0x640d6c0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 37% 26% 14%  3%  4%  5%  4%  4%  3%[libx264 @ 0x640d6c0] i8c dc,h,v,p: 57% 27% 13%  3%[libx264 @ 0x640d6c0] Weighted P-Frames: Y:0.0% UV:0.0%[libx264 @ 0x640d6c0] ref P L0: 95.1%  1.2%  3.1%  0.6%[libx264 @ 0x640d6c0] ref B L0: 48.1% 51.3%  0.7%[libx264 @ 0x640d6c0] ref B L1: 97.3%  2.7%[libx264 @ 0x640d6c0] kb/s:125.75


    


    2020-12-10T07:28:48.944Z    0ae0c435-54d3-416f-9d1a-8ddf595a7e83    INFO    [cache @ 0x5f57940] Statistics, cache hits:0 cache misses:3551


    


  • Flask and moviepy

    23 mars 2021, par Yoldash Reklamov

    Please help me figure out the correct logic for constructing a flask project with Moviepy.

    


    The task is to combine several audio files and several video files into one file.
With the help of the Moviepy and the method of concatenate in it, I manage to do all this.
But I just can't figure out how to do the following thing, there is :

    


    Audio1 (permanent), Audio2 (there will always be different files, selected by the user from the database using the drop-down menu on the site), Audio3 (permanent).
It's the same with video files.

    


    I am building a project on Flask, I am thinking of adding audio and video files not using the BLOB method, but by adding links to the database.

    


    I just can't figure out how to implement this system so that the user would go to the site, choose Audio2 from the list(for example i have 50 random audio files in drop down meny Audio1-Audio50) and somehow take it to AudioFileClip("Audio5.wav") or AudioFileClip("Audio8.wav")

    


    I just can't figure it out.
Thank you in advance !