
Recherche avancée
Autres articles (59)
-
Mise à jour de la version 0.1 vers 0.2
24 juin 2013, parExplications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1) ; Installation des dépendances pour Smush ; Installation de MediaInfo et FFprobe pour la récupération des métadonnées ; On n’utilise plus ffmpeg2theora ; On n’installe plus flvtool2 au profit de flvtool++ ; On n’installe plus ffmpeg-php qui n’est plus maintenu au (...) -
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;
-
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
Sur d’autres sites (8269)
-
Python OpenCV FFMPEG RTSP Stream timeout triggered after 30015.187000 ms
24 février 2024, par BatCoderI am trying to read several RTSP streams using opencv cv2.VideoCapture(URL). It has FFMPEG backend. Sometimes for few streams it is throwing timeout warning after 30 seconds.


[ WARN:0@123.394] global cap_ffmpeg_impl.hpp:453 _opencv_ffmpeg_interrupt_callback Stream timeout triggered after 30015.187000 ms



I tried setting up the timeout flag.


import os
os.environ["OPENCV_FFMPEG_CAPTURE_OPTIONS"] = "timeout;5000" # 5 seconds 
cv2.VideoCapture("rtsp://URL", cv2.CAP_FFMPEG)



Ref : How to terminate cv2.VideoCapture(rtsp_url) call if execution stalls due to RTSP camera issues ?


But still, it is waiting for 30 seconds before raising the warning.


OpenCV version : 4.4.0.x
Python version : 3.9.x


Can we decrease the wait time from 30 seconds to a lower number ?


-
FFMPEG RTSP Stream timeout triggered after 30015.187000 ms
24 février 2024, par BatCoderI am trying to read several RTSP streams using opencv cv2.VideoCapture(URL). It has FFMPEG backend. Sometimes for few streams it is throwing timeout warning after 30 seconds.


[ WARN:0@123.394] global cap_ffmpeg_impl.hpp:453 _opencv_ffmpeg_interrupt_callback Stream timeout triggered after 30015.187000 ms



I tried setting up the timeout flag.


import os
os.environ["OPENCV_FFMPEG_CAPTURE_OPTIONS"] = "timeout;5000" # 5 seconds 
cv2.VideoCapture("rtsp://URL", cv2.CAP_FFMPEG)



Ref : How to terminate cv2.VideoCapture(rtsp_url) call if execution stalls due to RTSP camera issues ?


But still, it is waiting for 30 seconds before raising the warning.


OpenCV version : 4.4.0.x
Python version : 3.9.x


Can we decrease the wait time from 30 seconds to a lower number ?


-
FFPMEG command to record screen works only from cmd on windows but not from my Java class
21 mars 2024, par Youssef Hammoumai have a JUNIT test that uses a Java class called ScreenRecordingWatcher where i specified my ffpmeg command to record the computer when my test fails.


But unfortunately, my command only works from my cmd and not from my class, On both sides it generates successfully my file, but when it is generated from my Java class, the file is not readable from my windows player (0xc10100be error).


Here is the command i am using :


C:\outils\ffmpeg-master-latest-win64-gpl\bin\ffmpeg.exe -f gdigrab -framerate 30 -i desktop -c:v h264_nvenc -qp 0 C:\outils\video\output.mkv



Here is the same command from my class :


public class ScreenRecordingWatcher extends TestWatcher {

private static final String FFMPEG_PATH = "C:\\outils\\ffmpeg-master-latest-win64-gpl\\bin\\ffmpeg.exe";
private static final String OUTPUT_FILE = "C:\\outils\\video\\fichier.mkv";
private boolean testFailed = false;

@Override
protected void failed(Throwable e, Description description) {

 super.failed(e, description);
 testFailed = true;
}

@Override
protected void finished(Description description) {
 super.finished(description);
 if (testFailed) {
 startRecording();

 try {
 Thread.sleep(5000);

 } catch (InterruptedException e) {
 throw new RuntimeException(e);
 }
 stopRecording();
 }
}

private void startRecording() {
 String[] command = { FFMPEG_PATH, "-f", "gdigrab", "-framerate", "30", "-i", "desktop", "-c:v", "h264_nvenc", "-qp", "0", OUTPUT_FILE };

 System.out.println(Arrays.toString(command));
 ProcessBuilder builder = new ProcessBuilder(command);
 try {
 builder.start();
 } catch (IOException e) {
 e.printStackTrace();
 }
}

private void stopRecording() {
 String[] command = { "tskill", "ffmpeg" };
 ProcessBuilder builder = new ProcessBuilder(command);
 try {
 builder.start();
 } catch (IOException e) {
 throw new RuntimeException(e);
 }
}



}


Does someone have an idea of why it executes well from my cmd but not from my class ?


Thank you in advance