
Recherche avancée
Médias (29)
-
#7 Ambience
16 octobre 2011, par
Mis à jour : Juin 2015
Langue : English
Type : Audio
-
#6 Teaser Music
16 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#5 End Title
16 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#3 The Safest Place
16 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#4 Emo Creates
15 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#2 Typewriter Dance
15 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
Autres articles (85)
-
Configurer la prise en compte des langues
15 novembre 2010, parAccéder à la configuration et ajouter des langues prises en compte
Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...) -
XMP PHP
13 mai 2011, parDixit Wikipedia, XMP signifie :
Extensible Metadata Platform ou XMP est un format de métadonnées basé sur XML utilisé dans les applications PDF, de photographie et de graphisme. Il a été lancé par Adobe Systems en avril 2001 en étant intégré à la version 5.0 d’Adobe Acrobat.
Étant basé sur XML, il gère un ensemble de tags dynamiques pour l’utilisation dans le cadre du Web sémantique.
XMP permet d’enregistrer sous forme d’un document XML des informations relatives à un fichier : titre, auteur, historique (...) -
L’utiliser, en parler, le critiquer
10 avril 2011La première attitude à adopter est d’en parler, soit directement avec les personnes impliquées dans son développement, soit autour de vous pour convaincre de nouvelles personnes à l’utiliser.
Plus la communauté sera nombreuse et plus les évolutions seront rapides ...
Une liste de discussion est disponible pour tout échange entre utilisateurs.
Sur d’autres sites (5656)
-
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 -
ffmpeg taking time to convert video
2 septembre 2015, par sonam Sharmahello all i am having a video hosting site like youtube where i allow almost all kinds of videos to be uploaded but i would like to convert all the uploaded videos to mp4 format
i can do this and my code is below
require 'vendor/autoload.php';
$getEXT_check=substr(@$_FILES['profileimage99']['name'],-3);
if($getEXT_check !='mp4' || $getEXT_check !='MP4'){
exec('ffmpeg -i '.$uploadfile.' -f mp4 -s 896x504 '.$new_flv.''); }
//execute ffmpeg and create thumb
exec('ffmpeg -i '.$uploadfile.' -ss 00:00:28.435 -vframes 1 '.$new_image_path);
$theduration=exec('ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 '.$uploadfile.' 2>&1');
$theduration_val=round($theduration/60, 2);this code converts the non mp4 videos to mp4 and gets a thumbnail and gets duration correctly but the problem is that the process takes very much time like more than 2-3 hrs if i upload flv or mkv formats of about 100mbs.
please suggest me something better please if you need to see the full page code
Complete Code :
<?php
@session_start();
include "conn.php";
include "date.php";
$sid = $_SESSION['id'];
$ipIP=$_SERVER['REMOTE_ADDR'];
$uploaddir = "members/$sid/video/";
//Check the file is of correct format.
function checkfile($input){
$ext = array('mpg', 'wma', 'mov', 'flv', 'mp4', 'avi', 'qt', 'wmv', 'rm', 'mkv', 'MP4','3gp');
$extfile = substr($input['name'],-4);
$extfile = explode('.',$extfile);
$good = array();
@$extfile = $extfile[1];
if(in_array($extfile, $ext)){
$good['safe'] = true;
$good['ext'] = $extfile;
}else{
$good['safe'] = false;
}
return $good;
}
if($_FILES["profileimage99"]["size"] ==''){
echo 'No file added';die;
}
// if the form was submitted process request if there is a file for uploading
if(@$_FILES["profileimage99"]["size"] < 102400000000){
//$live_dir is for videos after converted to mp4
$live_dir = "mem/$sid/video/";
//$live_img is for the first frame thumbs.
$live_img = "mem/$sid/img/";
$seed = rand(11111111111193,9999999999999929) * rand(3,9);
$getEXT=substr(@$_FILES['profileimage99']['name'],-5);
$upload = $seed.$getEXT;
$uploadfile = $uploaddir .$upload;
$safe_file = checkfile(@$_FILES['profileimage99']);
if($safe_file['safe'] == 1){
if (move_uploaded_file(@$_FILES['profileimage99']['tmp_name'], $uploadfile)) {
$base = basename($uploadfile, $safe_file['ext']);
$new_file = $base.'mp4';
$new_image = $base.'jpg';
$new_image_path = $live_img.$new_image;
$new_flv = $live_dir.$new_file;
require 'vendor/autoload.php';
$getEXT_check=substr(@$_FILES['profileimage99']['name'],-3);
if($getEXT_check !='mp4' || $getEXT_check !='MP4'){
exec('ffmpeg -i '.$uploadfile.' -f mp4 -s 896x504 '.$new_flv.''); }
//execute ffmpeg and create thumb
exec('ffmpeg -i '.$uploadfile.' -ss 00:00:28.435 -vframes 1 '.$new_image_path);
$theduration=exec('ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 '.$uploadfile.' 2>&1');
$theduration_val=round($theduration/60, 2);
//create query to store video
if(isset($_POST['title'])){$titlename=$_POST['title'];}else{$titlename='';}
if(isset($_POST['desc'])){$desc=$_POST['desc'];}else{$desc='';}
if(isset($_POST['catag'])){$catag=$_POST['catag'];}else{$catag='';}
if(isset($_POST['channel'])){$channel=$_POST['channel'];}else{$channel='';}
$dbentry_o=mysqli_query($conn,"insert into vids (uid,chid,ctid,vname,vdisc,duration,time,ip,src,thumb) values ('$sid','$channel','$catag','$titlename','$desc','$theduration_val','$date','$ipIP','$new_file','$new_image')");
echo "<img src="http://stackoverflow.com/feeds/tag/mem/$sid/img/$new_image" class="The_Append_L_snap" style='max-width: 300px; max-height: 300px' />";die;
} else {
echo "Possible file upload attack!\n";
print_r($_FILES);
}
}else{
echo 'Invalid File Type Please Try Again. You file must be of type
.mpg, .wma, .mov, .flv, .mp4, .avi, .qt, .wmv, .rm'.$_FILES['profileimage99']['name'];
}
}else{
echo 'Please choose a video';die;
}
?>The issue :
FFmpeg call above takes too much time to convert the video to MP4.Note :
In the future I will be having a quality selector in myvideo.js
player. -
fate : Use a oneoff test for the tremolo filter
9 décembre 2019, par Martin Storsjöfate : Use a oneoff test for the tremolo filter
The tremolo filter uses floating point internally, and uses
multiplication factors derived from sin(fmod()), neither of
which is bitexact for use with framecrc.This fixes running this test when built with for mingw/x86_32
with clang.In this case, a 1 ulp difference in the output from fmod() would
end up in an output from the filter that differs by 1 ulp, but
which makes the lrint() in swresample/audioconvert.c round in a
different direction.Signed-off-by : Martin Storsjö <martin@martin.st>