
Recherche avancée
Médias (1)
-
The Slip - Artworks
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Texte
Autres articles (51)
-
Websites made with MediaSPIP
2 mai 2011, parThis page lists some websites based on MediaSPIP.
-
Participer à sa traduction
10 avril 2011Vous pouvez nous aider à améliorer les locutions utilisées dans le logiciel ou à traduire celui-ci dans n’importe qu’elle nouvelle langue permettant sa diffusion à de nouvelles communautés linguistiques.
Pour ce faire, on utilise l’interface de traduction de SPIP où l’ensemble des modules de langue de MediaSPIP sont à disposition. ll vous suffit de vous inscrire sur la liste de discussion des traducteurs pour demander plus d’informations.
Actuellement MediaSPIP n’est disponible qu’en français et (...) -
Creating farms of unique websites
13 avril 2011, parMediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)
Sur d’autres sites (6618)
-
fate/lavf-* : Add missing dependency on pipe protocol
18 septembre 2022, par Andreas Rheinhardtfate/lavf-* : Add missing dependency on pipe protocol
Forgotten in bf1337f99c66ac574c6e4da65c305ca878f1d65d.
Signed-off-by : Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-
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.


-
Matplotlib pipe canvas.draw() to ffmpeg - unexpected result [duplicate]
31 juillet 2022, par NarusanI'm using this code from here to try and pipe multiple matplotlib plots into ffmpeg to write a video file :


import numpy as np
import matplotlib.pyplot as plt
import subprocess

xlist = np.random.randint(100,size=100)
ylist = np.random.randint(100, size=100)
color = np.random.randint(2, size=100)

f = plt.figure(figsize=(5,5), dpi = 300)
canvas_width, canvas_height = f.canvas.get_width_height()
ax = f.add_axes([0,0,1,1])
ax.axis('off')


# Open an ffmpeg process
outf = 'ffmpeg.mp4'
cmdstring = ('ffmpeg',
 '-y', '-r', '30', # overwrite, 30fps
 '-s', '%dx%d' % (canvas_width, canvas_height), # size of image string
 '-pix_fmt', 'argb', # format
 '-f', 'rawvideo', '-i', '-', # tell ffmpeg to expect raw video from the pipe
 '-vcodec', 'mpeg4', outf) # output encoding
p = subprocess.Popen(cmdstring, stdin=subprocess.PIPE)

# Draw 1000 frames and write to the pipe
for frame in range(10):
 print("Working on frame")
 # draw the frame
 f = plt.figure(figsize=(5,5), dpi=300)
 ax = f.add_axes([0,0,1,1])
 ax.scatter(xlist, ylist,
 c=color, cmap = 'viridis')
 f.canvas.draw()
 plt.show()

 # extract the image as an ARGB string
 string = f.canvas.tostring_argb()
 # write to pipe
 p.stdin.write(string)

# Finish up
p.communicate()



While
plt.show()
does show the correct plot (see image below), the video that ffmpeg creates is a bit different than whatplt.show()
shows. I am presuming the issue is withf.canvas.draw()
, but I'm not sure how to get a look at whatcanvas.draw()
actually plots.



ffmpeg video (imgur link)