Recherche avancée

Médias (1)

Mot : - Tags -/école

Autres articles (72)

  • Le profil des utilisateurs

    12 avril 2011, par

    Chaque 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, par

    Accé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, par

    Dixit 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 (9682)

  • Parsing file-like object into create_ffmpeg_player in discord.py not working

    3 août 2018, par user4757174

    The API documentation for create_ffmpeg_player says it allows passing file-like objects into create_ffmpeg_player as it will be passed to stdin.

    create_ffmpeg_player(filename, *, use_avconv=False, pipe=False, stderr=None, options=None, before_options=None, headers=None, after=None)

    filename – The filename that ffmpeg will take and convert to PCM bytes. If pipe is True then this is a file-like object that is passed to the stdin of ffmpeg

    here’s what I am inputting :

    buffer = BytesIO()
    c.setopt(c.WRITEDATA, buffer)
    c.perform()
    player = voice.create_ffmpeg_player(buffer,pipe=True)

    The PycURL object writes data to buffer which is the BytesIO object.

    Then I try to parse the file-like object into create_ffmpeg_player() but I get the following error :

       Traceback (most recent call last):
     File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\discord\client.py", line 307, in _run_event
       yield from getattr(self, event)(*args, **kwargs)
     File "test.py", line 116, in on_message
       player = voice.create_ffmpeg_player(buffer,pipe=True)
     File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\discord\voice_client.py", line 431, in create_ffmpeg_player
       p = subprocess.Popen(args, stdin=stdin, stdout=subprocess.PIPE, stderr=stderr)
     File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\subprocess.py", line 667, in __init__
       errread, errwrite) = self._get_handles(stdin, stdout, stderr)
     File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\subprocess.py", line 904, in _get_handles
       p2cread = msvcrt.get_osfhandle(stdin.fileno())
    io.UnsupportedOperation: fileno

    The error shows me that somewhere in the stack, a routine is trying to get the fileno() of the object, but since this is not a real file, there is no file handle, or "fileno". For a temporary work-around I am creating a physical file on disk and parsing that file into the function, but for this program, the function will be run many times so doing physical read/writes is not practical. Is it possible to work around this, or at least create a file on memory with the ability to get/spoof a fileno ?

  • Smartly concatenating gopro mp4 files - file-001.mp4 + file-002.mp4

    12 décembre 2017, par molly78

    Hello much smarter than me people out there...

    I have a folder of GoPro files which I have already renamed using this awesome utility : https://github.com/kcha/gopro_renamer

    However, I now have a folder of 110 files which should make up about 50 continuous videos...

    Some of which have only filename-001.mp4 parts, some are filename-001.mp4 and filename-002.mp4 parts. It could go on an on to say 10 parts per video, for argument sake.

    I’d like to get a hand with a script that would scan the folder and then join all the parts together into a new file.

    In windows 10 I know I can do a simple

    copy /b "C:\Filename-001.mp4" + "C:\Filename-002.mp4" Filename.mp4

    Just a bit lost how to loop thru this scenario with a (python is fine) script. I do not wish to re-encode them, simply join the parts that correspond to the base filename.

    So go from files looking like

    filename1-001.mp4 - 87 MB
    filename2-001.mp4 - 100 MB
    filename2-002.mp4 - 100 MB
    filename2-003.mp4 - 22 MB
    filename3-001.mp4 - 100 MB
    filename3-002.mp4 - 34 MB

    after concatenating the parts it would look like :

    filename1.mp4 - 87 MB (nothing done other than rename)
    filename2.mp4 - 222 MB (all joined)
    filename3.mp4 - 134 MB (all joined)

    Your help is greatly appreciated.

  • How to embed ffmpeg and ffprobe to a python gui.exe file in Windows or Mac ?

    10 décembre 2023, par sburakc

    I prepared a Pyhton Gui script in Windows that gets a subtitle then converts an audio file. But at the end of the script I realized that the script uses the ffmpeg from my computer's local ffmpeg and didn't give any error. But, when I try in another computer that doesn't include ffmpeg, it's given the error in the terminal below :
pydub\utils.py:170: RuntimeWarning: Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work Processing text 1/2 pydub\utils.py:198: RuntimeWarning: Couldn't find ffprobe or avprobe - defaulting to ffprobe, but may not work Error occurred: [WinError 2] System cannot find the specified file

    


    I tried many ways such as :

    


    pyinstaller -F --add-data "./ffmpeg/*;./ffmpeg/" gui.py

    


    pyinstaller -F --add-data "C:\Users\sbura\Desktop\gom\ffmpeg\ffmpeg.exe;ffmpeg" --add-data "C:\Users\sbura\Desktop\gom\ffmpeg\ffprobe.exe;ffmpeg" gui.py

    


    OR

    


    tried to gui.spec file adding :

    


    exe = EXE(pyz,
          a.scripts,
          binaries=[('C:\\Users\\sbura\\Desktop\\gom\\ffmpeg_bin\\ffmpeg.exe', 'ffmpeg.exe'), 
                    ('C:\\Users\\sbura\\Desktop\\gom\\ffmpeg_bin\\ffprobe.exe', 'ffprobe.exe')],
          a.zipfiles,
          a.datas,
          [],
          ...



    


    I also created a folder with the name of "ffmpeg" where I put the files of ffmpeg.exe and ffprobe.exe.

    


    Also I added to my code that :

    


    import sys
from pydub import AudioSegment

def resource_path(relative_path):
    if hasattr(sys, '_MEIPASS'):
        return os.path.join(sys._MEIPASS, relative_path)
    return os.path.join(os.path.abspath("."), relative_path)

AudioSegment.converter = resource_path('ffmpeg\\ffmpeg.exe')
AudioSegment.ffprobe = resource_path('ffmpeg\\ffprobe.exe')


    


    But any of these didn't work. Thank you for your help.