Recherche avancée

Médias (1)

Mot : - Tags -/swfupload

Autres articles (59)

  • MediaSPIP version 0.1 Beta

    16 avril 2011, par

    MediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

  • Amélioration de la version de base

    13 septembre 2013

    Jolie sélection multiple
    Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
    Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)

Sur d’autres sites (8411)

  • How to create a local audio livestream server with ffmpeg and python ? [closed]

    10 novembre 2024, par Fenekhu

    Simply put, this is what I'm trying to accomplish :
    
I navigate to something like http://localhost:8080/ in my browser and the browser shows a built-in audio player playing whatever the ffmpeg process is streaming. (Not just serving a local audio file.) (Built-in here meaning the page looks the same as if you had opened an mp3 file with your browser.)

    


    At first I thought it would be easy, as ffmpeg has the ability to stream through different protocols. I seem to have misunderstood though, because while I can stream something over rtp with it, I can't access that from my browser. Some stackoverflow questions I found seem to imply that you can do this with the output options -f mpegts http://localhost:8080, but when I try this, ffmpeg freezes for a second, then I get these errors :

    


    [tcp @ 00000210f70b0700] Connection to tcp://localhost:8080 failed: Error number -138 occurred
[out#0/mpegts @ 00000210f7080ec0] Error opening output http://localhost:8080: Error number -138 occurred
Error opening output file http://localhost:8080.
Error opening output files: Error number -138 occurred


    


    but I have no problem with -f rtp rtp://localhost:8080. (Like I said though, I can't access that through the browser).

    


    So I suspect I need something else to "pick up" the rtp stream and put it on an http server, but I haven't been able to find anything on that, probably because I just don't know the right thing to search. It seems like something that should be easily doable in Python, and that would be my preferred language to do it in over javascript, if possible.

    


    Can anyone point me in the right direction ? Or let me know if I'm misunderstanding something ? Thanks.

    


  • Understanding PTS and DTS in video frames

    28 juin 2017, par theateist

    I had fps issues when transcoding from avi to mp4(x264). Eventually the problem was in PTS and DTS values, so lines 12-15 where added before av_interleaved_write_frame function :

    1.  AVFormatContext* outContainer = NULL;
    2.  avformat_alloc_output_context2(&outContainer, NULL, "mp4", "c:\\test.mp4";
    3.  AVCodec *encoder = avcodec_find_encoder(AV_CODEC_ID_H264);
    4.  AVStream *outStream = avformat_new_stream(outContainer, encoder);
    5.  // outStream->codec initiation
    6.  // ...
    7.  avformat_write_header(outContainer, NULL);

    8.  // reading and decoding packet
    9.  // ...
    10. avcodec_encode_video2(outStream->codec, &encodedPacket, decodedFrame, &got_frame)
    11.
    12. if (encodedPacket.pts != AV_NOPTS_VALUE)
    13.     encodedPacket.pts =  av_rescale_q(encodedPacket.pts, outStream->codec->time_base, outStream->time_base);
    14. if (encodedPacket.dts != AV_NOPTS_VALUE)
    15.     encodedPacket.dts = av_rescale_q(encodedPacket.dts, outStream->codec->time_base, outStream->time_base);
    16.
    17. av_interleaved_write_frame(outContainer, &encodedPacket)

    After reading many posts I still do not understand :

    1. outStream->codec->time_base = 1/25 and outStream->time_base = 1/12800. The 1st one was set by me but I cannot figure out why and who set 12800 ? I noticed that before line (7) outStream->time_base = 1/90000 and right after it it changes to 1/12800, why ?
      When I transcode from avi to avi, meaning changing the line (2) to avformat_alloc_output_context2(&outContainer, NULL, "avi", "c:\\test.avi"; , so before and after line (7) outStream->time_base remains always 1/25 and not like in mp4 case, why ?
    2. What is the difference between time_base of outStream->codec and outStream ?
    3. To calc the pts av_rescale_q does : takes 2 time_base, multiplies their fractions in cross and then compute the pts. Why it does this in this way ? As I debugged, the encodedPacket.pts has value incremental by 1, so why changing it if it does has value ?
    4. At the beginning the dts value is -2 and after each rescaling it still has negative number, but despite this the video played correctly ! Shouldn’t it be positive ?
  • Understanding PTS and DTS in video frames

    8 août 2015, par theateist

    I had fps issues when transcoding from avi to mp4(x264). Eventually the problem was in PTS and DTS values, so lines 12-15 where added before av_interleaved_write_frame function :

    1.  AVFormatContext* outContainer = NULL;
    2.  avformat_alloc_output_context2(&outContainer, NULL, "mp4", "c:\\test.mp4";
    3.  AVCodec *encoder = avcodec_find_encoder(AV_CODEC_ID_H264);
    4.  AVStream *outStream = avformat_new_stream(outContainer, encoder);
    5.  // outStream->codec initiation
    6.  // ...
    7.  avformat_write_header(outContainer, NULL);

    8.  // reading and decoding packet
    9.  // ...
    10. avcodec_encode_video2(outStream->codec, &encodedPacket, decodedFrame, &got_frame)
    11.
    12. if (encodedPacket.pts != AV_NOPTS_VALUE)
    13.     encodedPacket.pts =  av_rescale_q(encodedPacket.pts, outStream->codec->time_base, outStream->time_base);
    14. if (encodedPacket.dts != AV_NOPTS_VALUE)
    15.     encodedPacket.dts = av_rescale_q(encodedPacket.dts, outStream->codec->time_base, outStream->time_base);
    16.
    17. av_interleaved_write_frame(outContainer, &encodedPacket)

    After reading many posts I still do not understand :

    1. outStream->codec->time_base = 1/25 and outStream->time_base = 1/12800. The 1st one was set by me but I cannot figure out why and who set 12800 ? I noticed that before line (7) outStream->time_base = 1/90000 and right after it it changes to 1/12800, why ?
      When I transcode from avi to avi, meaning changing the line (2) to avformat_alloc_output_context2(&outContainer, NULL, "avi", "c:\\test.avi"; , so before and after line (7) outStream->time_base remains always 1/25 and not like in mp4 case, why ?
    2. What is the difference between time_base of outStream->codec and outStream ?
    3. To calc the pts av_rescale_q does : takes 2 time_base, multiplies their fractions in cross and then compute the pts. Why it does this in this way ? As I debugged, the encodedPacket.pts has value incremental by 1, so why changing it if it does has value ?
    4. At the beginning the dts value is -2 and after each rescaling it still has negative number, but despite this the video played correctly ! Shouldn’t it be positive ?