
Recherche avancée
Autres articles (33)
-
Publier sur MédiaSpip
13 juin 2013Puis-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 -
Emballe médias : à quoi cela sert ?
4 février 2011, parCe plugin vise à gérer des sites de mise en ligne de documents de tous types.
Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ; -
Emballe Médias : Mettre en ligne simplement des documents
29 octobre 2010, parLe plugin emballe médias a été développé principalement pour la distribution mediaSPIP mais est également utilisé dans d’autres projets proches comme géodiversité par exemple. Plugins nécessaires et compatibles
Pour fonctionner ce plugin nécessite que d’autres plugins soient installés : CFG Saisies SPIP Bonux Diogène swfupload jqueryui
D’autres plugins peuvent être utilisés en complément afin d’améliorer ses capacités : Ancres douces Légendes photo_infos spipmotion (...)
Sur d’autres sites (9267)
-
C# Process in loop reading error output, causes "No async read operation is in progress on the stream" error
29 mai 2023, par TSLeeI 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;
 
 

 }
 }

 }));


 }



-
FFMPEG Streaming Issue - "Connection Failed : I/O Error"
25 avril 2023, par 1080JakeFor a fun project I wanted to see if I could create an SRT stream from an active SDI input (1080i59.94) on a BMD Decklink Quad card. Whenever I try to execute my syntax, I get the following prompt "Connection to srt ://127.0.0.1:1234 failed : I/O error"
Is there anyway to use a debug mode and get more details about what is causing this ? I am very new to FFMPEG and obviously clueless. This is the syntax I am trying to execute -


C:\Users\01>ffmpeg -f decklink -i "DeckLink Quad (8)" -c:v libx265 -preset ultrafast -b:v 5000k -f mpegts srt://127.0.0.1:1234



Full printout here -


C:\Users\01>ffmpeg -f decklink -i "DeckLink Quad (8)" -c:v libx265 -preset ultrafast -b:v 5000k -bufsize 3000k -f mpegts srt://127.0.0.1:1234
ffmpeg version n6.0-ffmpeg-windows-build-helpers Copyright (c) 2000-2023 the FFmpeg developers
 built with gcc 10.2.0 (GCC)
 configuration: --pkg-config=pkg-config --pkg-config-flags=--static --extra-version=ffmpeg-windows-build-helpers --enable-version3 --disable-debug --disable-w32threads --arch=x86_64 --target-os=mingw32 --cross-prefix=/home/runner/work/ffmpeg-stable-autobuild/ffmpeg-stable-autobuild/sandbox/cross_compilers/mingw-w64-x86_64/bin/x86_64-w64-mingw32- --enable-libcaca --enable-gray --enable-libtesseract --enable-fontconfig --enable-gmp --enable-libass --enable-libbluray --enable-libbs2b --enable-libflite --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopus --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libvorbis --enable-libwebp --enable-libzimg --enable-libzvbi --enable-libmysofa --enable-libopenjpeg --enable-libopenh264 --enable-libvmaf --enable-libsrt --enable-libxml2 --enable-opengl --enable-libdav1d --enable-cuda-llvm --enable-gnutls --enable-libsvtav1 --enable-libvpx --enable-libaom --enable-nvenc --enable-nvdec --extra-libs=-lharfbuzz --extra-libs=-lm --extra-libs=-lshlwapi --extra-libs=-lmpg123 --extra-libs=-lpthread --extra-cflags=-DLIBTWOLAME_STATIC --extra-cflags=-DMODPLUG_STATIC --extra-cflags=-DCACA_STATIC --enable-amf --enable-libmfx --enable-gpl --enable-frei0r --enable-librubberband --enable-libvidstab --enable-libx264 --enable-libx265 --enable-avisynth --enable-libaribb24 --enable-libxvid --enable-libdavs2 --enable-libxavs2 --enable-libxavs --extra-cflags='-mtune=generic' --extra-cflags=-O3 --enable-static --disable-shared --prefix=/home/runner/work/ffmpeg-stable-autobuild/ffmpeg-stable-autobuild/sandbox/cross_compilers/mingw-w64-x86_64/x86_64-w64-mingw32 --enable-nonfree --enable-libfdk-aac --enable-decklink
 libavutil 58. 2.100 / 58. 2.100
 libavcodec 60. 3.100 / 60. 3.100
 libavformat 60. 3.100 / 60. 3.100
 libavdevice 60. 1.100 / 60. 1.100
 libavfilter 9. 3.100 / 9. 3.100
 libswscale 7. 1.100 / 7. 1.100
 libswresample 4. 10.100 / 4. 10.100
 libpostproc 57. 1.100 / 57. 1.100
[decklink @ 000002ad2785a6c0] Autodetected the input mode
[decklink @ 000002ad2785a6c0] Found Decklink mode 1920 x 1080 with rate 29.97(i)
Guessed Channel Layout for Input Stream #0.0 : stereo
Input #0, decklink, from 'DeckLink Quad (8)':
 Duration: N/A, start: 0.000000, bitrate: 995869 kb/s
 Stream #0:0: Audio: pcm_s16le, 48000 Hz, 2 channels, s16, 1536 kb/s
 Stream #0:1: Video: rawvideo (UYVY / 0x59565955), uyvy422(top first), 1920x1080, 994333 kb/s, 29.97 tbr, 1000k tbn
[srt @ 000002ad2a870dc0] Connection to srt://127.0.0.1:1234 failed: I/O error
srt://127.0.0.1:1234: I/O error



Instead of using an SDI input from my BMD card, I also tried to use a local mp4 file on my PC but I get the same prompt. Note - I am running FFMPEG on a Windows 10 PC.


-
A ffplay Error :"Failed to set value 'yuv420p' for option 'pix_fmt' : Option not found"
3 novembre 2023, par DavisTaoI was trying to play a video by ffplay. Here’s my command :


ffplay -f rawvideo -pix_fmt yuv420p -video_size 640x360 Resources/video.h264


but I got this error :

Failed to set value 'yuv420p’ for option 'pix_fmt: Option not found


So l used another command to make the video playing correctly, and this is the command :


ffplay -f rawvideo -video_size 640x360 Resources/video.h264


I wonder why the first command reported the error, because I used
ffplav -pix_fmts
and found that yuv420p is supported.

By the way the pixel format of the video file is yuv420p exactly.