
Recherche avancée
Autres articles (99)
-
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 ;
-
Multilang : améliorer l’interface pour les blocs multilingues
18 février 2011, parMultilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela. -
ANNEXE : Les plugins utilisés spécifiquement pour la ferme
5 mars 2010, parLe site central/maître de la ferme a besoin d’utiliser plusieurs plugins supplémentaires vis à vis des canaux pour son bon fonctionnement. le plugin Gestion de la mutualisation ; le plugin inscription3 pour gérer les inscriptions et les demandes de création d’instance de mutualisation dès l’inscription des utilisateurs ; le plugin verifier qui fournit une API de vérification des champs (utilisé par inscription3) ; le plugin champs extras v2 nécessité par inscription3 (...)
Sur d’autres sites (13678)
-
ffmpeg process how to read from pipe to pipe in c#
28 janvier 2024, par gregI need to read audio data from stream 1 to stream 2 passing the data through ffmpeg.
It works great when i input data from file and output to pipe :


Process? CreateStream()
{
 return Process.Start(new ProcessStartInfo
 {
 FileName = @"sources\ffmpeg",
 Arguments = @"-i input.mp3 -f s16le pipe:1",
 UseShellExecute = false,
 RedirectStandardOutput = true
 });
}



Or when i input data from pipe and output to file :


Process? CreateStream()
{
 return Process.Start(new ProcessStartInfo
 {
 FileName = @"sources\ffmpeg",
 Arguments = @"-i pipe: -f s16le output.file",
 UseShellExecute = false,
 RedirectStandardInput = true
 });
}



But if i try to do both :


Process? CreateStream()
{
 return Process.Start(new ProcessStartInfo
 {
 FileName = @"sources\ffmpeg",
 Arguments = @"-i pipe:0 -f s16le pipe:1",
 UseShellExecute = false,
 RedirectStandardInput = true,
 RedirectStandardOutput = true
 });
}



Runtime will hang in place printing :




Input #0, matroska,webm, from 'pipe:0' :
Metadata :
encoder : google/video-file
Duration : 00:04:15.38, start : -0.007000, bitrate : N/A
Stream #0:0(eng) : Audio : opus, 48000 Hz, stereo, fltp (default)
Stream mapping :
Stream #0:0 -> #0:0 (opus (native) -> pcm_s16le (native))


Output #0, s16le, to 'pipe:1' :
Metadata :
encoder : Lavf59.27.100
Stream #0:0(eng) : Audio : pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s (default)
Metadata :
encoder : Lavc59.37.100 pcm_s16le




main function code (it is the same for all examples) :


async Task Do()
{
 using (var ffmpeg = CreateStream())
 {
 if (ffmpeg == null) return;

 using (var audioStream = GetAudioStream())
 {
 await audioStream.CopyToAsync(ffmpeg.StandardInput.BaseStream);
 ffmpeg.StandardInput.Close();
 }

 //runtime will hang in here

 Console.WriteLine("\n\ndone\n\n"); //this won't be printed

 using (var outputStream = CreatePCMStream())
 {
 try
 {
 await ffmpeg.StandardOutput.BaseStream.CopyToAsync(outputStream);
 }
 finally
 {
 await outputStream.FlushAsync();
 }
 }
 }
}



And the most interesting is if i remove
RedirectStandardOutput = true
string programm will work as expected printing a bunch of raw data to the console.

I'd like to solve this problem without using any intermediate files and so on.


-
php run two commands in backgorund one by one
30 mars 2022, par RednBlackI have a problem in php/linux, described below :


I have to execute a linux command through shell_exec and run two commands.


$command1 = "ffmpeg -y -nostdin -hide_banner -re -i file.mp4 -c:a copy -c:v copy -f mpegts udp://127.0.0.1:1235 >/dev/null 2>>error.log & echo $! > file.pid";

$command2 = "php /home/update.php file.mp4 &"

shell_exec("(".$command1.") && (".$command2.")");



But they both get executed in same time I tried with semi-colon ( ;) operator but same result.


What I want to achieve is run first command no mater, if finished or exit with error then run second command, but both put on background so php will not hang.


Thank you.


-
avfilter/vf_extractplanes : switch to activate()
7 mars 2022, par Paul B Maholavfilter/vf_extractplanes : switch to activate()
Fixes hang at end of input with this command :
ffmpeg -f lavfi -i testsrc2=d=50,format=yuv444p -lavfi \
"extractplanes=y+u+v[y][u][v] ;[y]tpad=start=0[y] ;[u]tpad=start=0[u] ;[v]negate[v] ;[y][u][v]vstack=3" -f null -