Recherche avancée

Médias (2)

Mot : - Tags -/documentation

Autres articles (25)

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

  • Support de tous types de médias

    10 avril 2011

    Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)

  • List of compatible distributions

    26 avril 2011, par

    The table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
    If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...)

Sur d’autres sites (6422)

  • C++, FFMpeg : Unable to find any decoder or encoder

    14 juillet 2016, par AmN

    I have been using this sample https://ffmpeg.org/doxygen/trunk/decoding__encoding_8c.html as reference for my C++ application. I have used the same code as in the given page. I have linked the libraries, placed the dlls and compiled with no errors. Everything works except that it always throws : Codec not found error.

    /* find the MPEG-1 video decoder */
    codec = avcodec_find_decoder(AV_CODEC_ID_MP2);
    if (!codec) {
       fprintf(stderr, "Codec not found\n");
       exit(1);
    }

    I have changed the line to AV_CODEC_ID_MP2 in this, just to test if only the MPEG codex was missing but seems like all are missing. I have tried changing this to multiple codecs as defined in avcodec.h file (enum AVCodecID, line 189), but all return "Codec not found".

    Am I missing something ?

    Compiler : Microsoft Visual Studio 2015 Community Edition
    Project Type : QTProject

    Oh and I am trying to make a Video Player just to enhance my c++ skills during these holidays. First I was trying QTMediaPlayer Widget, but it was throwing crazy errors on "DirectShowPlay::doRender" or something like that. So I switched to FFMpeg, but this too doesn’t work.

    Thank you for reading my question.

  • ffmpeg throws conversion error, but only if the triggering web request is made from safari ?

    22 novembre 2022, par Kyoshiro Kokujou Obscuritas

    I'm using ffmpeg to do an on-the-fly conversion of audio files to ensure high compatibility. i'm converting them to OGG. and all of this is done by a .NET 6 REST service.
This service is then accessed by a javascript Frontend.
Now the problem. The exact same request runs through without any problems on Windows + Firefox, but it does not on Safari. In Safari it says something about "unknownConversion failed"

    


    it's the same file, it's the same name, and to make sure there are no weird invisible characters i used the Microsoft File API to convert it to a proper file path.

    


    code looks like this

    


    var ffmpeg = new Process();
        var startInfo = new ProcessStartInfo("D:\\Programme\\ffmpeg\\bin\\ffmpeg.exe",
            $"-i \"{path.FullName}\" -c:a libopus -f ogg -")
        {
            RedirectStandardError = true,
            RedirectStandardOutput = true,
            RedirectStandardInput = true,
            UseShellExecute = false,
            CreateNoWindow = true
        };
        ffmpeg.EnableRaisingEvents = true;
        ffmpeg.StartInfo = startInfo;
        ffmpeg.ErrorDataReceived += OnErrorDataReceived;
        ffmpeg.Exited += OnFinished;

        ffmpeg.Start();
        ffmpeg.BeginErrorReadLine();

        return File(new BufferedStream(ffmpeg.StandardOutput.BaseStream), "audio/ogg");


    


    Complete Logs : https://pastebin.com/tTUcsjuT

    


  • 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;
                    
                    

                }
            }

        }));


    }