
Recherche avancée
Autres articles (58)
-
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 (...) -
Use, discuss, criticize
13 avril 2011, parTalk to people directly involved in MediaSPIP’s development, or to people around you who could use MediaSPIP to share, enhance or develop their creative projects.
The bigger the community, the more MediaSPIP’s potential will be explored and the faster the software will evolve.
A discussion list is available for all exchanges between users. -
MediaSPIP en mode privé (Intranet)
17 septembre 2013, parÀ partir de la version 0.3, un canal de MediaSPIP peut devenir privé, bloqué à toute personne non identifiée grâce au plugin "Intranet/extranet".
Le plugin Intranet/extranet, lorsqu’il est activé, permet de bloquer l’accès au canal à tout visiteur non identifié, l’empêchant d’accéder au contenu en le redirigeant systématiquement vers le formulaire d’identification.
Ce système peut être particulièrement utile pour certaines utilisations comme : Atelier de travail avec des enfants dont le contenu ne doit pas (...)
Sur d’autres sites (8612)
-
C# Adding generic text to a video file
14 juillet 2016, par Ozan AytenI would like to add a Generics Text (like the texts you see when a movie ends, it slides down or up in a slow pace) to a video file. Hardsubbed.
I’ve been experimented with few api but couldn’t manage to find a solution. Is this possible ? Is there a way to do it without the task getting too complicated ?
As a side note : I want to add generic text like the Windows Movie Maker does. But I want to do it programmatically of course.
-
How to mock an .mpg file for unit tests ?
28 juin 2012, par Richard KnopOk. I have a class which runs this command :
ffmpeg_command = "ffprobe -v quiet -print_format json -show_format -show_streams %s" % self.absolute_path
Where self.absolute_path is a path to a movie, let's say .mpg file.
The file I am using for testing is 4GB large and I don't want to commit it inside my GIT repo.
So I was thinking of mocking this file and creating a file called :
mock.mpg
Which would return the same string as the actual mpg movie when supplied as input to ffprobe command. Is that possible ?
Or what other approach should I choose ?
This is my class :
class Movie(object):
absolute_path = None
info = None
def __init__(self, path):
self.absolute_path = "%s/%s" % (os.getcwd(), path)
if(os.path.exists(self.absolute_path) is False):
raise IOError("File does not exist")
self.info = json.loads(self.get_info())
def get_info(self):
ffmpeg_command = "ffprobe -v quiet -print_format json -show_format -show_streams %s" % self.absolute_path
return subprocess.check_output(ffmpeg_command, shell=True)This is how I will be unit testing it :
class MovieTest(unittest.TestCase):
def test_foo(self):
movie = Movie("tests/test_1.mpg") # this file should be a mock file!!! -
Cannot run ffmpeg in subproces.call
27 juin 2012, par Richard KnopSo, I have a simple class where I am trying to save a string response from a terminal ffmpeg command into an object property :
import os
import subprocess
class Movie(object):
absolute_path = None
movie_info = None
def __init__(self, path):
self.absolute_path = "%s/%s" % (os.getcwd(), path)
if(os.path.exists(self.absolute_path) is False):
raise IOError("File does not exist")
def get_movie_info(self):
ffmpeg_command = "ffmpeg -i %s" % self.absolute_path
self.movie_info = subprocess.call(ffmpeg_command)
print self.movie_infoWhen I then run this command in cmd :
import os
import sys
sys.path.append(os.getcwd())
from Encode.Movie import Movie
try:
movie = Movie("tests/test_1.mpg")
movie.get_movie_info()
except IOError as e:
print eI get this exception :
richard@richard-desktop:~/projects/hello-python$ python main.py
Traceback (most recent call last):
File "main.py", line 9, in <module>
movie.get_movie_info()
File "/home/richard/projects/hello-python/Encode/Movie.py", line 16, in get_movie_info
self.movie_info = subprocess.call(ffmpeg_command)
File "/usr/lib/python2.7/subprocess.py", line 493, in call
return Popen(*popenargs, **kwargs).wait()
File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1249, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
</module>The path is correct because when I do print self.absolute_path before subprocess.call(), I get :
/home/richard/projects/hello-python/tests/test_1.mpg
And this file exists.