Recherche avancée

Médias (29)

Mot : - Tags -/Musique

Autres articles (103)

  • Gestion des droits de création et d’édition des objets

    8 février 2011, par

    Par défaut, beaucoup de fonctionnalités sont limitées aux administrateurs mais restent configurables indépendamment pour modifier leur statut minimal d’utilisation notamment : la rédaction de contenus sur le site modifiables dans la gestion des templates de formulaires ; l’ajout de notes aux articles ; l’ajout de légendes et d’annotations sur les images ;

  • Le profil des utilisateurs

    12 avril 2011, par

    Chaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
    L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)

  • Qualité du média après traitement

    21 juin 2013, par

    Le bon réglage du logiciel qui traite les média est important pour un équilibre entre les partis ( bande passante de l’hébergeur, qualité du média pour le rédacteur et le visiteur, accessibilité pour le visiteur ). Comment régler la qualité de son média ?
    Plus la qualité du média est importante, plus la bande passante sera utilisée. Le visiteur avec une connexion internet à petit débit devra attendre plus longtemps. Inversement plus, la qualité du média est pauvre et donc le média devient dégradé voire (...)

Sur d’autres sites (11292)

  • Is H.264 used with CRF 0 really strictly lossless ?

    23 décembre 2017, par Mephisto

    I am surprised by how small files are when encoded in ffmpeg with the libx264 codec in Constant Rate Factor mode equals zero (-crf 0) that, according to the documentation, is "lossless".

    I would like to make sure what the word "lossless" here means. I would like to know if it follows my personal definition of lossless video : After encoding a video, you can confidently bet the life of your mother that, once you play it, the numerical values in the pixels of the restored video will be identically equal (within maybe a factor 0.00001 due to the floating point arithmetic) to the original.

    Does the H.264 lossless encoding follow my definition, or do they call it "lossless" because it is visually very close, very beautiful, whatever... ?

  • FFMPEG : Recurring onMetaData for RTMP ? [on hold]

    30 novembre 2017, par stevendesu

    For whatever reason this was put on hold as "too broad", although I felt I was quite specific. So I’ll try rephrasing here :

    My former understanding :

    The RTMP Protocol involves sending several parallel streams of data as a series of packets, with an ID correlating to which stream they are a part of. For instance :

    [VIDEO] <data>
    [AUDIO] <data>
    [VIDEO] <data>
    [VIDEO] <data>
    [SERVER] <metadata about="about" bandwidth="bandwidth">
    [VIDEO] <data>
    [AUDIO] <data>
    ...
    </data></data></metadata></data></data></data></data>

    Then on the player side these packets are split up into separate buffers based on type (all video data is concatenated, all audio data is concatenated, etc)

    One of the packet types is called onMetaData (ID : 0x12)

    An onMetaData packet includes a timestamp for when to trigger the metadata (this way it can be synchronized with the video) as well as the contents of the metadata (a text string)

    My setup :

    I’m using Red5Pro as my ingest server to take in an RTMP stream and then watch this stream via WebRTC. When an onMetaData packet is received by Red5, it sends out a JSON object to all subscribers of the stream over WebSockets with the contents of the stream.

    What I want :

    I want to take advantage of this onMetaData channel to embed the server’s system clock into a stream. This way anyone viewing the stream can determine when (according to the server) a stream was encoded and, if they synchronize their clock with the server, they can then compute the end-to-end latency of the stream. Due to Red5’s use of WebSockets to send metadata this isn’t a perfect solution (you may receive the metadata before or after you actually receive the video information), however I have some plans to work around this.

    In other words, I want my stream to look like this :

    [VIDEO] <data>
    [AUDIO] <data>
    [ONMETADATA] time: 2:05:77.382
    [VIDEO] <data>
    [VIDEO] <data>
    [SERVER] <metadata about="about" bandwidth="bandwidth">
    [VIDEO] <data>
    [ONMETADATA] time: 2:05:77.423
    [AUDIO] <data>
    ...
    </data></data></metadata></data></data></data></data>

    What I would like is to generate this stream (with the server’s current time periodically embedded into the onMetaData channel) using FFMPEG

    Simpler problem :

    FFMPEG offers a -metadata command-line parameter.

    In my experiments, using this parameter caused a single onMetaData event to be fired including things like "title", "author", etc. I could not inject additional onMetaData packets periodically as the stream progressed.

    Even if the metadata packets do not contain the system clock, if I could send any metadata packets periodically using FFMPEG then I could include something static like "the server’s clock at the time the broadcast started". I can then compare this to the current timestamp of the video and calculate the latency.

    My confusion :

    Continuing to look into this after creating my post, there are a couple things that I don’t fully understand or which don’t quite make sense to me. For one, if FFMPEG is only injecting a single onMetaData packet into the stream, then I would expect anyone joining the stream late to miss it. However when I join the stream 8 hours later I see Red5 send me the metadata packet complete with title, author, etc. So it’s almost like the metadata packet doesn’t have a timestamp associated with it but instead is just generic metadata about the video

    Furthermore, there’s something called "AMF" which I’m not familiar with, but it may be important ?

    Original Post

    I spent today playing around with methods to embed the system clock at time of encode into a stream, so that I could compare this value to the same system clock at time of decode to get a rough estimate of RTMP latency. Unfortunately the majority of techniques I used ended up failing.

    One thing I wanted to try next was taking advantage of RTMP’s onMetaData to send the current system clock periodically (maybe every 5 seconds) as part of the stream for any clients to listen for.

    Unfortunately FFMPEG’s -metadata option seems to only be for one-time metadata when the stream first loads. I can’t figure out how to add continuous (and generated) values to a stream.

    Is there a way to do this ?

  • how to do mjpeg streaming using ffmpeg and c#

    19 décembre 2017, par Mahesh Vemuri

    I am trying to create a preview of my rtmp stream. But RTMP playback occupies the bandwidth as source, I want to do mjpeg streaming using ffmpeg and c#. Is it possible to do ?

    I am trying to create a webpage where users can monitor the stream. For this I dont need to use RTMP url to watch as it needs more and more bandwidth.

    So, my idea is to capture images and show them in sequence rate controlled at 1 frame per second. In this way users can monitor.

    I have tried various methods like using mjpeg

    ffmpeg.exe -i renditiontest.mp4 -c:v mjpeg -q:v 31 -an sample.avi

    Now, output file is getting generated. But, it is occupying harddisk.

    So, next way is to create images overwriting previous images

    ffmpeg.exe -y -i renditiontest.mp4 -f image2 -updatefirst 1 sample2.jpg

    Now, I tried creating a stream which will continously read the image and write it as response in C#.

    using (WebClient webClient = new WebClient())
                   {
                       string url = "http://localhost/probe_VOD/mjpg/sample2.jpg";
                       var memoryStream = new MemoryStream(webClient.DownloadData(url));

                       response.Headers.AcceptRanges.Add("bytes");
                       response.StatusCode = HttpStatusCode.OK;
                       response.Content = new StreamContent(memoryStream);
                       //response.Content.Headers.ContentDisposition = new ContentDispositionHeaderValue("render");
                       //response.Content.Headers.ContentDisposition.FileName = "sample.jpg";
                       response.Content.Headers.ContentType = new MediaTypeHeaderValue("multipart/x-mixed-replace; boundary=myboundary");
                       response.Content.Headers.ContentLength = memoryStream.Length;
                   }
                   return response;

    Please let me know how do I acheive this.