Recherche avancée

Médias (91)

Autres articles (88)

  • Qu’est ce qu’un masque de formulaire

    13 juin 2013, par

    Un masque de formulaire consiste en la personnalisation du formulaire de mise en ligne des médias, rubriques, actualités, éditoriaux et liens vers des sites.
    Chaque formulaire de publication d’objet peut donc être personnalisé.
    Pour accéder à la personnalisation des champs de formulaires, il est nécessaire d’aller dans l’administration de votre MediaSPIP puis de sélectionner "Configuration des masques de formulaires".
    Sélectionnez ensuite le formulaire à modifier en cliquant sur sont type d’objet. (...)

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 0.2 is the first MediaSPIP stable release.
    Its official release date is June 21, 2013 and is announced here.
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

  • MediaSPIP Player : les contrôles

    26 mai 2010, par

    Les contrôles à la souris du lecteur
    En plus des actions au click sur les boutons visibles de l’interface du lecteur, il est également possible d’effectuer d’autres actions grâce à la souris : Click : en cliquant sur la vidéo ou sur le logo du son, celui ci se mettra en lecture ou en pause en fonction de son état actuel ; Molette (roulement) : en plaçant la souris sur l’espace utilisé par le média (hover), la molette de la souris n’exerce plus l’effet habituel de scroll de la page, mais diminue ou (...)

Sur d’autres sites (7547)

  • About the delay of Electron playing FFpmeg transcoded video

    26 juillet 2020, par Yohann

    In the Electron project, you need to try to play the video screen of the camera

    


    The camera is Haikang’s webcam

    


    Get real-time video stream through RTSP protocol

    


    rtsp://admin:admin@192.168.0.253/main/Channels/

    


    There will be a delay of about 3s when playing through the VLC player

    


    Then when used in the project, create a websocket service in Electron through the main process, decode the rtsp video through fluent-ffmpeg, and convert it to flv stream and push it to the rendering process

    


    import * as express from 'express'
import * as expressWebSocket from 'express-ws'
import ffmpeg from 'fluent-ffmpeg'
import webSocketStream from 'websocket-stream/stream'
const path = require('path')

let ffmpegPath
if (process.env.NODE_ENV === 'development') {
  ffmpegPath = path.join(__static, 'ffmpeg', 'bin', 'ffmpeg.exe')
} else {
  ffmpegPath = path.join(process.cwd(), 'ffmpeg', 'bin', 'ffmpeg.exe')
}
ffmpeg.setFfmpegPath(ffmpegPath)

// Start video transcoding service
function videoServer () {
  let app = express()
  app.use(express.static(__dirname))
  expressWebSocket(app, null, {
    perMessageDeflate: true
  })
  app.ws('/rtsp/', rtspRequestHandle)
  app.listen(8888)
  console.log('Create a monitoring service')
}

//RTSP transcoding method
function rtspRequestHandle (ws, req) {
  console.log('rtsp request handle')
  const stream = webSocketStream(ws, {
    binary: true,
    browserBufferTimeout: 1000000
  },
  {
    browserBufferTimeout: 1000000
  })
  let url = req.query.url
  console.log('rtsp url:', url)
  try {
    ffmpeg(url)
      .addInputOption('-rtsp_transport', 'tcp', '-buffer_size', '102400') // Here you can add some RTSP optimized parameters
      .outputOptions([
        '-fflags',
        'nobuffer',
        '-tune',
        'zerolatency'
      ])
      .on('start', function () {
        console.log(url, 'Stream started.')
      })
      .on('codecData', function () {
        console.log(url, 'Stream codecData.')
      })
      .on('error', function (err) {
        console.log(url, 'An error occured: ', err.message)
      })
      .on('end', function () {
        console.log(url, 'Stream end!')
      })
      .outputFormat('flv').videoCodec('copy').noAudio().pipe(stream)
  } catch (error) {
    console.log(error)
  }
}

export default videoServer


    


    The rendering process parses the video stream and plays the video through flv.js

    


    <template>&#xA;  <div class="video">&#xA;    <video class="video-box" ref="player"></video>&#xA;  </div>&#xA;</template>&#xA;&#xA;<code class="echappe-js">&lt;script&gt;&amp;#xA;  import flvjs from &amp;#x27;flv.js&amp;#x27;&amp;#xA;  export default {&amp;#xA;    name: &amp;#x27;videopage&amp;#x27;,&amp;#xA;    props: {&amp;#xA;      rtsp: String&amp;#xA;    },&amp;#xA;    data () {&amp;#xA;      return {&amp;#xA;        player: null&amp;#xA;      }&amp;#xA;    },&amp;#xA;    mounted () {&amp;#xA;      console.log(flvjs.isSupported())&amp;#xA;      if (flvjs.isSupported()) {&amp;#xA;        let video = this.$refs.player&amp;#xA;        console.log(video)&amp;#xA;        if (video) {&amp;#xA;          this.player = flvjs.createPlayer({&amp;#xA;            type: &amp;#x27;flv&amp;#x27;,&amp;#xA;            isLive: true,&amp;#xA;            url: &amp;#x27;ws://localhost:8888/rtsp/?url=&amp;#x27; &amp;#x2B; this.rtsp&amp;#xA;          }, {&amp;#xA;            enableStashBuffer: true&amp;#xA;          })&amp;#xA;          console.log(this.player)&amp;#xA;          this.player.attachMediaElement(video)&amp;#xA;          try {&amp;#xA;            this.player.load()&amp;#xA;            this.player.play()&amp;#xA;          } catch (error) {&amp;#xA;            console.log(error)&amp;#xA;          }&amp;#xA;        }&amp;#xA;      }&amp;#xA;    },&amp;#xA;    methods: {&amp;#xA;      getCurrentFrame () {&amp;#xA;        let video = this.$refs.player&amp;#xA;        let scale = 1&amp;#xA;        let canvas = document.createElement(&amp;#x27;canvas&amp;#x27;)&amp;#xA;        canvas.width = video.videoWidth * scale&amp;#xA;        canvas.height = video.videoHeight * scale&amp;#xA;        canvas.getContext(&amp;#x27;2d&amp;#x27;).drawImage(video, 0, 0, canvas.width, canvas.height)&amp;#xA;        return canvas.toDataURL(&amp;#x27;image/png&amp;#x27;)&amp;#xA;      }&amp;#xA;    },&amp;#xA;    beforeDestroy () {&amp;#xA;      this.player &amp;amp;&amp;amp; this.player.destory &amp;amp;&amp;amp; this.player.destory()&amp;#xA;    }&amp;#xA;  }&amp;#xA;&lt;/script&gt;&#xA;&#xA;&#xA;

    &#xA;

    Then there will be a delay of about 3s when playing, and the delay will increase with the playing time

    &#xA;

    There will be a delay of 10 minutes in the later period

    &#xA;

    Is there any way to control this delay time

    &#xA;

    Or is there any other decoding scheme that can be used ?

    &#xA;

    Solutions that can support electron

    &#xA;

  • Dash output with ffmpeg not producing durations specified with -seg_duration

    30 juillet 2022, par Codie

    There is a .mp4 file of 35 MB and 51 seconds. I have to create 51 chunks, each corresponding to 1 second with a size of less than 1MB (the total size should be almost the same as the original file). Please note that I have to implement lossless converting.

    &#xA;

    I've tried many times, but it just produces about 10 files above 10 MB.

    &#xA;


    &#xA;

    Command :

    &#xA;

    ffmpeg -re -i input.mp4 -map 0:v -c:v libx264 -crf 0 -bf 1 -keyint_min 120 -g 120 -sc_threshold 0 -b_strategy 0 -use_template 1 -seg_duration 1 -window_size 60 -adaptation_sets "id=0,streams=v id=1,streams=a" -f dash ./dashTest/out.mpd&#xA;

    &#xA;


    &#xA;

    Command line log :

    &#xA;

    ffmpeg version 5.1-full_build-www.gyan.dev Copyright (c) 2000-2022 the FFmpeg developers&#xA;  built with gcc 12.1.0 (Rev2, Built by MSYS2 project)&#xA;  configuration: --enable-gpl --enable-version3 --enable-static --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-libdav1d --enable-libdavs2 --enable-libuavs3d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-liblensfun --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --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-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&#xA;  libavutil      57. 28.100 / 57. 28.100&#xA;  libavcodec     59. 37.100 / 59. 37.100&#xA;  libavformat    59. 27.100 / 59. 27.100&#xA;  libavdevice    59.  7.100 / 59.  7.100&#xA;  libavfilter     8. 44.100 /  8. 44.100&#xA;  libswscale      6.  7.100 /  6.  7.100&#xA;  libswresample   4.  7.100 /  4.  7.100&#xA;  libpostproc    56.  6.100 / 56.  6.100&#xA;Input #0, mov,mp4,m4a,3gp,3g2,mj2, from &#x27;input.mp4&#x27;:&#xA;  Metadata:&#xA;    major_brand     : mp42&#xA;    minor_version   : 0&#xA;    compatible_brands: mp42mp41&#xA;    creation_time   : 2022-07-27T09:13:31.000000Z&#xA;  Duration: 00:00:50.03, start: 0.000000, bitrate: 5716 kb/s&#xA;  Stream #0:0[0x1](eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p(progressive), 1280x720 [SAR 1:1 DAR 16:9], 5396 kb/s, 25 fps, 25 tbr, 25k tbn (default)&#xA;    Metadata:&#xA;      creation_time   : 2022-07-27T09:13:31.000000Z&#xA;      handler_name    : ?Mainconcept Video Media Handler&#xA;      vendor_id       : [0][0][0][0]&#xA;      encoder         : AVC Coding&#xA;  Stream #0:1[0x2](eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 317 kb/s (default)&#xA;    Metadata:&#xA;      creation_time   : 2022-07-27T09:13:31.000000Z&#xA;      handler_name    : #Mainconcept MP4 Sound Media Handler&#xA;      vendor_id       : [0][0][0][0]&#xA;Stream mapping:&#xA;  Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))&#xA;Press [q] to stop, [?] for help&#xA;[libx264 @ 000001d13acb0380] using SAR=1/1&#xA;[libx264 @ 000001d13acb0380] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX&#xA;[libx264 @ 000001d13acb0380] profile High 4:4:4 Predictive, level 3.1, 4:2:0, 8-bit&#xA;[libx264 @ 000001d13acb0380] 264 - core 164 r3095 baee400 - H.264/MPEG-4 AVC codec - Copyleft 2003-2022 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=0 mixed_ref=1 me_range=16 chroma_me=1 trellis=0 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=0 chroma_qp_offset=0 threads=12 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=2 keyint=120 keyint_min=61 scenecut=0 intra_refresh=0 rc=cqp mbtree=0 qp=0&#xA;[dash @ 000001d13a2a4680] No bit rate set for stream 0&#xA;[dash @ 000001d13a2a4680] Opening &#x27;./dashTest/init-stream0.m4s&#x27; for writing&#xA;Output #0, dash, to &#x27;./dashTest/out.mpd&#x27;:&#xA;  Metadata:&#xA;    major_brand     : mp42&#xA;    minor_version   : 0&#xA;    compatible_brands: mp42mp41&#xA;    encoder         : Lavf59.27.100&#xA;  Stream #0:0(eng): Video: h264, yuv420p(progressive), 1280x720 [SAR 1:1 DAR 16:9], q=2-31, 25 fps, 12800 tbn (default)&#xA;    Metadata:&#xA;      creation_time   : 2022-07-27T09:13:31.000000Z&#xA;      handler_name    : ?Mainconcept Video Media Handler&#xA;      vendor_id       : [0][0][0][0]&#xA;      encoder         : Lavc59.37.100 libx264&#xA;    Side data:&#xA;      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A&#xA;[dash @ 000001d13a2a4680] Opening &#x27;./dashTest/chunk-stream0-00001.m4s.tmp&#x27; for writing&#xA;[dash @ 000001d13a2a4680] Opening &#x27;./dashTest/out.mpd.tmp&#x27; for writing0.849x&#xA;[dash @ 000001d13a2a4680] Opening &#x27;./dashTest/chunk-stream0-00002.m4s.tmp&#x27; for writing&#xA;[dash @ 000001d13a2a4680] Opening &#x27;./dashTest/out.mpd.tmp&#x27; for writing0.918x&#xA;[dash @ 000001d13a2a4680] Opening &#x27;./dashTest/chunk-stream0-00003.m4s.tmp&#x27; for writing&#xA;[dash @ 000001d13a2a4680] Opening &#x27;./dashTest/out.mpd.tmp&#x27; for writing0.942x&#xA;[dash @ 000001d13a2a4680] Opening &#x27;./dashTest/chunk-stream0-00004.m4s.tmp&#x27; for writing&#xA;[dash @ 000001d13a2a4680] Opening &#x27;./dashTest/out.mpd.tmp&#x27; for writing0.957x&#xA;[dash @ 000001d13a2a4680] Opening &#x27;./dashTest/chunk-stream0-00005.m4s.tmp&#x27; for writing&#xA;[dash @ 000001d13a2a4680] Opening &#x27;./dashTest/out.mpd.tmp&#x27; for writing0.964x&#xA;[dash @ 000001d13a2a4680] Opening &#x27;./dashTest/chunk-stream0-00006.m4s.tmp&#x27; for writing&#xA;[dash @ 000001d13a2a4680] Opening &#x27;./dashTest/out.mpd.tmp&#x27; for writing0.971x&#xA;[dash @ 000001d13a2a4680] Opening &#x27;./dashTest/chunk-stream0-00007.m4s.tmp&#x27; for writing&#xA;[dash @ 000001d13a2a4680] Opening &#x27;./dashTest/out.mpd.tmp&#x27; for writing0.975x&#xA;[dash @ 000001d13a2a4680] Opening &#x27;./dashTest/chunk-stream0-00008.m4s.tmp&#x27; for writing&#xA;[dash @ 000001d13a2a4680] Opening &#x27;./dashTest/out.mpd.tmp&#x27; for writing0.978x&#xA;[dash @ 000001d13a2a4680] Opening &#x27;./dashTest/chunk-stream0-00009.m4s.tmp&#x27; for writing&#xA;[dash @ 000001d13a2a4680] Opening &#x27;./dashTest/out.mpd.tmp&#x27; for writing0.981x&#xA;[dash @ 000001d13a2a4680] Opening &#x27;./dashTest/chunk-stream0-00010.m4s.tmp&#x27; for writing&#xA;[dash @ 000001d13a2a4680] Opening &#x27;./dashTest/out.mpd.tmp&#x27; for writing0.982x&#xA;[dash @ 000001d13a2a4680] Opening &#x27;./dashTest/chunk-stream0-00011.m4s.tmp&#x27; for writing&#xA;[dash @ 000001d13a2a4680] Opening &#x27;./dashTest/out.mpd.tmp&#x27; for writing0.983x&#xA;frame= 1250 fps= 25 q=-1.0 Lsize=N/A time=00:00:49.96 bitrate=N/A speed=0.992x&#xA;video:171641kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown&#xA;[libx264 @ 000001d13acb0380] frame I:11    Avg QP: 0.00  size:255122&#xA;[libx264 @ 000001d13acb0380] frame P:1239  Avg QP: 0.00  size:139591&#xA;[libx264 @ 000001d13acb0380] mb I  I16..4: 52.8%  8.8% 38.4%&#xA;[libx264 @ 000001d13acb0380] mb P  I16..4:  3.9%  0.7%  1.3%  P16..4: 28.0% 13.9% 11.3%  0.0%  0.0%    skip:40.8%&#xA;[libx264 @ 000001d13acb0380] 8x8 transform intra:11.9% inter:33.4%&#xA;[libx264 @ 000001d13acb0380] coded y,uvDC,uvAC intra: 68.6% 80.1% 78.9% inter: 38.0% 47.1% 46.5%&#xA;[libx264 @ 000001d13acb0380] i16 v,h,dc,p: 65% 28%  5%  2%&#xA;[libx264 @ 000001d13acb0380] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 33% 33% 28%  2%  1%  1%  1%  1%  1%&#xA;[libx264 @ 000001d13acb0380] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 36% 36%  7%  3%  5%  3%  4%  3%  2%&#xA;[libx264 @ 000001d13acb0380] i8c dc,h,v,p: 17% 38% 44%  1%&#xA;[libx264 @ 000001d13acb0380] Weighted P-Frames: Y:0.0% UV:0.0%&#xA;[libx264 @ 000001d13acb0380] ref P L0: 86.4%  7.6%  4.6%  1.4%&#xA;[libx264 @ 000001d13acb0380] kb/s:28121.58&#xA;

    &#xA;


    &#xA;

    .mpd file :

    &#xA;

    &lt;?xml version="1.0" encoding="utf-8"?>&#xA;<mpd xmlns="urn:mpeg:dash:schema:mpd:2011" profiles="urn:mpeg:dash:profile:isoff-live:2011" type="static" mediapresentationduration="PT50.0S" maxsegmentduration="PT1.0S" minbuffertime="PT9.6S">&#xA;    <programinformation>&#xA;    </programinformation>&#xA;    <servicedescription>&#xA;    </servicedescription>&#xA;    <period start="PT0.0S">&#xA;        <adaptationset contenttype="video" startwithsap="1" segmentalignment="true" bitstreamswitching="true" framerate="25/1" maxwidth="1280" maxheight="720" par="16:9" lang="eng">&#xA;            <representation mimetype="video/mp4" codecs="avc1.f4001f" bandwidth="28122926" width="1280" height="720" sar="1:1">&#xA;                <segmenttemplate timescale="12800" initialization="init-stream$RepresentationID$.m4s" media="chunk-stream$RepresentationID$-$Number%05d$.m4s" startnumber="1">&#xA;                    <segmenttimeline>&#xA;                        <s t="0" d="61440" r="9"></s>&#xA;                        <s d="25600"></s>&#xA;                    </segmenttimeline>&#xA;                </segmenttemplate>&#xA;            </representation>&#xA;        </adaptationset>&#xA;        <adaptationset contenttype="audio" startwithsap="1" segmentalignment="true" bitstreamswitching="true">&#xA;        </adaptationset>&#xA;    </period>&#xA;</mpd>&#xA;

    &#xA;


    &#xA;

    Please, if you want to put a negative point, mention your reason in the comments !

    &#xA;


    &#xA;
  • muxing DVB subtitles into transport stream with ffmpeg

    28 novembre 2019, par user3439130

    So i have H264 video + AAC audio muxed inside transport stream (*.ts). To achive evenly spread PCR values i added muxrate tag to my command.

    ffmpeg -analyzeduration 20000000 -probesize 20M -loglevel verbose -i 1135084.m4v -i 1135084.m4a -c copy -muxrate 7982K -map 0:v:0 -map 1:a:0 -metadata:s:a:0 language=eng -metadata:s:a:0 tms_track_id=169451954 TEMP0.ts

    Since our client need DVB substitles we convert SRT to DVD with subtitle edit and then encode them to DVB with ffmpeg with this command :

    ffmpeg -analyzeduration 20000000 -probesize 20M -loglevel verbose -i TEMP0.ts -i out.da.idx -map 0 -c copy -muxrate 7992K -map 1:s -c:s:0 dvbsub -metadata:s:s:0 language=dan TEMP1.ts

    here is output from ffmpeg command :

    ffmpeg version git-2019-11-18-d831edc Copyright (c) 2000-2019 the FFmpeg developers
     built with gcc 9.2.1 (GCC) 20191010
     configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --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-libaom --enable-libmfx --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt --enable-amf
     libavutil      56. 36.100 / 56. 36.100
     libavcodec     58. 62.100 / 58. 62.100
     libavformat    58. 35.100 / 58. 35.100
     libavdevice    58.  9.101 / 58.  9.101
     libavfilter     7. 66.100 /  7. 66.100
     libswscale      5.  6.100 /  5.  6.100
     libswresample   3.  6.100 /  3.  6.100
     libpostproc    55.  6.100 / 55.  6.100
    [h264 @ 000002bf7460d400] non-existing SPS 0 referenced in buffering period
    [h264 @ 000002bf7460d400] SPS unavailable in decode_picture_timing
    [h264 @ 000002bf7460d400] non-existing SPS 0 referenced in buffering period
    [h264 @ 000002bf7460d400] SPS unavailable in decode_picture_timing
    [h264 @ 000002bf7460d400] Reinit context to 1920x1088, pix_fmt: yuv420p
    [mpegts @ 000002bf7460ae00] max_analyze_duration 20000000 reached at 20000000 microseconds st:0
    [mpegts @ 000002bf7460ae00] start time for stream 2 is not set in estimate_timings_from_pts
    Input #0, mpegts, from 'TEMP1.ts':
     Duration: 01:51:54.48, start: 1.440000, bitrate: 7992 kb/s
     Program 1
       Metadata:
         service_name    : Service01
         service_provider: FFmpeg
       Stream #0:0[0x100]: Video: h264 (High), 1 reference frame ([27][0][0][0] / 0x001B), yuv420p(progressive, left), 1920x1080 (1920x1088) [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
       Stream #0:1[0x101](eng): Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 254 kb/s
       Stream #0:2[0x102](dan): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)
    [vobsub @ 000002bf75d65940] IDX/SUB: out.fi.idx -> out.fi.sub
    Input #1, vobsub, from 'out.fi.idx':
     Duration: N/A, bitrate: N/A
       Stream #1:0[0x0](fi): Subtitle: dvd_subtitle, 1920x1080 (default)
    File 'TEMP2.ts' already exists. Overwrite? [y/N] y
    [mpegts @ 000002bf74634f00] service 1 using PCR in pid=256, pcr_period=20ms
    [mpegts @ 000002bf74634f00] muxrate 8002000, sdt every 500 ms, pat/pmt every 100 ms
    Output #0, mpegts, to 'TEMP2.ts':
     Metadata:
       encoder         : Lavf58.35.100
       Stream #0:0: Video: h264 (High), 1 reference frame ([27][0][0][0] / 0x001B), yuv420p(progressive, left), 1920x1080 (0x0) [SAR 1:1 DAR 16:9], q=2-31, 25 fps, 25 tbr, 90k tbn, 90k tbc
       Stream #0:1(eng): Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 254 kb/s
       Stream #0:2(dan): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)
       Stream #0:3(fin): Subtitle: dvb_subtitle (dvbsub), 1920x1080 (default)
       Metadata:
         encoder         : Lavc58.62.100 dvbsub
    Stream mapping:
     Stream #0:0 -> #0:0 (copy)
     Stream #0:1 -> #0:1 (copy)
     Stream #0:2 -> #0:2 (copy)
     Stream #1:0 -> #0:3 (dvd_subtitle (dvdsub) -> dvb_subtitle (dvbsub))
    Press [q] to stop, [?] for help
    No more output streams to write to, finishing.me=01:51:46.51 bitrate=7990.2kbits/s speed=18.2x
    frame=167862 fps=456 q=-1.0 Lsize= 6558750kB time=01:51:54.47 bitrate=8002.0kbits/s speed=18.2x
    video:5738580kB audio:212004kB subtitle:10989kB other streams:0kB global headers:0kB muxing overhead: 10.017118%
    Input file #0 (TEMP1.ts):
     Input stream #0:0 (video): 167862 packets read (5876305439 bytes);
     Input stream #0:1 (audio): 314742 packets read (217092443 bytes);
     Input stream #0:2 (subtitle): 1740 packets read (5578504 bytes);
     Total: 484344 packets (6098976386 bytes) demuxed
    Input file #1 (out.fi.idx):
     Input stream #1:0 (subtitle): 855 packets read (6881158 bytes); 854 frames decoded;
     Total: 855 packets (6881158 bytes) demuxed
    Output file #0 (TEMP2.ts):
     Output stream #0:0 (video): 167862 packets muxed (5876305439 bytes);
     Output stream #0:1 (audio): 314742 packets muxed (217092443 bytes);
     Output stream #0:2 (subtitle): 1740 packets muxed (5578504 bytes);
     Output stream #0:3 (subtitle): 1708 frames encoded; 1708 packets muxed (5673736 bytes);
     Total: 486052 packets (6104650122 bytes) muxed
    [AVIOContext @ 000002bf7463c280] Statistics: 0 seeks, 25621 writeouts
    [AVIOContext @ 000002bf74613f80] Statistics: 6728300448 bytes read, 2 seeks
    [AVIOContext @ 000002bf75efde40] Statistics: 7852032 bytes read, 0 seeks
    [AVIOContext @ 000002bf74f30e40] Statistics: 40275 bytes read, 0 seeks

    So i have video/audio and two dvb tracks inside one TS.

    Now im adding third subtitle and i get this warning :

    frame=32351 fps=869 q=-1.0 size= 1255936kB time=00:21:33.99 bitrate=7951.1kbits/s speed=34.8x
    [mpegts @ 0x2994600] Non-monotonous DTS in output stream 0:3; previous: 116868609, current: 116868607; changing to 116868610. This may result in incorrect timestamps in the output file.
    frame=33416 fps=886 q=-1.0 size= 1297408kB time=00:22:16.56 bitrate=7952.0kbits/s speed=35.4x

    By this warning it seems that something is not right with DVB (0:3) Finish track.
    Playing back the file with VLC i can see that Finish subtitles (between 21:33 and 22:16) are not showing up.

    Dumping packets from 0:3 track i see that 4 packets have the same DTS/PTS values.

    #stream#, dts,        pts, duration,     size, hash
    0,  111258000,  111258000,        0,     6979, 6215f060, S=1,        1, 67d220bc
    0,  111689100,  111689100,        0,       25, e60e94fa, S=1,        1, 67d220bc
    0,  113230800,  113230800,        0,     4423, f811be62, S=1,        1, 67d220bc
    0,  113561550,  113561550,        0,       25, 6db8d81f, S=1,        1, 67d220bc
    0,  113788800,  113788800,        0,     8247, 8b494779, S=1,        1, 67d220bc
    0,  114191190,  114191190,        0,       25, a205e183, S=1,        1, 67d220bc

    0,  116868607,  116868607,        0,     1119, e5d11188, S=1,        1, 67d220bc
    0,  116868607,  116868607,        0,       28, 11e09861, S=1,        1, 67d220bc
    0,  116868607,  116868607,        0,     1122, 8320a3f5, S=1,        1, 67d220bc
    0,  116868607,  116868607,        0,       28, e896fa37, S=1,        1, 67d220bc

    0,  117205200,  117205200,        0,     3583, 47b23f27, S=1,        1, 67d220bc
    0,  117611640,  117611640,        0,       25, e5ae32ed, S=1,        1, 67d220bc
    0,  117709200,  117709200,        0,     1119, 208b4f80, S=1,        1, 67d220bc
    0,  117830970,  117830970,        0,       25, 2a130b71, S=1,        1, 67d220bc
    0,  117846000,  117846000,        0,     3105, f179a4f0, S=1,        1, 67d220bc
    0,  118148040,  118148040,        0,       25, 29b3ad66, S=1,        1, 67d220bc
    0,  120146410,  120146410,        0,     1119, 714ef5d1, S=1,        1, 67d220bc
    0,  120146410,  120146410,        0,       28, bbad7fed, S=1,        1, 67d220bc
    0,  120708000,  120708000,        0,     2060, 703084f7, S=1,        1, 67d220bc
    0,  120855420,  120855420,        0,       25, 6db8d81f, S=1,        1, 67d220bc
    0,  121122000,  121122000,        0,     2184, 04a7be71, S=1,        1, 67d220bc
    0,  121395330,  121395330,        0,       25, a205e183, S=1,        1, 67d220bc

    Thes are the lines from SRT file where the warning happens :

    146
    00:21:34,840 --> 00:21:36,600
    Make!
    147
    00:21:42,280 --> 00:21:46,800
    Make! Hei, Make. Make!
    148
    00:21:47,880 --> 00:21:49,240
    Make!
    149
    00:21:49,400 --> 00:21:52,760
    Odota minua, Make!
    150
    00:22:00,400 --> 00:22:01,760
    Make!

    Sometimes muxing subtitles in different order (for example Finish before Danish and then Swedish) would solve this problem, but i would like to know why such things are happening.