Recherche avancée

Médias (91)

Autres articles (51)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • Problèmes fréquents

    10 mars 2010, par

    PHP et safe_mode activé
    Une des principales sources de problèmes relève de la configuration de PHP et notamment de l’activation du safe_mode
    La solution consiterait à soit désactiver le safe_mode soit placer le script dans un répertoire accessible par apache pour le site

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

Sur d’autres sites (6789)

  • OSError : MoviePy error : failed to read the duration of file

    3 août 2022, par ZackR

    I'm receiving the error below from a lambda deployment with a Python3.9 runtime environment and x86_64 architecture. I attempted using the both most recent ffmpeg binary snapshot snapshot and release from this link, [https://evermeet.cx/ffmpeg/][1].
I checked the file info for duration and the attribute exists with a value of 16 seconds.

    


    What am I missing here ??

    


    [ERROR] OSError: MoviePy error: failed to read the duration of file /tmp/lgnd-assets-public-drops---sample-video.mp4.
Here are the file infos returned by ffmpeg:

-i: /var/task/ffmpeg: cannot execute binary file

Traceback (most recent call last):
  File "/var/task/CreateThumbnail.py", line 99, in handler
    create_video_thumbnail(bucket, key, file_name, extension)
  File "/var/task/CreateThumbnail.py", line 72, in create_video_thumbnail
    resize_video(thumb_download_path, thumb_upload_path)
  File "/var/task/CreateThumbnail.py", line 30, in resize_video
    with VideoFileClip(video_path) as video:
  File "/var/task/moviepy/video/io/VideoFileClip.py", line 88, in __init__
    self.reader = FFMPEG_VideoReader(filename, pix_fmt=pix_fmt,
  File "/var/task/moviepy/video/io/ffmpeg_reader.py", line 35, in __init__
    infos = ffmpeg_parse_infos(filename, print_infos, check_duration,
  File "/var/task/moviepy/video/io/ffmpeg_reader.py", line 296, in ffmpeg_parse_infos
    raise IOError(("MoviePy error: failed to read the duration of file %s.\n"


    


    Thanks,
Zack

    


  • ffmpeg is working in terminal but not in php

    31 août 2018, par Gaurav kakkar

    I have installed ffmpeg using Ubuntu,

    sudo apt-get install ffmpeg

    ffmpeg is installed on root "/usr/bin/ffmpeg".

    It’s working fine in the terminal, but when I execute that using php i don’t get any output.

    shell_exec(/usr/bin/ffmpeg -y -i ./upload/1535531595first.mp3 -i ./upload/1535531595second.mp3 -filter_complex "[0:0][1:0] amix=inputs=2:duration=longest" -c:a libmp3lame ./download/1535531595outputnow1.mp3)

    and using this command in "opt/lampp/htdocs/project-Name/sub-directory/test.php" file.

    Any help will be appreciatable. Thanks in Advance.
    find the attachment cmd terminal working fine but for php not working

  • Check audio and video codec from base64 video file in Django

    6 juillet 2024, par mahmudsajib

    I'm currently working on a Django project where I need to check the audio and video codec of a base64-encoded video file. To achieve this, I've implemented a function that decodes the base64 string into binary data and then attempts to load the video clip using MoviePy. However, I'm encountering an AttributeError: '_io.BytesIO' object has no attribute 'endswith' when trying to run the code.

    


    Here's the relevant part of the code :

    


    import base64
from io import BytesIO
from moviepy.editor import VideoFileClip

def get_video_codec_info(base64_data):
    # Decode base64 string into binary data
    _format, _file_str = base64_data.split(";base64,")
    binary_data = base64.b64decode(_file_str)

    # Load the video clip using MoviePy
    clip = VideoFileClip(BytesIO(binary_data))

    # Get information about the video codec
    codec_info = {
        'video_codec': clip.video_codec,
        'audio_codec': clip.audio_codec,
    }

    return codec_info


    


    The error occurs at the line clip = VideoFileClip(BytesIO(binary_data)) and it seems related to the use of BytesIO. I've tried to find a solution, but I'm stuck at the moment.

    


    Any suggestions on how to resolve this issue or alternative approaches to check the audio and video codec of a base64-encoded video file in Django would be greatly appreciated. Thanks !