
Recherche avancée
Médias (91)
-
Les Miserables
9 décembre 2019, par
Mis à jour : Décembre 2019
Langue : français
Type : Textuel
-
VideoHandle
8 novembre 2019, par
Mis à jour : Novembre 2019
Langue : français
Type : Video
-
Somos millones 1
21 juillet 2014, par
Mis à jour : Juin 2015
Langue : français
Type : Video
-
Un test - mauritanie
3 avril 2014, par
Mis à jour : Avril 2014
Langue : français
Type : Textuel
-
Pourquoi Obama lit il mes mails ?
4 février 2014, par
Mis à jour : Février 2014
Langue : français
-
IMG 0222
6 octobre 2013, par
Mis à jour : Octobre 2013
Langue : français
Type : Image
Autres articles (86)
-
Encodage et transformation en formats lisibles sur Internet
10 avril 2011MediaSPIP transforme et ré-encode les documents mis en ligne afin de les rendre lisibles sur Internet et automatiquement utilisables sans intervention du créateur de contenu.
Les vidéos sont automatiquement encodées dans les formats supportés par HTML5 : MP4, Ogv et WebM. La version "MP4" est également utilisée pour le lecteur flash de secours nécessaire aux anciens navigateurs.
Les documents audios sont également ré-encodés dans les deux formats utilisables par HTML5 :MP3 et Ogg. La version "MP3" (...) -
Monitoring de fermes de MediaSPIP (et de SPIP tant qu’à faire)
31 mai 2013, parLorsque l’on gère plusieurs (voir plusieurs dizaines) de MediaSPIP sur la même installation, il peut être très pratique d’obtenir d’un coup d’oeil certaines informations.
Cet article a pour but de documenter les scripts de monitoring Munin développés avec l’aide d’Infini.
Ces scripts sont installés automatiquement par le script d’installation automatique si une installation de munin est détectée.
Description des scripts
Trois scripts Munin ont été développés :
1. mediaspip_medias
Un script de (...) -
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 (...)
Sur d’autres sites (14003)
-
Matplotlib use Ffmpeg to save plot to be mp4 not include full step
21 décembre 2020, par 昌翰余I use ffmpeg to store the dynamic graph drawn on matplotlib, but the output file is only 2 seconds
but It should have been 30 seconds.
I set a graph to run three curves, a total of 30 seconds of data,
the graph that ran on the py file is normal,
but the output is only the first two seconds of the output.
May I ask if I missed something


Below is my code


import matplotlib.pyplot as plt
from matplotlib import animation
from numpy import random 
import pandas as pd
from matplotlib.animation import FFMpegWriter

FFwriter=animation.FFMpegWriter(fps=30, extra_args=['-vcodec', 'libx264'])
data = pd.read_csv('apple1.csv', delimiter = ',', dtype = None)
data = data.values
AccX1=[]
AccY1=[]
AccZ1=[]
AccX2=[]
AccY2=[]
AccZ2=[]

time = []

for i in range(600):
 AccX1.append(data[i][8])
 AccY1.append(data[i][9])
 AccZ1.append(data[i][10])
 AccX2.append(data[i][24])
 AccY2.append(data[i][25])
 AccZ2.append(data[i][26])
 
 time.append(data[i][0])
 
fig = plt.figure()
ax1 = plt.axes(xlim=(0,3000), ylim=(6,-6))
line, = ax1.plot([], [], lw=2)
plt.xlabel('ACC')
plt.ylabel('Time')

plotlays, plotcols = [3], ["r","g","b"]
lines = []
for index in range(3):
 lobj = ax1.plot([],[],lw=2,color=plotcols[index])[0]
 lines.append(lobj)


def init():
 for line in lines:
 line.set_data([],[])
 return lines

x1,y1 = [],[]
x2,y2 = [],[]
x3,y3 = [],[]



i=0

def animate(frame):
 global i
 
 i+=1
 x = i
 y = AccX1[i]

 x1.append(x)
 y1.append(y)

 x = i
 y = AccY1[i]
 x2.append(x)
 y2.append(y)

 x = i
 y = AccZ1[i]
 x3.append(x)
 y3.append(y)
 

 xlist = [x1, x2,x3]
 ylist = [y1, y2,y3]


 for lnum,line in enumerate(lines):
 line.set_data(xlist[lnum], ylist[lnum]) 


 return lines


anim = animation.FuncAnimation(fig, animate,
 init_func=init, blit=True,interval=10)
anim.save('test.mp4',writer=FFwriter)
plt.show()



The dynamic picture ran out using plt.show is correct.
And I don't think I have set the length of storage. Did I add something ?


-
Using FFMPEG, how do we add subtitles in the black bar area or under the video ?
26 septembre 2020, par DunceDancerI followed these steps :


- 

-
Added the black bars


-vf "scale=1920:1080:force_original_aspect_ratio=decrease,pad=1920:1080 :(ow-iw)/2 :(oh-ih)/2,setsar=1" Source :How to add black borders to video


-
Added the subtitles ("burned" it into the video)


ffmpeg -i "imput.mp4" -lavfi "subtitles=subtitles.srt:force_style='Alignment=0,OutlineColour=&H100000000,BorderStyle=3,Outline=1,Shadow=0,Fontsize=18,MarginL=5,MarginV=25'" -crf 1 -c:a copy "output.mp4" Source : ffmpeg subtitles alignment and position








Now I am stuck as to how to place the subtitles under the video or in the black screen.


Edit : Screenshot added to clarify




-
-
dnn_backend_native_layer_mathunary : add floor support
6 août 2020, par Mingyu Yindnn_backend_native_layer_mathunary : add floor support
It can be tested with the model generated with below python script :
import tensorflow as tf
import os
import numpy as np
import imageio
from tensorflow.python.framework import graph_util
name = 'floor'pb_file_path = os.getcwd()
if not os.path.exists(pb_file_path+'/{}_savemodel/'.format(name)) :
os.mkdir(pb_file_path+'/{}_savemodel/'.format(name))with tf.Session(graph=tf.Graph()) as sess :
in_img = imageio.imread('detection.jpg')
in_img = in_img.astype(np.float32)
in_data = in_img[np.newaxis, :]
input_x = tf.placeholder(tf.float32, shape=[1, None, None, 3], name='dnn_in')
y_ = tf.math.floor(input_x*255)/255
y = tf.identity(y_, name='dnn_out')
sess.run(tf.global_variables_initializer())
constant_graph = graph_util.convert_variables_to_constants(sess, sess.graph_def, ['dnn_out'])with tf.gfile.FastGFile(pb_file_path+'/{}_savemodel/model.pb'.format(name), mode='wb') as f :
f.write(constant_graph.SerializeToString())print("model.pb generated, please in ffmpeg path use\n \n \
python tools/python/convert.py {}_savemodel/model.pb —outdir={}_savemodel/ \n \nto generate model.model\n".format(name,name))output = sess.run(y, feed_dict= input_x : in_data)
imageio.imsave("out.jpg", np.squeeze(output))print("To verify, please ffmpeg path use\n \n \
./ffmpeg -i detection.jpg -vf format=rgb24,dnn_processing=model={}_savemodel/model.pb:input=dnn_in:output=dnn_out:dnn_backend=tensorflow -f framemd5 {}_savemodel/tensorflow_out.md5\n \
or\n \
./ffmpeg -i detection.jpg -vf format=rgb24,dnn_processing=model={}_savemodel/model.pb:input=dnn_in:output=dnn_out:dnn_backend=tensorflow {}_savemodel/out_tensorflow.jpg\n \nto generate output result of tensorflow model\n".format(name, name, name, name))print("To verify, please ffmpeg path use\n \n \
./ffmpeg -i detection.jpg -vf format=rgb24,dnn_processing=model={}_savemodel/model.model:input=dnn_in:output=dnn_out:dnn_backend=native -f framemd5 {}_savemodel/native_out.md5\n \
or \n \
./ffmpeg -i detection.jpg -vf format=rgb24,dnn_processing=model={}_savemodel/model.model:input=dnn_in:output=dnn_out:dnn_backend=native {}_savemodel/out_native.jpg\n \nto generate output result of native model\n".format(name, name, name, name))Signed-off-by : Mingyu Yin <mingyu.yin@intel.com>