Recherche avancée

Médias (1)

Mot : - Tags -/Rennes

Autres articles (67)

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

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

  • Librairies et binaires spécifiques au traitement vidéo et sonore

    31 janvier 2010, par

    Les logiciels et librairies suivantes sont utilisées par SPIPmotion d’une manière ou d’une autre.
    Binaires obligatoires FFMpeg : encodeur principal, permet de transcoder presque tous les types de fichiers vidéo et sonores dans les formats lisibles sur Internet. CF ce tutoriel pour son installation ; Oggz-tools : outils d’inspection de fichiers ogg ; Mediainfo : récupération d’informations depuis la plupart des formats vidéos et sonores ;
    Binaires complémentaires et facultatifs flvtool2 : (...)

Sur d’autres sites (7046)

  • Problem settingup a play command for my discord bot (music) ['Error : FFmpeg/avconv not found !']

    28 août 2023, par TitanFrex

    Im new to programing a discord bot, im more to the web developing enviroment, im trying to create by myself a play command song (only with one link) to try if the first join is working and actually play the song.

    


    (Discord.js v14)

    


    Unfortunately i was having a problem with FFMPEG.
This my actual module for the play.js command, where all the problem is happening.

    


    const { joinVoiceChannel, createAudioPlayer, createAudioResource } = require('@discordjs/voice');
const ytdl = require('ytdl-core');

module.exports = {
    devOnly: true,
    name: 'play',
    description: 'Start to play a song!',
    // options: Object[],

    /**
     *
     * @param {Client} client
     * @param {Interaction} interaction
     */
    callback: async (client, interaction) => {
        const voiceChannel = interaction.member.voice.channel;

        if (!voiceChannel) {
            return interaction.reply('You must be in a voice channel to use this command.');
        }

        const connection = joinVoiceChannel({
            channelId: voiceChannel.id,
            guildId: interaction.guild.id,
            adapterCreator: interaction.guild.voiceAdapterCreator,
        });

        const stream = ytdl('URL_HERE', { filter: 'audioonly' });
        const resource = createAudioResource(stream);

        const player = createAudioPlayer();
        connection.subscribe(player);
        player.play(resource);

        interaction.reply({
            content: `Playing Song`,
            // ephemeral: true,
        });
    }
}


    


    The first error i was receving was 'Error : FFmpeg/avconv not found !', i tried to install it with some guides online. after couple of tries i get it right and the command 'ffmpeg -version' returns.

    


    After that i tought it was workikng, but when i started my project, i receved the same error,. I tried to look up for a solution and i tried to get the process.env.PATH to see but i dont understand if its right or not.

    


    After i removed the console.log(process.env.PATH), i get no errors in the terminal, but it will stil not play the song.

    


  • Play MPEG-2 TS using MseStreamSource

    27 novembre 2022, par Nicolas Séveno

    I need to display a live video stream in a UWP application.

    



    The video stream comes from a GoPro. It is transported by UDP messages. It is a MPEG-2 TS stream. I can play it successfully using FFPlay with the following command line :

    



    ffplay -fflags nobuffer -f:v mpegts udp://:8554


    



    I would like to play it with MediaPlayerElement without using a third party library.

    



    According to the following page :
https://learn.microsoft.com/en-us/windows/uwp/audio-video-camera/supported-codecs
UWP should be able to play it. (I installed the "Microsoft DVD" application in the Windows Store).

    



    I receive the MPEG-2 TS stream with a UdpClient. It works well.
I receive in each UdpReceiveResult a 12 bytes header, followed by 4, 5, 6, or 7 MPEGTS packets (each packet is 188 bytes, beginning with 0x47).

    



    I created a MseStreamSource :

    



    _mseStreamSource = new MseStreamSource();
_mseStreamSource.Opened += (_, __) =>
{
    _mseSourceBuffer = _mseStreamSource.AddSourceBuffer("video/mp2t");
    _mseSourceBuffer.Mode = MseAppendMode.Sequence;
};
_mediaPlayerElement.MediaSource = MediaSource.CreateFromMseStreamSource(_mseStreamSource);


    



    This is how I send the messages to the MseStreamSource :

    



        UdpReceiveResult receiveResult = await _udpClient.ReceiveAsync();
    byte[] bytes = receiveResult.Buffer;
    mseSourceBuffer.AppendBuffer(bytes.AsBuffer());


    



    The MediaPlayerElement displays the message "video not supported or incorrect file name". (not sure of the message, my Windows is in French).

    



    Is it a good idea to use the MseAppendMode.Sequence mode ?
What should I pass to the AppendBuffer method ? The raw udp message including the 12 bytes header or each MPEGTS 188 bytes packet ?

    


  • Play mp3 data with audiotrack with ffmpeg

    1er février 2014, par Ichigo Kurosaki

    I am designing an android app where i receive live mp3 data as stream from Red5 server and i need to play it.

    I cant play it using media player class as i don't have any url for the stream, nor i cant use files. Another option is to use Audio track class, but requires PCM data only. So need to convert mp3 to pcm, so using ffmpeg.

    My code for conversion is

    AVCodec *codec;
    AVCodecContext *c= NULL;
    int out_size, len;
    uint8_t *outbuf;

    int iplen=(*env)->GetArrayLength(env, mp3buf);
    int16_t inbuf[AUDIO_INBUF_SIZE + FF_INPUT_BUFFER_PADDING_SIZE];
    AVPacket avpkt;
    av_init_packet(&avpkt);
    av_register_all();
    avcodec_register_all();

    codec = avcodec_find_decoder(CODEC_ID_MP3);
    if(!codec){
       __android_log_print(ANDROID_LOG_DEBUG, "logfromjni", "Codec not found");
    }
    c = avcodec_alloc_context();
    outbuf = malloc(AVCODEC_MAX_AUDIO_FRAME_SIZE);
    avpkt.data = (*env)->GetByteArrayElements(env,mp3buf,NULL);

    avpkt.size = (*env)->GetArrayLength(env, mp3buf);
    out_size = AVCODEC_MAX_AUDIO_FRAME_SIZE;
    int ao=avcodec_open(c, codec);
       if (ao < 0) {
           __android_log_print(ANDROID_LOG_DEBUG, "logfromjni", "avcodec not open");
       }
       len = avcodec_decode_audio3(c, (short *)outbuf, &out_size, &avpkt);

    The Problem is avcodec_decode_audio3(c, (short *)outbuf, &out_size, &avpkt); returns -1 always.

    Cant figure out whats wrong.

    Any help appreciated.