
Recherche avancée
Médias (2)
-
SPIP - plugins - embed code - Exemple
2 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
Publier une image simplement
13 avril 2011, par ,
Mis à jour : Février 2012
Langue : français
Type : Video
Autres articles (24)
-
La file d’attente de SPIPmotion
28 novembre 2010, parUne file d’attente stockée dans la base de donnée
Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...) -
La sauvegarde automatique de canaux SPIP
1er avril 2010, parDans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...) -
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 (3793)
-
ProcessBuilder is not called when trying to start a process
15 juin 2022, par xnokI am trying to understand more about the ffmpeg usage in JavaCV for android studio and for said task I am trying to use ProcessBuilder. I tried writting a simple program to debug the
pb.start();
Although, I am not getting a response. What I did was to start a default/empty activity and pasted the following program :

package com.example.myapplication;

import androidx.annotation.RequiresApi;
import androidx.appcompat.app.AppCompatActivity;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStream;

import org.bytedeco.javacpp.Loader;

import android.os.Build;
import android.os.Bundle;
import android.util.Log;

public class MainActivity extends AppCompatActivity {
 static final int cols = 192;
 static final int rows = 108;
 static final String ffmpeg = Loader.load(org.bytedeco.ffmpeg.ffmpeg.class);
 static final String rtmp_url = "test.flv";
 static final String[] command = {ffmpeg,
 "-y",
 "-f", "rawvideo",
 "-vcodec", "rawvideo",
 "-pix_fmt", "bgr24",
 "-s", (Integer.toString(cols) + "x" + Integer.toString(rows)),
 "-r", "10",
 "-i", "pipe:",
 "-c:v", "libx264",
 "-pix_fmt", "yuv420p",
 "-preset", "ultrafast",
 "-f", "flv",
 rtmp_url};
 @RequiresApi(api = Build.VERSION_CODES.O)
 @Override
 protected void onCreate(Bundle savedInstanceState) {
 super.onCreate(savedInstanceState);
 setContentView(R.layout.activity_main);
 new Thread(t1).start();

 }
 private static Runnable t1 = () -> {
 Log.e("TAG", "void OnCreate called successfully!");
 ProcessBuilder pb = new ProcessBuilder(command).redirectErrorStream(true);
 pb.redirectErrorStream(true);
 try {
 Process process = pb.start();
 BufferedReader reader = new BufferedReader(new InputStreamReader(process.getInputStream()));
 OutputStream writer = process.getOutputStream();
 Log.e("TAG", "Something good happened here");
 } catch (IOException e) {
 e.printStackTrace();
 Log.e("TAG", "Nothing good happened here");
 }
 };


}



My current problem is that I can't seem to start properly the processBuilder process via pb.start() ;


I get the following logs from the logcat panel :


2022-06-14 17:24:46.328 13371-13371/com.example.myapplication E/TAG: void OnCreate called successfully!
2022-06-14 17:24:46.333 13371-13371/com.example.myapplication E/TAG: Nothing good happened here



I'd like to understand why is it skipping the try/catch block and not starting the process ?


EDIT : I made some changes as per @g00se's suggestions and I got the following stack trace from the code above :


2022-06-15 00:32:26.700 29787-29787/? E/USNET: USNET: appName: com.example.myapplication
2022-06-15 00:32:29.328 29787-29828/com.example.myapplication E/TAG: void OnCreate called successfully!
2022-06-15 00:32:29.330 29787-29828/com.example.myapplication E/AndroidRuntime: FATAL EXCEPTION: Thread-4
 Process: com.example.myapplication, PID: 29787
 java.lang.NullPointerException
 at java.lang.ProcessBuilder.start(ProcessBuilder.java:1012)
 at com.example.myapplication.MainActivity.lambda$static$0(MainActivity.java:48)
 at com.example.myapplication.MainActivity$$ExternalSyntheticLambda0.run(Unknown Source:0)
 at java.lang.Thread.run(Thread.java:920)



-
How to start webcam capturing with javacv
11 septembre 2017, par suny99I am new to JavaCV, i started to learn it but there is lack of documentation. so i need help. My goal in simple. Just take a capture with camera and open it in window, so i dont want to record or anything. Just open camera in window. this is my code :
public static void main(String[] args) throws FrameGrabber.Exception {
FrameGrabber grabber = FrameGrabber.createDefault(0);
grabber.start();
IplImage grabbedImage = converter.convert(grabber.grab());
CanvasFrame frame = new CanvasFrame("Some Title", CanvasFrame.getDefaultGamma()/grabber.getGamma());
while(grabber.grab()!=null){
frame.showImage(grabbedImage);
}
frame.dispose();
grabber.stop();
}So what is bothering me is this : frame.showImage(grabbedImage) ;
What i need to do to get that image from camera -
wait for node server to start up in php
22 février 2015, par Ortix92I have a php script which does the following :
- Start peerflix (node server)
- Get PID
- FFProbe* the server (http://127.0.0.1:8888)
All of this is done in PHP but there is a slight issue. It seems that after having received the PID, the server is not fully initialized yet, or so it seems. The problem is that
FFProbe
cannot probe the server. In other words, it’s not accessible at the time of probing.What are some possibilities to probe the server when it is actually initialized ? I don’t want to use the arbitrary
sleep()
method because waiting for 2 seconds on a slow vagrant machine is now the same as waiting for 2 seconds on a blazing vast server.FFProbe throws an exception when it can’t probe the server. Perhaps use a
try-catch
and return back to thetry
if an exception is thrown ? How would I implement that ?*FFProbe is a companion of FFMpeg to get the information of a video file such as duration and codec.