Recherche avancée

Médias (0)

Mot : - Tags -/configuration

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

Autres articles (69)

  • Creating farms of unique websites

    13 avril 2011, par

    MediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
    This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)

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

  • Configurer la prise en compte des langues

    15 novembre 2010, par

    Accéder à la configuration et ajouter des langues prises en compte
    Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
    De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
    Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...)

Sur d’autres sites (6557)

  • trying to play audio from youtube with ffmpeg on discord.py rewrite

    13 septembre 2021, par Bobby Cook

    im trying to use a discord bot that plays music, but im getting errors when i run this code and python crashes, and i cant quite figure out whats wrong, except for that its around the @client.command(pass_context=True) async def play(self, ctx, *, url): print(url) server = ctx.message.guild voice_channel = server.voice_client
block. the i apologize for wasting all your time, im really bad at this, and i didnt even write most of this.

    


    import random
import youtube_dl
from discord.ext import commands
from discord.ext import tasks

client = commands.Bot(command_prefix = 'f!')

@client.command()
async def join(ctx):
    channel = ctx.message.author.voice.channel
    await channel.connect()

@client.command()
async def leave(ctx):
    await ctx.voice_client.disconnect()

youtube_dl.utils.bug_reports_message = lambda: ''


ytdl_format_options = {
    'format': 'bestaudio/best',
    'outtmpl': '%(extractor)s-%(id)s-%(title)s.%(ext)s',
    'restrictfilenames': True,
    'noplaylist': True,
    'nocheckcertificate': True,
    'ignoreerrors': False,
    'logtostderr': False,
    'quiet': True,
    'no_warnings': True,
    'default_search': 'auto',
    'source_address': '0.0.0.0' # bind to ipv4 since ipv6 addresses cause issues sometimes
}

ffmpeg_options = {
    'options': '-vn'
}

ytdl = youtube_dl.YoutubeDL(ytdl_format_options)

class YTDLSource(discord.PCMVolumeTransformer):
    def __init__(self, source, *, data, volume=0.5):
        super().__init__(source, volume)

        self.data = data

        self.title = data.get('title')
        self.url = data.get('url')

    @classmethod
    async def from_url(cls, url, *, loop=None, stream=False):
        loop = loop or asyncio.get_event_loop()
        data = await loop.run_in_executor(None, lambda: ytdl.extract_info(url, download=not stream))

        if 'entries' in data:
            # take first item from a playlist
            data = data['entries'][0]

        filename = data['url'] if stream else ytdl.prepare_filename(data)
        return cls(discord.FFmpegPCMAudio(filename, **ffmpeg_options), data=data)

        async with ctx.typing():
            player = await YTDLSource.from_url(url, loop=self.bot.loop)
            ctx.voice_channel.play(player, after=lambda e: print('Player error: %s' % e) if e else None)
        await ctx.send('Now playing: {}'.format(player.title))

@client.command(pass_context=True)
   async def play(self, ctx, *, url):
       print(url)
       server = ctx.message.guild
       voice_channel = server.voice_client


    


  • Can't play MP4 after download

    14 août 2018, par joe

    I am using a downloader program in Firefox to download videos playing in Firefox. Most of the time final MP4 is playable. But sometimes I get MP4 file that looks good(shows file size) but shows no length of video in file explorer.

    I get this error log.

    Could not get information from media 'ESPN 2 (HD) Live Stream Channel' from file 'C:\Download\dwHelper\ESPN 2 (HD) Live Stream Channel.mp4'. The file might be corrupted.

    {
       "file": "C:\\Download\\dwHelper\\ESPN 2 (HD) Live Stream Channel.mp4",
       "stat": {
           "dev": 3831878042,
           "mode": 33206,
           "nlink": 1,
           "uid": 0,
           "gid": 0,
           "rdev": 0,
           "ino": 9007199254752056,
           "size": 610722524,
           "atimeMs": 1534241605017.09,
           "mtimeMs": 1534241604156.685,
           "ctimeMs": 1534241604426.08,
           "birthtimeMs": 1534237675494.6475,
           "atime": "2018-08-14T10:13:25.017Z",
           "mtime": "2018-08-14T10:13:24.157Z",
           "ctime": "2018-08-14T10:13:24.426Z",
           "birthtime": "2018-08-14T09:07:55.495Z"
       }
    }
    Exit code: 1
    ffprobe version n4.0-1-gdc49a24-vdhcoapp Copyright (c) 2007-2018 the FFmpeg developers

    built with gcc 5.3.1 (GCC) 20160211

    configuration : —cross-prefix=x86_64-w64-mingw32- —sysroot=/usr/x86_64-w64-mingw32/ —extra-ldflags=-static-libgcc —target-os=mingw32 —arch=x86_64 —prefix=/home/mig/vdhcoapp/converter/src-build/win/64/converter-build —extra-version=vdhcoapp —extra-cflags=-I/home/mig/vdhcoapp/converter/src-build/win/64/deps/include —extra-ldflags=’-static-libgcc -L/home/mig/vdhcoapp/converter/src-build/win/64/deps/lib -L/home/mig/vdhcoapp/converter/src-build/win/64/zlib’ —extra-libs=-lpthread —pkg-config=/usr/bin/x86_64-w64-mingw32-pkg-config —enable-shared —enable-gpl —enable-pthreads —disable-w32threads —enable-libmp3lame —enable-libopenjpeg —enable-libopus —enable-libtheora —enable-libvorbis —enable-libvpx —enable-libwebp —enable-libx265 —enable-libxvid —enable-libx264 —enable-avresample —disable-doc

    libavutil 56. 14.100 / 56. 14.100

    libavcodec 58. 18.100 / 58. 18.100

    libavformat 58. 12.100 / 58. 12.100

    libavdevice 58. 3.100 / 58. 3.100

    libavfilter 7. 16.100 / 7. 16.100

    libavresample 4. 0. 0 / 4. 0. 0

    libswscale 5. 1.100 / 5. 1.100

    libswresample 3. 1.100 / 3. 1.100

    libpostproc 55. 1.100 / 55. 1.100

    [mov,mp4,m4a,3gp,3g2,mj2 @ 00000000024c3900] moov atom not found

    C :\Download\dwHelper\ESPN 2 (HD) Live Stream Channel.mp4 : Invalid data found when processing input

    It looks like moov atom is missing thus can’t aggregate PART file into final playable MP4.

    I understand that during download, PART file is created. Then later PART is aggregated into final MP4.

    So question is how can I make this MP4 to play ?
    or is it impossible to play cus moov atom was not properly downloaded ?

    Any thoughts ?
    Thanks

  • How to downscale video using subprocess and then piping the data over to stdout and play using ffplay and save it as well

    2 avril 2021, par ZeroDay Fracture

    I am trying to use ffmpeg to downscale a video and pipe the stdout data to ffplay to play the new downsized video by piping it to ffplay on aws lambda.

    


    This is the command I have so far, but for some reason adding a scale option is not working.

    


    I am trying to run this command locally before I deploy it on python with subprocess command. I need the raw video to be able to save into database for streaming the data in realtime.

    


    %ffmpeg -i sample.mp4  -vf scale=240:-2 -f  mpegts -c:v copy -af aresample=async=1:first_pts=0 - | ffplay -

    


    adding the scale optioin for some reason is saving the video as the name scale=240 :-2 which does not make sense.