Recherche avancée

Médias (0)

Mot : - Tags -/page unique

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (52)

  • Keeping control of your media in your hands

    13 avril 2011, par

    The vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
    While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
    MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
    MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...)

  • 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

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

Sur d’autres sites (6875)

  • Am I missing a timeout param in FFMPEG ?

    5 mai 2020, par Dave Stein

    I'm running an ffmpeg command like this :

    



    ffmpeg -loglevel quiet -report -timelimit 15 -timeout 10 -protocol_whitelist file,http,https,tcp,tls,crypto -i ${inputFile} -vframes 1 ${outputFile} -y

    



    This is running in an AWS Lambda function. My Lambda timeout is at 30 seconds. For some reason I am getting "Task timed out" messages still. I should note I log before and after the command, so I know it's timing out during this task.

    



    Update

    



    In terms of the entire lambda execution I do the following :

    



      

    • Invoke a lambda to get an access token. This lambda makes on API request. It has a timeout of 5 seconds. The max time was 660MS for one request.

    • 


    • Make another API request to verify data. The max time was 1.6 seconds.

    • 


    • Run FFMPEG

    • 


    



    timelimit is supposed to Exit after ffmpeg has been running for duration seconds in CPU user time.. Theoretically this shouldn't run more than 15 seconds then, plus maybe 2-3 more before the other requests.

    



    timeout is probably superfluous here. There were a lot of definitions for it in the manual, but I think that was mainly waiting on input ? Either way, I'd think timelimit would cover my bases.

    



    Update 2

    



    I checked my debug log and saw this :

    



    Reading option '-timelimit' ... matched as option 'timelimit' (set max runtime in seconds) with argument '15'.
Reading option '-timeout' ... matched as AVOption 'timeout' with argument '10'.


    



    Seems both options are supported by my build

    



    Update 2

    



    I have updated my code with a lot of logs. I definitively see the FFMPEG command as the last thing that executes, before stalling out for the 30 second timeout

    



    Update 3
I can reproduce the behavior by pointing at a track instead of full manifest. I have set the command to this :

    



    ffmpeg -loglevel debug -timelimit 5 -timeout 5  -i 'https://streamprod-eastus-streamprodeastus-usea.streaming.media.azure.net/0c495135-95fa-48ec-a258-4ba40262e1be/23ab167b-9fec-439e-b447-d355ff5705df.ism/QualityLevels(200000)/Manifest(video,format=m3u8-aapl)' -vframes 1 temp.jpg -y

    



    A few things here :

    



      

    1. I typically point at the actual manifest (not the track), and things usually run much faster
    2. 


    3. I have lowered the timelimit and timeout to 5. Despite this, when i run a timer, the command runs for 15 seconds every time. It outputs a bunch of errors, likely due to this being track rather than full manifest, and then spits out the desired image.
    4. 


    



    The full output is at https://gist.github.com/DaveStein/b3803f925d64dd96cd45ae9db5e5a4d0

    


  • 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 ?

    


  • ffmpeg live stream transcoding. A/V sync issues on fast camera movement

    21 août 2020, par Kelsnare
      

    1. I create a webrtc peer connection with my server(only stun)
    2. 


    3. Using pion webrtc for the server
    4. 


    5. I write the received RTP packets as VP8 and opus streams, as described here, to two pipes (the writers ; created with os.Pipe() in golang)
    6. 


    7. The read ends of these two pipes are received by ffmpeg as inputs (via exec.Command.ExtraFiles) for transcoding using libx264 and aac into a single stream. The command :
    8. 


    


    ffmpeg -re -i pipe:3 -re -r pipe:4 -c:a aac -af aresample=48000 -c:v libx264 -x264-params keyint=48:min-keyint=24 -profile:v main -preset ultrafast -tune zerolatency -crf 20 -fflags genpts -avoid_negative_ts make_zero -vsync vfr -map 0:0,0:0 -map 1:0,0:0 -f matroska -strict -2 pipe:5


    


      

    1. The above command outputs to a pipe(:5) the read end of which is being taken as input by the following :
    2. 


    


    ffmpeg -hide_banner -y -re -i pipe:3 -sn -vf scale=-1:'min(ih,360)' -c:v libx264 -pix_fmt yuv420p -ca aac -b:a 128k -b:v 1400k -maxrate 1498k -bufsize 2100k -hls_time 1 -hls_playlist_type event -hls_base_url /workdir/streamID/360p -hls_segment_filename /workdir/streamID/360p/360_%%03d.ts -f hls /workdir/streamID/360p.m3u8


    


      

    1. This works fine as long as there are no movements of my webcam. The moment that happens the video speed suddenly increases for a split second and audio delay gets introduced. This delay keeps increasing each time I shake my webcam.
    2. 


    


    The first command in point 4 above - if written to a file separately will be absolutely fine, in terms of a/v sync, even with vigorous camera shaking. The weird audio delay is only when transcoding for hls output irrespective of whether I'm actually viewing it live or playing it back later.

    


    This is my first time working with ffmpeg/hls/webrtc - would be really helpful if I could be pointed in the correct direction at least to be able to debug this or even know why this happens. Any and all help is greatly appreciated