Recherche avancée

Médias (1)

Mot : - Tags -/lev manovitch

Autres articles (68)

  • Ajouter notes et légendes aux images

    7 février 2011, par

    Pour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
    Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
    Modification lors de l’ajout d’un média
    Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...)

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

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

  • Révision 90209 : div au lieu de ul/li

    14 juin 2015, par cedric@yterium.com
  • Révision 90230 : div au lieu de ul/li

    14 juin 2015, par cedric@yterium.com
  • Cannot use the codec copy in order to convert a webm file into mp4

    13 mai 2023, par Joel Smith

    I created a simple frontend code which records the user camera, and I setup the MediaRecorder Api and once the user clicks on the stop button, it stops the recording and ondataavailable it sends the recorded video through websocket to the python script.

    


    recorder.ondataavailable = (event) => {
      console.log('Data sending')
      socket.send(event.data);
      
    }


    


    In the python script

    


    
async for message in websocket:
        print(f"Received message:")
        with open('recorded_video.webm', 'wb') as f:
            f.write(message)

        print("Video saved as recorded_video.webm")

        # Convert the video using FFmpeg
        conversion_command = ['ffmpeg', '-i', 'recorded_video_by.webm', '-c:v', 'copy', 'output.mp4']
      
        subprocess.run(conversion_command, check=True)
        print("Video converted to output.mp4")


    


    I first save the video in the file system and then use the ffmpeg as a subprocess to input the video and copy the exact codec and output the video.
When I run the above code with the codec -c:v libx264 it works succesfully (but there is some quality loss in the final video), but when I try using the -c:v copy codec, it outputs this error :-

    


    subprocess.CalledProcessError: Command '['ffmpeg', '-i', 'recorded_video.webm', '-codec:v', 'copy', 'output.mp4']' returned non-zero exit status 22.


    


    [mp4 @ 000002660441e4c0] Could not find tag for codec vp8 in stream #0, codec not currently supported in container
[out#0/mp4 @ 00000266043f4d40] Could not write header (incorrect codec parameters ?): Invalid argument


    


    Terminal

    


    EDIT 


    


    I try using the fluent-ffmpeg (nodejs library), there I specify the exact same arguments and it was working fine

    


    const { Readable, Writable } = require('stream');  
const readable = Readable.from([data]);
ffmpeg()
        .input(readable)
        .inputFormat('webm')
        .outputOptions('-c:v copy')
        
        .outputFormat('mp4')
        .output('something/discordtest.mp4')
        .on('start', (command) => {
          
          console.log('The final command is: ' + command);
        })
        .on('end', () => {
          
          console.log('Video encoded successfully.');
        })
        .run();


    


    Here is the mp4 video produced by ffmpeg nodejs :-
discordtest.mp4