Recherche avancée

Médias (0)

Mot : - Tags -/signalement

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

Autres articles (57)

  • Le profil des utilisateurs

    12 avril 2011, par

    Chaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
    L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)

  • Configurer la prise en compte des langues

    15 novembre 2010, par

    Accéder à la configuration et ajouter des langues prises en compte
    Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
    De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
    Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...)

  • XMP PHP

    13 mai 2011, par

    Dixit Wikipedia, XMP signifie :
    Extensible Metadata Platform ou XMP est un format de métadonnées basé sur XML utilisé dans les applications PDF, de photographie et de graphisme. Il a été lancé par Adobe Systems en avril 2001 en étant intégré à la version 5.0 d’Adobe Acrobat.
    Étant basé sur XML, il gère un ensemble de tags dynamiques pour l’utilisation dans le cadre du Web sémantique.
    XMP permet d’enregistrer sous forme d’un document XML des informations relatives à un fichier : titre, auteur, historique (...)

Sur d’autres sites (3868)

  • Video concatenation puts sound out of sync

    9 août 2019, par mmorin

    (Cross-posted from Video Production, where the question received no answers and may be more technical than usual video production.)

    I have several MOV files from a DSLR camera. I concatenate them with directions from this thread :

    ffmpeg -safe 0 -f concat -i files_to_combine -vcodec copy -acodec copy temp.MOV

    where files_to_combine is :

    file ./DSC_0013.MOV
    ...
    file ./DSC_0019.MOV

    The result has image and sound in sync for the first clip and is out of sync by fractions of a second in the second clip, and out of sync by around a second for the last clip. It is probably related to this error from the log :

    [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f82dd802200] st: 0 edit list: 1 Missing key frame while searching for timestamp: 1000
    [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f82dd802200] st: 0 edit list 1 Cannot find an index entry before timestamp: 1000.
    [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f82dd802200] Auto-inserting h264_mp4toannexb bitstream filter

    How can I trim the frames to the available sound stream, then concatenate the two videos ?

    The full log from the ffmpeg command is :

    ffmpeg version 4.1.3 Copyright (c) 2000-2019 the FFmpeg developers
     built with Apple LLVM version 10.0.1 (clang-1001.0.46.4)
     configuration: --prefix=/usr/local/Cellar/ffmpeg/4.1.3_1 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags='-I/Library/Java/JavaVirtualMachines/adoptopenjdk-11.0.2.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/adoptopenjdk-11.0.2.jdk/Contents/Home/include/darwin' --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libmp3lame --enable-libopus --enable-librubberband --enable-libsnappy --enable-libtesseract --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp --enable-libspeex --enable-videotoolbox --disable-libjack --disable-indev=jack --enable-libaom --enable-libsoxr
     libavutil      56. 22.100 / 56. 22.100
     libavcodec     58. 35.100 / 58. 35.100
     libavformat    58. 20.100 / 58. 20.100
     libavdevice    58.  5.100 / 58.  5.100
     libavfilter     7. 40.101 /  7. 40.101
     libavresample   4.  0.  0 /  4.  0.  0
     libswscale      5.  3.100 /  5.  3.100
     libswresample   3.  3.100 /  3.  3.100
     libpostproc    55.  3.100 / 55.  3.100
    [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f82dc00e000] Auto-inserting h264_mp4toannexb bitstream filter
    Input #0, concat, from 'files_to_combine':
     Duration: N/A, start: -0.592000, bitrate: 36888 kb/s
       Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc, smpte170m/bt709/bt470m), 1920x1080, 35352 kb/s, 50 fps, 50 tbr, 50k tbn, 100 tbc
       Metadata:
         handler_name    : VideoHandler
       Stream #0:1(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, stereo, s16, 1536 kb/s
       Metadata:
         handler_name    : SoundHandler
    Output #0, mov, to 'temp.MOV':
     Metadata:
       encoder         : Lavf58.20.100
       Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc, smpte170m/bt709/bt470m), 1920x1080, q=2-31, 35352 kb/s, 50 fps, 50 tbr, 50k tbn, 50k tbc
       Metadata:
         handler_name    : VideoHandler
       Stream #0:1(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, stereo, s16, 1536 kb/s
       Metadata:
         handler_name    : SoundHandler
    Stream mapping:
     Stream #0:0 -> #0:0 (copy)
     Stream #0:1 -> #0:1 (copy)
    Press [q] to stop, [?] for help
    [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f82dd802200] st: 0 edit list: 1 Missing key frame while searching for timestamp: 1000
    [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f82dd802200] st: 0 edit list 1 Cannot find an index entry before timestamp: 1000.
    [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f82dd802200] Auto-inserting h264_mp4toannexb bitstream filter
    frame=41886 fps=547 q=-1.0 Lsize= 3789826kB time=00:13:58.75 bitrate=37014.8kbits/s speed=10.9x    
    video:3631879kB audio:157123kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.021759%

    Update (1 July 2019)

    I thought that the files had a problem at the beginning or at the end, so I
    trimmed one second from each end, but it still had the sound out of sync :

    FILES=files_to_combine
    OUTPUT=show2.MOV
    rm $FILES
    for i in 3 4 5 6 7 8 9; do
       rm ${i}.MOV
       duration=$(ffprobe -v 0 -show_entries format=duration -of compact=p=0:nk=1  DSC_001${i}.MOV)
       trimmed=$(echo $duration - 1 | bc)
       ffmpeg -ss 1 -t $trimmed -i DSC_001${i}.MOV -vcodec copy -acodec copy ${i}.MOV
       echo file ./${i}.MOV >> $FILES
    done

    rm $OUTPUT
    ffmpeg -safe 0 -f concat -i $FILES -vcodec copy -acodec copy $OUTPUT

    When I trim a single file near the end, the sound and video do not seem out of sync :

    ffmpeg -ss 00:09:20 -t 20 -i DSC_0014.MOV -vcodec copy -acodec copy end.MOV

    When I concatenate only 30 seconds from each video, the result seems OK :

    FILES=files_to_combine
    OUTPUT=show2.MOV
    rm $FILES
    for i in 3 4 5 6 7 8 9; do
       rm ${i}.MOV
       duration=$(ffprobe -v 0 -show_entries format=duration -of compact=p=0:nk=1  DSC_001${i}.MOV)
       start=$(echo $duration - 30 | bc)
       end=$(echo $duration - 1 | bc)
       ffmpeg -ss $start -t $end -i DSC_001${i}.MOV -vcodec copy -acodec copy ${i}.MOV
       echo file ./${i}.MOV >> $FILES
    done

    rm $OUTPUT
    ffmpeg -safe 0 -f concat -i $FILES -vcodec copy -acodec copy $OUTPUT

    This last concatenation gives this error multiple times :

    [mov @ 0x7fc3c7837400] Non-monotonous DTS in output stream 0:0; previous: 9080205, current: 9080200; changing to 9080206. This may result in incorrect timestamps in the output file.

    So I am guessing that the problem is small differences in timestamps that
    accumulate and become more noticeable with longer durations and the
    concatenation of multiple files.

    For reference, the DSLR that shot these clips is a Nikon D3300 and the result
    of ffprobe on one of the files is :

    $ ffprobe DSC_0017.MOV -hide_banner
    [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fab70003800] st: 0 edit list: 1 Missing key frame while searching for timestamp: 1000
    [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fab70003800] st: 0 edit list 1 Cannot find an index entry before timestamp: 1000.
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'DSC_0017.MOV':
     Metadata:
       major_brand     : qt  
       minor_version   : 537331968
       compatible_brands: qt  niko
       creation_time   : 2019-06-12T23:52:37.000000Z
     Duration: 00:09:53.58, start: 0.000000, bitrate: 36843 kb/s
       Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc, smpte170m/bt709/bt470m), 1920x1080, 35300 kb/s, 50 fps, 50 tbr, 50k tbn, 100 tbc (default)
       Metadata:
         creation_time   : 2019-06-12T23:52:37.000000Z
       Stream #0:1(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, 2 channels, s16, 1536 kb/s (default)
       Metadata:
         creation_time   : 2019-06-12T23:52:37.000000Z

    Update (9 August 2019)

    I concatenated the files in iMovie and the sound and image are not as out of sync as with FFMPEG. Maybe iMovie aligns the timestamps at the end of each clip instead of concatenating the audio and image streams separately.

    I ran the concatenation again with the latest ffmpeg 4.1.4_1 on these files and others from the same camera. The audio and image are in sync in one case (the results lasts 46 minutes) out of sync in another (the result lasts 48 minutes).

  • Having trouble compiling ffmpeg code in command terminal

    10 septembre 2019, par m00ncake

    I am having a bit of trouble compiling my c++ code in my terminal. I have ffmpeg installed as shown below.

    ffmpeg version n4.1 Copyright (c) 2000-2018 the FFmpeg developers
     built with gcc 7 (Ubuntu 7.4.0-1ubuntu1~18.04.1)
     configuration: --enable-gpl --enable-version3 --disable-static --enable-shared --enable-small --enable-avisynth --enable-chromaprint --enable-frei0r --enable-gmp --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-librtmp --enable-libshine --enable-libsmbclient --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtesseract --enable-libtheora --enable-libtwolame --enable-libv4l2 --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libxml2 --enable-libzmq --enable-libzvbi --enable-lv2 --enable-libmysofa --enable-openal --enable-opencl --enable-opengl --enable-libdrm
     libavutil      56. 22.100 / 56. 22.100
     libavcodec     58. 35.100 / 58. 35.100
     libavformat    58. 20.100 / 58. 20.100
     libavdevice    58.  5.100 / 58.  5.100
     libavfilter     7. 40.101 /  7. 40.101
     libswscale      5.  3.100 /  5.  3.100
     libswresample   3.  3.100 /  3.  3.100
     libpostproc    55.  3.100 / 55.  3.100
    Hyper fast Audio and Video encoder
    usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...

    However, when I compile my c++ code, currently trying to get NTP timestamps from private data in ffmpeg but I need to include their headers ? I have looked into ffmpeg’s libavformat folder and it does have rtpdec.h but when I compile it in the command line, i get this error. (trying to include this header for RTSPState and RTSPStream as well as RTPDemuxContext)

    cf.cpp:11:10: fatal error: libavformat/rtsp.h: No such file or directory
    #include <libavformat></libavformat>rtpdec.h>
             ^~~~~~~~~~~~~~~~~~~~
    compilation terminated.

    This is my code :

    #include
    #include
    #include <iostream>
    #include <fstream>
    #include <sstream>

    extern "C" {
    #include <libavcodec></libavcodec>avcodec.h>
    #include <libavformat></libavformat>avformat.h>
    #include <libavformat></libavformat>avio.h>
    #include <libavformat></libavformat>rtpdec.h>
    #include <libswscale></libswscale>swscale.h>
    }

    int main(int argc, char** argv) {

       // Open the initial context variables that are needed
       SwsContext *img_convert_ctx;
       AVFormatContext* format_ctx = avformat_alloc_context();
       AVCodecContext* codec_ctx = NULL;
       int video_stream_index;
       uint32_t* last_rtcp_ts;
       double* base_time;
       double* time;

       // Register everything
       av_register_all();
       avformat_network_init();

       //open RTSP
       if (avformat_open_input(&amp;format_ctx, "rtsp://admin:password@192.168.1.67:554",
               NULL, NULL) != 0) {
           return EXIT_FAILURE;
       }

       if (avformat_find_stream_info(format_ctx, NULL) &lt; 0) {
           return EXIT_FAILURE;
       }

       //search video stream
       for (int i = 0; i &lt; format_ctx->nb_streams; i++) {
           if (format_ctx->streams[i]->codec->codec_type == AVMEDIA_TYPE_VIDEO)
               video_stream_index = i;
       }

       AVPacket packet;
       av_init_packet(&amp;packet);

       //open output file
       AVFormatContext* output_ctx = avformat_alloc_context();

       AVStream* stream = NULL;
       int cnt = 0;

       //start reading packets from stream and write them to file
       av_read_play(format_ctx);    //play RTSP

       // Get the codec
       AVCodec *codec = NULL;
       codec = avcodec_find_decoder(AV_CODEC_ID_H264);
       if (!codec) {
           exit(1);
       }

    // Add this to allocate the context by codec
    codec_ctx = avcodec_alloc_context3(codec);

    avcodec_get_context_defaults3(codec_ctx, codec);
    avcodec_copy_context(codec_ctx, format_ctx->streams[video_stream_index]->codec);
    std::ofstream output_file;

    if (avcodec_open2(codec_ctx, codec, NULL) &lt; 0)
       exit(1);

       img_convert_ctx = sws_getContext(codec_ctx->width, codec_ctx->height,
               codec_ctx->pix_fmt, codec_ctx->width, codec_ctx->height, AV_PIX_FMT_RGB24,
               SWS_BICUBIC, NULL, NULL, NULL);

       int size = avpicture_get_size(AV_PIX_FMT_YUV420P, codec_ctx->width,
               codec_ctx->height);
       uint8_t* picture_buffer = (uint8_t*) (av_malloc(size));
       AVFrame* picture = av_frame_alloc();
       AVFrame* picture_rgb = av_frame_alloc();
       int size2 = avpicture_get_size(AV_PIX_FMT_RGB24, codec_ctx->width,
               codec_ctx->height);
       uint8_t* picture_buffer_2 = (uint8_t*) (av_malloc(size2));
       avpicture_fill((AVPicture *) picture, picture_buffer, AV_PIX_FMT_YUV420P,
               codec_ctx->width, codec_ctx->height);
       avpicture_fill((AVPicture *) picture_rgb, picture_buffer_2, AV_PIX_FMT_RGB24,
               codec_ctx->width, codec_ctx->height);

       while (av_read_frame(format_ctx, &amp;packet) >= 0 &amp;&amp; cnt &lt; 1000) { //read ~ 1000 frames

           RTSPState* rt = format_ctx->priv_data;
           RTSPStream *rtsp_stream = rt->rtsp_streams[0];
           RTPDemuxContext* rtp_demux_context = rtsp_stream->transport_priv;
           uint32_t new_rtcp_ts = rtp_demux_context->last_rtcp_timestamp;
           uint64_t last_ntp_time = 0;

           if (new_rtcp_ts != *last_rtcp_ts) {
               *last_rtcp_ts = new_rtcp_ts;
               last_ntp_time = rtp_demux_context->last_rtcp_ntp_time;
               uint32_t seconds = ((last_ntp_time >> 32) &amp; 0xffffffff) - 2208988800;
               uint32_t fraction  = (last_ntp_time &amp; 0xffffffff);
               double useconds = ((double) fraction / 0xffffffff);
               *base_time = seconds + useconds;
               uint32_t d_ts = rtp_demux_context->timestamp - *last_rtcp_ts;
               *time = *base_time + d_ts / 90000.0;
               std::cout &lt;&lt; "Time is: " &lt;&lt; *time &lt;&lt; std::endl;
           }

           std::cout &lt;&lt; "1 Frame: " &lt;&lt; cnt &lt;&lt; std::endl;
           if (packet.stream_index == video_stream_index) {    //packet is video
               std::cout &lt;&lt; "2 Is Video" &lt;&lt; std::endl;
               if (stream == NULL) {    //create stream in file
                   std::cout &lt;&lt; "3 create stream" &lt;&lt; std::endl;
                   stream = avformat_new_stream(output_ctx,
                           format_ctx->streams[video_stream_index]->codec->codec);
                   avcodec_copy_context(stream->codec,
                           format_ctx->streams[video_stream_index]->codec);
                   stream->sample_aspect_ratio =
                           format_ctx->streams[video_stream_index]->codec->sample_aspect_ratio;
               }
               int check = 0;
               packet.stream_index = stream->id;
               std::cout &lt;&lt; "4 decoding" &lt;&lt; std::endl;
               int result = avcodec_decode_video2(codec_ctx, picture, &amp;check, &amp;packet);
               std::cout &lt;&lt; "Bytes decoded " &lt;&lt; result &lt;&lt; " check " &lt;&lt; check
                       &lt;&lt; std::endl;
               if (cnt > 100)    //cnt &lt; 0)
                       {
                   sws_scale(img_convert_ctx, picture->data, picture->linesize, 0,
                           codec_ctx->height, picture_rgb->data, picture_rgb->linesize);
                   std::stringstream file_name;
                   file_name &lt;&lt; "test" &lt;&lt; cnt &lt;&lt; ".ppm";
                   output_file.open(file_name.str().c_str());
                   output_file &lt;&lt; "P3 " &lt;&lt; codec_ctx->width &lt;&lt; " " &lt;&lt; codec_ctx->height
                           &lt;&lt; " 255\n";
                   for (int y = 0; y &lt; codec_ctx->height; y++) {
                       for (int x = 0; x &lt; codec_ctx->width * 3; x++)
                           output_file
                                   &lt;&lt; (int) (picture_rgb->data[0]
                                           + y * picture_rgb->linesize[0])[x] &lt;&lt; " ";
                   }
                   output_file.close();
               }
               cnt++;
           }
           av_free_packet(&amp;packet);
           av_init_packet(&amp;packet);
       }
       av_free(picture);
       av_free(picture_rgb);
       av_free(picture_buffer);
       av_free(picture_buffer_2);

       av_read_pause(format_ctx);
       avio_close(output_ctx->pb);
       avformat_free_context(output_ctx);

       return (EXIT_SUCCESS);
    }
    </sstream></fstream></iostream>

    The command i use to compile my code : g++ -w cf.cpp -o cf $(pkg-config --cflags --libs libavformat libswscale libavcodec)

    I am a bit new to coding in FFmpeg.

  • FFMPEG, Creating an MPEG-DASH stream with existing inputs

    10 septembre 2019, par kitensei

    I am trying to generating a DASH .mpd file from multiple inputs (2 videos, 1 audio) without any success..

    What I’d like to do it’s simple getting the streams and create an mpd file without any re encoding since I’ve already my sources ready.

    The output seems to work in rxplayer, but I do get a lot of errors (see log below).

    Here are my 3 sources (taken from http://dash-mse-test.appspot.com/media.html) :

    ➜  test-dash $ ffprobe -hide_banner ../test-sources/car/car-20120827-89.mp4
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '../test-sources/car/car-20120827-89.mp4':
     Metadata:
       major_brand     : dash
       minor_version   : 0
       compatible_brands: iso6avc1mp41
       creation_time   : 2012-08-24T03:04:15.000000Z
     Duration: 00:03:01.39, start: 0.000000, bitrate: 4202 kb/s
       Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(progressive), 1920x1080, 171 kb/s, 23.97 fps, 23.97 tbr, 90k tbn, 47.95 tbc (default)
       Metadata:
         creation_time   : 2012-08-24T03:04:15.000000Z
         handler_name    : VideoHandler

    ➜  test-dash $ ffprobe -hide_banner ../test-sources/car/car-20120827-88.mp4
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '../test-sources/car/car-20120827-88.mp4':
     Metadata:
       major_brand     : dash
       minor_version   : 0
       compatible_brands: iso6avc1mp41
       creation_time   : 2012-08-27T01:01:28.000000Z
     Duration: 00:03:01.43, start: 0.000000, bitrate: 2076 kb/s
       Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(progressive), 1280x720, 81 kb/s, 23.97 fps, 23.97 tbr, 90k tbn, 47.95 tbc (default)
       Metadata:
         creation_time   : 2012-08-27T01:01:28.000000Z
         handler_name    : VideoHandler

    ➜  test-dash $ ffprobe -hide_banner ../test-sources/car/car-20120827-8b.mp4
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '../test-sources/car/car-20120827-8b.mp4':
     Metadata:
       major_brand     : dash
       minor_version   : 0
       compatible_brands: iso6mp41
       creation_time   : 2012-08-27T01:19:23.000000Z
     Duration: 00:03:01.63, start: 0.000000, bitrate: 31 kb/s
       Stream #0:0(und): Audio: aac (LC) (mp4a / 0x6134706D), 22050 Hz, mono, fltp, 1 kb/s (default)
       Metadata:
         creation_time   : 2012-08-27T01:19:23.000000Z
         handler_name    : SoundHandler

    And here how I am "muxing" them together with an .mpd manifest :

    ffmpeg  \
    -re \
    -i ../test-sources/car/car-20120827-88.mp4 \
    -i ../test-sources/car/car-20120827-89.mp4 \
    -i ../test-sources/car/car-20120827-8d.mp4 \
    -map 0:0  \
    -map 1:0 \
    -map 2:0 \
    -c copy \
    -bf 1 -keyint_min 120 -g 120 -sc_threshold 0 \
    -b_strategy 0 -use_timeline 1 -use_template 1 \
    -adaptation_sets "id=0,streams=v id=1,streams=a" \
    -f dash out.mpd

    The generated mpd file :

    &lt;?xml version="1.0" encoding="utf-8"?>
    <mpd xmlns="urn:mpeg:dash:schema:mpd:2011" profiles="urn:mpeg:dash:profile:isoff-live:2011" type="static" mediapresentationduration="PT3M1.3S" minbuffertime="PT10.0S">
       <programinformation>
       </programinformation>
       <period start="PT0.0S">
           <adaptationset contenttype="video" segmentalignment="true" bitstreamswitching="true" lang="und">
               <representation mimetype="video/mp4" codecs="avc1.4d401f" bandwidth="81397" width="1280" height="720" framerate="45000/1877">
                   <segmenttemplate timescale="24000" initialization="init-stream$RepresentationID$.m4s" media="chunk-stream$RepresentationID$-$Number%05d$.m4s" startnumber="1">
                       <segmenttimeline>
                           <s t="0" d="120128"></s>
                           <s d="120120" r="34"></s>
                           <s d="29023"></s>
                       </segmenttimeline>
                   </segmenttemplate>
               </representation>
               <representation mimetype="video/mp4" codecs="avc1.640028" bandwidth="171953" width="1920" height="1080" framerate="45000/1877">
                   <segmenttemplate timescale="24000" initialization="init-stream$RepresentationID$.m4s" media="chunk-stream$RepresentationID$-$Number%05d$.m4s" startnumber="1">
                       <segmenttimeline>
                           <s t="0" d="121129"></s>
                           <s d="239239"></s>
                           <s d="120120" r="32"></s>
                           <s d="29023"></s>
                       </segmenttimeline>
                   </segmenttemplate>
               </representation>
           </adaptationset>
           <adaptationset contenttype="audio" segmentalignment="true" bitstreamswitching="true" lang="und">
               <representation mimetype="audio/mp4" codecs="mp4a.40.2" bandwidth="13976" audiosamplingrate="44100">
                   <audiochannelconfiguration schemeiduri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"></audiochannelconfiguration>
                   <segmenttemplate timescale="44100" initialization="init-stream$RepresentationID$.m4s" media="chunk-stream$RepresentationID$-$Number%05d$.m4s" startnumber="1">
                       <segmenttimeline>
                           <s t="0" d="219136"></s>
                           <s d="221184"></s>
                           <s d="220160"></s>
                           <s d="221184"></s>
                           <s d="220160"></s>
                           <s d="221184" r="1"></s>
                           <s d="220160"></s>
                           <s d="221184"></s>
                           <s d="220160"></s>
                           <s d="221184"></s>
                           <s d="220160"></s>
                           <s d="221184"></s>
                           <s d="220160"></s>
                           <s d="221184"></s>
                           <s d="220160"></s>
                           <s d="221184" r="1"></s>
                           <s d="220160"></s>
                           <s d="221184"></s>
                           <s d="220160"></s>
                           <s d="221184"></s>
                           <s d="220160"></s>
                           <s d="221184"></s>
                           <s d="220160"></s>
                           <s d="221184"></s>
                           <s d="220160"></s>
                           <s d="221184" r="1"></s>
                           <s d="220160"></s>
                           <s d="221184"></s>
                           <s d="220160"></s>
                           <s d="221184"></s>
                           <s d="220160"></s>
                           <s d="221184"></s>
                           <s d="220160"></s>
                           <s d="63488"></s>
                       </segmenttimeline>
                   </segmenttemplate>
               </representation>
           </adaptationset>
       </period>
    </mpd>

    But I get a lot of errors :

    ➜  test-dash git:(0.1) ✗ ffmpeg  \
    -re \
    -i ../test-sources/car/car-20120827-88.mp4 \
    -i ../test-sources/car/car-20120827-89.mp4 \
    -i ../test-sources/car/car-20120827-8d.mp4 \
    -map 0:0  \
    -map 1:0 \
    -map 2:0 \
    -c copy \
    -bf 1 -keyint_min 120 -g 120 -sc_threshold 0 \
    -b_strategy 0 -use_timeline 1 -use_template 1 \
    -adaptation_sets "id=0,streams=v id=1,streams=a" \
    -f dash out.mpd
    ffmpeg version n4.2.1 Copyright (c) 2000-2019 the FFmpeg developers
     built with gcc 9.1.0 (GCC)
     configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-fontconfig --enable-gmp --enable-gnutls --enable-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libdrm --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libiec61883 --enable-libjack --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-nvdec --enable-nvenc --enable-omx --enable-shared --enable-version3
     libavutil      56. 31.100 / 56. 31.100
     libavcodec     58. 54.100 / 58. 54.100
     libavformat    58. 29.100 / 58. 29.100
     libavdevice    58.  8.100 / 58.  8.100
     libavfilter     7. 57.100 /  7. 57.100
     libswscale      5.  5.100 /  5.  5.100
     libswresample   3.  5.100 /  3.  5.100
     libpostproc    55.  5.100 / 55.  5.100
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '../test-sources/car/car-20120827-88.mp4':
     Metadata:
       major_brand     : dash
       minor_version   : 0
       compatible_brands: iso6avc1mp41
       creation_time   : 2012-08-27T01:01:28.000000Z
     Duration: 00:03:01.43, start: 0.000000, bitrate: 2076 kb/s
       Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(progressive), 1280x720, 81 kb/s, 23.97 fps, 23.97 tbr, 90k tbn, 47.95 tbc (default)
       Metadata:
         creation_time   : 2012-08-27T01:01:28.000000Z
         handler_name    : VideoHandler
    Input #1, mov,mp4,m4a,3gp,3g2,mj2, from '../test-sources/car/car-20120827-89.mp4':
     Metadata:
       major_brand     : dash
       minor_version   : 0
       compatible_brands: iso6avc1mp41
       creation_time   : 2012-08-24T03:04:15.000000Z
     Duration: 00:03:01.39, start: 0.000000, bitrate: 4202 kb/s
       Stream #1:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(progressive), 1920x1080, 171 kb/s, 23.97 fps, 23.97 tbr, 90k tbn, 47.95 tbc (default)
       Metadata:
         creation_time   : 2012-08-24T03:04:15.000000Z
         handler_name    : VideoHandler
    Input #2, mov,mp4,m4a,3gp,3g2,mj2, from '../test-sources/car/car-20120827-8d.mp4':
     Metadata:
       major_brand     : dash
       minor_version   : 0
       compatible_brands: iso6mp41
       creation_time   : 2012-08-27T00:59:44.000000Z
     Duration: 00:03:01.58, start: 0.000000, bitrate: 255 kb/s
       Stream #2:0(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 13 kb/s (default)
       Metadata:
         creation_time   : 2012-08-27T00:59:44.000000Z
         handler_name    : SoundHandler
    [dash @ 0x55b464bb1240] Opening 'init-stream0.m4s' for writing
    [dash @ 0x55b464bb1240] Opening 'init-stream1.m4s' for writing
    [dash @ 0x55b464bb1240] Opening 'init-stream2.m4s' for writing
    Output #0, dash, to 'out.mpd':
     Metadata:
       major_brand     : dash
       minor_version   : 0
       compatible_brands: iso6avc1mp41
       encoder         : Lavf58.29.100
       Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(progressive), 1280x720, q=2-31, 81 kb/s, 23.97 fps, 23.97 tbr, 24k tbn, 23.98 tbc (default)
       Metadata:
         creation_time   : 2012-08-27T01:01:28.000000Z
         handler_name    : VideoHandler
       Stream #0:1(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(progressive), 1920x1080, q=2-31, 171 kb/s, 23.97 fps, 23.97 tbr, 24k tbn, 23.98 tbc (default)
       Metadata:
         creation_time   : 2012-08-24T03:04:15.000000Z
         handler_name    : VideoHandler
       Stream #0:2(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 13 kb/s (default)
       Metadata:
         creation_time   : 2012-08-27T00:59:44.000000Z
         handler_name    : SoundHandler
    Stream mapping:
     Stream #0:0 -> #0:0 (copy)
     Stream #1:0 -> #0:1 (copy)
     Stream #2:0 -> #0:2 (copy)
    Press [q] to stop, [?] for help
    [dash @ 0x55b464bb1240] Opening 'chunk-stream0-00001.m4s.tmp' for writing
    [dash @ 0x55b464bb1240] Opening 'chunk-stream1-00001.m4s.tmp' for writing
    [dash @ 0x55b464bb1240] Opening 'chunk-stream2-00001.m4s.tmp' for writing
    [mp4 @ 0x55b464c3d840] Application provided duration: -8 / timestamp: 119119 is out of range for mov/mp4 format
    [dash @ 0x55b464bb1240] Opening 'chunk-stream0-00002.m4s.tmp' for writing
    [dash @ 0x55b464bb1240] Non-monotonous DTS in output stream 0:1; previous: 119127, current: 119119; changing to 119128. This may result in incorrect timestamps in the output file.
    [dash @ 0x55b464bb1240] Opening 'out.mpd.tmp' for writing
    [mp4 @ 0x55b464c425c0] Application provided duration: -1000 / timestamp: 119128 is out of range for mov/mp4 format
    [dash @ 0x55b464bb1240] Opening 'chunk-stream1-00002.m4s.tmp' for writing
    [dash @ 0x55b464bb1240] Opening 'chunk-stream2-00002.m4s.tmp' for writing
    [mp4 @ 0x55b464c425c0] Application provided duration: -8 / timestamp: 120120 is out of range for mov/mp4 format
    [mp4 @ 0x55b464c425c0] pts has no value
    [mp4 @ 0x55b464c3d840] Application provided duration: -8 / timestamp: 239239 is out of range for mov/mp4 format
    [dash @ 0x55b464bb1240] Opening 'chunk-stream0-00003.m4s.tmp' for writing
    [dash @ 0x55b464bb1240] Opening 'chunk-stream2-00003.m4s.tmp' for writing
    [dash @ 0x55b464bb1240] Opening 'out.mpd.tmp' for writing74 bitrate=N/A speed=   1x    
    [mp4 @ 0x55b464c3d840] Application provided duration: -8 / timestamp: 359359 is out of range for mov/mp4 format
    [dash @ 0x55b464bb1240] Opening 'chunk-stream0-00004.m4s.tmp' for writing
    [mp4 @ 0x55b464c425c0] Application provided duration: -8 / timestamp: 359359 is out of range for mov/mp4 format
    [dash @ 0x55b464bb1240] Opening 'chunk-stream1-00003.m4s.tmp' for writing
    [dash @ 0x55b464bb1240] Opening 'chunk-stream2-00004.m4s.tmp' for writing
    [dash @ 0x55b464bb1240] Opening 'out.mpd.tmp' for writing81 bitrate=N/A speed=   1x    
    [mp4 @ 0x55b464c3d840] Application provided duration: -8 / timestamp: 479479 is out of range for mov/mp4 format
    [dash @ 0x55b464bb1240] Opening 'chunk-stream0-00005.m4s.tmp' for writing
    [mp4 @ 0x55b464c425c0] Application provided duration: -8 / timestamp: 479479 is out of range for mov/mp4 format
    [dash @ 0x55b464bb1240] Opening 'chunk-stream1-00004.m4s.tmp' for writing
    [dash @ 0x55b464bb1240] Opening 'chunk-stream2-00005.m4s.tmp' for writing
    [dash @ 0x55b464bb1240] Opening 'out.mpd.tmp' for writing86 bitrate=N/A speed=   1x    
    [mp4 @ 0x55b464c3d840] Application provided duration: -8 / timestamp: 599599 is out of range for mov/mp4 format
    [dash @ 0x55b464bb1240] Opening 'chunk-stream0-00006.m4s.tmp' for writing
    [mp4 @ 0x55b464c425c0] Application provided duration: -8 / timestamp: 599599 is out of range for mov/mp4 format
    [dash @ 0x55b464bb1240] Opening 'chunk-stream1-00005.m4s.tmp' for writing
    [dash @ 0x55b464bb1240] Opening 'chunk-stream2-00006.m4s.tmp' for writing
    [dash @ 0x55b464bb1240] Opening 'out.mpd.tmp' for writing95 bitrate=N/A speed=   1x    
    [mp4 @ 0x55b464c3d840] Application provided duration: -8 / timestamp: 719719 is out of range for mov/mp4 format
    [dash @ 0x55b464bb1240] Opening 'chunk-stream0-00007.m4s.tmp' for writing
    [mp4 @ 0x55b464c425c0] Application provided duration: -8 / timestamp: 719719 is out of range for mov/mp4 format
    [dash @ 0x55b464bb1240] Opening 'chunk-stream1-00006.m4s.tmp' for writing
    [dash @ 0x55b464bb1240] Opening 'chunk-stream2-00007.m4s.tmp' for writing
    [dash @ 0x55b464bb1240] Opening 'out.mpd.tmp' for writing53 bitrate=N/A speed=   1x    
    [mp4 @ 0x55b464c3d840] Application provided duration: -8 / timestamp: 839839 is out of range for mov/mp4 format
    [dash @ 0x55b464bb1240] Opening 'chunk-stream0-00008.m4s.tmp' for writing
    [mp4 @ 0x55b464c425c0] Application provided duration: -8 / timestamp: 839839 is out of range for mov/mp4 format
    [dash @ 0x55b464bb1240] Opening 'chunk-stream1-00007.m4s.tmp' for writing
    [dash @ 0x55b464bb1240] Opening 'chunk-stream2-00008.m4s.tmp' for writing
    [dash @ 0x55b464bb1240] Opening 'out.mpd.tmp' for writing59 bitrate=N/A speed=   1x    
    [mp4 @ 0x55b464c3d840] Application provided duration: -8 / timestamp: 959959 is out of range for mov/mp4 format
    [dash @ 0x55b464bb1240] Opening 'chunk-stream0-00009.m4s.tmp' for writing
    [mp4 @ 0x55b464c425c0] Application provided duration: -8 / timestamp: 959959 is out of range for mov/mp4 format
    [dash @ 0x55b464bb1240] Opening 'chunk-stream1-00008.m4s.tmp' for writing
    [dash @ 0x55b464bb1240] Opening 'chunk-stream2-00009.m4s.tmp' for writing
    [dash @ 0x55b464bb1240] Opening 'out.mpd.tmp' for writing66 bitrate=N/A speed=   1x    
    [mp4 @ 0x55b464c3d840] Application provided duration: -8 / timestamp: 1080079 is out of range for mov/mp4 format
    [dash @ 0x55b464bb1240] Opening 'chunk-stream0-00010.m4s.tmp' for writing
    [mp4 @ 0x55b464c425c0] Application provided duration: -8 / timestamp: 1080079 is out of range for mov/mp4 format
    [dash @ 0x55b464bb1240] Opening 'chunk-stream1-00009.m4s.tmp' for writing
    [dash @ 0x55b464bb1240] Opening 'chunk-stream2-00010.m4s.tmp' for writing
    [dash @ 0x55b464bb1240] Opening 'out.mpd.tmp' for writing73 bitrate=N/A speed=   1x    
    [mp4 @ 0x55b464c3d840] Application provided duration: -8 / timestamp: 1200199 is out of range for mov/mp4 format
    [dash @ 0x55b464bb1240] Opening 'chunk-stream0-00011.m4s.tmp' for writing
    [mp4 @ 0x55b464c425c0] Application provided duration: -8 / timestamp: 1200199 is out of range for mov/mp4 format
    [dash @ 0x55b464bb1240] Opening 'chunk-stream1-00010.m4s.tmp' for writing
    [dash @ 0x55b464bb1240] Opening 'chunk-stream2-00011.m4s.tmp' for writing
    [dash @ 0x55b464bb1240] Opening 'out.mpd.tmp' for writing82 bitrate=N/A speed=   1x    
    [mp4 @ 0x55b464c3d840] Application provided duration: -8 / timestamp: 1320319 is out of range for mov/mp4 format
    [dash @ 0x55b464bb1240] Opening 'chunk-stream0-00012.m4s.tmp' for writing
    [mp4 @ 0x55b464c425c0] Application provided duration: -8 / timestamp: 1320319 is out of range for mov/mp4 format
    [dash @ 0x55b464bb1240] Opening 'chunk-stream1-00011.m4s.tmp' for writing
    [dash @ 0x55b464bb1240] Opening 'chunk-stream2-00012.m4s.tmp' for writing
    [dash @ 0x55b464bb1240] Opening 'out.mpd.tmp' for writing90 bitrate=N/A speed=   1x    
    ...
       [mp4 @ 0x55b464c425c0] Application provided duration: -8 / timestamp: 3962959 is out of range for mov/mp4 format
       [dash @ 0x55b464bb1240] Opening 'chunk-stream1-00033.m4s.tmp' for writing
       [dash @ 0x55b464bb1240] Opening 'chunk-stream2-00034.m4s.tmp' for writing
       [dash @ 0x55b464bb1240] Opening 'out.mpd.tmp' for writing06 bitrate=N/A speed=   1x    
       [mp4 @ 0x55b464c3d840] Application provided duration: -8 / timestamp: 4083079 is out of range for mov/mp4 format
       [dash @ 0x55b464bb1240] Opening 'chunk-stream0-00035.m4s.tmp' for writing
       [mp4 @ 0x55b464c425c0] Application provided duration: -8 / timestamp: 4083079 is out of range for mov/mp4 format
       [dash @ 0x55b464bb1240] Opening 'chunk-stream1-00034.m4s.tmp' for writing
       [dash @ 0x55b464bb1240] Opening 'chunk-stream2-00035.m4s.tmp' for writing
       [dash @ 0x55b464bb1240] Opening 'out.mpd.tmp' for writing10 bitrate=N/A speed=   1x    
       [mp4 @ 0x55b464c3d840] Application provided duration: -8 / timestamp: 4203199 is out of range for mov/mp4 format
       [dash @ 0x55b464bb1240] Opening 'chunk-stream0-00036.m4s.tmp' for writing
       [mp4 @ 0x55b464c425c0] Application provided duration: -8 / timestamp: 4203199 is out of range for mov/mp4 format
       [dash @ 0x55b464bb1240] Opening 'chunk-stream1-00035.m4s.tmp' for writing
       [dash @ 0x55b464bb1240] Opening 'chunk-stream2-00036.m4s.tmp' for writing
       [dash @ 0x55b464bb1240] Opening 'out.mpd.tmp' for writing67 bitrate=N/A speed=   1x    
       [mp4 @ 0x55b464c3d840] Application provided duration: -8 / timestamp: 4323319 is out of range for mov/mp4 format
       [dash @ 0x55b464bb1240] Opening 'chunk-stream0-00037.m4s.tmp' for writing
       [mp4 @ 0x55b464c425c0] Application provided duration: -8 / timestamp: 4323319 is out of range for mov/mp4 format
       [dash @ 0x55b464bb1240] Opening 'chunk-stream1-00036.m4s.tmp' for writing
       [dash @ 0x55b464bb1240] Opening 'chunk-stream2-00037.m4s.tmp' for writing
       [dash @ 0x55b464bb1240] Opening 'out.mpd.tmp' for writing18 bitrate=N/A speed=   1x    
       frame= 4350 fps= 24 q=-1.0 Lq=-1.0 size=N/A time=00:03:01.55 bitrate=N/A speed=   1x    
       video:138926kB audio:5621kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown