Recherche avancée

Médias (0)

Mot : - Tags -/alertes

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (68)

  • Amélioration de la version de base

    13 septembre 2013

    Jolie sélection multiple
    Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
    Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)

  • Menus personnalisés

    14 novembre 2010, par

    MediaSPIP utilise le plugin Menus pour gérer plusieurs menus configurables pour la navigation.
    Cela permet de laisser aux administrateurs de canaux la possibilité de configurer finement ces menus.
    Menus créés à l’initialisation du site
    Par défaut trois menus sont créés automatiquement à l’initialisation du site : Le menu principal ; Identifiant : barrenav ; Ce menu s’insère en général en haut de la page après le bloc d’entête, son identifiant le rend compatible avec les squelettes basés sur Zpip ; (...)

  • Déploiements possibles

    31 janvier 2010, par

    Deux types de déploiements sont envisageable dépendant de deux aspects : La méthode d’installation envisagée (en standalone ou en ferme) ; Le nombre d’encodages journaliers et la fréquentation envisagés ;
    L’encodage de vidéos est un processus lourd consommant énormément de ressources système (CPU et RAM), il est nécessaire de prendre tout cela en considération. Ce système n’est donc possible que sur un ou plusieurs serveurs dédiés.
    Version mono serveur
    La version mono serveur consiste à n’utiliser qu’une (...)

Sur d’autres sites (12465)

  • How to upload 7MB GIF to Twitter's API

    22 février 2021, par randombits

    I have a bunch of JPEG frames that I use ImageMagick to stitch together into a GIF. The final product has the following type :

    


    GIF image data, version 89a, 1280 x 720

    


    This gives the effect of an animated GIF. My file sizes range anywhere between 6-8MB.

    


    If I upload this media manually to Twitter, it works great. Using TwitterOAuth PHP library found here when I attempt the following :

    


    $media = $twitterConnection->upload('media/upload', ['media' => 'my_file.gif');

    


    I get the following error :

    


    Image file size must be <= 5242880 bytes

    


    I have also tried uploading the file using Twitter's recommended Python large video library and that failed with the following :

    


    INIT
Media ID: 1362940800456351744
APPEND
4194304 of 7685061 bytes uploaded
APPEND
7685061 of 7685061 bytes uploaded
Upload chunks complete.
FINALIZE
{'media_id': 1362940800456351744, 'media_id_string': '1362940800456351744', 'media_key': '7_1362940800456351744', 'size': 7685061, 'expires_after_secs': 86400, 'processing_info': {'state': 'pending', 'check_after_secs': 1}}
Media processing status is pending
Checking after 1 seconds
STATUS
Media processing status is failed


    


    I am willing to use any platform/utility to get my video files uploaded to Twitter. What is my best bet to either :

    


    1 : Fix my file type to adhere to Twitter's requirements. Should it not be a GIF ? Should I be converting my still shot JPEG files to another format ?

    


    2 : Is there an API that Twitter has available that will allow the GIFs of these sizes to be uploaded ? Again, I can upload these files via the regular Twitter web UI client, but I cannot automate it via their API.

    


    How do I upload my GIF to Twitter using their API ?

    


  • When I run code in Docker I get a Django error [Errno 2]. When running locally everything works. Why ?

    8 février 2021, par Bartłomiej Kokoszka

    I don't know what's going on. A script run by Django works fine, but not through Docker and Django. An error is returned :

    


    Pic Errno 2 No such file or directory

    


    Below is the code of the function with the error and the code of the Dockerfile.

    


    '''

    


    def mediainfo(filepath):
    


    


    Original code :

    


    

        prober = get_prober_name()
    command_args = [
        "-v", "quiet",
        "-show_format",
        "-show_streams",
        filepath
    ]

    command = [prober, '-of', 'old'] + command_args


    


    


    Modified code :

    


    

        command = f"ffprobe -v error -show_format -show_streams -select_streams v:0 {filepath}"


    


    


    The rest of the functions :

    


        res = Popen(command, stdout=PIPE)&#xA;    output = res.communicate()[0].decode("utf-8")&#xA;&#xA;    if res.returncode != 0:&#xA;        output = Popen(command, stdout=PIPE).communicate()[0].decode("utf-8")&#xA;&#xA;    rgx = re.compile(r"(?:(?P.*?):)?(?P<key>.*?)\=(?P<value>.*?)$")&#xA;    info = {}&#xA;&#xA;    if sys.platform == &#x27;win32&#x27;:&#xA;        output = output.replace("\r", "")&#xA;&#xA;    for line in output.split("\n"):&#xA;        # print(line)&#xA;        mobj = rgx.match(line)&#xA;&#xA;        if mobj:&#xA;            # print(mobj.groups())&#xA;            inner_dict, key, value = mobj.groups()&#xA;&#xA;            if inner_dict:&#xA;                try:&#xA;                    info[inner_dict]&#xA;                except KeyError:&#xA;                    info[inner_dict] = {}&#xA;                info[inner_dict][key] = value&#xA;            else:&#xA;                info[key] = value&#xA;&#xA;    return info&#xA;</value></key>

    &#xA;

    '''

    &#xA;

    Code of the Dockerfile

    &#xA;

    '''

    &#xA;

    FROM python:3.7 as base&#xA;&#xA;EXPOSE 80&#xA;&#xA;WORKDIR /app&#xA;COPY . /app&#xA;&#xA;&#xA;ENV PYTHONDONTWRITEBYTECODE=1&#xA;&#xA;ENV PYTHONUNBUFFERED=1&#xA;&#xA;RUN pip install --upgrade pip&#xA;RUN echo &#x27;deb http://deb.debian.org/debian buster-backports main contrib non-free&#x27; >> /etc/apt/sources.list&#xA;RUN apt-get update&#xA;&#xA;RUN apt-get -y install ffmpeg&#xA;RUN apt-get update&#xA;&#xA;COPY requirements.txt .&#xA;RUN python -m pip install -r requirements.txt&#xA;&#xA;FROM base as prod&#xA;&#xA;ENTRYPOINT ["python","manage.py","runserver","0.0.0.0:80"]&#xA;

    &#xA;

    '''

    &#xA;

  • FFMPEG add text frames to the start of video

    22 janvier 2021, par Ryan

    I have some videos either in mp4 or webm format, and I'd like to use ffmpeg to add 4 seconds to the start of each video to display some text in the center with no sound.

    &#xA;&#xA;

    Some other requirements :

    &#xA;&#xA;

      &#xA;
    • try to avoid re-encoding the video
    • &#xA;

    • need to maintain the quality (resolution, bitrate, etc)
    • &#xA;

    • (optional) to make the text fade in/out
    • &#xA;

    &#xA;&#xA;

    I am new to ffmpeg and any help will be appreciated.

    &#xA;&#xA;

    thanks in advance

    &#xA;&#xA;

    Example ffprobe information for mp4 below :

    &#xA;&#xA;

    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from &#x27;input.mp4&#x27;:&#xA;  Metadata:&#xA;    major_brand : isom&#xA;    minor_version   : 512&#xA;    compatible_brands: isomiso2avc1mp41&#xA;    encoder         : Lavf55.33.100&#xA;  Duration: 00:00:03.84, start: 0.042667, bitrate: 1117 kb/s&#xA;Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720, 1021 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default)&#xA;Metadata:&#xA;  handler_name    : VideoHandler&#xA;Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 140 kb/s (default)&#xA;Metadata:&#xA;  handler_name    : SoundHandler&#xA;

    &#xA;&#xA;

    Example webm

    &#xA;&#xA;

    Input #0, matroska,webm, from &#x27;input.webm&#x27;:&#xA;  Metadata:&#xA;  encoder         : Lavf55.33.100&#xA; Duration: 00:00:03.80, start: 0.000000, bitrate: 1060 kb/s&#xA;   Stream #0:0(eng): Video: vp8, yuv420p, 1280x720, SAR 1:1 DAR 16:9, 30 fps, 30 tbr, 1k tbn, 1k tbc (default)&#xA;   Stream #0:1(eng): Audio: vorbis, 48000 Hz, stereo, fltp (default)&#xA;

    &#xA;&#xA;

    Screenshot from joined.mp4

    &#xA;&#xA;

    Screenshot for step 3 console

    &#xA;