
Recherche avancée
Autres articles (64)
-
Le profil des utilisateurs
12 avril 2011, parChaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...) -
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 (...)
Sur d’autres sites (6581)
-
AttributeError : module 'ffmpeg' has no attribute 'load'
23 avril 2023, par az-purplepenI'm having difficulty with ffmpeg. I've installed it properly (I think) but still get AttributeErrors.


I used the online guide (https://ffmpeg.org/download.html), and doing
pip install ffmpeg-python
instead ofpip install ffmpeg
. I've verified the installation withpip show
. I've also made sure to not name my filesffmpeg.py
.

However, when I try running the following commands in terminal, I get an Attribute Error. Any tips ? I've seen this question pop up before, but none of the tips have worked.


>>> import ffmpeg
>>> ffmpeg.load('cover.wav')
Traceback (most recent call last):
 File "<stdin>", line 1, in <module>
AttributeError: module 'ffmpeg' has no attribute 'load
</module></stdin>


-
TypeError at /api/v1/file/86370b91-8e25-4833-bbc6-a4b833363893/ 'module' object is not callable
16 avril 2023, par OlyxPlease help me, I'm writing a patch request that should change the video resolution, but I can't get the file back from celery
views.py


def patch(self, request, id = None):
 file = File.objects.get(id = id)
 width = request.data.get('width')
 height = request.data.get('height')
 file.width = width
 file.height = height 
 
 file.video = change_video_extension.delay(file.video.path, width, height).get()
 file.save()
 return Response({'width':width, 'height':height})



tasks.py


import os
from demo.celery import app

@app.task(name = "change_video_extension")
def change_video_extension(input_file, width, height):
 output_file = "abc123.mp4"
 os.system(f"ffmpeg -i {input_file} -s {width}x{height} {output_file}")
 return output_file



TypeError


TypeError at /api/v1/file/86370b91-8e25-4833-bbc6-a4b833363893/
'module' object is not callable
Request Method : PATCH
Request URL : http://127.0.0.1:8000/api/v1/file/86370b91-8e25-4833-bbc6-a4b833363893/
Django Version : 4.2
Exception Type : TypeError
Exception Value :

'module' object is not callable

-
how to write subcommand to FFPLAY during playback using subprocess module ?
4 mars 2023, par ChienMouilleI'm trying to pause a video playback started with
FFPLAY
through a pythonsubprocess
. You can do this manually by pressing the "p" key on the keyboard while the video is playing. I'd like to emulate this behavior through a python call.

I'm now sending a "p" string, encoded as bytes, through the
stdin
of thePopen
call. The video starts and I can pause it with the keyboard but thecommunicate
command doesn't seem to do anything.

import subprocess
import time

proc = subprocess.Popen(['ffplay', 'PATH_TO_'],
 stdin=subprocess.PIPE,
 stdout=subprocess.PIPE,
 )
time.sleep(2) # just waiting to make sure playback has started
proc.communicate(input="p".encode())[0]




Thanks in advance !