[FFmpeg-trac] #5750(ffmpeg:new): ffmpeg generates rarerly PCR for mpegts with multiple video streams copy and muxrate specified.

FFmpeg trac at avcodec.org
Tue Aug 2 21:59:28 EEST 2016


#5750: ffmpeg generates rarerly PCR for mpegts with multiple video streams copy
and muxrate specified.
--------------------------------+---------------------------------------
             Reporter:  xzerth  |                     Type:  defect
               Status:  new     |                 Priority:  normal
            Component:  ffmpeg  |                  Version:  unspecified
             Keywords:          |               Blocked By:
             Blocking:          |  Reproduced by developer:  0
Analyzed by developer:  0       |
--------------------------------+---------------------------------------
 Summary of the bug:
 I'm trying to copy multiple video streams from one mpegts file to another.
 The problem is that PCR generated by ffmpeg from this procedure repeates
 very rarerly and looks very "bad". For example:
 {{{
 *pcr, BASE, EXT, dSTC(ms), dPCR(ms), PCR-STC(ns),
 *pcr,      97790029,     325966, 229, +19.899, +19.899,   +0,
 *pcr,      98327304,     327757, 204, +19.899, +19.899,   +0,
 *pcr,     101919550,     339731, 250, +133.046, +133.046,  +37,
 *pcr,     102463073,     341543, 173, +20.130, +20.130,   +0,
 *pcr,     124316424,     414388,  24, +809.384, +809.383, -815,
 *pcr,     154266386,     514221,  86, +1109.258, +1109.258,   +0,
 *pcr,     168875895,     562919, 195, +541.093, +541.093,  +37,
 *pcr,     174392335,     581307, 235, +204.313, +204.313,   +0,
 *pcr,     180349217,     601164,  17, +220.625, +220.625,  +74,
 *pcr,     194649480,     648831, 180, +529.639, +529.639,   +0,
 *pcr,     195186755,     650622, 155, +19.899, +19.899,   +0,
 *pcr,     196504953,     655016, 153, +48.822, +48.822,  +37,
 *pcr,     197257763,     657525, 263, +27.882, +27.882,  +37,
 }}}
 as you can see sometimes dPCR reaches up to +1038.984 ms in this log (next
 to the last column) and with my stream I've seen about 2k or 3k ms!
 Muxrate option specified but it seems it is ignored. Also if I transcode
 video streams there is no problem. Problem only with -copy option. Also if
 I specify less number of video streams it seems that problem affects less
 - PCR generates smoother: if I specify 1 track (also reduce muxrate) the
 problem not produces.

 How to reproduce:
 {{{

 % ffmpeg -i pipe:0 -codec:0 copy -map 0:0 -codec:1 copy -map 0:1 -codec:2
 copy -map 0:2 -codec:3 copy -map 0:3 -codec:4 copy -map 0:4 -codec:5 copy
 -map 0:5 -max_delay 3000000 -muxrate 13000k -f mpegts pipe:1 < input.ts >
 out_bad_pcr.ts

 ffmpeg version 3.1.1 Copyright (c) 2000-2016 the FFmpeg developers
   built with gcc 4.9.2 (Ubuntu 4.9.2-0ubuntu1~12.04)
   configuration: --prefix=/usr/local --pkg-config-flags=--static --enable-
 static --disable-shared --disable-avdevice --enable-runtime-cpudetect
 --disable-postproc --enable-libfdk-aac --enable-libmp3lame
   libavutil      55. 28.100 / 55. 28.100
   libavcodec     57. 48.101 / 57. 48.101
   libavformat    57. 41.100 / 57. 41.100
   libavfilter     6. 47.100 /  6. 47.100
   libswscale      4.  1.100 /  4.  1.100
   libswresample   2.  1.100 /  2.  1.100
 Hyper fast Audio and Video encoder
 usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options]
 outfile}...

 Use -h to get full help or, even better, run 'man ffmpeg'

 }}}

 I've got 3.1.1 (can't specify it here) version but problem definitely
 reproduces with 2.6.9.

--
Ticket URL: <https://trac.ffmpeg.org/ticket/5750>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list