Recherche avancée

Médias (1)

Mot : - Tags -/artwork

Autres articles (62)

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 0.2 est la première version de MediaSPIP stable.
    Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • Mise à disposition des fichiers

    14 avril 2011, par

    Par défaut, lors de son initialisation, MediaSPIP ne permet pas aux visiteurs de télécharger les fichiers qu’ils soient originaux ou le résultat de leur transformation ou encodage. Il permet uniquement de les visualiser.
    Cependant, il est possible et facile d’autoriser les visiteurs à avoir accès à ces documents et ce sous différentes formes.
    Tout cela se passe dans la page de configuration du squelette. Il vous faut aller dans l’espace d’administration du canal, et choisir dans la navigation (...)

Sur d’autres sites (7435)

  • 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 !

    


  • FFmpeg - Turn a 1280x720 video into 720x1280 video and add blur

    6 janvier 2021, par offish

    I've searched around and found multiple solutions. I've found one that works well, but the final video ends up being too big which makes the rendering slow.

    


    I'm giving it a 1280x720 video and want it to turn out like shown here with 720x1280 as the resolution.

    


    -lavfi "[0:v]scale=256/81*iw:256/81*ih,boxblur=luma_radius=min(h\,w)/40:luma_power=3:chroma_radius=min(cw\,ch)/40:chroma_power=1[bg];[bg][0:v]overlay=(W-w)/2:(H-h)/2,setsar=1,crop=w=iw*81/256"


    


    This video ends up being 1280x2274 instead of 720x1280, everything else is fine except the speed and resolution.

    


    -lavfi [0:v]scale=16/9*iw:16/9*ih,boxblur=luma_radius=min(h\,w)/40:luma_power=3:chroma_radius=min(cw\,ch)/40:chroma_power=1[bg];[bg][0:v]overlay=(W-w)/2:(H-h)/2,setsar=1,crop=w=720:h=1280


    


    This cuts the original video, but ends up being 720x1280, faster than the first solution.

    


    -lavfi "[0:v]scale=256/81*iw:256/81*ih,boxblur=luma_radius=min(h\,w)/40:luma_power=3:chroma_radius=min(cw\,ch)/40:chroma_power=1[bg];[bg][0:v]overlay=(W-w)/2:(H-h)/2,setsar=1,crop=w=iw*81/256,scale=720:1280"


    


    This is the same as the first one, but it gets scaled again. It has the correct resolution, but is way to slow for my liking (only about 3.6 it/s, when I've tried other solutions which fluctuates around 35 it/s).

    


    I guess my scaling is wrong, but I don't understand what I should multiply and divide by, to get the result I'm looking for.

    


    Thanks.

    


  • ffmpeg - how can I make a video out of video given a list of frames ?

    28 avril 2020, par Adam Gosztolai

    I have a list of frames frames = [23, 25, 26, 27, 28, 345, 346, 347] and a video file input.mp4 recorded at 100 fps.

    



    Could someone show me how to make a video output.mp4 taking only frames from frames ?