Recherche avancée

Médias (0)

Mot : - Tags -/upload

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

Autres articles (83)

  • Soumettre bugs et patchs

    10 avril 2011

    Un logiciel n’est malheureusement jamais parfait...
    Si vous pensez avoir mis la main sur un bug, reportez le dans notre système de tickets en prenant bien soin de nous remonter certaines informations pertinentes : le type de navigateur et sa version exacte avec lequel vous avez l’anomalie ; une explication la plus précise possible du problème rencontré ; si possibles les étapes pour reproduire le problème ; un lien vers le site / la page en question ;
    Si vous pensez avoir résolu vous même le bug (...)

  • Contribute to a better visual interface

    13 avril 2011

    MediaSPIP is based on a system of themes and templates. Templates define the placement of information on the page, and can be adapted to a wide range of uses. Themes define the overall graphic appearance of the site.
    Anyone can submit a new graphic theme or template and make it available to the MediaSPIP community.

  • Automated installation script of MediaSPIP

    25 avril 2011, par

    To overcome the difficulties mainly due to the installation of server side software dependencies, an "all-in-one" installation script written in bash was created to facilitate this step on a server with a compatible Linux distribution.
    You must have access to your server via SSH and a root account to use it, which will install the dependencies. Contact your provider if you do not have that.
    The documentation of the use of this installation script is available here.
    The code of this (...)

Sur d’autres sites (6842)

  • How can I stream a video from localhost to web browser using the video tag ?

    3 septembre 2021, par kup

    Basically what I want to stream a video to my browser both on localhost, using Flask, OpenCV, or FFmpeg.

    


    But I am not sure how to do it.

    


    I tried this :

    


    #!/usr/bin/env python
from flask import Flask, render_template, Response
import cv2
import sys
import numpy

app = Flask(__name__)

def get_frame():
    c=cv2.VideoCapture("output.mkv")

    while True:
        retval, im = c.read()
        imgencode=cv2.imencode('.jpg',im)[1]
        stringData=imgencode.tostring()
        yield (b'--frame\r\n'
            b'Content-Type: text/plain\r\n\r\n'+stringData+b'\r\n')

    del(c)

@app.route('/vid')
def vid():
     return Response(get_frame(),mimetype='multipart/x-mixed-replace; boundary=frame')


if __name__ == '__main__':
    app.run(host='localhost',port=5000, debug=True, threaded=True)


    


    But it's not working. Maybe because it is sending images. How can I stream video ?

    


  • Keep getting WIN32Exception when running FFMPEG in ASP.NET project

    23 octobre 2014, par Lance Bloom

    I have an ASP.NET project and I want to use FFMPEG to help create thumbails for my videos. I’ve loaded FFMPEG into the project, and whenever I run my code I get the same error :

    ’ffmpeg.MainModule’ threw an exception of type ’System.ComponentModel.Win32Exception’
    "A 32 bit processes cannot access modules of a 64 bit process."

    I’m using VS 2013, and I’ve set my target platform to x86, and made 100% sure I am using the 32bit version of ffmpeg. I’m using the static libraries from this site (http://ffmpeg.zeranoe.com/builds/) I also tried to change the target platform to All CPUs or x64, and tried with both 32 and 64 bit versions of FFMPEG. Always the same error. I am running IIS Express when I test in my local environment.

    Here is my code. Would appreciate any help !

    String vSource = "http://example.com/myvideo.mp4";
    String path1 = HttpContext.Current.Request.PhysicalApplicationPath;

    Process ffmpeg = new Process();
    ProcessStartInfo startinfo = new ProcessStartInfo(HostingEnvironment.MapPath("~/App_Data/exe/ffmpeg.exe"), "-i " + vSource + "-ss 00:00:05.000 -f image2 -vframes 1 " + path1 +"thumbnail1.jpg");

    startinfo.RedirectStandardError = true;
    startinfo.RedirectStandardOutput = true;
    startinfo.RedirectStandardInput = true;
    startinfo.UseShellExecute = false;
    startinfo.CreateNoWindow = true;
    ffmpeg.StartInfo = startinfo;

    ffmpeg.Start();
  • Adding an image overlay to a video using C# and ffmpeg.exe

    14 juillet 2023, par hello world

    I'm working on a project where I need to add an image overlay to a video using C# and ffmpeg.exe. I want to place the image at a specific position on the video and make sure it remains visible throughout the entire duration of the video. Can someone guide me on how to achieve this using the ffmpeg library in conjunction with C# ?

    


    I've looked into the documentation, but I couldn't find a straightforward example that demonstrates how to accomplish this task programmatically. Specifically, I'm interested in :

    


      

    1. How to specify the position and size of the image overlay on the video.
    2. 


    3. How to ensure the image stays visible throughout the duration of the video, even if the video has varying resolutions or aspect ratios.
    4. 


    5. How to execute the ffmpeg command from C# code and capture any potential error messages or status updates.
If anyone has experience with using C# and ffmpeg.exe to add image overlays to videos, your insights and code examples would be greatly appreciated. Thank you !
    6. 


    


    Edit :
Here is my code :

    


            private async void button6_Click(object sender, EventArgs e)
        {
            ProcessStartInfo startInfo = new ProcessStartInfo
            {
                FileName = "ffmpeg.exe",
                Arguments = $"-f lavfi -i nullsrc -t 1 -s {pictureBox2.Width}x{pictureBox2.Height} -r 30 -c:v libx264 {"file.mp4"}",
                UseShellExecute = false,
                RedirectStandardOutput = true,
                RedirectStandardError = true,
                CreateNoWindow = true
            };

            using (Process process = new Process())
            {
                process.StartInfo = startInfo;
                process.Start();
                process.WaitForExit();
            }
            render = true;
            await Task.Run(() =>
            {
                for (int i = 0; i < 10; i++)
                {
                    Bitmap bmp = new Bitmap(1, 1);
                    pictureBox1.Invoke((MethodInvoker)(() =>
                    {
                        bmp = (Bitmap)pictureBox1.Image.Clone();
                    }));
                    while (bmp == pictureBox1.Image)
                    {
                        Thread.Sleep(10);
                    }
                    bmp.Save($"a.jpg");
                    ProcessStartInfo startInfo = new ProcessStartInfo
                    {
                        FileName = "ffmpeg.exe",
                        Arguments = $"-i file.mp4 -i a.jpg -filter_complex \"[0:v][1:v] overlay=25:25:enable='between(t,0,20)'\" -pix_fmt yuv1080p -c:a copy file.mp4",
                        UseShellExecute = false,
                        RedirectStandardOutput = true,
                        RedirectStandardError = true,
                        CreateNoWindow = true
                    };

                    using (Process process = new Process())
                    {
                        process.StartInfo = startInfo;
                        process.Start();
                        process.WaitForExit();
                    }
                }
            });
            File.Delete("a.jpg");
        }