Recherche avancée

Médias (0)

Mot : - Tags -/presse-papier

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

Autres articles (60)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 0.2 est la première version de MediaSPIP stable.
    Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • Mise à disposition des fichiers

    14 avril 2011, par

    Par défaut, lors de son initialisation, MediaSPIP ne permet pas aux visiteurs de télécharger les fichiers qu’ils soient originaux ou le résultat de leur transformation ou encodage. Il permet uniquement de les visualiser.
    Cependant, il est possible et facile d’autoriser les visiteurs à avoir accès à ces documents et ce sous différentes formes.
    Tout cela se passe dans la page de configuration du squelette. Il vous faut aller dans l’espace d’administration du canal, et choisir dans la navigation (...)

Sur d’autres sites (6222)

  • How to work with data received from streaming services in my Java application ?

    24 novembre 2020, par gabriel garcia

    I'm currently trying to develop an "streaming client" as a way to organize multiple stream services (twitch, yt, mitele...) in a single desktop application written in Java.

    


    It basically relies on streamlink (which relies in ffmpeg) thanks to all it's features so my project could be defined as a frontend for streamlink.

    


    Straight to the point, one of the features I'd like to add it is the option to programatically record streams in the background and showing this video stream to the user when it's requested. Since there's also the possibility that the user wants to watch the stream without recording it, I'm forced to work with all that byte-like data sent from those streaming sources.

    


    So, the problem is basically that I do not know much about video coding/decoding/muxing/demuxing nor video theory like container structure, video formats and such.

    


    But the idea is to work with all the data sent from the stream source (let's say twitch, for example), read this bytes (I'm not sure what kind of information is sent to the client nor format) from the java.lang.Process's stdout and then present it to the client.

    


    Here's another problem : I don't know how to play video streams in JavaFX and I don't think it's even supported right now. So I would have to extract each frame and sound associated from the stdout and show them to the user each time a new frame is received (oups, another problem since I don't know when does each frame starts/ends since I'm reading each stdout's line).

    


    As a summary :

    


      

    • What kind of data am I receiving from the streaming source ?
    • 


    • How can I know when does each frame starts/stops ?
    • 


    • How can I extract the image and sound from each frame ?
    • 


    


    I hope I'm not asking too much and that you could shed some light upon my darkness.

    


  • FFMPEG merge mp4 file and mp3 file into mp4

    10 avril 2017, par Cường Trần

    I have video file in mp4 format (video.mp4), its length is 20 seconds. From 0 seconds to 10 seconds, the video has sound, and from 10 seconds to 20 seconds, there is no sound.

    I also have mp3 file (audio.mp3) and has length 10 seconds.

    I want to merge video.mp4 and audio.mp3 into result.mp4. The result.mp4 file should have video stream and its audio stream from 01 second to 10 seconds as original and audio stream from 10 seconds to 20 seconds of audio.mp3 as merged.

    I use the command to merge :

    ffmpeg -i video.mp4 -i audio.mp3 -filter_complex "aevalsrc=0:d=10[s1];[s1][1:a]concat=n=2:v=1:a=1[aout]" -c:v copy -map 0:v -map [aout] result.mp4

    But i get the result.mp4 with video : there is no sound from 01-10 seconds, only new sound from 10-20 seconds.

    It is the seem that my command don’t keep the sound from original mp4 file, it has removed it and just keep the new sound.

    Could you please help ?

  • FFMPEG- Duration of audio file is inaccurate

    17 septembre 2015, par Tony Than

    I have video file (mp4). I want to detach audio stream (AAC format) from that file and save in PC.
    With below code, Generated aac file canplay now on KM player, but can not play on VLC player. Information of duration displays on player is wrong.
    Please help me with this problem.

    err = avformat_open_input(input_format_context, filename, NULL, NULL);
    if (err < 0) {
       return err;
    }

    /* If not enough info to get the stream parameters, we decode the
      first frames to get it. (used in mpeg case for example) */
    ret = avformat_find_stream_info(*input_format_context, 0);
    if (ret < 0) {
       av_log(NULL, AV_LOG_FATAL, "%s: could not find codec parameters\n", filename);
       return ret;
    }

    /* dump the file content */
    av_dump_format(*input_format_context, 0, filename, 0);

    for (size_t i = 0; i < (*input_format_context)->nb_streams; i++) {
       AVStream *st = (*input_format_context)->streams[i];
       if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO) {
           *input_codec_context = st->codec;
           *input_audio_stream = st;

           FILE *file = NULL;
           file = fopen("C:\\Users\\MyPC\\Downloads\\Test.aac", "wb");
           AVPacket reading_packet;
           av_init_packet(&reading_packet);
           while (av_read_frame(*input_format_context, &reading_packet) == 0) {
               if (reading_packet.stream_index == (int) i) {

                   uint8_t adts_header[7];
                   unsigned int obj_type = 0;
                   unsigned int num_data_block = (reading_packet.size)/1024;
                   int rate_idx = st->codec->sample_rate, channels = st->codec->channels;

                    uint16_t frame_length;

                   // include the header length also
                    frame_length = reading_packet.size + 7;

                   /* We want the same metadata */
                   /* Generate ADTS header */
                   if(adts_header == NULL) return -1;
                   /* Sync point over a full byte */
                   adts_header[0] = 0xFF;
                   /* Sync point continued over first 4 bits + static 4 bits
                   * (ID, layer, protection)*/
                   adts_header[1] = 0xF1;
                   /* Object type over first 2 bits */
                   adts_header[2] = obj_type << 6;
                   /* rate index over next 4 bits */
                   adts_header[2] |= (rate_idx << 2);
                   /* channels over last 2 bits */
                   adts_header[2] |= (channels & 0x4) >> 2;
                   /* channels continued over next 2 bits + 4 bits at zero */
                   adts_header[3] = (channels & 0x3) << 6;
                   /* frame size over last 2 bits */
                   adts_header[3] |= (frame_length & 0x1800) >> 11;
                   /* frame size continued over full byte */
                   adts_header[4] = (frame_length & 0x1FF8) >> 3;
                   /* frame size continued first 3 bits */
                   adts_header[5] = (frame_length & 0x7) << 5;
                   /* buffer fullness (0x7FF for VBR) over 5 last bits*/
                   adts_header[5] |= 0x1F;
                   /* buffer fullness (0x7FF for VBR) continued over 6 first bits + 2 zeros
                   * number of raw data blocks */
                   adts_header[6] = 0xFA;
                   adts_header[6] |= num_data_block & 0x03; // Set raw Data blocks.

                   fwrite(adts_header, 1, 7, file);
                   fwrite(reading_packet.data, 1, reading_packet.size, file);
               }
               av_free_packet(&reading_packet);  
           }
           fclose(file);

           return 0;
       }
    }