Recherche avancée

Médias (1)

Mot : - Tags -/Christian Nold

Autres articles (76)

  • MediaSPIP version 0.1 Beta

    16 avril 2011, par

    MediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Pour avoir une installation fonctionnelle, 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 (...)

  • 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

  • Supporting all media types

    13 avril 2011, par

    Unlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)

Sur d’autres sites (9046)

  • FFmpeg decode OGG Vorbis audio as float, how to get float data from decoder

    19 novembre 2020, par cs guy

    I am trying to decode a OGG Vorbis audio file with the following :

    


    // if opening input failed
    if (avformat_open_input(&pFormatContext, filePath.c_str(), av_find_input_format("ogg"),
                            nullptr) != 0) {
        
        LOGE("FFmpegExtractor can not open the file! %s", filePath.c_str());
        return FAILED_TO_LOAD;
    }

    durationInMillis = pFormatContext->duration / AV_TIME_BASE * secondsToMilli;
    LOGD("FFmpegExtractor opened the file, Duration: %llu", durationInMillis);

    avformat_find_stream_info(pFormatContext, nullptr);

    LOGD("pFormatContext streams num: %ui", pFormatContext->nb_streams);

    int sendPacketResult = 0;
    int receiveFrameResult = 0;

    for (int i = 0; i < pFormatContext->nb_streams; i++) {
        AVCodecParameters *pLocalCodecParameters = pFormatContext->streams[i]->codecpar;

        if (pLocalCodecParameters->codec_type == AVMEDIA_TYPE_AUDIO) {
            avCodecContext = avcodec_alloc_context3(avCodec);
            if (!avCodecContext) {
                
                LOGE("FFmpegExtractor avcodec_alloc_context3 failed!");
                return FAILED_TO_LOAD;
            }

            if (avcodec_parameters_to_context(avCodecContext, pLocalCodecParameters) < 0) {
                
                LOGE("FFmpegExtractor avcodec_parameters_to_context failed!");
                return FAILED_TO_LOAD;
            }

            if (avcodec_open2(avCodecContext, avCodec, nullptr) < 0) {
                
                LOGE("FFmpegExtractor avcodec_open2 failed!");
                return FAILED_TO_LOAD;
            }
        }

        while (av_read_frame(pFormatContext, avPacket) >= 0) {
            
            sendPacketResult = avcodec_send_packet(avCodecContext, avPacket);

            
            receiveFrameResult = avcodec_receive_frame(avCodecContext, avFrame);

            // TODO: Get frames PCM data from the decoder, 
        }
    }


    


    I am stuck on the last part. I want to get the decoded data of the current frame as a float between -1 to +1 for all the channels the audio has but I have no idea how to. I looked at the official documents but I could not understand them. How can I get the data from the decoder on the line

    


    


    // TODO : Get frames PCM data from the decoder,

    


    


  • Cannot get MediaStream from Electron app to browser via Openvidu media server

    11 juin 2021, par foxy.bunny

    I'm currently having an issue with openvidu-browser-2.17.0.js

    


    I'm trying to transfer a camera stream from RTSP to an Openvidu media server deployed on cloud and get the stream back on the browser.

    


    The RTSP stream was converted into an HLS stream using FFmpeg and played using hls.js. It was captured in an video tag in HTML and I used the HTMLMediaElement.captureStream().getVideoTrack() to generate MediaStreamTrack and passed it into the videoSource property in initPublisher. This publisher part was wrapped in electron. Then, the stream was connected to our cloud Openvidu server deployed on-premises exactly like in the Docs (https://docs.openvidu.io/en/2.18.0/deployment/deploying-on-premises/). The subscriber part is a simple HTML page displayed on the browser to get the stream from the cloud server. The subscriber is responsible for creating session and generating stream from the media server when streamCreated event occurs.

    


    The whole workflow worked nicely when we tested it with our webcam, however, when we use MediaStreamTrack of our stream video instead of webcam, the subscriber part only showed the blank video.

    


    My question is :

    


    1 : Is it possible to stream an MediaStream to Openvidu media server like that ?

    


    2 : If yes, then what am I doing wrong here ?

    


    Describe the bug

    


    Cannot get MediaStream from Electron app to browser via Openvidu media server.

    


    Expected behavior

    


    Receive the stream from the Electron app to browser via Openvidu media server.

    


    Wrong current behavior

    


    Only get blank video

    


    Client device info

    


      

    • Chrome Version 91.0.4472.77 (Official Build) (64-bit) on Windows 10 Version 10.0.19042 Build 19042
    • 


    


  • JAVE (Java Audio Video Encoder) library exception only on Linux (CentOS 7)

    13 octobre 2017, par Linu Radu

    I’m using JAVE (Java Audio Video Encoder) library and the developed application is on windows.
    On windows the conversion of an .mp3 file is working fine but when I deployed on linux (CentOS 7) an exception is thrown.

    As I understand JAVE has also a wrapper around an ffmpeg executable.

    Here is my code :

    try {
           File source = new File(sourceFile);
           File target = new File(targetFile);

           final AudioAttributes audio = new AudioAttributes();
           audio.setCodec("libmp3lame");
           audio.setBitRate(88000);
           audio.setChannels(2);
           audio.setSamplingRate(44100);  

           EncodingAttributes attrs = new EncodingAttributes();
           attrs.setFormat("mp3");
           attrs.setAudioAttributes(audio);

           Encoder encoder = new Encoder();
           encoder.encode(source, target, attrs);
    } catch (EncoderException ex) {
       throw ex;
    }

    Exception :

    ...

    Caused by: it.sauronsoftware.jave.EncoderException: Error while opening codec for output stream #0.0 - maybe incorrect parameters such as bit_rate, rate, width or height
       at it.sauronsoftware.jave.Encoder.encode(Encoder.java:926)
       at it.sauronsoftware.jave.Encoder.encode(Encoder.java:713)
       at com.hft2.ejb.util.Mp3JaveEncoder.encode(Mp3JaveEncoder.java:36)
       ... 206 more

    Update

    Here is the official page : http://www.sauronsoftware.it/projects/jave/

    Full exception log : https://jpst.it/1678l

    Does anyone have any idea ?