Recherche avancée

Médias (29)

Mot : - Tags -/Musique

Autres articles (71)

  • Support audio et vidéo HTML5

    10 avril 2011

    MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
    Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
    Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
    Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...)

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

  • De l’upload à la vidéo finale [version standalone]

    31 janvier 2010, par

    Le chemin d’un document audio ou vidéo dans SPIPMotion est divisé en trois étapes distinctes.
    Upload et récupération d’informations de la vidéo source
    Dans un premier temps, il est nécessaire de créer un article SPIP et de lui joindre le document vidéo "source".
    Au moment où ce document est joint à l’article, deux actions supplémentaires au comportement normal sont exécutées : La récupération des informations techniques des flux audio et video du fichier ; La génération d’une vignette : extraction d’une (...)

Sur d’autres sites (8159)

  • Anomalie #4187 : Connecté en Anglais (langue principale français) pas de bouton pour ajouter les p...

    4 octobre 2018, par Jacques Bouthier

    Bon, après quelques essais :
    - en fonction des plugins sélectionnés par le critère de recherche parfois tout fonctionne correctement. Par exemple si je recherche avec le critère de recherche "media", 5 plugins sont affichés de façon correcte et si j’en sélectionne un les boutons "upload" et "upload and activate" sont bien présents.
    - si je recherche (avec comme langue l’anglais) des plugins avec comme critère "edit" ou "encore" ou "modele" ... des plugins remontent qui cassent la présentation et du coup les boutons upload ne sont pas dispos.

    Le seul point commun que j’ai trouvé dans le paquet.xml de ces plugins est la présence de caractères comme par exemple pour afficher un slogan au lieu de le mettre comme recommandé comme chaine de langue dans un fichier de langue.

    Je ne m’explique pas pourquoi ce code casserait le fonctionnement en trad et pas en français...

  • How do I use FFMPEG/libav to access the data in individual audio samples ?

    15 octobre 2022, par Breadsnshreds

    The end result is I'm trying to visualise the audio waveform to use in a DAW-like software. So I want to get each sample's value and draw it. With that in mind, I'm currently stumped by trying to gain access to the values stored in each sample. For the time being, I'm just trying to access the value in the first sample - I'll build it into a loop once I have some working code.

    


    I started off by following the code in this example. However, LibAV/FFMPEG has been updated since then, so a lot of the code is deprecated or straight up doesn't work the same anymore.

    


    Based on the example above, I believe the logic is as follows :

    


      

    1. get the formatting info of the audio file
    2. 


    3. get audio stream info from the format
    4. 


    5. check that the codec required for the stream is an audio codec
    6. 


    7. get the codec context (I think this is info about the codec) - This is where it gets kinda confusing for me
    8. 


    9. create an empty packet and frame to use - packets are for holding compressed data and frames are for holding uncompressed data
    10. 


    11. the format reads the first frame from the audio file into our packet
    12. 


    13. pass that packet into the codec context to be decoded
    14. 


    15. pass our frame to the codec context to receive the uncompressed audio data of the first frame
    16. 


    17. create a buffer to hold the values and try allocating samples to it from our frame
    18. 


    


    From debugging my code, I can see that step 7 succeeds and the packet that was empty receives some data. In step 8, the frame doesn't receive any data. This is what I need help with. I get that if I get the frame, assuming a stereo audio file, I should have two samples per frame, so really I just need your help to get uncompressed data into the frame.

    


    I've scoured through the documentation for loads of different classes and I'm pretty sure I'm using the right classes and functions to achieve my goal, but evidently not (I'm also using Qt, so I'm using qDebug throughout, and QString to hold the URL for the audio file as path). So without further ado, here's my code :

    


    // Step 1 - get the formatting info of the audio file
    AVFormatContext* format = avformat_alloc_context();
    if (avformat_open_input(&format, path.toStdString().c_str(), NULL, NULL) != 0) {
        qDebug() << "Could not open file " << path;
        return -1;
    }

// Step 2 - get audio stream info from the format
    if (avformat_find_stream_info(format, NULL) < 0) {
        qDebug() << "Could not retrieve stream info from file " << path;
        return -1;
    }

// Step 3 - check that the codec required for the stream is an audio codec
    int stream_index =- 1;
    for (unsigned int i=0; inb_streams; i++) {
        if (format->streams[i]->codecpar->codec_type == AVMEDIA_TYPE_AUDIO) {
            stream_index = i;
            break;
        }
    }

    if (stream_index == -1) {
        qDebug() << "Could not retrieve audio stream from file " << path;
        return -1;
    }

// Step 4 -get the codec context
    const AVCodec *codec = avcodec_find_decoder(format->streams[stream_index]->codecpar->codec_id);
    AVCodecContext *codecContext = avcodec_alloc_context3(codec);
    avcodec_open2(codecContext, codec, NULL);

// Step 5 - create an empty packet and frame to use
    AVPacket *packet = av_packet_alloc();
    AVFrame *frame = av_frame_alloc();

// Step 6 - the format reads the first frame from the audio file into our packet
    av_read_frame(format, packet);
// Step 7 - pass that packet into the codec context to be decoded
    avcodec_send_packet(codecContext, packet);
//Step 8 - pass our frame to the codec context to receive the uncompressed audio data of the first frame
    avcodec_receive_frame(codecContext, frame);

// Step 9 - create a buffer to hold the values and try allocating samples to it from our frame
    double *buffer;
    av_samples_alloc((uint8_t**) &buffer, NULL, 1, frame->nb_samples, AV_SAMPLE_FMT_DBL, 0);
    qDebug () << "packet: " << &packet;
    qDebug() << "frame: " <<  frame;
    qDebug () << "buffer: " << buffer;


    


    For the time being, step 9 is incomplete as you can probably tell. But for now, I need help with step 8. Am I missing a step, using the wrong function, wrong class ? Cheers.

    


  • avformat/matroskaenc : Don't use size of inexistent Cluster

    22 janvier 2020, par Andreas Rheinhardt
    avformat/matroskaenc : Don't use size of inexistent Cluster
    

    In order to determine whether the current Cluster needs to be closed
    because of the limits on clustersize and clustertime,
    mkv_write_packet() would first get the size of the current Cluster by
    applying avio_tell() on the dynamic buffer holding the current Cluster.
    It did this without checking whether there is a dynamic buffer for
    writing Clusters open right now.

    In this case (which happens when writing the first packet)
    avio_tell() returned AVERROR(EINVAL) ; yet it is not good to rely on
    avio_tell() (or actually, avio_seek()) to handle the situation
    gracefully.

    Fixing this is easy : Only check whether a Cluster needs to be closed
    if a Cluster is in fact open.

    Signed-off-by : Andreas Rheinhardt <andreas.rheinhardt@gmail.com>

    • [DH] libavformat/matroskaenc.c