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 (18)

  • Encoding and processing into web-friendly formats

    13 avril 2011, par

    MediaSPIP automatically converts uploaded files to internet-compatible formats.
    Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
    Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
    Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
    All uploaded files are stored online in their original format, so you can (...)

  • Demande de création d’un canal

    12 mars 2010, par

    En fonction de la configuration de la plateforme, l’utilisateur peu avoir à sa disposition deux méthodes différentes de demande de création de canal. La première est au moment de son inscription, la seconde, après son inscription en remplissant un formulaire de demande.
    Les deux manières demandent les mêmes choses fonctionnent à peu près de la même manière, le futur utilisateur doit remplir une série de champ de formulaire permettant tout d’abord aux administrateurs d’avoir des informations quant à (...)

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

Sur d’autres sites (4489)

  • Want to send a video from desktop to Wowza using ffmpeg

    3 mars 2018, par ST94

    I am trying to stream a local .mp4 video file from my laptop to Wowza Streaming Engine using ffmpeg. Both systems are able to ping each other. I give the following command on my laptop

    ffmpeg -re -i bunny_1080p_60fps_normal.mp4 -vcodec libx264 -acodec aac -ar 48000 -strict experimental -f flv "rtmp://192.168.1.22:1935/live/myStream"

    192.168.1.22 is the IP address of Wowza server residing on another system running Ubuntu 17.04.

    I see the following on the command prompt of my laptop when I give the above command,

    ffmpeg version N-89894-g18e2ac032e Copyright (c) 2000-2018 the FFmpeg developers
     built with gcc 7.2.0 (GCC)
     configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-bzlib --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libmfx --enable-amf --enable-cuda --enable-cuvid --enable-d3d11va --enable-nvenc --enable-dxva2 --enable-avisynth
     libavutil      56.  7.100 / 56.  7.100
     libavcodec     58.  9.100 / 58.  9.100
     libavformat    58.  5.101 / 58.  5.101
     libavdevice    58.  0.101 / 58.  0.101
     libavfilter     7. 11.101 /  7. 11.101
     libswscale      5.  0.101 /  5.  0.101
     libswresample   3.  0.101 /  3.  0.101
     libpostproc    55.  0.100 / 55.  0.100
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'bunny_1080p_60fps_normal.mp4':
     Metadata:
       major_brand     : isom
       minor_version   : 1
       compatible_brands: isomavc1
       creation_time   : 2013-12-16T17:59:32.000000Z
       title           : Big Buck Bunny, Sunflower version
       artist          : Blender Foundation 2008, Janus Bager Kristensen 2013
       comment         : Creative Commons Attribution 3.0 - http://bbb3d.renderfarming.net
       genre           : Animation
       composer        : Sacha Goedegebure
     Duration: 00:10:34.53, start: 0.000000, bitrate: 4486 kb/s
       Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 4001 kb/s, 60 fps, 60 tbr, 60k tbn, 120 tbc (default)
       Metadata:
         creation_time   : 2013-12-16T17:59:32.000000Z
         handler_name    : GPAC ISO Video Handler
       Stream #0:1(und): Audio: mp3 (mp4a / 0x6134706D), 48000 Hz, stereo, s16p, 160 kb/s (default)
       Metadata:
         creation_time   : 2013-12-16T17:59:37.000000Z
         handler_name    : GPAC ISO Audio Handler
       Stream #0:2(und): Audio: ac3 (ac-3 / 0x332D6361), 48000 Hz, 5.1(side), fltp, 320 kb/s (default)
       Metadata:
         creation_time   : 2013-12-16T17:59:37.000000Z
         handler_name    : GPAC ISO Audio Handler
       Side data:
         audio service type: main
    [rtmp @ 000001ed7c4108c0] No credentials set
    [rtmp @ 000001ed7c4108c0] Server error: [ AccessManager.Reject ] : [ code=403 need auth; authmod=adobe ] :
    rtmp://192.168.1.22:1935/live/myStream: Unknown error occurred

    Can anyone please tell me what the exact procedure is to stream a video file to Wowza .

    How will I be able to view the stream at Wowza ?

  • Create an audio file and fill it with the RTP package payload using ffmpeg

    24 août 2020, par WithoutExperience

    My task is to extract the payload of an RTP packet and save it as an audio file. In my case, I get the payload type - 8 (PCMA). I process RTP packets and store all the payload in a separate buffer. After that, I have to process this buffer and create an audio file. And that's my problem :(

    


    First, the specification says that in payload 8 (PCMA), audio samples are U8(bitRate / clockRate = 64000 / 8000) in size. But I can't even find a decoder for this sample size. What might be the problem ?

    


    Second, if I create synthetic sound, I can't record it in mka audio format.

    


    As a cheat sheet, I use this link.

    


    Based on this example, I wrote something similar :

    


    
class AudioGenerater
{
public:

    enum AudioFormatType
    {
        AudioFormat_WAV,
        AudioFormat_MP3
    };

public:

    AudioGenerater();
   ~AudioGenerater() = default;

    void generateAudioFileWithOptions(
            QString        fileName,
            QByteArray     pcmData,
            AVCodecID      codecID,
            int            channel,
            int            bitRate,
            int            sampleRate,
            AVSampleFormat format);

private:

    // init Format
    bool initFormat(QString audioFileName);

private:

    AVCodec         *m_AudioCodec        = nullptr;
    AVCodecContext  *m_AudioCodecContext = nullptr;
    AVFormatContext *m_FormatContext     = nullptr;
    AVOutputFormat  *m_OutputFormat      = nullptr;
};



    


    Cpp file :

    


    AudioGenerater::AudioGenerater()
{
    av_register_all();
    avcodec_register_all();
}

bool AudioGenerater::initFormat(QString audioFileName)
{
     // Create an output Format context
    int result = avformat_alloc_output_context2(&m_FormatContext, nullptr, nullptr, audioFileName.toLocal8Bit().data());
    if (result < 0) {
        return false;
    }

    m_OutputFormat = m_FormatContext->oformat;

     // Create an audio stream
    AVStream *audioStream = avformat_new_stream(m_FormatContext, m_AudioCodec);
    if (audioStream == nullptr) {
        avformat_free_context(m_FormatContext);
        return false;
    }

     // Set the parameters in the stream
    audioStream->id = m_FormatContext->nb_streams - 1;
    audioStream->time_base = { 1, 64000 };
    result = avcodec_parameters_from_context(audioStream->codecpar, m_AudioCodecContext);
    if (result < 0) {
        avformat_free_context(m_FormatContext);
        return false;
    }

     // Print FormatContext information
    av_dump_format(m_FormatContext, 0, audioFileName.toLocal8Bit().data(), 1);

     // Open file IO
    if (!(m_OutputFormat->flags & AVFMT_NOFILE)) {
        result = avio_open(&m_FormatContext->pb, audioFileName.toLocal8Bit().data(), AVIO_FLAG_WRITE);
        if (result < 0) {
            avformat_free_context(m_FormatContext);
            return false;
        }
    }

    return true;
}

void AudioGenerater::generateAudioFileWithOptions(
        QString _fileName,
        QByteArray _pcmData,
        AVCodecID _codecID,
        int _channel,
        int _bitRate,
        int _sampleRate,
        AVSampleFormat _format)
{
    AVCodecID codecID = _codecID;
    // Find Codec
    m_AudioCodec = avcodec_find_encoder(codecID);
    if (m_AudioCodec == nullptr) {
        return;
    }

     // Create an encoder context
    m_AudioCodecContext = avcodec_alloc_context3(m_AudioCodec);
    if (m_AudioCodecContext == nullptr){
        return;
    }

        // Setting parameters
    m_AudioCodecContext->bit_rate    = _bitRate;
    m_AudioCodecContext->sample_rate = _sampleRate;
    m_AudioCodecContext->sample_fmt  = _format;
    m_AudioCodecContext->channels    = _channel;


    m_AudioCodecContext->channel_layout = av_get_default_channel_layout(_channel);
    m_AudioCodecContext->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;

     // Turn on the encoder
    int result = avcodec_open2(m_AudioCodecContext, m_AudioCodec, nullptr);
    if (result < 0) {
        avcodec_free_context(&m_AudioCodecContext);
        if (m_FormatContext != nullptr)
            avformat_free_context(m_FormatContext);
        return;
    }

     // Create a package
    if (!initFormat(_fileName)) {
        avcodec_free_context(&m_AudioCodecContext);
        if (m_FormatContext != nullptr)
            avformat_free_context(m_FormatContext);
        return;
    }

     // write to the file header
    result = avformat_write_header(m_FormatContext, nullptr);
    if (result < 0) {
        avcodec_free_context(&m_AudioCodecContext);
        if (m_FormatContext != nullptr)
            avformat_free_context(m_FormatContext);
        return;
    }

     // Create Frame
    AVFrame *frame = av_frame_alloc();
    if (frame == nullptr) {
        avcodec_free_context(&m_AudioCodecContext);
        if (m_FormatContext != nullptr)
            avformat_free_context(m_FormatContext);
        return;
    }

    int nb_samples = 0;
    if (m_AudioCodecContext->codec->capabilities & AV_CODEC_CAP_VARIABLE_FRAME_SIZE) {
        nb_samples = 10000;
    }
    else {
        nb_samples = m_AudioCodecContext->frame_size;
    }

    // Set the parameters of the Frame
    frame->nb_samples = nb_samples;
    frame->format = m_AudioCodecContext->sample_fmt;
    frame->channel_layout = m_AudioCodecContext->channel_layout;

    // Apply for data memory
    result = av_frame_get_buffer(frame, 0);
    if (result < 0)
    {
        av_frame_free(&frame); {
            avcodec_free_context(&m_AudioCodecContext);
            if (m_FormatContext != nullptr)
                avformat_free_context(m_FormatContext);
            return;
        }
    }

    // Set the Frame to be writable
    result = av_frame_make_writable(frame);
    if (result < 0)
    {
        av_frame_free(&frame); {
            avcodec_free_context(&m_AudioCodecContext);
            if (m_FormatContext != nullptr)
                avformat_free_context(m_FormatContext);
            return;
        }
    }

    int perFrameDataSize = frame->linesize[0];
    int count = _pcmData.size() / perFrameDataSize;
    bool needAddOne = false;
    if (_pcmData.size() % perFrameDataSize != 0)
    {
        count++;
        needAddOne = true;
    }

    int frameCount = 0;
    for (int i = 0; i < count; ++i)
    {
         // Create a Packet
        AVPacket *pkt = av_packet_alloc();
        if (pkt == nullptr) {
            avcodec_free_context(&m_AudioCodecContext);
            if (m_FormatContext != nullptr)
                avformat_free_context(m_FormatContext);
            return;
        }
        av_init_packet(pkt);

        if (i == count - 1)
            perFrameDataSize = _pcmData.size() % perFrameDataSize;

        // Synthesize WAV files
       memset(frame->data[0], 0, perFrameDataSize);
       memcpy(frame->data[0], &(_pcmData.data()[perFrameDataSize * i]), perFrameDataSize);


        frame->pts = frameCount++;
         // send Frame
        result = avcodec_send_frame(m_AudioCodecContext, frame);
        if (result < 0)
            continue;

         // Receive the encoded Packet
        result = avcodec_receive_packet(m_AudioCodecContext, pkt);
        if (result < 0)
        {
            av_packet_free(&pkt);
            continue;
        }

         // write to file
        av_packet_rescale_ts(pkt, m_AudioCodecContext->time_base, m_FormatContext->streams[0]->time_base);
        pkt->stream_index = 0;
        result = av_interleaved_write_frame(m_FormatContext, pkt);
        if (result < 0)
            continue;

        av_packet_free(&pkt);
    }

     // write to the end of the file
    av_write_trailer(m_FormatContext);
     // Close file IO
    avio_closep(&m_FormatContext->pb);
    // Release Frame memory
    av_frame_free(&frame);

    avcodec_free_context(&m_AudioCodecContext);
    if (m_FormatContext != nullptr)
        avformat_free_context(m_FormatContext);
}


    


    Main :

    


    int main(int argc, char *argv[])
{
    QCoreApplication a(argc, argv);
    AudioGenerater generator;
    
    av_log_set_level(AV_LOG_DEBUG);
    av_log_set_flags(av_log_get_flags());
    
    QFile file("pcma.raw");
    if (!file.open(QIODevice::ReadOnly)) {
        return EXIT_FAILURE;
    }
    QByteArray pcmaData(file.readAll());
    
    generator.generateAudioFileWithOptions(
                "test.mka",
                pcmaData,
                AV_CODEC_ID_PCM_ALAW,
                1, 64000, 8000,
                AV_SAMPLE_FMT_U8);

    return a.exec();
}



    


    After I run the program, here are the errors that come out :

    


    [pcm_alaw @ 0x19229a0] Specified sample format u8 is invalid or not supported


    


    But if I set s16p instead of U8 format :

    


    generator.generateAudioFileWithOptions(
                "test.mka",
                pcmaData,
                AV_CODEC_ID_PCM_ALAW,
                1, 64000, 8000,
                AV_SAMPLE_FMT_S16P);


    


    I get twice as fast audio track, with a lot of noise. I need a sequential instruction encoding raw audio data into an audio file. Unfortunately, I don't understand what my error is.

    


  • Measuring success for your SEO content

    20 mars 2020, par Jake Thornton — Uncategorized

    With over a billion searches every day in search engines, it’s hard to underestimate the importance of having your business present on page one (ideally in positions 1 – 3) ranking for the keywords that impact your sales and conversions.

    "In 2019, Google received nearly 2.3 trillion searches and on page one alone, the first five organic results accounted for 67.60% of all the clicks."

    So how is your business performing when it comes to ranking in the crucial top three spots of search for your most important keywords ?

    Accurately measuring the success of your content

    Once you’ve done your keyword research, created compelling content, optimised it to be search-friendly, and hit ‘publish’, you then need to accurately measure the success of your efforts.

    4 tips for measuring the success of your SEO content

    1. Create a custom segment for "Visitors from Search Engines only"

    By creating this custom segment, you’ll be able to analyse the behavioural patterns of the visitors who found your website through a search engine. 

    This way you can use many of Matomo’s powerful features (Visitors, Behaviour, Acquisition, Ecommerce, Goals etc.) focused entirely on search engine visitors only.

    Once you’ve created this segment, you can begin to see key metrics like which entry pages are responsible for referring visitors to your website. For example : Visit Behaviour – Entry Pages, this is a great way to analyse your most effective SEO pages.You may be surprised at what pages currently bring in the most traffic.

    As well as discovering which content resonates with your search audience, you will also be able to create more content focused on your targeted audience. Do this by learning which locations your search visitors are from, which device they use, what time of the day they visited your website and much more.

    >> Learn more about creating custom segments

    2. Website visits, time on site, pages per session, and bounce rate.

    “The top four ranking factors are website visits, time on site, pages per session, and bounce rate.”

    These four metrics set the benchmark for your SEO success.

    First, you need to get as many of the ‘right’ users to see your content. If you feel you’ve exhausted channels such as social media, email and possibly paid posts ; think about who your ideal audience is. Where are they likely to hang out online ? Are there community groups or forum sites that are interested in what you’re writing about ? 

    Whatever the case, putting yourself out there and getting more traffic to your website will help show search engines that people are interested in your website. As a result, they’ll likely rank you higher for that.

    When we say getting more of the ‘right’ users, we mean users who are generally interested in the topic/subject you’re writing about and interested in the work you do. 

    This is important for the next three metrics – increasing users time on your website, increasing the amount of pages your users explore on your website, and reducing the overall bounce rate for users who leave your website in a matter of seconds.

    To evaluate these metrics, go to Behaviour Pages in your Matomo and see how these metrics vary on previous posts or pages you’ve created. Which pages are already showing you the best results ? Why do they get the results ? Can you focus on creating more content like this ?

    Understanding what content is resonating with your users through these metrics is easy and is the starting point for measuring the success of your SEO content strategy.

    >> Learn more about the Behaviour feature

    3. Row Evolution

    The Row Evolution feature embedded within the Search Engine Keywords Performance plugin lets you see how your ranking positions have changed over time for your important keywords. It also lets you see how the incoming traffic, related to your keywords, has changed over time.

    This is valuable when measuring the changes you’ve made to your landing pages to see if it has a positive or negative effect on your ranking efforts. 

    This also lets you see how search engine algorithm changes affect your search rankings over time, and to see if the effects of these algorithm updates are temporary or long lasting.

    Row evolution allows you to report on keyword performance with ease. If you only check your insights once a week or once a fortnight, you’ll see how ranking positions for your important keywords have changed daily (or even weekly, monthly or yearly however you prefer.)

    >> Learn more about Row Evolution

    4. What results are you getting from the lesser known search engines ?

    "In 2019 (to date), Google accounted for just over 75% of all global desktop search traffic, followed by Bing at 9.97%, Baidu at 9.34%, and Yahoo at 2.77%."

    For most of us, we want to be ranking in the top three spots in Google Search because that’s where the majority of search users are. However, don’t shy away from opportunities you could be missing with lesser known search engines.

    If you sell a product aimed at 55-65 year olds who use a PC computer, chances are they are using Bing. If you have customers in China the majority will be using Baidu, or in our case at Matomo, many of our loyal users use a privacy-friendly search engine like DuckDuckGo or Qwant.

    Some of your ideal customers might be finding you through these alternative search engines, so be sure to measure the impact that these referrals may have on your conversions.

    Strategically including important keywords that impact your business

    While search is an important acquisition channel for most businesses, it’s also one of the most competitive.

    We recommend analysing your keyword and content performance regularly and alter content that isn’t performing as well as you’d like. You need to continually learn from the content that is successful, and focus on creating more content like this. 

    The final thing to remember with search keyword performance is to be patient. If you have had little success in the past with attracting customers through search, it can take time to build this reputation with search engines.