
Recherche avancée
Médias (1)
-
Sintel MP4 Surround 5.1 Full
13 mai 2011, par
Mis à jour : Février 2012
Langue : English
Type : Video
Autres articles (45)
-
Ajouter notes et légendes aux images
7 février 2011, parPour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
Modification lors de l’ajout d’un média
Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...) -
Demande de création d’un canal
12 mars 2010, parEn fonction de la configuration de la plateforme, l’utilisateur peu avoir à sa disposition deux méthodes différentes de demande de création de canal. La première est au moment de son inscription, la seconde, après son inscription en remplissant un formulaire de demande.
Les deux manières demandent les mêmes choses fonctionnent à peu près de la même manière, le futur utilisateur doit remplir une série de champ de formulaire permettant tout d’abord aux administrateurs d’avoir des informations quant à (...) -
Selection of projects using MediaSPIP
2 mai 2011, parThe examples below are representative elements of MediaSPIP specific uses for specific projects.
MediaSPIP farm @ Infini
The non profit organizationInfini develops hospitality activities, internet access point, training, realizing innovative projects in the field of information and communication technologies and Communication, and hosting of websites. It plays a unique and prominent role in the Brest (France) area, at the national level, among the half-dozen such association. Its members (...)
Sur d’autres sites (6946)
-
even though my code is running without an error, it does not generate plot or video. I have xming runing
23 octobre 2017, par Amin AbbasiThis is my first code and I am really new to coding. I am trying to create a video or just plot my code.Eeven though my code is running without an error, I can’t get the video or the plot to generate. I have xming running and I have plotted a sample to make sure it not a computer Issue. I have also tried the following on GitHub but no success :
https://jakevdp.github.io/blog/2013/05/19/a-javascript-viewer-for-matplotlib-animations/# -*- coding: utf-8 -*-
import numpy as np
def solver(I, V, f, c, L, dt, cc, T, user_action=None):
"""Solve u_tt=c^2*u_xx + f on (0,L)x(0,T]."""
Nt = int(round(T/dt))
t = np.linspace(0, Nt*dt, Nt+1) # Mesh points in time
dx = dt*c/float(cc)
Nx = int(round(L/dx))
x = np.linspace(0, L, Nx+1) # Mesh points in space
C2 = cc**2 # Help variable in the scheme
# Make sure dx and dt are compatible with x and t
dx = x[1] - x[0]
dt = t[1] - t[0]
if f is None or f == 0 :
f = lambda x, t: 0
if V is None or V == 0:
V = lambda x: 0
u = np.zeros(Nx+1) # Solution array at new time level
u_n = np.zeros(Nx+1) # Solution at 1 time level back
u_nm1 = np.zeros(Nx+1) # Solution at 2 time levels back
import time; t0 = time.clock() # Measure CPU time
# Load initial condition into u_n
for i in range(0,Nx+1):
u_n[i] = I(x[i])
if user_action is not None:
user_action(u_n, x, t, 0)
# Special formula for first time step
n = 0
for i in range(1, Nx):
u[i] = u_n[i] + dt*V(x[i]) + \
0.5*C2*(u_n[i-1] - 2*u_n[i] + u_n[i+1]) + \
0.5*dt**2*f(x[i], t[n])
u[0] = 0; u[Nx] = 0
if user_action is not None:
user_action(u, x, t, 1)
# Switch variables before next step
u_nm1[:] = u_n; u_n[:] = u
for n in range(1, Nt):
# Update all inner points at time t[n+1]
for i in range(1, Nx):
u[i] = - u_nm1[i] + 2*u_n[i] + \
C2*(u_n[i-1] - 2*u_n[i] + u_n[i+1]) + \
dt**2*f(x[i], t[n])
# Insert boundary conditions
u[0] = 0; u[Nx] = 0
if user_action is not None:
if user_action(u, x, t, n+1):
break
# Switch variables before next step
u_nm1[:] = u_n; u_n[:] = u
cpu_time = time.clock() - t0
return u, x, t,
def test_quadratic():
"""Check that u(x,t)=x(L-x)(1+t/2) is exactly reproduced."""
def u_exact(x, t):
return x*(L-x)*(1 + 0.5*t)
def I(x):
return u_exact(x, 0)
def V(x):
return 0.5*u_exact(x, 0)
def f(x, t):
return 2*(1 + 0.5*t)*c**2
L = 2.5
c = 1.5
cc = 0.75
Nx = 6 # Very coarse mesh for this exact test
dt = cc*(L/Nx)/c
T = 18
def assert_no_error(u, x, t, n):
u_e = u_exact(x, t[n])
diff = np.abs(u - u_e).max()
tol = 1E-13
assert diff < tol
solver(I, V, f, c, L, dt, cc, T,
user_action=assert_no_error)
def viz(
I, V, f, c, L, dt, C, T,umin, umax, animate=True, tool='matplotlib'):
"""Run solver and visualize u at each time level."""
def plot_u_st(u, x, t, n):
"""user_action function for solver."""
plt.plot(x, u, 'r-')
# xlabel='x', ylabel='u',
# axis=[0, L, umin, umax],
# title='t=%f' % t[n], show=True)
# Let the initial condition stay on the screen for 2
# seconds, else insert a pause of 0.2 s between each plot
time.sleep(2) if t[n] == 0 else time.sleep(0.2)
plt.savefig('frame_%04d.png' % n) # for movie making
class PlotMatplotlib:
def __call__(self, u, x, t, n):
"""user_action function for solver."""
if n == 0:
plt.ion()
self.lines = plt.plot(x, u, 'r-')
plt.xlabel('x'); plt.ylabel('u')
plt.axis([0, L, umin, umax])
plt.legend(['t=%f' % t[n]], loc='lower left')
else:
self.lines[0].set_ydata(u)
plt.legend(['t=%f' % t[n]], loc='lower left')
plt.draw()
time.sleep(2) if t[n] == 0 else time.sleep(0.2)
plt.savefig('tmp_%04d.png' % n) # for movie making
if tool == 'matplotlib':
import matplotlib.pyplot as plt
plot_u = PlotMatplotlib()
elif tool == 'scitools':
import scitools.std as plt # scitools.easyviz interface
plot_u = plot_u_st
import time, glob, os
# Clean up old movie frames
for filename in glob.glob('tmp_*.png'):
os.remove(filename)
# Call solver and do the simulaton
user_action = plot_u if animate else None
u, x, t, cpu = solver_function(
I, V, f, c, L, dt, C, T, user_action)
# Make video files
fps = 4 # frames per second
codec2ext = dict(flv='flv', libx264='mp4', libvpx='webm',
libtheora='ogg') # video formats
filespec = 'tmp_%04d.png'
movie_program = 'ffmpeg' # or 'avconv'
for codec in codec2ext:
ext = codec2ext[codec]
cmd = '%(movie_program)s -r %(fps)d -i %(filespec)s '\
'-vcodec %(codec)s movie.%(ext)s' % vars()
os.system(cmd)
if tool == 'scitools':
# Make an HTML play for showing the animation in a browser
plt.movie('tmp_*.png', encoder='html', fps=fps,
output_file='movie.html')
return cpu -
Is Replacing Dynamic Resolution with scale_amf in FFmpeg Command a Good Direction ?
21 novembre 2024, par fredI'm working on a Lua script for MPV that processes 360-degree videos using FFmpeg's v360 filter. The original command dynamically calculates the output resolution based on a res variable, like this :


mp.command_native_async({
 "no-osd", "vf", "add", 
 string.format(
 "@vrrev:v360=%s:%s:reset_rot=1:in_stereo=%s:out_stereo=2d:
id_fov=%s:d_fov=%.3f:yaw=%.3f:pitch=%s:roll=%.3f:
w=%s*192.0:h=%.3f*108.0:h_flip=%s:interp=%s",
 in_flip, inputProjection, outputProjection, in_stereo, idfov, dfov, yaw, pitch, roll, res, res, h_flip, scaling
 )
}, updateComplete)



Change Proposal :


I am considering replacing the dynamic width and height calculations with a scale_amf filter to handle scaling more efficiently and leverage GPU acceleration. The updated command would look like this :


mp.command_native_async({
 "no-osd", "vf", "add", 
 string.format(
 "@vrrev:v360=%s:%s:reset_rot=1:in_stereo=%s:out_stereo=2d:
id_fov=%s:d_fov=%.3f:yaw=%.3f:pitch=%s:roll=%.3f,
%sscale_amf=w=%.0f:h=%.0f",
 inputProjection, outputProjection, in_stereo, idfov, dfov, yaw, pitch, roll, in_flip, res * 192.0, res * 108.0
 )



Hardware Specifications :


I am using an AMD Ryzen 5 5600G, no display card, 16GB RAM, Windows 10.


Questions :


Is using scale_amf for scaling a good direction in terms of performance and efficiency ?
Are there any potential drawbacks to this approach that I should be aware of ?
How does using scale_amf compare to the original dynamic resolution method in terms of output quality and processing speed ?
}, updateComplete)


Any insights or experiences with this change would be greatly appreciated !


-
ffmpeg throwing "errorMessage" : "spawn ffmpeg ENOENT"
25 avril 2016, par user2792129My ffmpeg function thats running as a shell command isnt working. I think its because ’ffmpeg’ isnt really referring to anything. I have the ffmpeg node module in my bundle, but i dont know the execFile command is referring to it here.
Im following aws-lambda-ffmpeg as an example of how to call this particular function. They are referring to ’ffmpeg’ as a 64-bit linux build they created from John Vansickle’s static FFMPEG builds in their gulp function.
I want to know how to replace ’ffmpeg’ with something that will just recognize it like a node_module without having to do the whole gulp static build process. To my understanding the only reason they are doing that is to get the latest build which i really dont need.
If I am wrong and a static build using gulp is needed for another reason please let me know.
function ffmpegProcess(description, cb) {
console.log('Starting FFmpeg');
child_process.execFile(
'ffmpeg',
[
'-y',
'-loglevel', 'warning',
'-i', 'download',
'-c:a', 'copy',
'-vf', scaleFilter,
'-movflags', '+faststart',
'-metadata', 'description=' + description,
'out.' + config.format.video.extension,
'-vf', 'thumbnail',
'-vf', scaleFilter,
'-vframes', '1',
'out.' + config.format.image.extension
],
{
cwd: tempDir
},
function(err, stdout, stderr) {
console.log('FFmpeg done.');
return cb(err, 'FFmpeg finished:' + JSON.stringify({ stdout: stdout, stderr: stderr}));
}
);
}