
Recherche avancée
Médias (1)
-
SWFUpload Process
6 septembre 2011, par
Mis à jour : Septembre 2011
Langue : français
Type : Texte
Autres articles (50)
-
HTML5 audio and video support
13 avril 2011, parMediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
For older browsers the Flowplayer flash fallback is used.
MediaSPIP allows for media playback on major mobile platforms with the above (...) -
Support audio et vidéo HTML5
10 avril 2011MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...) -
De l’upload à la vidéo finale [version standalone]
31 janvier 2010, parLe chemin d’un document audio ou vidéo dans SPIPMotion est divisé en trois étapes distinctes.
Upload et récupération d’informations de la vidéo source
Dans un premier temps, il est nécessaire de créer un article SPIP et de lui joindre le document vidéo "source".
Au moment où ce document est joint à l’article, deux actions supplémentaires au comportement normal sont exécutées : La récupération des informations techniques des flux audio et video du fichier ; La génération d’une vignette : extraction d’une (...)
Sur d’autres sites (8476)
-
How To Resize a Video Clip Python
4 juillet 2016, par Seyyed Ali AkhavaniI want to resize a video clip in python 2.7.
For example we give "movie.mp4" with 1080p quality
The result should be "movie.mp4" with 360p qualityI Think that there should be solutions with Moviepy. If you know a solution with it.
I would be grateful if you answer me.
-
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.
-
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!!!