Recherche avancée

Médias (91)

Autres articles (29)

  • Support audio et vidéo HTML5

    10 avril 2011

    MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
    Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
    Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
    Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...)

  • Gestion de la ferme

    2 mars 2010, par

    La ferme est gérée dans son ensemble par des "super admins".
    Certains réglages peuvent être fais afin de réguler les besoins des différents canaux.
    Dans un premier temps il utilise le plugin "Gestion de mutualisation"

  • Supporting all media types

    13 avril 2011, par

    Unlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)

Sur d’autres sites (3955)

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

    


  • discord bot music with youtube dl not stuck at webpage downloading

    22 septembre 2021, par patricebailey1998

    So I'm trying to make a music bot which just joins,plays,stops and resume music. However my bot can join and leave a voice channel fine, however when i do my /play command it get stuck on [youtube] oCveByMXd_0: Downloading webpage (this is output in vscode) and then does nothing after. I put some print statement (which you can see in the code below and it prints 1 and 2 but NOT 3). Anyone had this issue ?

    


    MUSIC BOT FILE

    


    import discord
from discord.ext import commands
import youtube_dl

class music(commands.Cog):
    def __init__(self, bot):
        self.bot = bot
        
    @commands.command()
    async def join(self, ctx):
        if(ctx.author.voice is None):
            await ctx.reply("*You're not in a voice channel.*")
        voiceChannel = ctx.author.voice.channel
        if(ctx.voice_client is None): # if bot is not in voice channel
            await voiceChannel.connect()
        else: # bot is in voice channel move it to new one
            await ctx.voice_client.move_to(voiceChannel)

    @commands.command()
    async def leave(self, ctx):
        await ctx.voice_client.disconnect()
        
    @commands.command()
    async def play(self,ctx, url:str = None):
        if(url == None):
            await ctx.reply("*Check your arguments!*\n```/play VIDEO_URL```")
        else:
            ctx.voice_client.stop() # stop current song
            
            # FFMPEG handle streaming in discord, and has some standard options we need to include
            FFMPEG_OPTIONS = {'before_options': '-reconnect 1 -reconnect_streamed 1 -reconnect_delay_max 5', 'options': '-vn'}
            YTDL_OPTIONS = {"format":"bestaudio"}
            vc = ctx.voice_client
            
            # Create stream to play audio and then stream directly into vc
            with youtube_dl.YoutubeDL(YTDL_OPTIONS) as ydl:
                info = ydl.extract_info(url, download=False)
                print("1")
                url2 = info["formats"][0]["url"]
                print("2")
                source = await discord.FFmpegOpusAudio.from_probe(url2,FFMPEG_OPTIONS)
                print("3")
                vc.play(source) # play the audio
                await ctx.send(f"*Playing {info['title']} -* ퟎ
  • Streaming - How do you re-encode (fps, bit rate, codec) a live stream (e:g twitch/youtube) to another live stream ? [on hold]

    10 février 2017, par shayan

    For example I could receive a twitch 720p/60fps stream and encode it down to 360p/60fps for live viewing(hls preferably). I have used ffmpeg and youtube-dl for simple tasks but i don’t know how I can achieve this.