
Recherche avancée
Médias (1)
-
Bug de détection d’ogg
22 mars 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Video
Autres articles (111)
-
Les tâches Cron régulières de la ferme
1er décembre 2010, parLa gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
Le super Cron (gestion_mutu_super_cron)
Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...) -
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir -
Emballe médias : à quoi cela sert ?
4 février 2011, parCe plugin vise à gérer des sites de mise en ligne de documents de tous types.
Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ;
Sur d’autres sites (6475)
-
Improper use of system() call ?
28 mai 2013, par Dima1982I have a particle system program that generates a
.dat
file with particle coordinates in every iteration. The end goal is to run the program multiple times via a script with different parameters. So, I am trying to setup my program in a way that, for every run, all relevant data are going to be stored in a folder.What I do is to generate
PNGs
from the.dat
files withGnuplot
, callffmpeg
to create a video out of thePNGs
, useWinRAR
to compress the.dat
files and finally clean up, by deleting all the intermediate files. This works, when I do it in the working directory.Now I try to create a new directory and do the same stuff in there. My code :
// Load the proper library to use chdir() function
#ifdef _WIN32
#include
#elif defined __linux__ || defined __APPLE__&&__MACH__
#include
#endif
// Make output directory and change working directory to new directory
ostringstream dirCommand;
dirCommand << "mkdir " << folderName_str;
system(dirCommand.str().c_str());
const char* test = folderName_str.c_str();
#ifdef _WIN32
if(_chdir(test))
{
printf( "Unable to locate the directory: %s\n",test);
return;
}
#elif defined __linux__ || defined __APPLE__&&__MACH__
if(chdir(test))
{
printf( "Unable to locate the directory: %s\n",test);
return;
}
#endif
else
printf("Created output directory...\n");Already for this part, I know that there are going to be objections. I have looked extensively on SO and many people favor
SetCurrentDirectory()
for Windows, or they are skeptical about usingsystem()
. In my defense, I am a novice programmer and my knowledge is really limited...Now, when I try to make the video with
FFMpeg
and then rar/tar my files :// Make video
std::cout << "Generating Video..." << endl;
ostringstream command;
command << "ffmpeg -f image2 -r 1/0.1 -i output_%01d.png -vcodec mpeg4 " << videoName_str << ".avi -loglevel quiet";
std::system(command.str().c_str());
// Clean Up!
std::cout << "Cleaning up!" << endl;
ostringstream command2;
#ifdef _WIN32
command2 << "rar -inul a " << videoName_str << ".rar *.dat settings.gp loadfile.gp";
#elif defined __linux__ || defined __APPLE__&&__MACH__
command2 << "tar cf " << videoName_str << ".tar *.dat settings.gp loadfile.gp";
#endif
std::system(command2.str().c_str());I get very different behaviors in Win/ Linux.
Win 7 x64, Visual Studio 2010/12
In windows, the folder is created. The
.dat
files are generated correctly andgnuplot
plots thePNGs
as well. Whenffmpeg
is called, nothing happens. No error message fromFFMpeg
or anything. The same goes forWinRAR
. Maybe, for the last thing, I can use the command line utility of7z
which is free !Linux Mint 14 x64, Qt 4.8.1
Strangely enough, the behavior is inverted from that of Windows. As soon as the dir is changed, only the first
.dat
file is generated. It is as if every subsequent call I make tofprintf()
for my file generation does not work, or gets lost somewhere.Gnuplot
works, as doffmpeg
andtar
!!I am really perplexed. Any help, would be really appreciated.
-
Python Matplotlib Basemap animation with FFMpegwriter stops after 820 Frames ?
5 août 2013, par cpaulikIf I run the following code it just stops after 820 Frames. I tested this on both a Ubuntu 12.04 VM and on Linux Mint 15. Unfortunately there is no error message. The program just hangs after printing 2012-06-02T16:54:00
import os, sys
import matplotlib.pyplot as plt
from mpl_toolkits.basemap import Basemap
import matplotlib.animation as animation
from datetime import datetime,timedelta
def animation_test(start,end,fps=10,save_path='/home/username/animation_test/',\
save_name="test.mp4",dpi=80):
step = timedelta(minutes = 3)
current = start
dates =[]
frame = 0
while current <=end:
dates.append(current)
current += step
fig = plt.figure(figsize=(16,9),facecolor='k',edgecolor='k')
ax = fig.add_subplot(111)
metadata = dict(title='Movie Test', artist='Matplotlib',
comment='Movie support!')
writer = animation.FFMpegWriter(fps=fps, metadata=metadata,bitrate=20000)
direction = -0.5
lat_current = 0
lon_current = 0
with writer.saving(fig,os.path.join(save_path,save_name),dpi):
for current in dates:
ax.cla()
if direction > 0 and lat_current > 40 or \
direction < 0 and lat_current < -40:
direction = - direction
lat_current = lat_current + direction
lon_current = lon_current - 0.75
if lon_current < -180 :
lon_current += 360
basem = Basemap(projection='ortho', lat_0=lat_current, lon_0=lon_current, resolution='l',ax=ax)
basem.drawcoastlines()
#plt.show()
plt.savefig(os.path.join(save_path, 'frame%d.png'%frame),
dpi=dpi,facecolor='w',edgecolor='k')
writer.grab_frame()
frame += 1
print current.isoformat()
start = datetime.now()
animation_test(datetime(2012,6,1,0,0,0),datetime(2012,6,4,0,0,0),fps=10,dpi=80)
print datetime.now() - startTo explain the code a little bit :
I want to make an animation of satellite data which comes in small 3 minute files and show it on a rotating globe. This is why I chose to make the loop in the following example code step through the animation in 3 minute steps. I just removed the reading and plotting of the satellite data in order to make the code executable by anyone.When I removed basemap from the program and just plotted a scatterplot of random data the program ran all the way through.
I'm not sure but I don't think that it is a memory issue since my RAM is only utilized approx. 20% while the program is running.
Thanks for any help in getting to the bottom of this.
-
How to use android ndk r9b to compile FFMPEG for Android
27 août 2015, par user3032481I want to design an Android app which can play and edit video by FFMPEG commands.
But I don’t know how to use FFMPEG on Android. I have tried many methods searched from Google, but they are too old to implement.
Now, the newest version of FFMPEG is 2.1.1 and the Android-NDK’s version is r9b. My operating system is Linux mint 15.
How can I use eclipse IDE on my OS to implement an Android app which has FFMPEG’s newest decoder and encoder ?