Recherche avancée

Médias (0)

Mot : - Tags -/xmlrpc

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

Autres articles (85)

  • Personnaliser les catégories

    21 juin 2013, par

    Formulaire de création d’une catégorie
    Pour ceux qui connaissent bien SPIP, une catégorie peut être assimilée à une rubrique.
    Dans le cas d’un document de type catégorie, les champs proposés par défaut sont : Texte
    On peut modifier ce formulaire dans la partie :
    Administration > Configuration des masques de formulaire.
    Dans le cas d’un document de type média, les champs non affichés par défaut sont : Descriptif rapide
    Par ailleurs, c’est dans cette partie configuration qu’on peut indiquer le (...)

  • 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

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

  • Sporadic "Error parsing Cues... Operation not permitted" errors when trying to generate a DASH manifest

    22 novembre 2023, par kshetline

    I have already-generated .webm audio and video files (1 audio, 3 video resolutions for each video I want to stream). The video has been generated not (directly) by ffmpeg, but HandbrakeCLI 1.7.0, with V9 encoding. The audio (which has never caused an error) is generated by ffmpeg using libvorbis.

    


    Most of the time ffmpeg (version 6.1) creates a manifest without any problem. Sporadically, however, "Error parsing Cues" comes up (frequently with the latest videos I've been trying to process) and I can't create a manifest. Since this is happening during an automated process to process many videos for streaming, the audio and video sources are being created exactly the same way whether ffmpeg succeeds or fails in generating a manifest, making this all the more confusing.

    


    The video files ffmpeg chokes on play perfectly well using VLC, and mediainfo doesn't show any problems with these files.

    


    Here's the way I've been (sometimes successfully, sometimes not) generating a manifest, with extra logging added :

    


    ffmpeg -v 9 -loglevel 99 \
  -f webm_dash_manifest -i '.\Sample Video.v480.webm' \
  -f webm_dash_manifest -i '.\Sample Video.v720.webm' \
  -f webm_dash_manifest -i '.\Sample Video.v1080.webm' \
  -f webm_dash_manifest -i '.\Sample Video.audio.webm' \
  -c copy -map 0 -map 1 -map 2 -map 3 \
  -f webm_dash_manifest -adaptation_sets "id=0,streams=0,1,2 id=1,streams=3" \
  '.\Sample Video.mpd'


    


    Here's the result when it fails :

    


    ffmpeg version 6.1-full_build-www.gyan.dev Copyright (c) 2000-2023 the FFmpeg developers
  built with gcc 12.2.0 (Rev10, Built by MSYS2 project)
  configuration: --enable-gpl --enable-version3 --enable-static --pkg-config=pkgconf --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libaribb24 --enable-libaribcaption --enable-libdav1d --enable-libdavs2 --enable-libuavs3d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libaom --enable-libjxl --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libharfbuzz --enable-liblensfun --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-dxva2 --enable-d3d11va --enable-libvpl --enable-libshaderc --enable-vulkan --enable-libplacebo --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libcodec2 --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint
  libavutil      58. 29.100 / 58. 29.100
  libavcodec     60. 31.102 / 60. 31.102
  libavformat    60. 16.100 / 60. 16.100
  libavdevice    60.  3.100 / 60.  3.100
  libavfilter     9. 12.100 /  9. 12.100
  libswscale      7.  5.100 /  7.  5.100
  libswresample   4. 12.100 /  4. 12.100
  libpostproc    57.  3.100 / 57.  3.100
Splitting the commandline.
Reading option '-v' ... matched as option 'v' (set logging level) with argument '9'.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument '99'.
Reading option '-f' ... matched as option 'f' (force format) with argument 'webm_dash_manifest'.
Reading option '-i' ... matched as output url with argument '.\Sample Video.v480.webm'.
Reading option '-f' ... matched as option 'f' (force format) with argument 'webm_dash_manifest'.
Reading option '-i' ... matched as output url with argument '.\Sample Video.v720.webm'.
Reading option '-f' ... matched as option 'f' (force format) with argument 'webm_dash_manifest'.
Reading option '-i' ... matched as output url with argument '.\Sample Video.v1080.webm'.
Reading option '-f' ... matched as option 'f' (force format) with argument 'webm_dash_manifest'.
Reading option '-i' ... matched as output url with argument '.\Sample Video.audio.webm'.
Reading option '-c' ... matched as option 'c' (codec name) with argument 'copy'.
Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument '0'.
Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument '1'.
Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument '2'.
Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument '3'.
Reading option '-f' ... matched as option 'f' (force format) with argument 'webm_dash_manifest'.
Reading option '-adaptation_sets' ... matched as AVOption 'adaptation_sets' with argument 'id=0,streams=0,1,2 id=1,streams=3'.
Reading option '.\Sample Video.mpd' ... matched as output url.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option v (set logging level) with argument 9.
Successfully parsed a group of options.
Parsing a group of options: input url .\Sample Video.v480.webm.
Applying option f (force format) with argument webm_dash_manifest.
Successfully parsed a group of options.
Opening an input file: .\Sample Video.v480.webm.
[webm_dash_manifest @ 000002bbcb41dc80] Opening '.\Sample Video.v480.webm' for reading
[file @ 000002bbcb41e300] Setting default whitelist 'file,crypto,data'
st:0 removing common factor 1000000 from timebase
[webm_dash_manifest @ 000002bbcb41dc80] Error parsing Cues
[AVIOContext @ 000002bbcb41e5c0] Statistics: 102283 bytes read, 4 seeks
[in#0 @ 000002bbcb41dac0] Error opening input: Operation not permitted
Error opening input file .\Sample Video.v480.webm.
Error opening input files: Operation not permitted


    


    This is mediainfo for the offending input file, Sample Video.v480.webm :

    


    General
Complete name                            : .\Sample Video.v480.webm
Format                                   : WebM
Format version                           : Version 2
File size                                : 628 MiB
Duration                                 : 1 h 34 min
Overall bit rate                         : 926 kb/s
Frame rate                               : 23.976 FPS
Encoded date                             : 2023-11-21 16:48:35 UTC
Writing application                      : HandBrake 1.7.0 2023111500
Writing library                          : Lavf60.16.100

Video
ID                                       : 1
Format                                   : VP9
Format profile                           : 0
Codec ID                                 : V_VP9
Duration                                 : 1 h 34 min
Bit rate                                 : 882 kb/s
Width                                    : 720 pixels
Height                                   : 480 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Constant
Frame rate                               : 23.976 (24000/1001) FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Bits/(Pixel*Frame)                       : 0.106
Stream size                              : 598 MiB (95%)
Default                                  : Yes
Forced                                   : No
Color range                              : Limited
Color primaries                          : BT.709
Transfer characteristics                 : BT.709
Matrix coefficients                      : BT.709


    


    I don't know if I need different command line options, or whether this might be an ffmpeg or Handbrake bug. It has taken many, many hours to generate these video files (VP9 is painfully slow to encode), so I hate to do a lot of this over again, especially doing it again encoding the video with ffmpeg instead of Handbrake, as Handbrake is (oddly enough, considering it uses ffmpeg under the hood) noticeably faster.

    


    I have no idea what these "Cues" are that ffmpeg wants and can't parse, or how I would change them.

    


  • "Application provided invalid, non monotonically increasing dts to muxer in stream 0 : 47104 >= -4251" in C ffmpeg video & audio streams processing

    30 décembre 2023, par M.Hakim

    For an input.mp4 file containing a video stream and an audio stream, intend to convert the video stream into h264 codec and the audio stream into aac codec and combine the two streams in output.mp4 file using C and ffmpeg libraries.
Am getting an error [mp4 @ 0x5583c88fd340] Application provided invalid, non monotonically increasing dts to muxer in stream 0 : 47104 >= -4251
How do i solve that error ?

    


    #include &#xA;#include <libavcodec></libavcodec>avcodec.h>&#xA;#include <libavformat></libavformat>avformat.h>    &#xA;#include <libavutil></libavutil>opt.h>&#xA;&#xA;int encodeVideoAndAudio4(char *pInName, char *pOutName) {&#xA;&#xA;    AVFormatContext *format_ctx = avformat_alloc_context();&#xA;&#xA;    AVCodecContext *video_dec_ctx = NULL;&#xA;    AVCodecContext *video_enc_ctx = NULL;&#xA;    AVCodec *video_dec_codec = NULL;&#xA;    AVCodec *video_enc_codec = NULL;&#xA;    AVDictionary *video_enc_opts = NULL;&#xA;&#xA;    AVCodecContext *audio_dec_ctx = NULL;&#xA;    AVCodecContext *audio_enc_ctx = NULL;&#xA;    AVCodec *audio_dec_codec = NULL;&#xA;    AVCodec *audio_enc_codec = NULL;&#xA;&#xA;&#xA;    if (avformat_open_input(&amp;format_ctx, pInName, NULL, NULL) &lt; 0) {&#xA;        fprintf(stderr, "Error: Could not open input file\n");&#xA;        return 1;&#xA;    }&#xA;&#xA;    if (avformat_find_stream_info(format_ctx, NULL) &lt; 0) {&#xA;        fprintf(stderr, "Error: Could not find stream information\n");&#xA;        return 1;&#xA;    }&#xA;&#xA;    for (int i = 0; i &lt; format_ctx->nb_streams; i&#x2B;&#x2B;) {&#xA;        AVStream *stream = format_ctx->streams[i];&#xA;        const char *media_type_str = av_get_media_type_string(stream->codecpar->codec_type);&#xA;        AVRational time_base = stream->time_base;&#xA;&#xA;    }&#xA;&#xA;    int video_stream_index = -1;&#xA;    for (int i = 0; i &lt; format_ctx->nb_streams; i&#x2B;&#x2B;) {&#xA;        if (format_ctx->streams[i]->codecpar->codec_type == AVMEDIA_TYPE_VIDEO) {&#xA;            video_stream_index = i;&#xA;            break;&#xA;        }&#xA;    }&#xA;    if (video_stream_index == -1) {&#xA;        fprintf(stderr, "Error: Could not find a video stream\n");&#xA;        return 1;&#xA;    }&#xA;&#xA;    AVStream *videoStream = format_ctx->streams[video_stream_index];&#xA;    video_dec_ctx = avcodec_alloc_context3(NULL);&#xA;    avcodec_parameters_to_context(video_dec_ctx, videoStream->codecpar);&#xA;&#xA;    video_dec_codec = avcodec_find_decoder(video_dec_ctx->codec_id);&#xA;&#xA;    if (!video_dec_codec) {&#xA;        fprintf(stderr, "Unsupported video codec!\n");&#xA;        return 1;&#xA;    }&#xA;&#xA;    if (avcodec_open2(video_dec_ctx, video_dec_codec, NULL) &lt; 0) {&#xA;        fprintf(stderr, "Error: Could not open a video decoder codec\n");&#xA;        return 1;&#xA;    }&#xA;&#xA;    video_enc_codec = avcodec_find_encoder(AV_CODEC_ID_H264);&#xA;    if (!video_enc_codec) {&#xA;        fprintf(stderr, "Error: Video Encoder codec not found\n");&#xA;        return 1;&#xA;    }&#xA;&#xA;    video_enc_ctx = avcodec_alloc_context3(video_enc_codec);&#xA;    if (!video_enc_ctx) {&#xA;        fprintf(stderr, "Error: Could not allocate video encoder codec context\n");&#xA;        return 1;&#xA;    }&#xA;&#xA;    videoStream->time_base = (AVRational){1, 25};&#xA;&#xA;    video_enc_ctx->bit_rate = 1000; &#xA;    video_enc_ctx->width = video_dec_ctx->width;&#xA;    video_enc_ctx->height = video_dec_ctx->height;&#xA;    video_enc_ctx->time_base = (AVRational){1, 25};&#xA;    video_enc_ctx->gop_size = 10;&#xA;    video_enc_ctx->max_b_frames = 1;&#xA;    video_enc_ctx->pix_fmt = AV_PIX_FMT_YUV420P;&#xA;&#xA;    if (avcodec_open2(video_enc_ctx, video_enc_codec, NULL) &lt; 0) {&#xA;        fprintf(stderr, "Error: Could not open encoder codec\n");&#xA;        return 1;&#xA;    }&#xA;&#xA;    av_dict_set(&amp;video_enc_opts, "preset", "medium", 0);&#xA;    av_opt_set_dict(video_enc_ctx->priv_data, &amp;video_enc_opts);&#xA;&#xA;    AVPacket video_pkt;&#xA;    av_init_packet(&amp;video_pkt);&#xA;    video_pkt.data = NULL;&#xA;    video_pkt.size = 0;&#xA;&#xA;    AVPacket pkt;&#xA;    av_init_packet(&amp;pkt);&#xA;    pkt.data = NULL;&#xA;    pkt.size = 0;&#xA;&#xA;    AVFrame *video_frame = av_frame_alloc();&#xA;    if (!video_frame) {&#xA;        fprintf(stderr, "Error: Could not allocate video frame\n");&#xA;        return 1;&#xA;    }&#xA;&#xA;    video_frame->format = video_enc_ctx->pix_fmt;&#xA;    video_frame->width = video_enc_ctx->width;&#xA;    video_frame->height = video_enc_ctx->height;&#xA;   &#xA;    int audio_stream_index = -1;&#xA;    for (int i = 0; i &lt; format_ctx->nb_streams; i&#x2B;&#x2B;) {&#xA;        if (format_ctx->streams[i]->codecpar->codec_type == AVMEDIA_TYPE_AUDIO) {&#xA;            audio_stream_index = i;&#xA;            break;&#xA;        }&#xA;    }&#xA;&#xA;    if (audio_stream_index == -1) {&#xA;        fprintf(stderr, "Error: Could not find an audio stream\n");&#xA;        return 1;&#xA;    }&#xA;    &#xA;    AVStream *audioStream = format_ctx->streams[audio_stream_index];&#xA;    audio_dec_ctx = avcodec_alloc_context3(NULL);&#xA;    avcodec_parameters_to_context(audio_dec_ctx, audioStream->codecpar);&#xA;    &#xA;    audio_dec_codec = avcodec_find_decoder(audio_dec_ctx->codec_id);&#xA;   &#xA;    if (!audio_dec_codec) {&#xA;        fprintf(stderr, "Unsupported audio codec!\n");&#xA;        return 1;&#xA;    }&#xA;   &#xA;    if (avcodec_open2(audio_dec_ctx, audio_dec_codec, NULL) &lt; 0) {&#xA;        fprintf(stderr, "Error: Could not open Audio decoder codec\n");&#xA;        return 1;&#xA;    }&#xA;    &#xA;    audio_enc_codec = avcodec_find_encoder(AV_CODEC_ID_AAC);&#xA;    if (!audio_enc_codec) {&#xA;        fprintf(stderr, "Error: Audio Encoder codec not found\n");&#xA;        return 1;&#xA;    }&#xA;   &#xA;    audio_enc_ctx = avcodec_alloc_context3(audio_enc_codec);&#xA;    if (!audio_enc_ctx) {&#xA;        fprintf(stderr, "Error: Could not allocate audio encoder codec context\n");&#xA;        return 1;&#xA;    }&#xA;&#xA;    audioStream->time_base = (AVRational){1, audio_dec_ctx->sample_rate};&#xA;    &#xA;    audio_enc_ctx->bit_rate = 64000; &#xA;    audio_enc_ctx->sample_rate = audio_dec_ctx->sample_rate;&#xA;    audio_enc_ctx->channels = audio_dec_ctx->channels;&#xA;    audio_enc_ctx->channel_layout = av_get_default_channel_layout(audio_enc_ctx->channels);&#xA;    audio_enc_ctx->sample_fmt = AV_SAMPLE_FMT_FLTP;&#xA;    audio_enc_ctx->profile = FF_PROFILE_AAC_LOW;&#xA;    &#xA;    if (avcodec_open2(audio_enc_ctx, audio_enc_codec, NULL) &lt; 0) {&#xA;        fprintf(stderr, "Error: Could not open encoder codec\n");&#xA;        return 1;&#xA;    }&#xA;   &#xA;    AVPacket audio_pkt;&#xA;    av_init_packet(&amp;audio_pkt);&#xA;    audio_pkt.data = NULL;&#xA;    audio_pkt.size = 0;&#xA;   &#xA;    AVFrame *audio_frame = av_frame_alloc();&#xA;    if (!audio_frame) {&#xA;        fprintf(stderr, "Error: Could not allocate audio frame\n");&#xA;        return 1;&#xA;    }&#xA;&#xA;    audio_frame->format = audio_enc_ctx->sample_fmt;&#xA;    audio_frame->sample_rate = audio_enc_ctx->sample_rate;&#xA;    audio_frame->channels = audio_enc_ctx->channels;&#xA;   &#xA;    AVFormatContext *output_format_ctx = NULL;&#xA;    if (avformat_alloc_output_context2(&amp;output_format_ctx, NULL, NULL, pOutName) &lt; 0) {&#xA;        fprintf(stderr, "Error: Could not create output context\n");&#xA;        return 1;&#xA;    }&#xA;    &#xA;    if (avio_open(&amp;output_format_ctx->pb, pOutName, AVIO_FLAG_WRITE) &lt; 0) {&#xA;        fprintf(stderr, "Error: Could not open output file\n");&#xA;        return 1;&#xA;    }&#xA;   &#xA;    AVStream *video_stream = avformat_new_stream(output_format_ctx, video_enc_codec);&#xA;    if (!video_stream) {&#xA;        fprintf(stderr, "Error: Could not create video stream\n");&#xA;        return 1;&#xA;    }&#xA;   &#xA;    av_dict_set(&amp;video_stream->metadata, "rotate", "90", 0);&#xA;    &#xA;    if (avcodec_parameters_from_context(video_stream->codecpar, video_enc_ctx) &lt; 0) {&#xA;        fprintf(stderr, "Error: Could not copy video codec parameters\n");&#xA;        return 1;&#xA;    }&#xA;  &#xA;    AVStream *audio_stream = avformat_new_stream(output_format_ctx, audio_enc_codec);&#xA;    if (!audio_stream) {&#xA;        fprintf(stderr, "Error: Could not create audio stream\n");&#xA;        return 1;&#xA;    }&#xA;   &#xA;    if (avcodec_parameters_from_context(audio_stream->codecpar, audio_enc_ctx) &lt; 0) {&#xA;        fprintf(stderr, "Error: Could not copy audio codec parameters\n");&#xA;        return 1;&#xA;    }&#xA;  &#xA;    if (avformat_write_header(output_format_ctx, NULL) &lt; 0) {&#xA;        fprintf(stderr, "Error: Could not write header\n");&#xA;        return 1;&#xA;    }&#xA;  &#xA;     int video_frame_count = 0, audio_frame_count = 0;&#xA;    &#xA;    while (1) {&#xA;&#xA;        if (av_read_frame(format_ctx, &amp;pkt) &lt; 0) {&#xA;            fprintf(stderr, "BREAK FROM MAIN WHILE LOOP\n");&#xA;            break;&#xA;        }&#xA;&#xA;        if (pkt.stream_index == video_stream_index) {&#xA;&#xA;            if (avcodec_send_packet(video_dec_ctx, &amp;pkt) &lt; 0) {&#xA;                fprintf(stderr, "Error: Could not send video packet for decoding\n");&#xA;                return 1;&#xA;            }&#xA;&#xA;            while (avcodec_receive_frame(video_dec_ctx, video_frame) == 0) { &#xA;&#xA;                if (avcodec_send_frame(video_enc_ctx, video_frame) &lt; 0) {&#xA;                    fprintf(stderr, "Error: Could not send video frame for encoding\n");&#xA;                    return 1;&#xA;                }&#xA;&#xA;                while (avcodec_receive_packet(video_enc_ctx, &amp;video_pkt) == 0) {&#xA;                    &#xA;                    if (av_write_frame(output_format_ctx, &amp;video_pkt) &lt; 0) {&#xA;                        fprintf(stderr, "Error: Could not write video packet to output file.\n");&#xA;                        return 1;&#xA;                    }&#xA;&#xA;                    av_packet_unref(&amp;video_pkt);&#xA;                }&#xA;&#xA;                video_frame_count&#x2B;&#x2B;;&#xA;            }&#xA;        } else if (pkt.stream_index == audio_stream_index) {&#xA;&#xA;            if (avcodec_send_packet(audio_dec_ctx, &amp;pkt) &lt; 0) {&#xA;                fprintf(stderr, "Error: Could not send audio packet for decoding\n");&#xA;                return 1;&#xA;            }&#xA;&#xA;            while (avcodec_receive_frame(audio_dec_ctx, audio_frame) == 0) { &#xA; &#xA;                if (avcodec_send_frame(audio_enc_ctx, audio_frame) &lt; 0) {&#xA;                    fprintf(stderr, "Error: Could not send audio frame for encoding\n");&#xA;                    return 1;&#xA;                }&#xA;&#xA;                while (avcodec_receive_packet(audio_enc_ctx, &amp;audio_pkt) == 0) {                    if (av_write_frame(output_format_ctx, &amp;audio_pkt) &lt; 0) {&#xA;                        fprintf(stderr, "Error: Could not write audio packet to output file\n");&#xA;                        return 1;&#xA;                    }&#xA;&#xA;                    av_packet_unref(&amp;audio_pkt);&#xA;                }&#xA;&#xA;                audio_frame_count&#x2B;&#x2B;;&#xA;            }&#xA;        }&#xA;&#xA;        av_packet_unref(&amp;pkt);&#xA;    }&#xA;&#xA;    if (av_write_trailer(output_format_ctx) &lt; 0) {&#xA;        fprintf(stderr, "Error: Could not write trailer\n");&#xA;        return 1;&#xA;    }  &#xA;    &#xA;    avformat_close_input(&amp;format_ctx);&#xA;    avio_close(output_format_ctx->pb);&#xA;    avformat_free_context(output_format_ctx);&#xA;    &#xA;    av_frame_free(&amp;video_frame);&#xA;    avcodec_free_context(&amp;video_dec_ctx);&#xA;    avcodec_free_context(&amp;video_enc_ctx);&#xA;    av_dict_free(&amp;video_enc_opts);&#xA;    &#xA;    av_frame_free(&amp;audio_frame);&#xA;    avcodec_free_context(&amp;audio_dec_ctx);&#xA;    avcodec_free_context(&amp;audio_enc_ctx);&#xA;&#xA;    printf("Conversion complete.  %d video frames processed and %d audio frames processed.\n",video_frame_count, audio_frame_count);&#xA;&#xA;    return 0;&#xA;}&#xA;&#xA;&#xA;int main(int argc, char *argv[]) {&#xA;    if (argc != 3) {&#xA;        printf("Usage: %s  \n", argv[0]);&#xA;        return 1;&#xA;    }&#xA;&#xA;    const char *input_filename = argv[1];&#xA;    const char *output_filename = argv[2];&#xA;&#xA;    avcodec_register_all();&#xA;    av_register_all();&#xA;&#xA;    int returnValue = encodeVideoAndAudio4(input_filename, output_filename);&#xA;    &#xA;    return 0;&#xA;}&#xA;&#xA;

    &#xA;

    When i comment out the blocks that process one of the two streams, the other stream is converted and written to the output.mp4 successfully.&#xA;When each stream is processed in a separate loop, only the first stream is processed and written to the output.mp4 file and the other stream is skipped.&#xA;When both streams are processed in a common loop as it is in the code above, the above mentioned error appears.

    &#xA;

  • Clickstream Data : Definition, Use Cases, and More

    15 avril 2024, par Erin

    Gaining a deeper understanding of user behaviour — customers’ different paths, digital footprints, and engagement patterns — is crucial for providing a personalised experience and making informed marketing decisions. 

    In that sense, clickstream data, or a comprehensive record of a user’s online activities, is one of the most valuable sources of actionable insights into users’ behavioural patterns. 

    This article will cover everything marketing teams need to know about clickstream data, from the basic definition and examples to benefits, use cases, and best practices. 

    What is clickstream data ? 

    As a form of web analytics, clickstream data focuses on tracking and analysing a user’s online activity. These digital breadcrumbs offer insights into the websites the user has visited, the pages they viewed, how much time they spent on a page, and where they went next.

    Illustration of collecting and analysing data

    Your clickstream pipeline can be viewed as a “roadmap” that can help you recognise consistent patterns in how users navigate your website. 

    With that said, you won’t be able to learn much by analysing clickstream data collected from one user’s session. However, a proper analysis of large clickstream datasets can provide a wealth of information about consumers’ online behaviours and trends — which marketing teams can use to make informed decisions and optimise their digital marketing strategy. 

    Clickstream data collection can serve numerous purposes, but the main goal remains the same — gaining valuable insights into visitors’ behaviours and online activities to deliver a better user experience and improve conversion likelihood. 

    Depending on the specific events you’re tracking, clickstream data can reveal the following : 

    • How visitors reach your website 
    • The terms they type into the search engine
    • The first page they land on
    • The most popular pages and sections of your website
    • The amount of time they spend on a page 
    • Which elements of the page they interact with, and in what sequence
    • The click path they take 
    • When they convert, cancel, or abandon their cart
    • Where the user goes once they leave your website

    As you can tell, once you start collecting this type of data, you’ll learn quite a bit about the user’s online journey and the different ways they engage with your website — all without including any personal details about your visitors.

    Types of clickstream data 

    While all clickstream data keeps a record of the interactions that occur while the user is navigating a website or a mobile application — or any other digital platform — it can be divided into two types : 

    • Aggregated (web traffic) data provides comprehensive insights into the total number of visits and user interactions on a digital platform — such as your website — within a given timeframe 
    • Unaggregated data is broken up into smaller segments, focusing on an individual user’s online behaviour and website interactions 

    One thing to remember is that to gain valuable insights into user behaviour and uncover sequential patterns, you need a powerful tool and access to full clickstream datasets. Matomo’s Event Tracking can provide a comprehensive view of user interactions on your website or mobile app — everything from clicking a button and completing a form to adding (or removing) products from their cart. 

    On that note, based on the specific events you’re tracking when a user visits your website, clickstream data can include : 

    • Web navigation data : referring URL, visited pages, click path, and exit page
    • User interaction data : mouse movements, click rate, scroll depth, and button clicks
    • Conversion data : form submissions, sign-ups, and transactions 
    • Temporal data : page load time, timestamps, and the date and time of day of the user’s last login 
    • Session data : duration, start, and end times and number of pages viewed per session
    • Error data : 404 errors and network or server response issues 

    Try Matomo for Free

    Get the web insights you need, without compromising data accuracy.

    No credit card required

    Clickstream data benefits and use cases 

    Given the actionable insights that clickstream data collection provides, it can serve a wide range of use cases — from identifying behavioural patterns and trends and examining competitors’ performance to helping marketing teams map out customer journeys and improve ROI.

    Example of using clickstream data for marketing ROI

    According to the global Clickstream Analytics Market Report 2024, some key applications of clickstream analytics include click-path optimisation, website and app optimisation, customer analysis, basket analysis, personalisation, and traffic analysis. 

    The behavioural patterns and user preferences revealed by clickstream analytics data can have many applications — we’ve outlined the prominent use cases below. 

    Customer journey mapping 

    Clickstream data allows you to analyse the e-commerce customer’s online journey and provides insights into how they navigate your website. With such a comprehensive view of their click path, it becomes easier to understand user behaviour at each stage — from initial awareness to conversion — identify the most effective touchpoints and fine-tune that journey to improve their conversion likelihood. 

    Identifying customer trends 

    Clickstream data analytics can also help you identify trends and behavioural patterns — the most common sequences and similarities in how users reached your website and interacted with it — especially when you can access data from many website visitors. 

    Think about it — there are many ways in which you can use these insights into the sequence of clicks and interactions and recurring patterns to your team’s advantage. 

    Here’s an example : 

    It can reveal that some pieces of content and CTAs are performing well in encouraging visitors to take action — which shows how you should optimise other pages and what you should strive to create in the future, too. 

    Preventing site abandonment 

    Cart abandonment remains a serious issue for online retailers : 

    According to a recent report, the global cart abandonment rate in the fourth quarter of 2023 was at 83%. 

    That means that roughly eight out of ten e-commerce customers will abandon their shopping carts — most commonly due to additional costs, slow website loading times and the requirement to create an account before purchasing. 

    In addition to cart abandonment predictions, clickstream data analytics can reveal the pages where most visitors tend to leave your website. These drop-off points are clear indicators that something’s not working as it should — and once you can pinpoint them, you’ll be able to address the issue and increase conversion likelihood.

    Improving marketing campaign ROI 

    As previously mentioned, clickstream data analysis provides insights into the customer journey. Still, you may not realise that you can also use this data to keep track of your marketing effectiveness

    Global digital ad spending continues to grow — and is expected to reach $836 billion by 2026. It’s easy to see why relying on accurate data is crucial when deciding which marketing channels to invest in. 

    You want to ensure you’re allocating your digital marketing and advertising budget to the channels — be it SEO, pay-per-click (PPC) ads, or social media campaigns — that impact driving conversions. 

    When you combine clickstream e-commerce data with conversion rates, you’ll find the latter in Matomo’s goal reports and have a solid, data-driven foundation for making better marketing decisions.

    Try Matomo for Free

    Get the web insights you need, without compromising data accuracy.

    No credit card required

    Delivering a better user experience (UX) 

    Clickstream data analysis allows you to identify specific “pain points” — areas of the website that are difficult to use and may cause customer frustration. 

    It’s clear how this would be beneficial to your business : 

    Once you’ve identified these pain points, you can make the necessary changes to your website’s layout and address any technical issues that users might face, improving usability and delivering a smoother experience to potential customers. 

    Collecting clickstream data : Tools and legal implications 

    Your team will need a powerful tool capable of handling clickstream analytics to reap the benefits we’ve discussed previously. But at the same time, you need to respect users’ online privacy throughout clickstream data collection.

    Illustration of user’s data protection and online security

    Generally speaking, there are two ways to collect data about users’ online activity — web analytics tools and server log files.

    Web analytics tools are the more commonly used solution. Specifically designed to collect and analyse website data, these tools rely on JavaScript tags that run in the browser, providing actionable insights about user behaviour. Server log files can be a gold mine of data, too — but that data is raw and unfiltered, making it much more challenging to interpret and analyse. 

    That brings us to one of the major clickstream challenges to keep in mind as you move forward — compliance.

    While Google remains a dominant player in the web analytics market, there’s one area where Matomo has a significant advantage — user privacy. 

    Matomo operates according to privacy laws — including the General Data Protection Regulation (GDPR) and California Consumer Privacy Act (CCPA), making it an ethical alternative to Google Analytics. 

    It should go without saying, but compliance with data privacy laws — the most talked-about one being the GDPR framework introduced by the EU — isn’t something you can afford to overlook. 

    The GDPR was first implemented in the EU in 2018. Since then, several fines have been issued for non-compliance — including the record fine of €1.2 billion that Meta Platforms, Inc. received in 2023 for transferring personal data of EU-based users to the US.

    Clickstream analytics data best practices 

    Illustration of collecting, analysing and presenting data

    As valuable as it might be, processing large amounts of clickstream analytics data can be a complex — and, at times, overwhelming — process. 

    Here are some best practices to keep in mind when it comes to clickstream analysis : 

    Define your goals 

    It’s essential to take the time to define your goals and objectives. 

    Once you have a clear idea of what you want to learn from a given clickstream dataset and the outcomes you hope to see, it’ll be easier to narrow down your scope — rather than trying to tackle everything at once — before moving further down the clickstream pipeline. 

    Here are a few examples of goals and objectives you can set for clickstream analysis : 

    • Understanding and predicting users’ behavioural patterns 
    • Optimising marketing campaigns and ROI 
    • Attributing conversions to specific marketing touchpoints and channels

    Analyse your data 

    Collecting clickstream analytics data is only part of the equation ; what you do with raw data and how you analyse it matters. You can have the most comprehensive dataset at your disposal — but it’ll be practically worthless if you don’t have the skill set to analyse and interpret it. 

    In short, this is the stage of your clickstream pipeline where you uncover common sequences and consistent patterns in user behaviour. 

    Clickstream data analytics can extract actionable insights from large datasets using various approaches, models, and techniques. 

    Here are a few examples : 

    • If you’re working with clickstream e-commerce data, you should perform funnel or conversion analyses to track conversion rates as users move through your sales funnel. 
    • If you want to group and analyse users based on shared characteristics, you can use Matomo for cohort analysis
    • If your goal is to predict future trends and outcomes — conversion and cart abandonment prediction, for example — based on available data, prioritise predictive analytics.

    Try Matomo for Free

    Get the web insights you need, without compromising data accuracy.

    No credit card required

    Organise and visualise your data

    As you reach the end of your clickstream pipeline, you need to start thinking about how you will present and communicate your data. And what better way to do that than to transform that data into easy-to-understand visualisations ? 

    Here are a few examples of easily digestible formats that facilitate quick decision-making : 

    • User journey maps, which illustrate the exact sequence of interactions and user flow through your website 
    • Heatmaps, which serve as graphical — and typically colour-coded — representations of a website visitor’s activity 
    • Funnel analysis, which are broader at the top but get increasingly narrower towards the bottom as users flow through and drop off at different stages of the pipeline 

    Collect clickstream data with Matomo 

    Clickstream data is hard to beat when tracking the website visitor’s journey — from first to last interaction — and understanding user behaviour. By providing real-time insights, your clickstream pipeline can help you see the big picture, stay ahead of the curve and make informed decisions about your marketing efforts. 

    Matomo accurate data and compliance with GDPR and other data privacy regulations — it’s an all-in-one, ethical platform that can meet all your web analytics needs. That’s why over 1 million websites use Matomo for their web analytics.

    Try Matomo free for 21 days. No credit card required.