Recherche avancée

Médias (3)

Mot : - Tags -/image

Autres articles (81)

  • Multilang : améliorer l’interface pour les blocs multilingues

    18 février 2011, par

    Multilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
    Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela.

  • 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 (...)

  • Installation en mode ferme

    4 février 2011, par

    Le mode ferme permet d’héberger plusieurs sites de type MediaSPIP en n’installant qu’une seule fois son noyau fonctionnel.
    C’est la méthode que nous utilisons sur cette même plateforme.
    L’utilisation en mode ferme nécessite de connaïtre un peu le mécanisme de SPIP contrairement à la version standalone qui ne nécessite pas réellement de connaissances spécifique puisque l’espace privé habituel de SPIP n’est plus utilisé.
    Dans un premier temps, vous devez avoir installé les mêmes fichiers que l’installation (...)

Sur d’autres sites (8599)

  • Set some audio stream properties in the vivo demuxer.

    4 décembre 2012, par Carl Eugen Hoyos

    Set some audio stream properties in the vivo demuxer.

  • Julia FFMPEG string not recognizing format specifier

    12 janvier 2024, par veryverde

    I have this code :

    


    using Pkg
#Pkg.add("FFMPEG")
using FFMPEG

imagesdirectory = "my/paths/images"
framerate = 30
gifname = "my/paths/images/my-animation-name.gif"
FFMPEG.ffmpeg_exe(`-framerate $(framerate) -f image2 -i $(imagesdirectory)/%07d.png -y $(gifname)`)


    


    This code is taken from here
In it, FFMPEG is supposed to match those files that have 7 digits, which is what the %07d . That is, of the format 0000123.png, for example.

    


    This is, for whatever reason, not parsing it correctly, and reading the string directly :

    


    [image2 @ 0x7fc9fb00a000] Could find no file with path '/my/paths/images/%07d.png' and index in the range 0-4
/my/paths/images/%07d.png: No such file or directory


    


    I am not sure how to input this matching so that it is read properly, i.e., so that it matches all those files with exactly 7 digits, and a .png extension. For others, from the source of the code, it seems to be working, but I have no idea why it would parse it incorrectly. I've downloaded FFMPEG specifically for this task, so it ought to be up-to-date.

    


  • How to Download YouTube Videos in 1080p with English Subtitles Using yt-dlp with Python 3

    30 juillet 2024, par edge selcuk

    I am trying to download YouTube videos using yt-dlp in Python 3.9. I want to download videos in 1080p quality and if 1080p is not available, it should download the best available quality. The audio and video files should be merged into a single MP4 file, and I have ffmpeg installed to handle the merging process.

    


    Here is my script :

    


    import os
import sys
from yt_dlp import YoutubeDL

def download_video(url):
    output_dir = r"/path"  # Update this path

    # Ensure the output directory exists
    if not os.path.exists(output_dir):
        os.makedirs(output_dir)
    
    ydl_opts = {
        'format': '(bestvideo[height<=1080][ext=mp4]/bestvideo)+bestaudio/best',
        'merge_output_format': 'mp4',
        'write_auto_sub': True,
        'writesubtitles': True,
        'subtitleslangs': ['en'],
        'subtitlesformat': 'vtt',
        'embedsubtitles': True,
        'outtmpl': os.path.join(output_dir, '%(title)s.%(ext)s'),
        'postprocessors': [{
            'key': 'FFmpegVideoConvertor',
            'preferedformat': 'mp4',
        }],
    }

    with YoutubeDL(ydl_opts) as ydl:
        ydl.download([url])

if __name__ == "__main__":
    if len(sys.argv) != 2:
        print("Usage: python download_video.py ")
        sys.exit(1)

    youtube_url = sys.argv[1]
    download_video(youtube_url)


    


    This script successfully downloads the video in 1080p quality or the best available quality and merges the audio and video files as intended. However, it does not download the subtitles as intended.

    


    I have ffmpeg installed for merging the video and audio files. How can I modify this script to ensure that English subtitles are downloaded and embedded in the video file ?