Recherche avancée

Médias (0)

Mot : - Tags -/api

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

Autres articles (51)

  • Les formats acceptés

    28 janvier 2010, par

    Les commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
    ffmpeg -codecs ffmpeg -formats
    Les format videos acceptés en entrée
    Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
    Les formats vidéos de sortie possibles
    Dans un premier temps on (...)

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

  • Utilisation et configuration du script

    19 janvier 2011, par

    Informations spécifiques à la distribution Debian
    Si vous utilisez cette distribution, vous devrez activer les dépôts "debian-multimedia" comme expliqué ici :
    Depuis la version 0.3.1 du script, le dépôt peut être automatiquement activé à la suite d’une question.
    Récupération du script
    Le script d’installation peut être récupéré de deux manières différentes.
    Via svn en utilisant la commande pour récupérer le code source à jour :
    svn co (...)

Sur d’autres sites (5644)

  • m4a/mp3 files to wav for Bing Speech API

    17 décembre 2018, par Waqas

    Bing Speech API only accepts wav files so I have been trying to convert m4a (Skype) and mp3 (Facebook) audio files I am getting in my chatbot to wav format. I am using fluent-ffmpeg in node.js.

    For now, I am downloading the audio file, converting it to wav and returning the piped output for use ahead.

    if (attachment.contentType === 'audio/x-m4a') {
     request.get(attachment.contentUrl).pipe(fs.createWriteStream('file.m4a'));
     var command = ffmpeg('file.m4a')
           .toFormat('wav')
           .on('error', function (err) {
               console.log('An error occurred: ' + err.message);
           })
           .on('progress', function (progress) {
               // console.log(JSON.stringify(progress));
               console.log('Processing: ' + progress.targetSize + ' KB converted');
           })
           .on('end', function () {
               console.log('Processing finished !');
           });

     return command.pipe();
    }

    Right now, the conversion works when I send the m4a file through the botframework-emulator on my pc. But when I specify my pc as the endpoint (through ngrok) and try to send the m4a file from the chat test at the bot framework developer end, ffmpeg returns an error :

    An error occurred: ffmpeg exited with code 1: file.m4a: Invalid data found when processing input

    But when I play the downloaded m4a file, it plays alright.

    The content URL is https in the second case if that matters.

    Kindly help me with two things :

    1. Downloading, Converting and Returning without storing anything on my end
    2. Downloading/Accessing m4a/mp3 files properly

    I am new to streams, pipes and ffmpeg and all the above code is after googling.

  • FFmpeg truncates untrunc'ed video

    18 mars 2020, par petrpulc

    Background : Colleague's Panasonic consumer camera had issues with high-capacity SD card and yielded two different types of truncated files (mp4 and mdt) with both header and index corrupted. Both were "fixable" with following steps :

    



      

    1. Locate with hex editor the ascii sequence "mdat" in both a truncated and a corresponding known good file. In mp4 the "mdat" is quite deep in the file as it contains some (but bad) headers, the mdt type almost starts with it.
    2. 


    3. Replace everything up to the "mdat" sequence with known good header. BUT this also means that metadata on length are copied over.
    4. 


    5. Run https://github.com/ponchio/untrunc on the file with corrected header (it refused to run on original files).
    6. 


    7. Profit ! VLC plays the file fine, ffprobe shows correct length. BUT ffmpeg encoding stops at the end timecode of the file I taken the known good header from in step 2.
    8. 


    9. A somewhat ugly solution is to recode the file in VLC (video copy seems to be breaking file up again).
    10. 


    



    I am wondering if I overlooked something ; big time. I guess I do, but simple timecode operations on input file do not seem to have any effect at all.

    



    Is there a way to persuade ffmpeg to encode the whole file that ffprobe and VLC see ?

    



    Files may be provided for analysis on personal basis only, sorry.

    


  • Get rtsp error when connection is corrupted ?

    9 septembre 2013, par vominhtien961476

    I using ffmpeg libavformat to record RTSP stream from the Panasonic Camera. I can get both audio and video stream frome that everything is fine until there is a corruption between server and camera.

    • the "av_read_frame" function did not return anything I think it has been waiting to received frame from camera however, it cannot due to corrupted connection. I expected that this function should complete its task and return error (connection failure or something like that) but it did not and stuck forever.
    • the same problem with "avformat_open_input" function when the connection is corrupted. Therefore, the left functions cannot be processed

    Anyone can explain to me what the problem's here and what wrong with my code. How can I avoid the deadlock for this case.

    (Enviroment : Win 7, VS 2010, FFMPEG : 20130227-git-5d2f2c7, LAN network)

       int main(int argc, char** argv)
    {

       AVFormatContext* context = avformat_alloc_context();
       int video_stream_index;

       av_register_all();
       avcodec_register_all();
       avformat_network_init();

       //open rtsp
       if(avformat_open_input(&context, "rtsp://username:12345/192.168.1.253:554/mpeg4/640x480",NULL,NULL) != 0)
       {
           return EXIT_FAILURE;
       }

       if(avformat_find_stream_info(context,NULL) < 0)
       {
           return EXIT_FAILURE;
       }
       AVPacket packet;
       av_init_packet(&packet);
       //start reading packets from stream and write them to file

       while(av_read_frame(context,&packet))
       {
          //Store packet here
       }
       av_free_packet(&packet);
       return (EXIT_SUCCESS);
    }