Recherche avancée

Médias (0)

Mot : - Tags -/metadatas

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

Autres articles (24)

  • Installation en mode ferme

    4 février 2011, par

    Le mode ferme permet d’héberger plusieurs sites de type MediaSPIP en n’installant qu’une seule fois son noyau fonctionnel.
    C’est la méthode que nous utilisons sur cette même plateforme.
    L’utilisation en mode ferme nécessite de connaïtre un peu le mécanisme de SPIP contrairement à la version standalone qui ne nécessite pas réellement de connaissances spécifique puisque l’espace privé habituel de SPIP n’est plus utilisé.
    Dans un premier temps, vous devez avoir installé les mêmes fichiers que l’installation (...)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

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

  • FFMPEG Custom Read function reads all the data

    15 juillet 2014, par Hafedh Haouala

    I’m trying to implement a custom read function for ffmpeg that will retrieve a buffer from local video ( from device in the future) and then deocde this buffer, etc..

    So, here’s my read function

    int IORead(void *opaque, uint8_t *buf, int buf_size)
    {
    FileReader* datrec = (FileReader*)opaque;
    int ret = datrec->Read(buf, buf_size);
    return ret;
    }

    As for the FileReader :

    class FileReader {
    protected:
     int fd;
    public:
     FileReader(const char *filename){ //, int buf_size){
         fd = open(filename, O_RDONLY);
         };

    ~FileReader() {
          close(fd);
        };

    int Read(uint8_t *buf, int buf_size){
      int len = read(fd, buf, buf_size);
      return len;
         };
    };

    and for the my execution :

    FileReader *receiver = new FileReader("/sdcard/clip.ts");

    AVFormatContext *avFormatContextPtr = NULL;
    this->iobuffer = (unsigned char*) av_malloc(4096 + FF_INPUT_BUFFER_PADDING_SIZE);
    avFormatContextPtr = avformat_alloc_context();
    avFormatContextPtr->pb = avio_alloc_context(this->iobuffer, 4096, 0, receiver, IORead, NULL, NULL);
    avFormatContextPtr->pb->seekable    = 0;

    int err = avformat_open_input(&avFormatContextPtr, "", NULL, NULL) ;
    if( err != 0)
    {...}
    // Decoding process
     {...}

    However, once the avformat_open_input() is called, the read function IORead is called and keeps reading the file clip.ts until it reaches its end and only then it exit and the decoding process is reached with no data to decode ( as all of it was consumed)

    I don’t know what is the problem especially that this code

    AVFormatContext *avFormatContextPtr = NULL;
    int err = avformat_open_input(&avFormatContextPtr, "/sdcard/clip.ts", NULL, NULL) ;

    isn’t blocking untill the end of the file is reached.

    Am I missing something ?
    I appreciate your help.

  • how to create an http live stream ( broadcast ) from a segmented mp4 without sound defects

    18 août 2020, par user3621958

    tl ;dr - concatenating independent short videos to an hls playlist creates sound defects. A 'Tick' sound at the concatenation point. How do I avoid it ?

    



    I have a process that emits a 4 second MOV video every 3 seconds.
Those 4s videos are segments of a longer video. But they are completely independent. 
I want to be able to play the Longer video before it exists.
In order to achieve that I'm creating an HLS even playlist
hls event playlist
I first convert the first 4s video to hls using ffmpeg
by running :

    



    fmpeg -y -i  output0.mov -c:a aac -b:a 128000 -r:a 44100 -c:v libx264  -x264-params keyint=150:scenecut=0  -hls_flags omit_endlist -hls_playlist_type -b:t 800k -maxrate 2000k -bufsize 1200k -f hls -pix_fmt yuv420p -g 5 -hls_time 5 one.m3u8


    



    this will create an .ts file and and an .m3u8 playlist

    



    #EXT-X-PLAYLIST-TYPE:EVENT
#EXT-X-TARGETDURATION:4
#EXT-X-VERSION:4
#EXT-X-MEDIA-SEQUENCE:0
#EXTINF:4.00,
part1.ts


    



    notice the : -hls_flags omit_endlist -hls_playlist_type event flags. They make sure the playlist is an EVENT playlist and that it has no EXT-X-ENDLIST at the end of the list ( this makes the player to start polling the .m3u8 file in order to "wait" for new .ts chunks to be appended to the playlist )

    



    When the next 4s video is available I'm running the ffmpeg command again.
and then "merge" the new .m3u8 file to the old .m3u8 file. 
by appending the new .ts file to the playlist.

    



    #EXT-X-PLAYLIST-TYPE:EVENT
#EXT-X-TARGETDURATION:4
#EXT-X-VERSION:4
#EXT-X-MEDIA-SEQUENCE:0
#EXTINF:4.00,
part1.ts <- first 4 seconds chunk
#EXTINF:4.00,
part2.ts <- second ( new ) 4 second chunk


    



    since the player is polling the .m3u8 file , when its updated it fetches the second .ts file (part2.ts)
and plays it.

    



    The only issue is that sound defect. exactly at the concatenation point of the two videos. ( at second 4 ) in this example.
The video has no visible defects.
I suspect this happens because of an encoding problem. ( every mov video is encoded to hls separately ) 
But I must play the video after 4 seconds. ( can't wait for the whole duration to be ready )

    



    What am I doing wrong ? How to encode the hls chunks to avoid the sound defect ?

    



    In ffmpeg documentation I saw :
Segment the input file, and create an M3U8 live playlist (can be used as live HLS source) :

    



    ffmpeg -re -i in.mkv -codec copy -map 0 -f segment -segment_list playlist.m3u8 \
-segment_list_flags +live -segment_time 10 out%03d.mkv


    



    My problem is that i don't have the entire video. Its generated chunk by chunk.

    


  • Révision 99151 : Fix https://core.spip.net/issues/3520 : déplier les blocs des referers uniquement...

    13 août 2016, par brunobergot@gmail.com

    Opera est un peu concon car il déclenche l’event onclick si on utilise le clic milieu