Recherche avancée

Médias (1)

Mot : - Tags -/stallman

Autres articles (35)

  • Les tâches Cron régulières de la ferme

    1er décembre 2010, par

    La gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
    Le super Cron (gestion_mutu_super_cron)
    Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...)

  • Encoding and processing into web-friendly formats

    13 avril 2011, par

    MediaSPIP automatically converts uploaded files to internet-compatible formats.
    Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
    Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
    Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
    All uploaded files are stored online in their original format, so you can (...)

  • ANNEXE : Les plugins utilisés spécifiquement pour la ferme

    5 mars 2010, par

    Le site central/maître de la ferme a besoin d’utiliser plusieurs plugins supplémentaires vis à vis des canaux pour son bon fonctionnement. le plugin Gestion de la mutualisation ; le plugin inscription3 pour gérer les inscriptions et les demandes de création d’instance de mutualisation dès l’inscription des utilisateurs ; le plugin verifier qui fournit une API de vérification des champs (utilisé par inscription3) ; le plugin champs extras v2 nécessité par inscription3 (...)

Sur d’autres sites (6409)

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