Recherche avancée

Médias (0)

Mot : - Tags -/alertes

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

Autres articles (43)

  • La file d’attente de SPIPmotion

    28 novembre 2010, par

    Une file d’attente stockée dans la base de donnée
    Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
    Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...)

  • Ajouter des informations spécifiques aux utilisateurs et autres modifications de comportement liées aux auteurs

    12 avril 2011, par

    La manière la plus simple d’ajouter des informations aux auteurs est d’installer le plugin Inscription3. Il permet également de modifier certains comportements liés aux utilisateurs (référez-vous à sa documentation pour plus d’informations).
    Il est également possible d’ajouter des champs aux auteurs en installant les plugins champs extras 2 et Interface pour champs extras.

  • Possibilité de déploiement en ferme

    12 avril 2011, par

    MediaSPIP peut être installé comme une ferme, avec un seul "noyau" hébergé sur un serveur dédié et utilisé par une multitude de sites différents.
    Cela permet, par exemple : de pouvoir partager les frais de mise en œuvre entre plusieurs projets / individus ; de pouvoir déployer rapidement une multitude de sites uniques ; d’éviter d’avoir à mettre l’ensemble des créations dans un fourre-tout numérique comme c’est le cas pour les grandes plate-formes tout public disséminées sur le (...)

Sur d’autres sites (5345)

  • FFmpeg massive data loss when writing large data and swapping segments

    25 avril 2023, par Bohdan Petrenko

    I have an ffmpeg process running which continiously writes audio data to two 30 seconds (for testing, I'm actually planning to use 5 minutes) segments. The problem is that when I write some audio data with length more than size of two segments (60 seconds), 8-17 seconds of audio is lost. Here is how I run FFmpeg and write data :

    


        _ffmpeg = Process.Start(new ProcessStartInfo
    {
        FileName = "ffmpeg",
        Arguments = 
            $"-y -f s16le -ar 48000 -ac {Channels} -i pipe:0 -c:a libmp3lame -f segment -segment_time {BufferDuration} -segment_format mp3 -segment_wrap 2 -reset_timestamps 1 -segment_list \"{_segmentListPath}\" \"{segmentName}\"",
        UseShellExecute = false,
        RedirectStandardInput = true
    })!;
    // Channels is usually 1, BufferDuration is 30


    


    And here is how I write data :

    


    public async Task WriteSilenceAsync(int amount)
{
    if (amount > _size) amount = _size; // _size is 48000 * 1 * 2 * 30 * 2 = 5760000 (size of 1 minute of audio)
    
    var silence = _silenceBuffer.AsMemory(0, amount);
    await _ffmpeg.StandardInput.BaseStream.WriteAsync(silence);
}


    


    I tried to change the ffmpeg parameters and ways I write data. But I haven't found the solution.

    


    I'm sure that the problem is caused by ffmpeg segments, because if I disable segmenting and write audio to a single file, there are no problems with data loss or audio missmatch. I also sure that amount of silence to add in WriteSilenceAsync() method is calculated right. I'm not sure if the problem appears with data length more than 30 seconds but less then 1 minute, but I think it doesn't.

    


    I don't know how to solve this problem and would be glad to see any suggestions or solutions.

    


  • Filename in android rejected by ffmpeg command

    28 avril 2020, par ark1974

    Planning to use ffmpeg in Android for A/V conversion. Installed Android Studio 3.5.3. I am fairly new to Android development and the folder names, unlike in windows system, is fairly confusing to me. I am able to build the gradle without any error but the fetched pathname is rejected by ffmpeg commandline.

    



    Questions :

    



    1) Resulting path_name shows both pathname and filename which is cool. Is the resulting path_name correct or expected ? However, ffmpeg raised error flag citing that directory/file do not exist corresponding to the resulting path_name.

    



    2) Inside android properties, the path starts with "Device storage/..." but Android Studio command starts with "/document/". Why I see this variation ?

    



    3) onActivityResult() do not work with @override private prefix but works with @override public, is it expected ? Many examples on internet, however use private though.

    



    4) MediaStore.Audio.Media.DATA code do not work at all, is it deprecated in Android 3.5.5 ?

    



    Java code :

    



    @Override public void onActivityResult(int requestCode, int resultCode, Intent data) {
        if(requestCode == 7 &&  resultCode == RESULT_OK){    
                    path_name = data.getData().getPath();    
        }
    }


    



    Result :

    



    path_name = "/document/primary:WhatsApp/Media/WhatsApp Audio/AUD-20200402-WA0006.mp3" **strong text**


    


  • Ffmpeg "no directory found" when passing in a path to the mp3 file

    21 février 2020, par Eugene Levinson

    How my code should work :

    Join the voice channel with the user who sent the command

    Download the video using the link

    Save it as random 16 digit number .mp3

    Then pass the path to the FFmpeg player to play

    My code :

    The random 16 digit number

    def get_digits(amount):
       st = ""
       for i in range(amount):
           n = random.randint(0,9)
           st = st + str(n)

       return int(st)

    Downloading the file

    def get_path(url):

       #checking if the directory exists
       os.makedirs('Music', exist_ok=True)

       title = YouTube(url).streams.get_highest_resolution().title
       current_directory = pathlib.Path(__file__).parent.absolute()

       print(str(current_directory))

       #name for the music
       name = str(get_digits(16))

       YouTube(url).streams.filter(only_audio=True).order_by("bitrate").desc().first().download("Music",name )
       return str(str(current_directory) + "/Music/" + name + ".mp3")

    This gets called on command play

    #function to connect to a voice chat
    async def join_auth(ctx):
       try:
           channel = ctx.author.voice.channel
           vc = await channel.connect()
           return vc
       except Exception as e:
           logg("Exception occured when joining a voice channel: " + str(e),"error",str(ctx.guild.name), str(ctx.guild.id))

    The error I get :
    C:\Users\Eugene\Desktop\Discord bot/Music/4343941300524002.mp3: No such file or directory
    But the directory C:\Users\Eugene\Desktop\Discord bot\Music exists and it does contain the 4343941300524002.mp3 file. Does anyone know why do I get the error ?