Recherche avancée

Médias (2)

Mot : - Tags -/kml

Autres articles (71)

  • Keeping control of your media in your hands

    13 avril 2011, par

    The vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
    While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
    MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
    MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...)

  • Ecrire une actualité

    21 juin 2013, par

    Présentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
    Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
    Vous pouvez personnaliser le formulaire de création d’une actualité.
    Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette 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.

Sur d’autres sites (7294)

  • 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 transconding one input video stream and multiple output video streams in the same file

    13 mars 2013, par user2165262

    I am trying to transcode a single video file with 1 video stream and several audio streams to the file having same video stream in different bitrates/sizes with correct padding at the same time.

    the command I use is :

        ffmpeg -y -ss 600 -t 600 -i "INPUT.mkv" -map_chapters -1 -map 0:0 -c:v libx264 -keyint_min 48 -g 96 -bufsize 350k -b:v 350k -minrate 300k -maxrate 400k -profile:v baseline -level 3.0 -preset slow -vf "scale=iw*min(480/iw\,272/ih):ih*min(480/iw\,272/ih),pad=480:272 :(480-iw)/2 :(272-ih)/2" -map 0:0 -c:v libx264 -keyint_min 48 -g 96 -bufsize 650k -b:v 650k -minrate 500k -maxrate 800k -profile:v baseline -level 3.1 -preset slow -vf "scale=iw*min(640/iw\,360/ih):ih*min(640/iw\,360/ih),pad=640:360 :(640-iw)/2 :(360-ih)/2" -map 0:1 -c:a libfaac -b:a 32k -ar 44100 -f mpegts OUTPUT.m2ts
    

    ffmpeg creates two video streams, however the bitrate and resolution for all of them are taken from the last video arguments - i.e. both streams are 640x360 :

        Output #0, mpegts, to 'OUTPUT.m2ts' :
        Stream #0:0(eng) : Video : h264, yuv420p, 640x360 [SAR 559:560 DAR 559:315], q=-1—1, 650 kb/s,     Stream #0:1(eng) : Video : h264, yuv420p, 640x360 [SAR 559:560 DAR 559:315], q=-1—1, 650 kb/s, 90k tbn, 23.98 tbc (default)
        Stream #0:2(rus) : Audio : aac, 44100 Hz, 5.1, s16, 32 kb/s (default)
        Stream mapping :
        Stream #0:0 -> #0:0 (h264 -> libx264)
        Stream #0:0 -> #0:1 (h264 -> libx264)
        Stream #0:1 -> #0:2 (aac -> libfaac)
        Press [q] to stop, [?] for help
    

    Is it practically possible to make transcoding to several bitrates to the same file ?

  • save caca (ascii video) to an mp4 video [on hold]

    8 juillet 2013, par user2559158

    No problems viewing a caca file from mplayer (mplayer -vo caca), and it's also possible view the video file as caca with ffmpeg (fmpeg -i file.mp4 -f caca -pix_fmt rgb24 outputfile.mp4), but neither saves the file. Is there anyway to do it ?