Recherche avancée

Médias (91)

Autres articles (106)

  • Soumettre bugs et patchs

    10 avril 2011

    Un logiciel n’est malheureusement jamais parfait...
    Si vous pensez avoir mis la main sur un bug, reportez le dans notre système de tickets en prenant bien soin de nous remonter certaines informations pertinentes : le type de navigateur et sa version exacte avec lequel vous avez l’anomalie ; une explication la plus précise possible du problème rencontré ; si possibles les étapes pour reproduire le problème ; un lien vers le site / la page en question ;
    Si vous pensez avoir résolu vous même le bug (...)

  • Contribute to a better visual interface

    13 avril 2011

    MediaSPIP is based on a system of themes and templates. Templates define the placement of information on the page, and can be adapted to a wide range of uses. Themes define the overall graphic appearance of the site.
    Anyone can submit a new graphic theme or template and make it available to the MediaSPIP community.

  • Support de tous types de médias

    10 avril 2011

    Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)

Sur d’autres sites (8005)

  • How can I split an mp4 video with ffmpeg every time the volume is zero ?

    14 mars 2019, par Juan Pablo Fernandez

    I need to split a video into many smaller videos.
    I have tried PySceneDetect and its 2 scene detection methods don’t fit my need.

    The idea is to trigger a scene cut/break every time the volume is very low, every time audio level is less than a given parameter. I think overall RMS dB volume level is what I mean.

    The purpose is to split an mp4 video into many short videos, each smaller video with short dialog phrases.

    So far I have a command to get the overall RMS audio volume level.

    ffprobe -f lavfi -i amovie=01x01TheStrongestMan.mp4,astats=metadata=1:reset=1 -show_entries frame=pkt_pts_time:frame_tags=lavfi.astats.Overall.RMS_level,lavfi.astats.1.RMS_level,lavfi.astats.2.RMS_level -of csv=p=0

    How can I get only the minimum values for RMS level and its corresponding frame or time ?

    And then how can I use ffmpeg to split the video in many videos on every frame that corresponds to a minimum RMS ?

    Thanks.

  • lame mp3 change bitrate cpp

    23 mai 2019, par user2018761

    I need to change mp3 bitrate, I’m using lame for cpp project under Windows and Linux. I think I need to convert mp3 to wav and then wav to mp3 with desired bitrate.

    For wav to mp3 I already have the code (using lame) it works.
    For mp3 to wav there is problem with app crashing on hip_decode.
    Probably due to ID3 tags at the beginning of the file.
    How to skip the ID3 tags or is this a different problem ?

    This is code I’m using

    bool Helper::convert2Wav(QString fromFile, QString toFile) {
       int read, write;
       int ctn = 0;

       FILE *mp3_in =fopen(fromFile.toLocal8Bit().data(),"rb");
       //this should be WAV
       FILE *pcm_out =fopen(toFile.toLocal8Bit().data(),"wb");

       const int PCM_SIZE = 4096;
       const int MP3_SIZE = 4096;

       short int pcm_buffer[PCM_SIZE*2];
       short int pcm_buffer1[PCM_SIZE];
       short int pcm_buffer2[PCM_SIZE];
       unsigned char mp3_buffer[MP3_SIZE];


       memset(pcm_buffer, 0, sizeof(pcm_buffer));
       memset(pcm_buffer1, 0, sizeof(pcm_buffer1));
       memset(pcm_buffer2, 0, sizeof(pcm_buffer2));
       memset(mp3_buffer, 0, sizeof(mp3_buffer));

       lame_t lame = lame_init();
       hip_t l = hip_decode_init();
       lame_set_in_samplerate(lame, 44100);
       //lame_set_VBR(lame, vbr_default);
       //lame_set_mode(lame, MONO);
       lame_init_params(lame);

       qDebug()<<"start decoding";

       do {
           ctn += 4096;
           qDebug()<<"a message:"</read = hip_decode(l, mp3_buffer, MP3_SIZE, pcm_buffer1,pcm_buffer2);

           //memcpy(pcm_buffer, pcm_buffer1, sizeof(pcm_buffer1));
           //memcpy(&pcm_buffer[PCM_SIZE], pcm_buffer2, sizeof(pcm_buffer2));
           //write = lame_encode_buffer_interleaved(lame, pcm_buffer, read,mp3_buffer, MP3_SIZE);
           //fwrite(pcm_buffer, 1, sizeof(pcm_buffer), pcm_out);

       } while (read != 0);

       hip_decode_exit(l);
       lame_close(lame);
       fclose(pcm_out);
       fclose(mp3_in);

       return true;
    }

    It is crashing with an output :

    start decoding
    a message: 4096
    a message: 8192
    a message: 12288
    1   ??                                 0x7ffff7b8f0b5    
    2   hip_decode1_headers                0x7ffff7b8f34b    
    3   hip_decode1_headers                0x7ffff7b8f385    
    4   hip_decode_headers                 0x7ffff7b8f42d    
    5   hip_decode                         0x7ffff7b8f47c    
    6   Helper::convert2Wav helper.cpp 498 0x5555555b0fe7    
    7   ??                                 0x4490551063006a0  

           MP3_SIZE    258346945   int
           PCM_SIZE    234884892   int
           ctn 189860957   int
           l   1050198802094820962 hip_t
           lame    1165886731226582744 lame_t
           mp3_buffer  "\005\0029lM^J\035�xo�R����(����Rj\172175r�V�����ԡCb٥���0a�ע�r�4�A��7Xj�Q0u�\033Os��L5�S$D2\002\016� UxCp\014s��08\004+7��@"�r"... (4096)   unsigned char[4096]
           mp3_in  0xe0b0e1e0e060d4a   FILE*
           pcm_buffer  @0x7fffffff89a0 short[8192]
           pcm_buffer1 @0x7fffffff69a0 short[4096]
           pcm_buffer2 @0x7fffffff49a0 short[4096]
           pcm_out 0xc460bb00bb40c82   FILE*
           read    229772669   int
           write   <optimized out="out">
    </optimized>

    it seems this is not ID3 issue, I have used this code https://searchcode.com/file/31230698/ID3.cpp to read ID3 and it shows there is no ID3 tags
    But still crashing at the same point :

    Has ID3v2 Tag: No
     Tag size: 0
    start decoding skip tag_size: 0
    a message: 4096
    a message: 8192
    a message: 12288
  • lame mp3 to wav crashing (need to skip ID3 tag ?)

    18 janvier 2018, par user2018761

    I need to change mp3 bitrate, I’m using lame for cpp project under Windows and Linux. I think I need to convert mp3 to wav and then wav to mp3 with desired bitrate.
    For wav to mp3 I already have the code (using lame) it works.
    For mp3 to wav there is problem with app crashing on hip_decode.
    Probably due to ID3 tags at the beginning of the file.
    How to skip the ID3 tags or is this a different problem ?

    This is code I’m using

    bool Helper::convert2Wav(QString fromFile, QString toFile) {
       int read, write;
       int ctn = 0;

       FILE *mp3_in =fopen(fromFile.toLocal8Bit().data(),"rb");
       //this should be WAV
       FILE *pcm_out =fopen(toFile.toLocal8Bit().data(),"wb");

       const int PCM_SIZE = 4096;
       const int MP3_SIZE = 4096;

       short int pcm_buffer[PCM_SIZE*2];
       short int pcm_buffer1[PCM_SIZE];
       short int pcm_buffer2[PCM_SIZE];
       unsigned char mp3_buffer[MP3_SIZE];


       memset(pcm_buffer, 0, sizeof(pcm_buffer));
       memset(pcm_buffer1, 0, sizeof(pcm_buffer1));
       memset(pcm_buffer2, 0, sizeof(pcm_buffer2));
       memset(mp3_buffer, 0, sizeof(mp3_buffer));

       lame_t lame = lame_init();
       hip_t l = hip_decode_init();
       lame_set_in_samplerate(lame, 44100);
       //lame_set_VBR(lame, vbr_default);
       //lame_set_mode(lame, MONO);
       lame_init_params(lame);

       qDebug()&lt;&lt;"start decoding";

       do {
           ctn += 4096;
           qDebug()&lt;&lt;"a message:"&lt;/read = hip_decode(l, mp3_buffer, MP3_SIZE, pcm_buffer1,pcm_buffer2);

           //memcpy(pcm_buffer, pcm_buffer1, sizeof(pcm_buffer1));
           //memcpy(&amp;pcm_buffer[PCM_SIZE], pcm_buffer2, sizeof(pcm_buffer2));
           //write = lame_encode_buffer_interleaved(lame, pcm_buffer, read,mp3_buffer, MP3_SIZE);
           //fwrite(pcm_buffer, 1, sizeof(pcm_buffer), pcm_out);

       } while (read != 0);

       hip_decode_exit(l);
       lame_close(lame);
       fclose(pcm_out);
       fclose(mp3_in);

       return true;
    }

    It is crashing with an output :

    start decoding
    a message: 4096
    a message: 8192
    a message: 12288
    1   ??                                 0x7ffff7b8f0b5    
    2   hip_decode1_headers                0x7ffff7b8f34b    
    3   hip_decode1_headers                0x7ffff7b8f385    
    4   hip_decode_headers                 0x7ffff7b8f42d    
    5   hip_decode                         0x7ffff7b8f47c    
    6   Helper::convert2Wav helper.cpp 498 0x5555555b0fe7    
    7   ??                                 0x4490551063006a0  

           MP3_SIZE    258346945   int
           PCM_SIZE    234884892   int
           ctn 189860957   int
           l   1050198802094820962 hip_t
           lame    1165886731226582744 lame_t
           mp3_buffer  "\005\0029lM^J\035�xo�R����(����Rj\172175r�V�����ԡCb٥���0a�ע�r�4�A��7Xj�Q0u�\033Os��L5�S$D2\002\016� UxCp\014s��08\004+7��@"�r"... (4096)   unsigned char[4096]
           mp3_in  0xe0b0e1e0e060d4a   FILE*
           pcm_buffer  @0x7fffffff89a0 short[8192]
           pcm_buffer1 @0x7fffffff69a0 short[4096]
           pcm_buffer2 @0x7fffffff49a0 short[4096]
           pcm_out 0xc460bb00bb40c82   FILE*
           read    229772669   int
           write   <optimized out="out">
    </optimized>

    it seems this is not ID3 issue, I have used this code https://searchcode.com/file/31230698/ID3.cpp to read ID3 and it shows there is no ID3 tags
    But still crashing at the same point :

    Has ID3v2 Tag: No
     Tag size: 0
    start decoding skip tag_size: 0
    a message: 4096
    a message: 8192
    a message: 12288

    Best Regards

    Marek