Recherche avancée

Médias (0)

Mot : - Tags -/page unique

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (44)

  • Use, discuss, criticize

    13 avril 2011, par

    Talk to people directly involved in MediaSPIP’s development, or to people around you who could use MediaSPIP to share, enhance or develop their creative projects.
    The bigger the community, the more MediaSPIP’s potential will be explored and the faster the software will evolve.
    A discussion list is available for all exchanges between users.

  • MediaSPIP Player : problèmes potentiels

    22 février 2011, par

    Le lecteur ne fonctionne pas sur Internet Explorer
    Sur Internet Explorer (8 et 7 au moins), le plugin utilise le lecteur Flash flowplayer pour lire vidéos et son. Si le lecteur ne semble pas fonctionner, cela peut venir de la configuration du mod_deflate d’Apache.
    Si dans la configuration de ce module Apache vous avez une ligne qui ressemble à la suivante, essayez de la supprimer ou de la commenter pour voir si le lecteur fonctionne correctement : /** * GeSHi (C) 2004 - 2007 Nigel McNie, (...)

  • MediaSPIP Player : les contrôles

    26 mai 2010, par

    Les contrôles à la souris du lecteur
    En plus des actions au click sur les boutons visibles de l’interface du lecteur, il est également possible d’effectuer d’autres actions grâce à la souris : Click : en cliquant sur la vidéo ou sur le logo du son, celui ci se mettra en lecture ou en pause en fonction de son état actuel ; Molette (roulement) : en plaçant la souris sur l’espace utilisé par le média (hover), la molette de la souris n’exerce plus l’effet habituel de scroll de la page, mais diminue ou (...)

Sur d’autres sites (3544)

  • (Ffmpeg) How to play live audio in the browser from received UDP packets using Ffmpeg ?

    26 octobre 2022, par Yousef Alaqra

    I have .NET Core console application which acts as UDP Server and UDP Client

    



      

    • UDP client by receiving audio packet.
    • 


    • UDP server, by sending each received packet.
    • 


    



    Here's a sample code of the console app :

    



    static UdpClient udpListener = new UdpClient();
    static IPEndPoint endPoint = new IPEndPoint(IPAddress.Parse("192.168.1.230"), 6980);
    static IAudioSender audioSender = new UdpAudioSender(new IPEndPoint(IPAddress.Parse("192.168.1.230"), 65535));

    static void Main(string[] args)
    {
        udpListener.Client.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReuseAddress, true);
        udpListener.Client.Bind(endPoint);

        try
        {
            udpListener.BeginReceive(new AsyncCallback(recv), null);
        }
        catch (Exception e)
        {
            throw e;
        }

        Console.WriteLine("Press enter to dispose the running service");
        Console.ReadLine();
    }

    private async static void recv(IAsyncResult res)
    {
        byte[] received = udpListener.EndReceive(res, ref endPoint);
        OnAudioCaptured(received);
        udpListener.BeginReceive(new AsyncCallback(recv), null);
    }


    



    On the other side, I have a node js API application, which supposes to execute an FFmpeg command as a child process and to do the following

    



      

    • receive the audio packet as an input from the console app UDP server.
    • 


    • convert the received bytes into WebM
    • 


    • pipe out the result into the response.
    • 


    



    Finally, in the client-side, I should have an audio element with source value equals to the http://localhost:3000

    



    For now, I can only execute this FFmpeg command :

    



    ffmpeg -f  s16le  -ar 48000 -ac 2 -i 'udp://192.168.1.230:65535' output.wav


    



    Which do the following

    



      

    • Receive UDP packet as an input
    • 


    • Convert the received bytes into the output.wav audio file.
    • 


    



    How would I execute a child process in the node js server which receives the UDP packets and pipe out the result into the response as Webm ?

    


  • How to check when ffmpeg completes a task ?

    25 mai 2018, par Andrew

    I’m just learning how to use ffmpeg a few hours ago to generate video thumbnails.

    These are some results :

    1

    2

    I’d used the same size (width - height) to Youtube’s. Each image contains max 25 thumbnails (5x5) with the size 160x90.

    Everything looks good until :

    public async Task GetVideoThumbnailsAsync(string videoPath, string videoId)
    {
       byte thumbnailWidth = 160;
       byte thumbnailHeight = 90;

       string fps = "1/2";

       videoPath = Path.Combine(_environment.WebRootPath, videoPath);

       string videoThumbnailsPath = Path.Combine(_environment.WebRootPath, $"assets/images/video_thumbnails/{videoId}");
       string outputImagePath = Path.Combine(videoThumbnailsPath, "item_%d.jpg");

       Directory.CreateDirectory(videoThumbnailsPath);

       using (var ffmpeg = new Process())
       {
           ffmpeg.StartInfo.Arguments = $" -i {videoPath} -vf fps={fps} -s {thumbnailWidth}x{thumbnailHeight} {outputImagePath}";
           ffmpeg.StartInfo.FileName = Path.Combine(_environment.ContentRootPath, "FFmpeg/ffmpeg.exe");
           ffmpeg.Start();
       }

       await Task.Delay(3000);

       await GenerateThumbnailsAsync(videoThumbnailsPath, videoId);
    }

    I’m getting a trouble with the line :

    await Task.Delay(3000);

    When I learn the way to use ffmpeg, they didn’t mention about it. After some hours failed, I notice that :

    An mp4 video (1 min 31 sec - 1.93Mb) requires some delay time 1000ms. And other, an mp4 video (1 min 49 sec - 7.25Mb) requires some delay time 3000ms.

    If I don’t use Task.Delay and try to get all the files immediately, it would return 0 (there was no file in the directory).

    Plus, each file which has a difference length to the others requires a difference delay time. I don’t know how to calculate it.

    And my question is : How to check when the task has completed ?

    P/s : I don’t mean to relate to javascript, but in js, there is something called Promise :

    var promise = new Promise(function (done) {
       var todo = function () {
           done();
       };

       todo();
    });

    promise.then(function () {
       console.log('DONE...');
    });

    I want to edit the code like that.

    Thank you !

  • ffmpeg add loop to this line of code i have

    5 juin 2020, par steve

    the code itself is working fine however the 2.mp3 finishes instead i will like it to just loop all the way keeping the current settings how it is as I am happy with it

    



    ffmpeg -i "C:\Users\test\Desktop\vidz\New folder (2)\target\vaastav song .mp4" -i "C:\Users\test\Desktop\vidz\New folder (2)\target\2.mp3" -filter_complex "[1:a]adelay=3000|60000[1a];[0:a][1a]amix" -vcodec copy -y "C:\Users\test\Desktop\vidz\New folder (2)\target\output1.mp4"