Recherche avancée

Médias (1)

Mot : - Tags -/epub

Autres articles (79)

  • Demande de création d’un canal

    12 mars 2010, par

    En fonction de la configuration de la plateforme, l’utilisateur peu avoir à sa disposition deux méthodes différentes de demande de création de canal. La première est au moment de son inscription, la seconde, après son inscription en remplissant un formulaire de demande.
    Les deux manières demandent les mêmes choses fonctionnent à peu près de la même manière, le futur utilisateur doit remplir une série de champ de formulaire permettant tout d’abord aux administrateurs d’avoir des informations quant à (...)

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

  • 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 (8958)

  • avcodec/nvdec : More effort to make vp8 compile with gcc 4.6

    27 novembre 2017, par Philip Langdale
    avcodec/nvdec : More effort to make vp8 compile with gcc < 4.6
    

    I'm told my prefix work-around wasn't enough to make it compile,
    although I'm not sure why ; I did some basic testing and that
    approach appeared to work, but I'm not in a position to do a
    full compile on CentOS 6 so I can't be sure of anything.

    I have had it confirmed that the additional change to not use
    named initialisers is enough to make it compile, so let's
    throw that into the mix too.

    • [DH] libavcodec/nvdec_vp8.c
  • Extract audio from video using autogen ffmpeg C# in Unity

    5 décembre 2024, par Johan Sophie

    Hi I'm using ffmpeg autogen to extract audio from video in Unity, but when I following this code, the file write cannot write, it's 0Kb, so what's issue of this or someone have any examples for extract audio using this library, apologize for my English. This is github of library : &#xA;https://github.com/Ruslan-B/FFmpeg.AutoGen

    &#xA;&#xA;

    unsafe void TestExtractAudio()&#xA;{&#xA;&#xA;    string inFile = Application.streamingAssetsPath &#x2B; "/" &#x2B; strFileName;&#xA;    string outFile = Application.streamingAssetsPath &#x2B; "/" &#x2B; strFileNameAudio;&#xA;&#xA;    AVOutputFormat* outFormat = null;&#xA;    AVFormatContext* inFormatContext = null;&#xA;    AVFormatContext* outFormatContext = null;&#xA;    AVPacket packet;&#xA;&#xA;    ffmpeg.av_register_all();&#xA;&#xA;    inFormatContext = ffmpeg.avformat_alloc_context();&#xA;    outFormatContext = ffmpeg.avformat_alloc_context();&#xA;&#xA;    if (ffmpeg.avformat_open_input(&amp;inFormatContext, inFile, null, null) &lt; 0)&#xA;    {&#xA;        throw new ApplicationException("Could not open input file.");&#xA;    }&#xA;&#xA;    if (ffmpeg.avformat_find_stream_info(inFormatContext, null) &lt; 0)&#xA;    {&#xA;        throw new ApplicationException("Failed to retrieve input stream info.");&#xA;    }&#xA;&#xA;    ffmpeg.avformat_alloc_output_context2(&amp;outFormatContext, null, null, outFile);&#xA;    if (outFormatContext == null)&#xA;    {&#xA;        throw new ApplicationException("Could not create output context");&#xA;    }&#xA;&#xA;    outFormat = outFormatContext->oformat;&#xA;&#xA;    AVStream* inStream = inFormatContext->streams[1];&#xA;    AVStream* outStream = ffmpeg.avformat_new_stream(outFormatContext, inStream->codec->codec);&#xA;    if (outStream == null)&#xA;    {&#xA;        throw new ApplicationException("Failed to allocate output stream.");&#xA;    }&#xA;&#xA;    if (ffmpeg.avcodec_copy_context(outStream->codec, inStream->codec) &lt; 0)&#xA;    {&#xA;        throw new ApplicationException("Couldn&#x27;t copy input stream codec context to output stream codec context");&#xA;    }&#xA;&#xA;    outFormatContext->audio_codec_id = AVCodecID.AV_CODEC_ID_MP3;&#xA;&#xA;    int retcode = ffmpeg.avio_open(&amp;outFormatContext->pb, outFile, ffmpeg.AVIO_FLAG_WRITE);&#xA;    if (retcode &lt; 0)&#xA;    {&#xA;        throw new ApplicationException("Couldn&#x27;t open output file");&#xA;    }&#xA;&#xA;    int returnCode = ffmpeg.avformat_write_header(outFormatContext, null);&#xA;&#xA;    if (returnCode &lt; 0)&#xA;    {&#xA;        throw new ApplicationException("Error occurred opening output file.");&#xA;    }&#xA;&#xA;    while (true)&#xA;    {&#xA;        if (ffmpeg.av_read_frame(inFormatContext, &amp;packet) &lt; 0)&#xA;        {&#xA;            break;&#xA;        }&#xA;&#xA;        if (packet.stream_index == 1)&#xA;        {&#xA;&#xA;            inStream = inFormatContext->streams[1];&#xA;            outStream = outFormatContext->streams[0];&#xA;&#xA;            // TODO: Replicate log packet functionality to print out what&#x27;s inside the packet.&#xA;&#xA;            packet.pts = ffmpeg.av_rescale_q_rnd(packet.pts, inStream->time_base, outStream->time_base,&#xA;                AVRounding.AV_ROUND_NEAR_INF | AVRounding.AV_ROUND_PASS_MINMAX);&#xA;            packet.dts = ffmpeg.av_rescale_q_rnd(packet.dts, inStream->time_base, outStream->time_base,&#xA;                AVRounding.AV_ROUND_NEAR_INF | AVRounding.AV_ROUND_PASS_MINMAX);&#xA;&#xA;            packet.duration = ffmpeg.av_rescale_q(packet.duration, inStream->time_base, outStream->time_base);&#xA;&#xA;            int returncode = ffmpeg.av_interleaved_write_frame(outFormatContext, &amp;packet);&#xA;&#xA;        }&#xA;&#xA;        ffmpeg.av_packet_unref(&amp;packet);&#xA;    }&#xA;&#xA;    ffmpeg.av_write_trailer(outFormatContext);&#xA;&#xA;&#xA;    ffmpeg.avformat_close_input(&amp;inFormatContext);&#xA;&#xA;    ffmpeg.avformat_free_context(outFormatContext);&#xA;&#xA;    Console.WriteLine("Press any key to continue...");&#xA;&#xA;    Console.ReadKey();&#xA;}&#xA;

    &#xA;&#xA;

    the value returnCode return less than 0, so someone can fix this, thanks so much for that

    &#xA;

  • How to check if client is still connected with ffmpeg

    11 décembre 2017, par Adalcar

    I am working on a live-streaming server in C++ using FFMPEG.
    I have a I have an acquisition thread which grabs the images from the cameras and I spawn a new thread on each client connexion to send them the packets.

    Here’s my "send" function :

    void Encoder::_encode()
    {
       int ret = 0;
       if (avcodec_send_frame(ctx, frame) &lt; 0)
           throw new std::runtime_error("error sending a frame for encoding");
       while (ret >= 0)
       {
           ret = avcodec_receive_packet(ctx, pkt);
           if (ret == AVERROR(EAGAIN) || ret == AVERROR_EOF)
               return;
           avio_write(client, pkt->data, pkt->size);
           avio_flush(client);
           av_packet_unref(pkt);
       }
    }

    This encodes the frame and sends it to the client.

    The problem is : whenever the client exits, the thread keeps sending it data, and throws no exception, even when the same client connects again, it will spawn a new thread while the old one keeps running...
    Is there a way to "ping" the client to check whether it is still connected ?