Recherche avancée

Médias (1)

Mot : - Tags -/musée

Autres articles (45)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

  • Creating farms of unique websites

    13 avril 2011, par

    MediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
    This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)

  • Encoding and processing into web-friendly formats

    13 avril 2011, par

    MediaSPIP automatically converts uploaded files to internet-compatible formats.
    Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
    Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
    Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
    All uploaded files are stored online in their original format, so you can (...)

Sur d’autres sites (6464)

  • C# Process in loop reading error output, causes "No async read operation is in progress on the stream" error

    29 mai 2023, par TSLee

    I am trying to read the format of multiple video files using ffmpeg in an asynchronous operation of Process and facing an error, "No async read operation is in progress on the stream". According to https://social.msdn.microsoft.com/Forums/vstudio/en-US/c961f461-7afb-4a92-b0ae-f78c2003b5de/help-an-asynchronous-read-operation-is-already-in-progress-on-the-standardoutput-stream?forum=csharpgeneral, I think I have to use CancelErrorRead(), as BeginErrorReadLine() can't be launched more than once. I also wonder if I use this function in the wrong place, because the read operation has ended in process1.exited() ? But the operation can't proceed to the second index with this error.

    


    How could I use CancelErrorRead()/CancelOutputRead() properly and where should I place them on the code ? I also did an experiment in that I commented these two CancelRead(), and a different error "async read operation has been started on the stream" will appear.

    


                Process process1 = new Process();
            process1.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
            process1.StartInfo.CreateNoWindow = true;
            process1.StartInfo.UseShellExecute = false;
            process1.StartInfo.FileName = ".\\ffmpeg.exe";
            process1.StartInfo.WorkingDirectory = ".\\";
            process1.EnableRaisingEvents = true;
            process1.StartInfo.RedirectStandardOutput = true; //if this is true, UseShellExecute must be false. true if output should be written to StandardOutput
            process1.StartInfo.RedirectStandardError = true;
            //indicates that the associated Process has written a line that's terminated with a newline
            process1.ErrorDataReceived += new DataReceivedEventHandler(inputHandler);
            process1.Exited += (ending, p) =>
            {
                flag = true;
                process1.CancelOutputRead();
                process1.CancelErrorRead();//
            };
            foreach (String file in inputList)
            {
                if (flag == true)
                {
                    flag = false;
                    process1.StartInfo.Arguments = "-i " + " \"" + file + "\"";
                    Console.WriteLine(process1.StartInfo.Arguments);
                    process1.Start();
                    process1.BeginOutputReadLine();//
                    process1.BeginErrorReadLine();
                    process1.WaitForExit(); //for asynchronous output
                }


            }
        }
        private void inputHandler(object sender, DataReceivedEventArgs l)
        {
             cba.Append(l.Data + "\n");
             videoInput = l.Data;
             //Console.WriteLine(cba);
             //Process p = sender as Process;
             Console.WriteLine(videoInput);

             this.BeginInvoke(new MethodInvoker(() =>
             {

              if (!String.IsNullOrEmpty(videoInput))
              {
                    if (videoInput.Contains("Stream #0:0"))
                    {
                        String subvideoInput1 = 
                        videoInput.Substring(videoInput.IndexOf("Stream #0:0"));
                        String video_inputType = subvideoInput1;
                        textBox1.Text += video_inputType + System.Environment.NewLine;
                        Console.WriteLine(video_inputType);
                     }
                     if (videoInput.Contains("Stream #0:1"))
                     {
                         String subvideoInput2 = 
                         videoInput.Substring(videoInput.IndexOf("Stream #0:1"));
                         Console.WriteLine(subvideoInput2.IndexOf("\n"));
                         Console.WriteLine(subvideoInput2);
                         String audio_inputType = subvideoInput2;
                         textBox1.AppendText(audio_inputType + System.Environment.NewLine);
                         Console.WriteLine(audio_inputType);
                     }
                     if (videoInput.Contains("Duration:"))
                     {
                         String videoinputDuration = 
                         videoInput.Substring(videoInput.IndexOf("Duration:"));
                         String subvideo_inputDuration = videoinputDuration.Substring(9);
                         String inputvideoDuration = 
                     subvideo_inputDuration.Remove(subvideo_inputDuration.IndexOf("."));
                         Console.WriteLine(inputvideoDuration);
                         double totalseconds = 
                         TimeSpan.Parse(inputvideoDuration).TotalSeconds;
                    
                    

                }
            }

        }));


    }


    


  • Opencv Won't compile due to "cap_ffmpeg_impl.hpp" and "ffmpeg_codecs.hpp"

    13 octobre 2022, par AmberGraph41161

    I am new to opencv and linux. I am trying to install opencv or build opencv from source to use the library with c++. When building or trying to use "make" to build all the files, everything is fine until around 50% (I've tried to redo the entire installation process multiple times over because I have no idea what I am doing and keep getting the same errors). At around the 50% mark, I get the same two errors :

    


    make[2]: *** [modules/videoio/CMakeFiles/opencv_videoio.dir/build.make:244: modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_ffmpeg.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:5218: modules/videoio/CMakeFiles/opencv_videoio.dir/all] Error 2
make: *** [Makefile:166: all] Error 2


    


    I get these two errors as well as a ton of build error messages containing errors about 2 files in particular (I get a bunch of errors and all of them deal with 2 files).

    


    /home/jinwoo_k/opencv/opencv-4.6.0/modules/videoio/src/ffmpeg_codecs.hpp:96:27: error: ‘CODEC_ID_LJPEG’ was not declared in this scope; did you mean ‘AV_CODEC_ID_LJPEG’?
   96 | #define AV_CODEC_ID_LJPEG CODEC_ID_LJPEG
      |                           ^~~~~~~~~~~~~~
/home/jinwoo_k/opencv/opencv-4.6.0/modules/videoio/src/cap_ffmpeg_impl.hpp:215:26: note: in expansion of macro ‘AV_CODEC_ID_LJPEG’
  215 | #  define CV_CODEC(name) AV_##name
      |                          ^~~
/home/jinwoo_k/opencv/opencv-4.6.0/modules/videoio/src/cap_ffmpeg_impl.hpp:2842:10: note: in expansion of macro ‘CV_CODEC’
 2842 |     case CV_CODEC(CODEC_ID_LJPEG):
      |          ^~~~~~~~
/home/jinwoo_k/opencv/opencv-4.6.0/modules/videoio/src/ffmpeg_codecs.hpp:100:30: error: ‘CODEC_ID_RAWVIDEO’ was not declared in this scope; did you mean ‘AV_CODEC_ID_RAWVIDEO’?
  100 | #define AV_CODEC_ID_RAWVIDEO CODEC_ID_RAWVIDEO
      |                              ^~~~~~~~~~~~~~~~~



    


    ^^^These are just a couple of the error messages, I get hundreds of them.

    


    I read another stackoverflow post about opencv and ffmpeg : OpenCV 3.0.0 make error with FFMPEG
but I don't think that this is the same error that I have. I don't believe that I have made a mistake in the installation or build process or anything with cmake - I have followed and redone the process of following mutliple video and forum guides on how to install opencv. What am I doing wrong ?

    


  • "Missing reference picture" error when saving rtsp stream with ffmpeg

    4 mars 2020, par Cédric Kamermans

    I want to record 10 seconds of video with an IP camera via ffmpeg. The output video looks fine but i get a bunch of "Missing reference picture" errors in the log. This only happens in the beginning of the process. I also get the warning "circular_buffer_size is not supported on this build".

    I started of with the following code :

    -y -i rtsp://username:password@IP:88/videoMain -t 10 ffmpeg_capture.mp4

    But this resulted in the output being corrupted in the beginning.
    I found the following code on a forum and this seems to fix that problem. The errors still remain though.

    -y -i rtsp://username:password@IP:88/videoMain -b 900k -vcodec copy -r 60 -t 10 ffmpeg_capture.mp4

    One thing to note is that currently we’re using a C2 V3 IP camera. This model is just for testing, we will upgrade to a better model when we get this working.

    I want to clarify that i’m just beginning to use ffmpeg, so I don’t quite understand it yet. It would be greatly appreciated if someone could provide an example code of how I can fix this problem.

    Thanks in advance !