Recherche avancée

Médias (1)

Mot : - Tags -/Christian Nold

Autres articles (85)

  • Organiser par catégorie

    17 mai 2013, par

    Dans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
    Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
    Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...)

  • Récupération d’informations sur le site maître à l’installation d’une instance

    26 novembre 2010, par

    Utilité
    Sur le site principal, une instance de mutualisation est définie par plusieurs choses : Les données dans la table spip_mutus ; Son logo ; Son auteur principal (id_admin dans la table spip_mutus correspondant à un id_auteur de la table spip_auteurs)qui sera le seul à pouvoir créer définitivement l’instance de mutualisation ;
    Il peut donc être tout à fait judicieux de vouloir récupérer certaines de ces informations afin de compléter l’installation d’une instance pour, par exemple : récupérer le (...)

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

Sur d’autres sites (11071)

  • Create and update HLS playlist programmatically

    26 février 2018, par Pierre P.

    I have a C++ application that records audio from my default input device, encodes it in AAC format and writes to a .aac file. I want to use HTTP Live Streaming to live stream this AAC file. According to this question, I have to create a FFMPEG script to split my audio file into several .ts files.

    # bitrate, width, and height, you may want to change this
    BR=512k
    WIDTH=432
    HEIGHT=240
    input=${1}

    # strip off the file extension
    output=$(echo ${input} | sed 's/\..*//' )

    # works for most videos
    ffmpeg -y -i ${input} -f mpegts -acodec libmp3lame -ar 48000 -ab 64k -s ${WIDTH}x${HEIGHT} -vcodec libx264 -b ${BR} -flags +loop -cmp +chroma -partitions +parti4x4+partp8x8+partb8x8 -subq 7 -trellis 0 -refs 0 -coder 0 -me_range 16 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -bt 200k -maxrate ${BR} -bufsize ${BR} -rc_eq 'blurCplx^(1-qComp)' -qcomp 0.6 -qmin 30 -qmax 51 -qdiff 4 -level 30 -aspect ${WIDTH}:${HEIGHT} -g 30 -async 2 ${output}-iphone.ts

    (It is slightly different in my case because I only work with audio)

    Can I do so programmatically in C++ and if so, do I have to use a third-part library or does macOS provide native functions to do so ?

  • av_read_frame() in ffmpeg returns -5 while receiving UDP data [closed]

    26 février 2024, par zttang

    I'm working on an app which is using ffmpeg lib. There is a living source keep sending TS stream thru udp. Then I allocated a thread use ffmpeg receive the TS packets. the code for this thread is like :

    


    void* av_source_thread(void *data) {
    char udp_url[50];
    snprintf(udp_url, sizeof(udp_url), "udp://127.0.0.1:12345");
    AVDictionary* options = NULL;
    av_dict_set(&options, "timeout", "500000", 0);  // timeout=0.5s
    av_dict_set(&options, "overrun_nonfatal", "1", 0);
    av_dict_set(&options, "fifo_size", "278876", 0);  //50MB

    AVFormatContext *ffmpeg_source = avformat_alloc_context();
    while (running) {
        if (avformat_open_input(&ffmpeg_source, udp_url, NULL, &options) != 0) {
            continue;
        } else {
            break;
        }
    }
    // Some code fill codec type and alloc context here

    av_format_inject_global_side_data(ffmpeg_source);
    AVPacket *packet = av_packet_alloc();
    while (running) {
        ret = av_read_frame(ffmpeg_source, packet);
        if (ret < 0) {
            char errbuf[AV_ERROR_MAX_STRING_SIZE];
            av_strerror(ret, errbuf, AV_ERROR_MAX_STRING_SIZE);
            usleep(10000);
            log("av_read_frame failed, Exit, %s, %d", errbuf, ret);
            continue;
        }
        putPkt2Q(packet);  
    }
    av_packet_free(&packet);
    avformat_close_input(&ffmpeg_source);
    av_dict_free(&options);
    return nullptr;
}


    


    Then the packets will be sent to Q and other thread will process them. but when I run the program, the av_read_frame will return -5(I/O error) from time to time. and once it returned -5, it can not recover unless I restart this thread.

    


    since this is a real time source, so lost some frames are acceptable, I just want to know how to avoid this kind of issue or how to recover without restart the whole thread. I tried to increase the fifo_size in options, but it does not work.

    


  • Publishing an RTSP stream from my IP camera to a remote MediaMTX / RTSP Simple Server using FFmpeg and Azure [closed]

    28 janvier 2024, par cmd

    Using FFmpeg, I am trying to publish the RTSP stream from my IP camera to an Azure VM running a MediaMTX instance https://github.com/bluenviron/mediamtx. My intention is for the stream to be accessible from other remote connections by connecting to the VM.

    


    I was able to setup a local MediaMTX server on my laptopm, and publish the stream using this FFmpeg command :

    


    ffmpeg -i rtsp://<camera username="username">:<camera password="password">@<camera local="local" ip="ip">:554 -c:v copy -c:a copy -f rtsp rtsp://<laptop local="local" ip="ip">:8554/stream/mystream&#xA;</laptop></camera></camera></camera>

    &#xA;

    This worked fine, as I was able to connect to the MediaMTX server in VLC player to view the stream. However, I have setup an Azure VM running Windows 10, and run the same MediaMTX instance on it. I have attempted to publish the RTSP stream from the IP camera using the same command, but with the Laptop IP replaced with the address of the VM, but this doesn't work.

    &#xA;

    I have disabled the Windows Firewall on my laptop and the VM, but the stream can still not be published. I have also tried the same approach by running the MediaMTX server on my friend's computer on his network, and adding the necessary port forwarding rules to his router. I am unable to edit any rules on the router where I am living however.

    &#xA;

    What else might be causing this issue, and is there any way to publish the IP camera's RTSP to a remote server where it could then be read ?

    &#xA;