
Recherche avancée
Autres articles (61)
-
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 ;
-
Ecrire une actualité
21 juin 2013, parPrésentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
Vous pouvez personnaliser le formulaire de création d’une actualité.
Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...) -
Websites made with MediaSPIP
2 mai 2011, parThis page lists some websites based on MediaSPIP.
Sur d’autres sites (9208)
-
Python gets stuck at pipe.stdin.write(image.tostring())
10 mars 2020, par Vandana RajanI am reading each frame of video and adding time stamp to it as given below.
command = ['ffmpeg',
'-y', # (optional) overwrite output file if it exists
'-f', 'rawvideo', #Input is raw video
'-pix_fmt', 'bgr24', #Raw video format
'-s', str(int(width)) + 'x' + str(int(height)), # size of one frame
'-i', '-', # The input comes from a pipe
'-an', # Tells FFMPEG not to expect any audio
'-vcodec', 'mpeg4',
'-b:v', '10M', #Sets a maximum bit rate
Output_name]
#Open the pipe
pipe = sp.Popen(command, stdin=sp.PIPE, stderr=sp.PIPE)
print('Processing....')
print(' ')
#Reads through each frame, calculates the timestamp, places it on the frame and exports the frame to the output video.
#import pdb
#pdb.set_trace()
while current_frame < total_frames:
success, image = video.read()
if success:
elapsed_time = video.get(cv2.CAP_PROP_POS_MSEC)
current_frame = video.get(cv2.CAP_PROP_POS_FRAMES)
timestamp = initial + dt.timedelta(microseconds = elapsed_time*1000)
cv2.putText(image, 'Date: ' + str(timestamp)[0:10], (50,int(height-150)), cv2.FONT_HERSHEY_COMPLEX_SMALL, 2, (255, 255, 255), 3)
cv2.putText(image, 'Time: ' + str(timestamp)[11:-4], (50,int(height-100)), cv2.FONT_HERSHEY_COMPLEX_SMALL, 2, (255, 255, 255), 3)
pipe.stdin.write(image.tostring())
print('frame number',current_frame)
else:
print('video reader fail')
video.release()
pipe.stdin.close()
pipe.stderr.close()However, after around 18k frames, Python gets stuck at ’pipe.stdin.write(image.tostring())’. It does not produce any error, but simply hangs. How to resolve this issue ?
Thanks in advance.
-
Pipe PhantomJS output to FFmpeg
10 avril 2017, par Hasse AndersenI am running PhantomJS using Selenium WebDriver (C#).
I’m trying to video record my browser using FFmpeg as shown in the 2 tutorials :
https://mindthecode.com/recording-a-website-with-phantomjs-and-ffmpeg/
As explained in the tutorials, I’ll need to pipe output the phantomJS process to ffmpeg.
I know how to add arguments to phantomjs, like the following :
var svz = PhantomJSDriverService.CreateDefaultService();
svz.AddArgument("ffmpeg -y -c:v png -f image2pipe -r 24 -t 10 -i - -c:v libx264 -pix_fmt yuv420p -movflags +faststart output.mp4");
var driver = new PhantomJSDriver(svz);However, I don’t know how to add the argument as pipe. I have tried adding the pipe symbol before the actual argument but that doesn’t seem to work.
So, my question is, how do I pipe the output of PhantomJS using selenium webdriver ?
-
ffmpeg in a bash pipe
27 décembre 2019, par Martin WangI have a rmvb file path list, and want to convert this files to mp4 files. So I hope to use bash pipeline to handle it. The code is
Convert() {
ffmpeg -i "$1" -vcodec mpeg4 -sameq -acodec aac -strict experimental "$1.mp4"
}
Convert_loop(){
while read line; do
Convert $line
done
}
cat list.txt | Convert_loopHowever, it only handle the first file and the pipe exits.
So, does ffmpeg affect the bash pipe ?