Recherche avancée

Médias (1)

Mot : - Tags -/belgique

Autres articles (67)

  • Submit bugs and patches

    13 avril 2011

    Unfortunately a software is never perfect.
    If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
    If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
    You may also (...)

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

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

Sur d’autres sites (7874)

  • How do i fix the error "ffmpeg was not found." in my discord bot ?

    4 janvier 2023, par Anton Abboud

    I am currently trying to make my discord bot play a youtube audio from a URL. However, I can't pass the error "ffmpeg was not found". I have tried to use different solutions but nothing has worked. My code currently looks like this :

    


    import discord
import asyncio
from discord import FFmpegPCMAudio
from discord.utils import get
from discord.ext import commands
from youtube_dl import YoutubeDL

@bot.command(brief="Plays a single video, from a youtube URL")
async def play(ctx, url):
    if not ctx.message.author.voice:
        await ctx.send("{} is not connected to a voice channel".format(ctx.message.author.name))
        return
    else:
        global channel_player
        channel_player = ctx.message.author.voice.channel
    await channel_player.connect()
    YDL_OPTIONS = {'format': 'bestaudio', 'noplaylist':'True'}
    FFMPEG_OPTIONS = {'before_options': '-reconnect 1 -reconnect_streamed 1 -reconnect_delay_max 5', 'options': '-vn'}
    voice = get(bot.voice_clients, guild=ctx.guild)

    if not voice.is_playing():
        with YoutubeDL(YDL_OPTIONS) as ydl:
            info = ydl.extract_info(url, download=False)
        URL = info['url']
        voice.play(FFmpegPCMAudio(URL, **FFMPEG_OPTIONS))
        voice.is_playing()
    else:
        await ctx.send("Already playing song")
        return


    


    I am relatively new to coding so if you have any other suggestions on top of (hopefully) the solution to the problem, feel free !

    


    I am relatively new to coding so if you have any other suggestions on top of (hopefully) the solution to the problem, feel free !

    


    I have as I said tried a few different other approaches but nothing has worked. The one that seemed to almost work was to download ffmpeg through libx264 and create files that python could be directed to.

    


    I also tried downloadeing the most recent version of ffmpeg and 7zip to extract it.

    


  • How to add an album cover to an mp3 stream using FFmpeg ?

    29 décembre 2022, par Daniel LAPIDES

    I'm having a bit of an issue and I'd really appreciate it if I could get some insights.

    



    What I am trying to do is to add an album cover to the mp3 file that will be downloaded from the front-end.

    



    Context

    



    I'm downloading a video stream from YouTube and converting it to mp3 using fluent-ffmpeg.
    
To get the video I use the ytdl npm module.

    



    I then pipe this stream to the front-end.

    



    What I've found

    



    fluent-ffmpeg offers either pipe() or saveToFile().

    



    What I figured is that when I use the saveToFile() function and actually save my stream into an mp3 file, it works, I do get the album cover.

    



    But when I pipe the stream to front-end or even into a file, the song is saved properly into a file but without the album cover.

    



    Here is my code

    



    Back-end (NodeJS)

    



    let video = ytdl(`http://youtube.com/watch?v=${videoId}`, {
  filter: (format) => format.container === 'mp4' && format.audioEncoding,
  quality: 'lowest'
});

let stream = new FFmpeg()
  .input(video)
  .addInput(`https://i.ytimg.com/vi/${videoId}/default.jpg`)
  .outputOptions([
      '-map 0:1',
      '-map 1:0',
      '-c copy',
      '-c:a libmp3lame',
      '-id3v2_version 3',
      '-metadata:s:v title="Album cover"',
      '-metadata:s:v comment="Cover (front)"'
  ])
  .format('mp3');


    



    And then piping it to my front-end.

    



    stream.pipe(res);
stream
  .on('end', () => {
    console.log('******* Stream end *******');
    res.end.bind(res);
  })
  .on('error', (err) => {
    console.log('ERR', err);
    res.status(500).end.bind(res);
  });


    



    Front-end (React)

    



    axios.get(url)
  .then(res => {
    axios(`${url}/download`, {
      method: 'GET',
      responseType: 'blob'
    })
      .then(stream => {
        const file = new Blob(
          [stream.data],
          { type: 'audio/mpeg' });
        //Build a URL from the file
        const fileURL = URL.createObjectURL(file);
      })
      .catch(err => {
        console.log('ERROR', err);
      });
    })
    .catch(err => {
      console.log('ERROR', err);
    });


    


  • my own tv news channel - using vlc streaming

    6 janvier 2015, par SledgehammerPL

    I want to create my own tv channel (using vlc streaming).
    And for now - it works great :

    cvlc --sout-keep --loop --sout '#standard{access=http,mux=ts,dst=:2000}' file.avi

    But i have two problems :

    1st : how to make a playlist, which i can modify without breaking the streaming (I thought about playlist with file1.avi- file10.avi, which all are symlinks, so when i’m sure, that file2 is playing, I can change symlink for file1 -but maybe there is something beter ?
    2ns : I want to add logo, and news ticker - adding logo is quite easy, but ticker looks hard : for now i know, that I have to use transcode sfilter, something like

    cvlc  --sout-keep --loop --sout '#transcode{soverlay, sfilter=marq{marquee="$N$_$T$_$D", position=5, size=14, opacity=255}, vb=600, vcodec=h264, venc=x264{bpyramid=none, weightp=0}}:standard{access=http,mux=ts,dst=:2000}' film.mp4

    but the problem is that ticker doesn’t move - it changes, but not move

    And I think if I can add logo twice - with ticker between logos - i think about layers :
    1. movie
    2. ticker background
    3. ticker text
    4. ticker frame (because i don’t want to scroll text from border to border)

    Any ideas ?