Recherche avancée

Médias (1)

Mot : - Tags -/MediaSPIP 0.2

Autres articles (42)

  • (Dés)Activation de fonctionnalités (plugins)

    18 février 2011, par

    Pour gérer l’ajout et la suppression de fonctionnalités supplémentaires (ou plugins), MediaSPIP utilise à partir de la version 0.2 SVP.
    SVP permet l’activation facile de plugins depuis l’espace de configuration de MediaSPIP.
    Pour y accéder, il suffit de se rendre dans l’espace de configuration puis de se rendre sur la page "Gestion des plugins".
    MediaSPIP est fourni par défaut avec l’ensemble des plugins dits "compatibles", ils ont été testés et intégrés afin de fonctionner parfaitement avec chaque (...)

  • Activation de l’inscription des visiteurs

    12 avril 2011, par

    Il est également possible d’activer l’inscription des visiteurs ce qui permettra à tout un chacun d’ouvrir soit même un compte sur le canal en question dans le cadre de projets ouverts par exemple.
    Pour ce faire, il suffit d’aller dans l’espace de configuration du site en choisissant le sous menus "Gestion des utilisateurs". Le premier formulaire visible correspond à cette fonctionnalité.
    Par défaut, MediaSPIP a créé lors de son initialisation un élément de menu dans le menu du haut de la page menant (...)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

Sur d’autres sites (6955)

  • C# server problem with FFmpeg Visual Studio 2022

    16 mai 2024, par seanofdead

    Hello everyone I've spent countless hours on my server I'm trying to create that will share video from one stream to another client computer. That is the goal anyway. I'm using Visual Studio 2022 most recent update. Currently this is my code

    


    using System;
using System.IO;
using System.Net;
using System.Net.Sockets;
using System.Threading.Tasks;
using FFmpeg.AutoGen;
using NLog;

public class VideoStreamServer
{
    private const int Port = 5000;
    private TcpListener server;
    private FFmpegVideoEncoder encoder;
    private static readonly Logger logger = LogManager.GetCurrentClassLogger();

    public VideoStreamServer()
    {
        // Initialize FFmpeg network components
        Console.WriteLine("Initializing FFmpeg network components...");
        int result = ffmpeg.avformat_network_init();
        if (result != 0)
        {
            throw new ApplicationException($"Failed to initialize FFmpeg network components: {result}");
        }

        // Initialize encoder
        encoder = new FFmpegVideoEncoder(1920, 1080, AVCodecID.AV_CODEC_ID_H264); // Screen size & codec
    }

    public static void Main()
    {
        // Initialize NLog
        var logger = LogManager.GetCurrentClassLogger();
        logger.Info("Application started");

        var server = new VideoStreamServer();
        server.Start().Wait();
    }

    public async Task Start()
    {
        server = new TcpListener(IPAddress.Any, Port);
        server.Start();
        logger.Info($"Server started on port {Port}...");

        try
        {
            while (true)
            {
                TcpClient client = await server.AcceptTcpClientAsync();
                logger.Info("Client connected...");
                _ = HandleClientAsync(client);
            }
        }
        catch (Exception ex)
        {
            logger.Error(ex, "An error occurred");
        }
    }

    private async Task HandleClientAsync(TcpClient client)
    {
        using (client)
        using (NetworkStream netStream = client.GetStream())
        {
            try
            {
                await encoder.StreamEncodedVideoAsync(netStream);
            }
            catch (IOException ex)
            {
                logger.Error(ex, $"Network error: {ex.Message}");
                // Additional logging and recovery actions
            }
            catch (Exception ex)
            {
                logger.Error(ex, $"Unexpected error: {ex.Message}");
                // Log and handle other exceptions
            }
            finally
            {
                // Ensure all resources are cleaned up properly
                client.Close();
                logger.Info("Client connection closed properly.");
            }
        }
    }
}

public class FFmpegVideoEncoder
{
    private readonly int width;
    private readonly int height;
    private readonly AVCodecID codecId;
    private static readonly Logger logger = LogManager.GetCurrentClassLogger();

    public FFmpegVideoEncoder(int width, int height, AVCodecID codecId)
    {
        this.width = width;
        this.height = height;
        this.codecId = codecId;
        InitializeEncoder();
    }

    private void InitializeEncoder()
    {
        // Initialize FFmpeg encoder here
        logger.Debug("FFmpeg encoder initialized");
    }

    public async Task StreamEncodedVideoAsync(NetworkStream netStream)
    {
        // Initialize reusable buffers for efficiency
        byte[] buffer = new byte[4096];

        // Capture and encode video frames
        while (true)
        {
            try
            {
                // Simulate capture and encoding
                byte[] videoData = new byte[1024]; // This would come from the encoder

                // Simulate streaming
                for (int i = 0; i < videoData.Length; i += buffer.Length)
                {
                    int chunkSize = Math.Min(buffer.Length, videoData.Length - i);
                    Buffer.BlockCopy(videoData, i, buffer, 0, chunkSize);
                    await netStream.WriteAsync(buffer, 0, chunkSize);
                }
            }
            catch (Exception ex)
            {
                logger.Error(ex, "Error streaming video data");
                throw; // Rethrow to handle in the calling function
            }

            await Task.Delay(1000 / 30); // For 30 FPS
        }
    }
}


    


    When I build no issues but when i run it in debug mode I get this error

    


    System.DllNotFoundException
  HResult=0x80131524
  Message=Unable to load DLL 'avformat.59 under C:\Users\phlfo\Downloads\cfolder\server\ConsoleApp\bin\Debug\': The specified module could not be found.
  Source=FFmpeg.AutoGen
  StackTrace:
   at FFmpeg.AutoGen.ffmpeg.LoadLibrary(String libraryName, Boolean throwException)
   at FFmpeg.AutoGen.ffmpeg.<>c.<.cctor>b__7_0(String libraryName)
   at FFmpeg.AutoGen.ffmpeg.<>c.<.cctor>b__7_242()
   at FFmpeg.AutoGen.ffmpeg.avformat_network_init()
   at VideoStreamServer..ctor() in C:\Users\phlfo\Downloads\cfolder\server\ConsoleApp\Program.cs:line 20
   at VideoStreamServer.Main() in C:\Users\phlfo\Downloads\cfolder\server\ConsoleApp\Program.cs:line 36


    


    I have FFmpeg.AutoGen package installed through VS i originally started with 7.0 but then switched to 5.0 to see if an older version might work (it did not). I also have the files in the same directory as the .exe for testing purposes as seen in the screenshot. Can someone please help me figure out this error.
enter image description here

    


  • Why every audio part is louder in FFmpeg when I join them in one audio ?

    14 mai 2024, par Volodymyr Bilovus

    I trying to make dubbing for audio. I have original audio track and I want to put translated audio parts on top of the original.

    


    translated audio 100% vol : —p1--- ---p2— -----p3--- —p4—

    


    original audio 5% vol : -----------------------------------------

    


    Here is my FFmpeg command with filter_complex

    


    ffmpeg -i video_wpmXlZF4XiE.opus -i 989-audio.mp3 -i 989-audio.mp3 -i 989-audio.mp3 -i 989-audio.mp3 \
-filter_complex "\
[0:a]loudnorm=I=-14:TP=-2:LRA=7, volume=0.05[original]; \
[1:a]loudnorm=I=-14:TP=-2:LRA=7, adelay=5000|5000, volume=1.0[sent1]; \
[2:a]loudnorm=I=-14:TP=-2:LRA=7, adelay=10000|10000, volume=1.0[sent2]; \
[3:a]loudnorm=I=-14:TP=-2:LRA=7, adelay=20000|20000, volume=1.0[sent3]; \
[4:a]loudnorm=I=-14:TP=-2:LRA=7, adelay=30000|30000, volume=1.0[sent4]; \
[original][sent1][sent2][sent3][sent4]amix=inputs=5:duration=longest[out]" \
-map "[out]" output.mp3


    


    Audios I put on top of the original audio track is the same -i 989-audio.mp3 I made it by purpose to show the problem
And here is the audio levels on final generated track.
enter image description here

    


    As you can see, first and second only slightly different but third
and fourth have totally different(higher) volume level (Notice, audio is the same).
Why it's happened ? And how can I workaround this odd behaviour ?

    


  • Why every audio part louder in FFmpeg while I join them in one audio ?

    13 mai 2024, par Volodymyr Bilovus

    I trying to make dubbing for audio. I have original audio track and I want to put translated audio parts on top of the original.

    


    translated audio 100% vol : —p1--- ---p2— -----p3--- —p4—

    


    original audio 5% vol : -----------------------------------------

    


    Here is my FFmpeg command with filter_complex

    


    ffmpeg -i video_wpmXlZF4XiE.opus -i 989-audio.mp3 -i 989-audio.mp3 -i 989-audio.mp3 -i 989-audio.mp3 \
-filter_complex "\
[0:a]loudnorm=I=-14:TP=-2:LRA=7, volume=0.05[original]; \
[1:a]loudnorm=I=-14:TP=-2:LRA=7, adelay=5000|5000, volume=1.0[sent1]; \
[2:a]loudnorm=I=-14:TP=-2:LRA=7, adelay=10000|10000, volume=1.0[sent2]; \
[3:a]loudnorm=I=-14:TP=-2:LRA=7, adelay=20000|20000, volume=1.0[sent3]; \
[4:a]loudnorm=I=-14:TP=-2:LRA=7, adelay=30000|30000, volume=1.0[sent4]; \
[original][sent1][sent2][sent3][sent4]amix=inputs=5:duration=longest[out]" \
-map "[out]" output.mp3


    


    Audios I put on top of the original audio track is the same -i 989-audio.mp3 I made it by purpose to show the problem
And here is the audio levels on final generated track.
enter image description here

    


    As you can see, first and second only slightly different but third
and fourth have totally different(higher) volume level (Notice, audio is the same).
Why it's happened. And how can I workaround this odd behaviour ?