Recherche avancée

Médias (91)

Autres articles (36)

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 0.2 is the first MediaSPIP stable release.
    Its official release date is June 21, 2013 and is announced here.
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

  • De l’upload à la vidéo finale [version standalone]

    31 janvier 2010, par

    Le chemin d’un document audio ou vidéo dans SPIPMotion est divisé en trois étapes distinctes.
    Upload et récupération d’informations de la vidéo source
    Dans un premier temps, il est nécessaire de créer un article SPIP et de lui joindre le document vidéo "source".
    Au moment où ce document est joint à l’article, deux actions supplémentaires au comportement normal sont exécutées : La récupération des informations techniques des flux audio et video du fichier ; La génération d’une vignette : extraction d’une (...)

Sur d’autres sites (4826)

  • Output file does not show up after executing ffmpeg command [closed]

    19 février 2024, par davai

    I'm using ffmpeg to combine an MP3 + G file and produce an MP4 file. I've placed the source code / .exe file for 'ffmpeg' in the project folder, and the MP3 + G files are also in the project folder. I also set the MP4 output to show up in the project folder as well. The weird thing is that, initially, I was producing output files, and while trying to tweak the constant rate factor, the MP4 output just stopped showing up entirely. I'm also not receiving any errors while running the code, and it does print out that the file has been successfully created, despite nothing showing up in the project folder.

    


    
        String mp3FilePath = "C:/Users/exampleuser/pfolder/example.mp3";
        String gFilePath = "C:/Users/exampleuser/pfolder/example.cdg";
        String mp4OutputPath = "C:/Users/exampleuser/pfolder/example.mp4";

        try
        {
            String[] command = {
                    "C:/Users/tonih/IdeaProjects/MP3GtoMP4Conversion/ffmpeg/ffmpeg-2024-02-19-git-0c8e64e268-full_build/bin/ffmpeg.exe",
                    "-i", mp3FilePath,       // Input MP3 file
                    "-r", "25",              // Frame rate
                    "-loop", "1",            // Loop input video
                    "-i", gFilePath,         // Input G file
                    "-c:v", "libx264",       // Video codec
                    "-preset", "slow",       // Encoding preset for quality (choose according to your requirement)
                    "-crf", "18",            // Constant Rate Factor (lower is higher quality, typical range 18-28)
                    "-c:a", "aac",           // Audio codec
                    "-b:a", "320k",          // Audio bitrate
                    "-shortest",             // Stop when the shortest stream ends
                    mp4OutputPath            // Output MP4 file
            };

            Process process = Runtime.getRuntime().exec(command);
            process.waitFor();
            System.out.println("MP4 file created successfully: " + mp4OutputPath);
        }
        catch (IOException | InterruptedException e)
        {
            e.printStackTrace();
        }


    


  • Show the filename being processed when using an input list and an error occurs ?

    17 février 2024, par GeoNomad

    I am concatenating a large number of short files using a list.

    


    One in a hundred seems to have an error of one sort or another which stops the processing.

    


      

    1. Is there a way to tell ffmpeg to just drop the bad frame or even bad file and continue ?

      


    2. 


    3. If not, is there a way to know what file has the error so I can just remove that file from the list ?

      


    4. 


    


    ffmpeg -safe 0  -f concat -i list.txt -c copy FEEDER.mp4

    


    I have tried -loglevel verbose, but that did not help.

    


    [concat @ 0000022d22b23480] h264_mp4toannexb filter failed to receive output packet
Error demuxing input file 0: Invalid data found when processing input
Terminating demuxer thread 0
list.txt: Invalid data found when processing input


    


    How do I find out which file of the several hundred files in list.txt is the culprit ?

    


    As it happens, these files have time stamps and I can find it by looking at the last output frame and then deleting the appropriate file. But it seems there should be a better way.

    


    FWIW I am working in Windows cmd.exe or Powershell Terminal

    


  • Skipping extractors execution since zero extractors were registered (Use `node —trace-warnings ...` to show where the warning was created)

    28 septembre 2023, par Parkster00

    I'm following a Discord Music Bot tutorial that uses ffmpeg, here is index.js

    


    require("dotenv").config();

const { REST } = require("@discordjs/rest");
const { Routes } = require("discord-api-types/v9");
const { Client, Collection, Intents } = require('discord.js');
const { Player } = require("discord-player");

const fs = require("node:fs");
const path = require("node:path");

const client = new Client({
    intents: ["Guilds", "GuildMessages", "GuildVoiceStates"]
});

// Set up our commands into an array
const commands = [];
client.commands = new Collection();

const commandsPath = path.join(__dirname, "commands");
const commandFiles = fs.readdirSync(commandsPath).filter(file => file.endsWith(".js"));

for (const file of commandFiles) {
    console.log(`${file}`)
    console.log(`${commandsPath}`)
    const filePath = path.join(commandsPath, file);
    console.log(`${filePath}`)
    const command = require(filePath);

    client.commands.set(command.data.name, command);
    commands.push(command.data.toJSON());
}

// Create the player, highest quality audio
client.player = new Player(client, {
    ytdlOptions: {
        quality: "highestaudio",
        highWaterMark: 1 << 25
    }
});

// Commands are registered
client.on("ready", () => {
    const guild_ids = client.guilds.cache.map(guild => guild.id);

    const rest = new REST({ version: "9" }).setToken(process.env.TOKEN);
    for (const guildId of guild_ids) {
        rest.put(Routes.applicationGuildCommands(process.env.CLIENT_ID, guildId), {
            body: commands
        })
            .then(() => console.log(`Added commands to ${guildId}`))
            .catch(console.error);
    }

});

client.on("interactionCreate", async interaction => {
    if (!interaction.isCommand()) return;

    const command = client.commands.get(interaction.commandName);
    if (!command) return;

    try {
        await command.execute({ client, interaction });
    }
    catch (err) {
        console.error(err);
        await interaction.reply("An error occured while executing that command.");
    }
});

console.log(process.env.TOKEN);
client.login(process.env.TOKEN);


    


    And here is play.js where I think the error originates :

    


    const { SlashCommandBuilder } = require("@discordjs/builders");
const { EmbedBuilder } = require("discord.js");
const { QueryType } = require('discord-player');


module.exports = {
    data: new SlashCommandBuilder()
        .setName("play")
        .setDescription("Plays a song.")
        .addSubcommand(subcommand => {
            return subcommand
                .setName("search")
                .setDescription("Searches for a song.")
                .addStringOption(option => {
                    return option
                        .setName("searchterms")
                        .setDescription("search keywords")
                        .setRequired(true);
                })
        })
        .addSubcommand(subcommand => {
            return subcommand
                .setName("playlist")
                .setDescription("Plays playlist from YT")
                .addStringOption(option => {
                    return option
                        .setName("url")
                        .setDescription("playlist url")
                        .setRequired(true);

                })
        })
        .addSubcommand(subcommand => {
            return subcommand
                .setName("song")
                .setDescription("Plays song from YT")
                .addStringOption(option => {
                    return option
                        .setName("url")
                        .setDescription("url of song")
                        .setRequired(true);

                })
        }),
    execute: async ({ client, interaction }) => {

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

        const queue = await client.player.nodes.create(interaction.guild);

        if (!queue.connection) await queue.connect(interaction.member.voice.channel)

        let embed = new EmbedBuilder();
        if (interaction.options.getSubcommand() === "song") {
            let url = interaction.options.getString('url');

            const result = await client.player.search(url, {
                requestedBy: interaction.user,
                searchEngine: QueryType.YOUTUBE_VIDEO
            });

            console.log(result.tracks);

            if (result.tracks.length === 0) {
                await interaction.reply("no results found");
                return
            }

            const song = result.tracks[0];
            await queue.addTrack(song);

            embed
                .setDescription(`Added **[${song.title}](${song.url})** to the queue.`)
                .setThumbnail(song.thumbnail)
                .setFooter({ text: `Duration: ${song.duration}` });
        }

        else if (interaction.options.getSubcommand() === "playlist") {
            let url = interaction.options.getString('url');

            const result = await client.player.search(url, {
                requestedBy: interaction.SlashCommandBuilder,
                searchEngine: QueryType.YOUTUBE_PLAYLIST,
            });

            if (result.tracks.length === 0) {
                await interaction.reply("no playlist found");
                return
            }

            const playlist = result.playlist;
            await queue.addTracks(playlist);

            embed
                .setDescription(`Added **[${playlist.title}](${playlist.url})** to the queue.`)
                .setThumbnail(playlist.thumbnail)
                .setFooter({ text: `Duration: ${playlist.duration}` });
        }

        else if (interaction.options.getSubcommand() === "search") {
            let url = interaction.options.getString('searchterms');

            const result = await client.player.search(url, {
                requestedBy: interaction.SlashCommandBuilder,
                searchEngine: QueryType.AUTO,
            });

            if (result.tracks.length === 0) {
                await interaction.reply("no results found");
                return
            }

            const song = result.tracks[0]
            await queue.addTrack(song);

            embed
                .setDescription(`Added **[${song.title}](${song.url})** to the queue.`)
                .setThumbnail(song.thumbnail)
                .setFooter({ text: `Duration: ${song.duration}` });
        }

        if (!queue.playing) await queue.play();

        await interaction.reply({
            embeds: [embed]
        })
    }
}


    


    Is ffmpeg called differently now ? Am I doing something wrong ?

    


    I've tried different installs of Ffmpeg and none seem to work, so I'd imagine it originates somewhere in my code.