Recherche avancée

Médias (1)

Mot : - Tags -/MediaSPIP

Autres articles (67)

  • Keeping control of your media in your hands

    13 avril 2011, par

    The vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
    While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
    MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
    MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...)

  • Le plugin : Gestion de la mutualisation

    2 mars 2010, par

    Le plugin de Gestion de mutualisation permet de gérer les différents canaux de mediaspip depuis un site maître. Il a pour but de fournir une solution pure SPIP afin de remplacer cette ancienne solution.
    Installation basique
    On installe les fichiers de SPIP sur le serveur.
    On ajoute ensuite le plugin "mutualisation" à la racine du site comme décrit ici.
    On customise le fichier mes_options.php central comme on le souhaite. Voilà pour l’exemple celui de la plateforme mediaspip.net :
    < ?php (...)

  • Qualité du média après traitement

    21 juin 2013, par

    Le bon réglage du logiciel qui traite les média est important pour un équilibre entre les partis ( bande passante de l’hébergeur, qualité du média pour le rédacteur et le visiteur, accessibilité pour le visiteur ). Comment régler la qualité de son média ?
    Plus la qualité du média est importante, plus la bande passante sera utilisée. Le visiteur avec une connexion internet à petit débit devra attendre plus longtemps. Inversement plus, la qualité du média est pauvre et donc le média devient dégradé voire (...)

Sur d’autres sites (4792)

  • FFmpeg - resampled audio with much noise

    28 mars 2019, par Jinx

    I’m not familiar with auido resampling. I tried to resample auido streams from two videos. The first one’s output was close to the original but with noise, the other one was almost full of noise.

    Information for the first one

    128 kb/s, 48.0kHz, 2 channels, AACLC

    Information for the second one

    384 kb/s, 48.0 kHz, 6channels, AACLC

    I found that, when I set the sample size 16, the frist one worked quit good but still with noise. The other one worked too bad but still had sound. What and how to determine the output sample size ? Although I used channels * av_get_bytes_per_sample((AVSampleFormat)output_fmt) as the output sample size because I wanted it to be the same as the original, it had no sound at all.

    MyResampling.cpp

    bool MyResample::open(AVCodecParameters* par) {
       if (!par) {
           std::cout &lt;&lt; "par is null" &lt;&lt; std::endl;
           return false;
       }  
       audio_context = swr_alloc_set_opts(
           audio_context, av_get_default_channel_layout(2), (AVSampleFormat)output_fmt,
           par->sample_rate, av_get_default_channel_layout(par->channels), (AVSampleFormat)par->format, par->sample_rate,
           0, 0);

       avcodec_parameters_free(&amp;par);
       int ret = swr_init(audio_context);
       if (ret != 0) {
           std::cout &lt;&lt; "failed to open audio codec" &lt;&lt; std::endl;
       }
       return true;
    }

    int MyResample::resample(AVFrame* frame, unsigned char* output)
    {
       if (!frame)
           return 0;
       if (!output)
           av_frame_free(&amp;frame);

       uint8_t* data[2] = { 0 };
       data[0] = output;
       int ret = swr_convert(audio_context, data, frame->nb_samples, (const uint8_t**)frame->data, frame->nb_samples);
       //int size =  ret * frame->channels * av_get_bytes_per_sample((AVSampleFormat)output_fmt);
       int size = av_samples_get_buffer_size(nullptr, frame->channels, frame->nb_samples, (AVSampleFormat)output_fmt, 1);
       if (ret &lt; 0)
           return ret;
       return size;
    }

    MyAudioPlayer.cpp

    bool open()
    {
       close();
       QAudioFormat fmt;
       fmt.setSampleRate(sample_rate); // from audioStream->codecpar->sample_rate
       fmt.setSampleSize(16); //
       fmt.setChannelCount(channels); // from audioStream->codecpar->channels
       fmt.setCodec("audio/pcm");
       fmt.setByteOrder(QAudioFormat::LittleEndian);
       fmt.setSampleType(QAudioFormat::UnSignedInt);
       output = new QAudioOutput(fmt);
       io = output->start();
       if (io)
           return true;
       return false;
    }

    bool write(const unsigned char* data, int data_size)
    {
       if (!data || data_size &lt;= 0)
           return false;
       if (!output || !io)
       {
           return false;
       }
       int size = io->write((char*)data, data_size);
       if (data_size != size)
           return false;
       return true;
    }

    main.cpp

    MyAudioPlayer::open();
    unsigned char* pcm = new unsigned char[1024 * 1024];
    if (demux.get_media_type() == 1) { // audio
       audio_decode.sendPacket(pkt);
       AVFrame* frame = audio_decode.receiveFrame();
       int len = resample.resample(frame, pcm);
       while (len > 0) {
           if (MyAudioPlayer::check_space() >= len) {
               MyAudioPlayer::write(pcm, len);
               break;
           }
           msleep(1);
       }              
    }
  • Archive download links

    1er juin 2015, par scottschiller
    Archive download links
  • V2.97a.20170601 download and details.

    2 juin 2017, par scottschiller
    V2.97a.20170601 download and details.