Recherche avancée

Médias (1)

Mot : - Tags -/Christian Nold

Autres articles (55)

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

  • Emballe médias : à quoi cela sert ?

    4 février 2011, par

    Ce plugin vise à gérer des sites de mise en ligne de documents de tous types.
    Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ;

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

Sur d’autres sites (5570)

  • Discord.py Music Bot problem with FFmpeg on heroku

    16 mai 2020, par Phantom_7331

    I'm coding my first music bot for discord and successfully tested it on the localhost. After that, I moved it on Heroku and installed FFmpeg buildpack for it. But for some reason, it doesn't work.
Here is proof that I installed FFmpeg buildpack on Heroku : Screen

    



    Here is my code (that works well on localhost) :

    



    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'
}

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:
        data = data['entries'][0]

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

@client.command()
async def join(ctx):
channel = ctx.message.author.voice.channel
if ctx.voice_client is not None:
    return await ctx.voice_client.move_to(channel)
await channel.connect()

@client.command()
async def play(ctx, *, URL):
    async with ctx.typing():
        player = await YTDLSource.from_url(url)
        ctx.voice_client.play(player, after=lambda e: print('Player error: %s' % e) if e else None)
    await ctx.send('Now playing: {}'.format(player.title))


    


  • How to not add AdaptationSet for audio if audio stream is not present in input file

    13 juin 2019, par Saurabh

    I am using ffmpeg-dash to create mpd files. I am using following command to generate the same :

    ffmpeg -i input/video.mov \
           -map 0:v:0 -map 0:v:0 -map 0:v:0 -map 0:a\?:0 \
           -b:v:0 350k -c:v:0 libx264 -filter:v:0 "scale=320:-1" \
           -b:v:1 1000k -c:v:1 libx264 -filter:v:1 "scale=640:-1" \
           -b:v:2 3000k -c:v:2 libx264 -filter:v:2 "scale=1280:-1" \
           -use_timeline 1 -use_template 1 -window_size 6  -adaptation_sets "id=0,streams=v id=1,streams=a"  \
           -seg_duration 2 -threads 16 -hls_playlist true -f dash output/ffmpeg/output.mpd

    This works with video which has audio streams, but for the case there is no audio stream in the video file, I get empty entry for audio in mpd files like following, which is not valid and fails while playing in Exo Player in Android.

    <adaptationset contenttype="audio" segmentalignment="true" bitstreamswitching="true">
    </adaptationset>

    I tried adding ? in option adaptation_sets like : id=0,streams=v id=1,streams=a?, however that also adds above line.

    One solution is to run different commands for different videos by first checking whether there is audio stream or not, but would be better if there is some option which add audio adaptationSet only if audio stream is present in the input file.

  • Running FFmpeg in Azure Function app not working when deployed with Azure Pipelines

    8 septembre 2023, par Isak Engström

    I'm unable to run ffmpeg in a .Net 7 isolated process Azure Function app in Azure after deploying it through Azure Pipelines. I can run it locally, and I've been able to run ffmpeg after deploying the app manually.

    &#xA;

    Here's an example of how I run the ffmpeg process. The process.ExitCode on exit is always '-1073741515' when it's been deployed through Azure Pipelines.

    &#xA;

    internal bool IsFfmpegExecutable(string ffmpegPath)&#xA;{&#xA;    try&#xA;    {&#xA;        using var process = new Process();&#xA;        var startInfo = new ProcessStartInfo&#xA;        {&#xA;            FileName = ffmpegPath,&#xA;            RedirectStandardOutput = true,&#xA;            RedirectStandardError = true,&#xA;            UseShellExecute = false,&#xA;            CreateNoWindow = true,&#xA;            Arguments = "-version"&#xA;        };&#xA;&#xA;        process.StartInfo = startInfo;&#xA;&#xA;        process.OutputDataReceived &#x2B;= (_, _) => { };&#xA;        process.ErrorDataReceived &#x2B;= (_, _) => { };&#xA;&#xA;        process.Start();&#xA;        process.WaitForExit();&#xA;&#xA;        return process.ExitCode == 0;&#xA;    }&#xA;    catch (Exception)&#xA;    {&#xA;        return false;&#xA;    }&#xA;}&#xA;

    &#xA;

    The path to the ffmpeg.exe (along with the other ffmpeg dll and exe files) are correct, as I've checked it with File.Exists(). All those files are located in the C :\home\site\wwwroot\ffmpeg\ folder in Azure, as can be seen in Kudu : enter image description here

    &#xA;

    Any idea of how I can get it working ?

    &#xA;