
Recherche avancée
Médias (91)
-
MediaSPIP Simple : futur thème graphique par défaut ?
26 septembre 2013, par
Mis à jour : Octobre 2013
Langue : français
Type : Video
-
avec chosen
13 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
sans chosen
13 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
config chosen
13 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
SPIP - plugins - embed code - Exemple
2 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
GetID3 - Bloc informations de fichiers
9 avril 2013, par
Mis à jour : Mai 2013
Langue : français
Type : Image
Autres articles (99)
-
Gestion des droits de création et d’édition des objets
8 février 2011, parPar défaut, beaucoup de fonctionnalités sont limitées aux administrateurs mais restent configurables indépendamment pour modifier leur statut minimal d’utilisation notamment : la rédaction de contenus sur le site modifiables dans la gestion des templates de formulaires ; l’ajout de notes aux articles ; l’ajout de légendes et d’annotations sur les images ;
-
Des sites réalisés avec MediaSPIP
2 mai 2011, parCette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page. -
Dépôt de média et thèmes par FTP
31 mai 2013, parL’outil MédiaSPIP traite aussi les média transférés par la voie FTP. Si vous préférez déposer par cette voie, récupérez les identifiants d’accès vers votre site MédiaSPIP et utilisez votre client FTP favori.
Vous trouverez dès le départ les dossiers suivants dans votre espace FTP : config/ : dossier de configuration du site IMG/ : dossier des média déjà traités et en ligne sur le site local/ : répertoire cache du site web themes/ : les thèmes ou les feuilles de style personnalisées tmp/ : dossier de travail (...)
Sur d’autres sites (13578)
-
Moviepy : subclip fails when iterating through CSV
5 mai 2016, par user3316291I am trying to randomize the order of video clips based on timing from a CSV file and then reassemble the randomized clips into a single video. However, I am receiving an error in the loop that iterates through each clip timing to create the subclip.
Here is what my CSV looks like :
00:00:32.18,00:00:52.10,1
00:00:52.11,00:00:56.09,2
00:00:56.10,00:00:58.15,3
00:00:58.16,00:01:05.16,4
00:01:05.17,00:01:16.04,5column 1 is clip onset
column 2 is clip offset
column 3 is scene number that I use to randomizeHere is my code :
import os
import csv
import numpy as np
from moviepy.editor import *
f = open('SceneCuts.csv')
csv_f = csv.reader(f)
scenes = []
ons = []
offs = []
for row in csv_f:
ons.append(row[0])
offs.append(row[1])
scenes.append(row[2])
r_scene = scenes
np.random.seed(1000)
np.random.shuffle(r_scene)
r_scene = map(int, r_scene)
clip = VideoFileClip("FullVideo.m4v")
temp = []
for row in r_scene:
print(row)
temp.append(clip.subclip(ons[row-1], offs[row-1]))
catclip = concatenate_videoclips(temp)
catclip_resize = catclip.resize((1024,576))
catclip_resize.write_videofile("RandomVideo.mp4")Here is the output, error occurs at line 29 (temp.append)
File "/Users/Dustin/anaconda/lib/python2.7/site-packages/moviepy/video/io/ffmpeg_reader.py", line 87, in initialize
self.proc = sp.Popen(cmd, **popen_params)
File "/Users/Dustin/anaconda/lib/python2.7/subprocess.py", line 710, in __init__
errread, errwrite)
File "/Users/Dustin/anaconda/lib/python2.7/subprocess.py", line 1316, in _execute_child
data = _eintr_retry_call(os.read, errpipe_read, 1048576)
File "/Users/Dustin/anaconda/lib/python2.7/subprocess.py", line 476, in _eintr_retry_call
return func(*args)
OSError: [Errno 22] Invalid argumentBased on my research, it appears to be something regarding child processes and subprocess.Popen, but I can’t figure it out. Thanks !
EDIT to add new information :
I have been running the above script in Spyder (anaconda) and receiving the above errors. However, when I run from a terminal or sublime (cmd+b), the code "works". It runs and I do not get the above error, however, the resulting video file is a mess. There are multiple conflicting audio tracks that shouldn’t be there. I am not sure what is going on in Spyder, but I’d love to know. Also, I still need to fix the audio problem. -
How to upload object to a bucket in Google Cloud Platform from Python script
7 juillet 2016, par BryanThe goal of this script is to extract audio from a video file using ffmpeg and upload it into a bucket on Google Cloud Platform each time it is called. Eventually I will have to extract audio from a large list of videos, so ideally I would want my script to extract and subsequently upload it into the cloud.
My confusion is how to use GCP API to upload my object into a bucket. Any advice would be greatly appreciated !
Link for reference : https://cloud.google.com/storage/docs/json_api/v1/json-api-python-samples#setup-code
import subprocess
import sys
import re
fullVideo = sys.argv[1]
title = re.findall('^([^.]*).*', fullVideo)
title = str(title[0])
subprocess.call('ffmpeg -i ' + fullVideo + ' -vn -ab 128k ' + title + '.flac', shell = True)
def upload_object(bucket, filename, readers, owners):
service = create_service()
# This is the request body as specified:
# http://g.co/cloud/storage/docs/json_api/v1/objects/insert#request
body = {
'name': filename,
}
# If specified, create the access control objects and add them to the
# request body
if readers or owners:
body['acl'] = []
for r in readers:
body['acl'].append({
'entity': 'user-%s' % r,
'role': 'READER',
'email': r
})
for o in owners:
body['acl'].append({
'entity': 'user-%s' % o,
'role': 'OWNER',
'email': o
})
# Now insert them into the specified bucket as a media insertion.
# http://g.co/dev/resources/api-libraries/documentation/storage/v1/python/latest/storage_v1.objects.html#insert
with open(filename, 'rb') as f:
req = service.objects().insert(
bucket=bucket, body=body,
# You can also just set media_body=filename, but # for the sake of
# demonstration, pass in the more generic file handle, which could
# very well be a StringIO or similar.
media_body=http.MediaIoBaseUpload(f, 'application/octet-stream'))
resp = req.execute()
return resp -
Psychopy gives the ffmpeg error and does not play the videos
17 août 2017, par I.NuelI want to create an experiment with Psychopy in which I will present randomly video that participant will have to evaluate.
I have created a routine with my MovieStim and my Rating response and a Loop with my conditions file (in which are my video files videoname.wmv).
All my videos are in the same folder as my experiment.I have specified the MovieStim with a variable refering to my Loop’s column ($Stimulus).
But when I run the experiment I have this message.
Running: E:\Thèse ESPRIT\Approach_Aversion\Experience_AA\Approach_Aversion_lastrun.py
pyo version 0.8.0 (uses single precision)
WARNING:root:Warning: could not find imageio's ffmpeg executable:
[Error 5] Accès refus: 'C:\\Program Files (x86)\\PsychoPy2\\lib\\site-packages\\imageio\\resources\\ffmpeg\\ffmpeg.win32.exe'
Traceback (most recent call last):
File "E:\Thèse ESPRIT\Approach_Aversion\Experience_AA\Approach_Aversion_lastrun.py", line 105, in <module>
depth=0.0,
File "C:\Program Files (x86)\PsychoPy2\lib\site-packages\psychopy-1.84.2-py2.7.egg\psychopy\contrib\lazy_import.py", line 120, in __call__
return obj(*args, **kwargs)
File "C:\Program Files (x86)\PsychoPy2\lib\site-packages\psychopy-1.84.2-py2.7.egg\psychopy\visual\movie3.py", line 124, in __init__
self.loadMovie(self.filename)
File "C:\Program Files (x86)\PsychoPy2\lib\site-packages\psychopy-1.84.2-py2.7.egg\psychopy\visual\movie3.py", line 170, in loadMovie
self._mov = VideoFileClip(filename, audio=(1 - self.noAudio))
File "C:\Program Files (x86)\PsychoPy2\lib\site-packages\moviepy\video\io\VideoFileClip.py", line 55, in __init__
reader = FFMPEG_VideoReader(filename, pix_fmt=pix_fmt)
File "C:\Program Files (x86)\PsychoPy2\lib\site-packages\moviepy\video\io\ffmpeg_reader.py", line 32, in __init__
infos = ffmpeg_parse_infos(filename, print_infos, check_duration)
File "C:\Program Files (x86)\PsychoPy2\lib\site-packages\moviepy\video\io\ffmpeg_reader.py", line 237, in ffmpeg_parse_infos
proc = sp.Popen(cmd, **popen_params)
File "C:\Program Files (x86)\PsychoPy2\lib\subprocess.py", line 710, in __init__
errread, errwrite)
File "C:\Program Files (x86)\PsychoPy2\lib\subprocess.py", line 958, in _execute_child
startupinfo)
WindowsError: [Error 2] Le fichier spécifié est introuvable
</module>It seems to be something wrong with the ffmpeg executable but I don’t understand what.
Do you have any idea ?
Thank you very much fo advance !
Have a nice day.
Ivane