Recherche avancée

Médias (91)

Autres articles (81)

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
    Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.

  • Librairies et binaires spécifiques au traitement vidéo et sonore

    31 janvier 2010, par

    Les logiciels et librairies suivantes sont utilisées par SPIPmotion d’une manière ou d’une autre.
    Binaires obligatoires FFMpeg : encodeur principal, permet de transcoder presque tous les types de fichiers vidéo et sonores dans les formats lisibles sur Internet. CF ce tutoriel pour son installation ; Oggz-tools : outils d’inspection de fichiers ogg ; Mediainfo : récupération d’informations depuis la plupart des formats vidéos et sonores ;
    Binaires complémentaires et facultatifs flvtool2 : (...)

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

Sur d’autres sites (8566)

  • FFmpeg youtube livestreaming [closed]

    23 janvier 2024, par T1WT

    I'm developing a project for streaming on YouTube. I use Python + ffpeg in the code. I haven’t been able to fix the problem for a month now - after a while (from 6 to 20 hours) buffering begins. In the command I use -c copy. But after this time, I came to the conclusion that most likely the buffering (namely, the stream gradually drops from speed x1 to speed x0.9 and below) is due to the disk. My server has SATA. Moreover, the problem is that the disk reaches 100% active time. And around this time the flow speed begins to drop. Moreover, the total read/write speed is only 20MB/sec. How to fix it ? Thanks for your help, I really can't stand it anymore.

    


    I’ll say right away that the potential of the project is great, now there are only 50 streams on YouTube, but then there may be more than 10,000.

    


    I tried a lot but settled on the SATA drive and

    


  • Is there a way to pipe the stdio stream with the output segment ts files during m3u8 from mp4 conversion in ffmpeg with nodes spawn function ?

    21 février, par Jacob L

    I am writing an automated pipeline in Node-JS that takes an MP4 file, compresses it, then returns the buffer of the compressed file, feeds it into another FFmpeg command, which then converts the mp4 to .m3u8 for HLS.

    


    The problem I’m having is that I am not able to pipe the segment file data stream to automatically upload each .ts file to the cloud versus having them stored to the disk (which is not an option because this is a cloud function).

    


    I either have to opt in to them being created in memory in the directory, which then my manifest file is based off of, or I create one large buffer with the binary data and then the manifest data intertwined. I am able to perform all of this if I can write these files to the disk and store them locally, but, as I said, this is for a cloud function.

    


    The command I’m using for conversion is

    


      const ffmpeg = spawn(
    "ffmpeg",
    [
      "-i",
      `pipe:0`,
      "-codec",
      "copy",
      "-start_number",
      "0",
      "-hls_time",
      "10",
      "-hls_list_size",
      "0",
      "-f",
      "hls",
      "-hls_flags",
      "delete_segments",
      "pipe:1",
    ],
    { stdio: ["pipe", "pipe", "pipe", "pipe"] }
  );


    


    I am writing to the stdin with an input buffer.
    The only way around not generating physical TS files and not getting an EPIPE error (by trying to pipe the segment outputs to stdout) is by passing the delete segments flag. At least that’s what I have found. Then I am intercepting the stream on stdout, which then I get the large buffer array of all of the binary and manifest file data (the latter is in utf-8 encoding so I can parse it out).

    


    Even if I physically parse it and then upload the buffer as a blob, and then insert that downloadURL from the cloud in the areas of the manifest file where the different .ts files are called sequentially, I am not able to make it work.

    


    Please ask any clarifying questions.

    


    Update I think I found a good solution that also aligns with one of the comments under this post. Here it is :

    


    Instead of spawning multiple child processes in node, I spawned just one that contains all of the compression information and hls conversion flags. This solves the issue of storing the buffer in memory manually and writing it to stdin for the next ffmpeg function. Additionally, I manually set the video bitrate and the maxbuffer size for the video and encoded the audio. I played around with adaptive bitrate streaming, but found it was not necessary for my use case and I could always simply opt in to it later. Additionally, while the ffmpeg function is running, I am employing a file watcher with chokidar and fetching, uploading, and deleting each .ts file to minimize memory usage in a cloud environment. I then store all of the download urls in a map with the key set to the segment, then parse the manifest file, replacing each segment name with its respective download url. If anyone wants to see my solution or the specific ffmpeg command, please let me know.

    


  • FFMpeg call from kotlin invalid argument [closed]

    4 février 2024, par Moréo

    I'm trying to execute a ffmpeg command with a complex_filter in it, but i get a parsing error from ffmpeg every time

    


    [AVFilterGraph @ 0x602c5de06880] No option name near '4'
[AVFilterGraph @ 0x602c5de06880] Error parsing a filter description around: [v1][v2][v3][v4]; [v1]scale_vaapi=-2:1080[v1out]; [v2]scale_vaapi=-2:720[v2out]; [v3]scale_vaapi=-2:480[v3out]; [v4]scale_vaapi=-2:360[v4out]
[AVFilterGraph @ 0x602c5de06880] Error parsing filterchain '[0:v:0]split_vaapi=4[v1][v2][v3][v4]; [v1]scale_vaapi=-2:1080[v1out]; [v2]scale_vaapi=-2:720[v2out]; [v3]scale_vaapi=-2:480[v3out]; [v4]scale_vaapi=-2:360[v4out]' around: [v1][v2][v3][v4]; [v1]scale_vaapi=-2:1080[v1out]; [v2]scale_vaapi=-2:720[v2out]; [v3]scale_vaapi=-2:480[v3out]; [v4]scale_vaapi=-2:360[v4out]
Failed to set value '[0:v:0]split_vaapi=4[v1][v2][v3][v4]; [v1]scale_vaapi=-2:1080[v1out]; [v2]scale_vaapi=-2:720[v2out]; [v3]scale_vaapi=-2:480[v3out]; [v4]scale_vaapi=-2:360[v4out]' for option 'filter_complex': Invalid argument
Error parsing global options: Invalid argument


    


    Here is the filter build

    


    val splitsDef = "[0:v:0]split_vaapi=${splits.size}" + splits.joinToString("") { "[${it.name}]" }

val splitFilters = splits.joinToString("; ") { "[${it.name}]${it.filter}[${it.name}out]" }

val args = mutableListOf(..., "$splitsDef; $splitFilters")



    


    I've tried to add escaped quote to my complex definition, but i get another error from ffmpeg. However, when running the command in my terminal, It's working.

    


    I found this question quite answering what I'm trying to achieve, but not working either.