Recherche avancée

Médias (91)

Autres articles (64)

  • Mise à jour de la version 0.1 vers 0.2

    24 juin 2013, par

    Explications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
    Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1) ; Installation des dépendances pour Smush ; Installation de MediaInfo et FFprobe pour la récupération des métadonnées ; On n’utilise plus ffmpeg2theora ; On n’installe plus flvtool2 au profit de flvtool++ ; On n’installe plus ffmpeg-php qui n’est plus maintenu au (...)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • Ecrire une actualité

    21 juin 2013, par

    Présentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
    Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
    Vous pouvez personnaliser le formulaire de création d’une actualité.
    Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)

Sur d’autres sites (8915)

  • Converting mp4 to multiple resolutions using FFMPEG

    2 avril 2018, par Edwin Flataunet

    I am developing a E-Learning website where people can upload videos.

    When someone uploads a video, they usually upload it in 1080p full HD which is good.
    Now the issue is that when people watch the videos, they are only in 1080p and some people have bad internet (including myself) so watching a video in 1080p is not optimal.

    So I assume that converting the video to different formats (720p, 360 etc..) is the best way to go here.
    So I tried using FFMpeg, and it works, but its really slow, especially since some videos are over 10 minutes long and over 1gb in size.

    I use this command in FFMPEG :

    ffmpeg -i video.mp4 -vf scale:1280:720 -strict -2 output.mp4

    This works, but its really slow.

    Is there any better way to do this ? Since some people upload 5-10 videos and every video has to be in 3 different formats (1080p(original) 720p, 360p).

    Can someone give me some guidelines how to tackle this issue, as this kind of stops the website from progressing atm.

    Thanks

  • ffmpeg pipe response how to play javascript ?

    30 mars 2017, par 최진영

    Hello i have some question

    i trying app.post and response angular2

    here is my code

    function.js

    var url = 'https://www.youtube.com/watch?v=' + id;
    try {
          youtubeStream(url).pipe(res)
        } catch (exception) {
           res.status(500).send(exception)
         }

    response.ts

          this.loading = true
           var headers = new Headers();
           var query = {
                        "videoURL" : this.tracklist[0].videoURL
                       }
            headers.append('Content-Type', 'application/json');
            this.http.post('http://localhost:4100/toMp3',query,{headers: headers}).subscribe((res) => {
                console.log(res) <-- plz check picture
            });

    console.log(res)

    console.log(res)

    I do not know how to play stream data in _body

  • Discord.js v14 : AudioPlayer isn't working

    6 septembre 2023, par colonelPanic

    I'm new to javascript in general, and I'm making a Discord bot that can join a voice channel and play some audio. When I run the slash command that I set up, I get no errors and a reply that suggests that everything is running correctly, but no audio is playing. I've looked at the documentation for the audio player and some examples of how to do this on youtube, but I can't find any hints as to why there's no audio.

    


    The command that I'm using to handle the audio player is shown below :

    


    // These are the contents of the 'play.js' file where I'm defining and exporting the slash command 

const { SlashCommandBuilder } = require('discord.js');
const { createAudioPlayer, 
        NoSubscriberBehavior, 
        AudioPlayerStatus,
        getVoiceConnection,
        createAudioResource,
        joinVoiceChannel
      } = require('@discordjs/voice');

module.exports = {
    data: new SlashCommandBuilder()
        .setName('play')
        .setDescription('Plays a song/sound in the voice channel you are in.')
        .addStringOption((option) => 
            option
            .setName('sound')
            .setDescription('The sound/song to play.')
            .setRequired(true)
            .addChoices(
                {name: 'spiderman-pizza', value: 'https://www.youtube.com/watch?v=czTksCF6X8Y'},
                {name: 'royaltyfree-1',   value: 'C:/resources/sounds/royaltyfree-1.mp3'}
            )
        ),
    async execute(interaction) {
        // Create the audio player
        const audioPlayer = createAudioPlayer({
            behaviors: {
                noSubscriber: NoSubscriberBehavior.Pause,
            },
        });
        // Get the existing voice connection
        var connection = getVoiceConnection(interaction.guild.id);
        // If there is no existing connection, create one
        if (!connection) {
            connection = joinVoiceChannel({
                channelId: interaction.member.voice.channel.id,
                guildId: interaction.guild.id,
                adapterCreator: interaction.guild.voiceAdapterCreator
            });
        }
        // Get the chosen audio resource and play it in the voice channel
        const resource = createAudioResource(interaction.options.getString('sound'));
        audioPlayer.play(resource);
        connection.subscribe(audioPlayer);

        interaction.reply({content: `Playing ${interaction.options.getString('sound')}`, ephemeral: true});
    }
}


    


    I don't get any errors when I execute this command with either of the available choices, but the audio player doesn't play anything. On the Discord server, I've given the bot all permissions except for Administrator, and the intents that I've specified in the code can be seen below :

    


    const { 
    Client, 
    Collection, 
    Events, 
    GatewayIntentBits,
 } = require('discord.js');

// Create a new client instance
const client = new Client({ 
    intents: [
            GatewayIntentBits.Guilds,
            GatewayIntentBits.MessageContent,
            GatewayIntentBits.GuildMessages,
            GatewayIntentBits.GuildMembers,
            GatewayIntentBits.GuildVoiceStates
            ] 
        }
    );


    


    I know that the '/play' command is registered and that the bot can join the user's voice channel when '/play' is executed. I've installed 'libsodium-wrappers' (encryption package), 'ffmpeg-static', and '@discordjs/voice' using npm so I don't think there should be any dependency issues. Does anyone have an idea of why the audio isn't playing ?