#5750(ffmpeg:new): ffmpeg generates rarerly PCR for mpegts with multiple video streams copy and muxrate specified.
#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
#5750: ffmpeg generates rarerly PCR for mpegts with multiple video streams copy and muxrate specified. -------------------------------------+---------------------------------- Reporter: xzerth | Owner: Type: defect | Status: new Priority: normal | Component: ffmpeg Version: unspecified | Resolution: Keywords: | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+---------------------------------- Comment (by xzerth): The upload file size is very small and the problem reproduces with multiple streams so if it's not representative, I upload it to google drive: https://drive.google.com/open?id=0B4Jl7oDxoE7CTUoya2k5NTcwQWM -- Ticket URL: <https://trac.ffmpeg.org/ticket/5750#comment:1> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#5750: ffmpeg generates rarerly PCR for mpegts with multiple video streams copy and muxrate specified. -------------------------------------+---------------------------------- Reporter: xzerth | Owner: Type: defect | Status: new Priority: normal | Component: ffmpeg Version: unspecified | Resolution: Keywords: | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+---------------------------------- Comment (by cehoyos): Please test current FFmpeg git head and please provide command line including console output for the file you uploaded to Google drive. -- Ticket URL: <https://trac.ffmpeg.org/ticket/5750#comment:2> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#5750: ffmpeg generates rarerly PCR for mpegts with multiple video streams copy and muxrate specified. -------------------------------------+------------------------------------- Reporter: xzerth | Owner: Type: defect | Status: new Priority: normal | Component: Version: unspecified | undetermined Keywords: | Resolution: Blocking: | Blocked By: Analyzed by developer: 0 | Reproduced by developer: 0 -------------------------------------+------------------------------------- Changes (by cehoyos): * component: ffmpeg => undetermined -- Ticket URL: <https://trac.ffmpeg.org/ticket/5750#comment:3> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#5750: ffmpeg generates rarerly PCR for mpegts with multiple video streams copy and muxrate specified. -------------------------------------+------------------------------------- Reporter: xzerth | Owner: Type: defect | Status: new Priority: normal | Component: Version: unspecified | undetermined Keywords: | Resolution: Blocking: | Blocked By: Analyzed by developer: 0 | Reproduced by developer: 0 -------------------------------------+------------------------------------- Comment (by xzerth): Ok, here is output from the git master for file I've uploaded to google disk: {{{ ~# bin/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.ts ffmpeg version N-81231-g5469293 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. 51.100 / 57. 51.100 libavformat 57. 44.100 / 57. 44.100 libavfilter 6. 49.100 / 6. 49.100 libswscale 4. 1.100 / 4. 1.100 libswresample 2. 1.100 / 2. 1.100 Input #0, mpegts, from 'pipe:0': Duration: N/A, start: 1.480000, bitrate: N/A Program 1 Metadata: service_name : Service01 service_provider: FFmpeg Stream #0:0[0x100]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p, 480x270 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc Stream #0:1[0x101]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p, 640x360 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc Stream #0:2[0x102]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p, 720x404 [SAR 404:405 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc Stream #0:3[0x103]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p, 960x540 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc Stream #0:4[0x104]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc Stream #0:5[0x105]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc Stream #0:6[0x106](rus): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 192 kb/s [mpegts @ 0x23ee360] Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead. Last message repeated 5 times Output #0, mpegts, to 'pipe:1': Metadata: encoder : Lavf57.44.100 Stream #0:0: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p, 480x270 [SAR 1:1 DAR 16:9], q=2-31, 25 fps, 25 tbr, 90k tbn, 90k tbc Stream #0:1: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p, 640x360 [SAR 1:1 DAR 16:9], q=2-31, 25 fps, 25 tbr, 90k tbn, 90k tbc Stream #0:2: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p, 720x404 [SAR 404:405 DAR 16:9], q=2-31, 25 fps, 25 tbr, 90k tbn, 90k tbc Stream #0:3: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p, 960x540 [SAR 1:1 DAR 16:9], q=2-31, 25 fps, 25 tbr, 90k tbn, 90k tbc Stream #0:4: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], q=2-31, 25 fps, 25 tbr, 90k tbn, 90k tbc Stream #0:5: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 25 fps, 25 tbr, 90k tbn, 90k tbc Stream mapping: Stream #0:0 -> #0:0 (copy) Stream #0:1 -> #0:1 (copy) Stream #0:2 -> #0:2 (copy) Stream #0:3 -> #0:3 (copy) Stream #0:4 -> #0:4 (copy) Stream #0:5 -> #0:5 (copy) frame= 548 fps=0.0 q=-1.0 Lq=-1.0 q=-1.0 q=-1.0 q=-1.0 q=-1.0 size= 35819kB time=00:00:21.80 bitrate=13460.0kbits/s speed= 170x video:21302kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 68.151382% }}} And the problem persist: {{{ *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, }}} -- Ticket URL: <https://trac.ffmpeg.org/ticket/5750#comment:4> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#5750: ffmpeg generates rarerly PCR for mpegts with multiple video streams copy and muxrate specified. -------------------------------------+------------------------------------- Reporter: xzerth | Owner: Type: defect | Status: new Priority: normal | Component: Version: unspecified | undetermined Keywords: mpegts | Resolution: Blocking: | Blocked By: Analyzed by developer: 0 | Reproduced by developer: 0 -------------------------------------+------------------------------------- Changes (by cehoyos): * keywords: => mpegts Comment: How can I reproduce the PCR frequency? (And why are you using pipe input and output?) Unrelated: --enable-static --disable-shared --enable-runtime-cpudetect have no effect. --disable-postproc has no effect in your configure line (only if --enable- gpl is specified) --prefix=/usr/local should be the default -- Ticket URL: <https://trac.ffmpeg.org/ticket/5750#comment:5> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#5750: ffmpeg generates rarerly PCR for mpegts with multiple video streams copy and muxrate specified. -------------------------------------+------------------------------------- Reporter: xzerth | Owner: Type: defect | Status: new Priority: normal | Component: Version: unspecified | undetermined Keywords: mpegts | Resolution: Blocking: | Blocked By: Analyzed by developer: 0 | Reproduced by developer: 0 -------------------------------------+------------------------------------- Comment (by xzerth): You can reproduce the problem with my command. Also if you want to see "good" PCR corresponding muxrate, you can just decrease number of copy streams: {{{ ~# bin/ffmpeg -i pipe:0 -codec:0 copy -map 0:0 -codec:1 copy -map 0:1 -max_delay 3000000 -muxrate 13000k -f mpegts pipe:1 < input.ts > out.ts }}} I'm using pipe because it's convenient with my encoding environment. Thanks for notice about build flags - it's remain from another build -- Ticket URL: <https://trac.ffmpeg.org/ticket/5750#comment:6> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#5750: ffmpeg generates rarerly PCR for mpegts with multiple video streams copy and muxrate specified. -------------------------------------+------------------------------------- Reporter: xzerth | Owner: Type: defect | Status: new Priority: normal | Component: Version: unspecified | undetermined Keywords: mpegts | Resolution: Blocking: | Blocked By: Analyzed by developer: 0 | Reproduced by developer: 0 -------------------------------------+------------------------------------- Comment (by cehoyos): What do I have to do with tstools to get the output you provided? -- Ticket URL: <https://trac.ffmpeg.org/ticket/5750#comment:7> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#5750: ffmpeg generates rarerly PCR for mpegts with multiple video streams copy and muxrate specified. -------------------------------------+------------------------------------- Reporter: xzerth | Owner: Type: defect | Status: new Priority: normal | Component: Version: unspecified | undetermined Keywords: mpegts | Resolution: Blocking: | Blocked By: Analyzed by developer: 0 | Reproduced by developer: 0 -------------------------------------+------------------------------------- Comment (by xzerth): Ok, now I understand :) To see the problem I'm using also my scripts. This output from my analyzing system (which uses tstools sometimes). I wrote simple script for you to detect the problem and attached it. You can run it with `python2 pcr_diff.py out.ts` -- It's extract PCRs and calculates those diffs. Also you may check the output from tstools with `tsreport -v out.ts | grep ".. PCR "` -- it's just extracting PCRs so you need to calculate it by hand but my script already do this. -- Ticket URL: <https://trac.ffmpeg.org/ticket/5750#comment:8> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#5750: ffmpeg generates rarerly PCR for mpegts with multiple video streams copy and muxrate specified. -------------------------------------+------------------------------------- Reporter: xzerth | Owner: Type: defect | Status: new Priority: normal | Component: Version: unspecified | undetermined Keywords: mpegts | Resolution: Blocking: | Blocked By: Analyzed by developer: 0 | Reproduced by developer: 0 -------------------------------------+------------------------------------- Comment (by cehoyos): Is the issue also reproducible if you reencode (to x264 or mpeg2video)? Is it also reproducible when remuxing mpeg2video? -- Ticket URL: <https://trac.ffmpeg.org/ticket/5750#comment:9> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#5750: ffmpeg generates rarerly PCR for mpegts with multiple video streams copy and muxrate specified. -------------------------------------+------------------------------------- Reporter: xzerth | Owner: Type: defect | Status: new Priority: normal | Component: Version: unspecified | undetermined Keywords: mpegts | Resolution: Blocking: | Blocked By: Analyzed by developer: 0 | Reproduced by developer: 0 -------------------------------------+------------------------------------- Comment (by xzerth): Replying to [comment:9 cehoyos]:
Is the issue also reproducible if you reencode (to x264 or mpeg2video)? Is it also reproducible when remuxing mpeg2video?
No, as I already wrote the problem is not reproduces if I transcode it. Yes, it is also reproducible when remuxing mpeg2video Transcode with libx264: {{{ ~# ffmpeg -threads auto -i pipe:0 -async 1 -vsync 1 -r 25 -b:0 270k -codec:0 libx264 -maxrate:0 300k -bufsize:0 900k -preset:0 ultrafast -map 0:0 -b:1 460k -codec:1 libx264 -maxrate:1 512k -bufsize:1 1536k -preset:1 fast -map 0:1 -b:2 675k -codec:2 libx264 -maxrate:2 750k -bufsize:2 2250k -preset:2 ultrafast -map 0:2 -b:3 1260k -codec:3 libx264 -maxrate:3 1400k -bufsize:3 4200k -preset:3 ultrafast -map 0:3 -b:4 2200k -codec:4 libx264 -maxrate:4 2500k -bufsize:4 7500k -preset:4 ultrafast -map 0:4 -b:5 5400k -codec:5 libx264 -maxrate:5 6000k -bufsize:5 18000k -preset:5 ultrafast -map 0:5 -f mpegts pipe:1 < input.ts > out.ts ffmpeg version N-81231-g5469293 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 --enable-gpl --enable-libx264 --enable-libx265 --enable-libmp3lame libavutil 55. 28.100 / 55. 28.100 libavcodec 57. 51.100 / 57. 51.100 libavformat 57. 44.100 / 57. 44.100 libavfilter 6. 49.100 / 6. 49.100 libswscale 4. 1.100 / 4. 1.100 libswresample 2. 1.100 / 2. 1.100 libpostproc 54. 0.100 / 54. 0.100 Input #0, mpegts, from 'pipe:0': Duration: N/A, start: 1.480000, bitrate: N/A Program 1 Metadata: service_name : Service01 service_provider: FFmpeg Stream #0:0[0x100]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p, 480x270 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc Stream #0:1[0x101]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p, 640x360 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc Stream #0:2[0x102]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p, 720x404 [SAR 404:405 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc Stream #0:3[0x103]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p, 960x540 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc Stream #0:4[0x104]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc Stream #0:5[0x105]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc Stream #0:6[0x106](rus): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 192 kb/s [libx264 @ 0x3ed21e0] using SAR=1/1 [libx264 @ 0x3ed21e0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX [libx264 @ 0x3ed21e0] profile Constrained Baseline, level 2.1 [libx264 @ 0x4a20300] using SAR=1/1 [libx264 @ 0x4a20300] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX [libx264 @ 0x4a20300] profile High, level 3.0 [libx264 @ 0x4a2c300] using SAR=404/405 [libx264 @ 0x4a2c300] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX [libx264 @ 0x4a2c300] profile Constrained Baseline, level 3.0 [libx264 @ 0x3e28580] using SAR=1/1 [libx264 @ 0x3e28580] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX [libx264 @ 0x3e28580] profile Constrained Baseline, level 3.1 [libx264 @ 0x429bd00] using SAR=1/1 [libx264 @ 0x429bd00] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX [libx264 @ 0x429bd00] profile Constrained Baseline, level 3.1 [libx264 @ 0x4a236e0] using SAR=1/1 [libx264 @ 0x4a236e0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX [libx264 @ 0x4a236e0] profile Constrained Baseline, level 4.0 [mpegts @ 0x3fcfd80] Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead. Last message repeated 5 times Output #0, mpegts, to 'pipe:1': Metadata: encoder : Lavf57.44.100 Stream #0:0: Video: h264 (libx264), yuv420p, 480x270 [SAR 1:1 DAR 16:9], q=-1--1, 270 kb/s, 25 fps, 90k tbn, 25 tbc Metadata: encoder : Lavc57.51.100 libx264 Side data: cpb: bitrate max/min/avg: 300000/0/270000 buffer size: 900000 vbv_delay: -1 Stream #0:1: Video: h264 (libx264), yuv420p, 640x360 [SAR 1:1 DAR 16:9], q=-1--1, 460 kb/s, 25 fps, 90k tbn, 25 tbc Metadata: encoder : Lavc57.51.100 libx264 Side data: cpb: bitrate max/min/avg: 512000/0/460000 buffer size: 1536000 vbv_delay: -1 Stream #0:2: Video: h264 (libx264), yuv420p, 720x404 [SAR 404:405 DAR 16:9], q=-1--1, 675 kb/s, 25 fps, 90k tbn, 25 tbc Metadata: encoder : Lavc57.51.100 libx264 Side data: cpb: bitrate max/min/avg: 750000/0/675000 buffer size: 2250000 vbv_delay: -1 Stream #0:3: Video: h264 (libx264), yuv420p, 960x540 [SAR 1:1 DAR 16:9], q=-1--1, 1260 kb/s, 25 fps, 90k tbn, 25 tbc Metadata: encoder : Lavc57.51.100 libx264 Side data: cpb: bitrate max/min/avg: 1400000/0/1260000 buffer size: 4200000 vbv_delay: -1 Stream #0:4: Video: h264 (libx264), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], q=-1--1, 2200 kb/s, 25 fps, 90k tbn, 25 tbc Metadata: encoder : Lavc57.51.100 libx264 Side data: cpb: bitrate max/min/avg: 2500000/0/2200000 buffer size: 7500000 vbv_delay: -1 Stream #0:5: Video: h264 (libx264), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=-1--1, 5400 kb/s, 25 fps, 90k tbn, 25 tbc Metadata: encoder : Lavc57.51.100 libx264 Side data: cpb: bitrate max/min/avg: 6000000/0/5400000 buffer size: 18000000 vbv_delay: -1 Stream mapping: Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264)) Stream #0:1 -> #0:1 (h264 (native) -> h264 (libx264)) Stream #0:2 -> #0:2 (h264 (native) -> h264 (libx264)) Stream #0:3 -> #0:3 (h264 (native) -> h264 (libx264)) Stream #0:4 -> #0:4 (h264 (native) -> h264 (libx264)) Stream #0:5 -> #0:5 (h264 (native) -> h264 (libx264)) [h264 @ 0x4f7ba80] error while decoding MB 48 39, bytestream -5ize= 20530kB time=00:00:19.96 bitrate=8425.9kbits/s speed=3.63x [h264 @ 0x4f7ba80] concealing 3481 DC, 3481 AC, 3481 MV errors in B frame frame= 549 fps= 84 q=-1.0 Lq=-1.0 q=-1.0 q=-1.0 q=-1.0 q=-1.0 size= 27042kB time=00:00:21.92 bitrate=10106.4kbits/s dup=2 drop=0 speed=3.36x video:24721kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 9.391791% [libx264 @ 0x3ed21e0] frame I:3 Avg QP:31.33 size: 6422 [libx264 @ 0x3ed21e0] frame P:546 Avg QP:31.14 size: 1253 [libx264 @ 0x3ed21e0] mb I I16..4: 100.0% 0.0% 0.0% [libx264 @ 0x3ed21e0] mb P I16..4: 11.1% 0.0% 0.0% P16..4: 26.4% 0.0% 0.0% 0.0% 0.0% skip:62.6% [libx264 @ 0x3ed21e0] coded y,uvDC,uvAC intra: 23.0% 16.2% 6.3% inter: 10.8% 4.2% 0.6% [libx264 @ 0x3ed21e0] i16 v,h,dc,p: 45% 33% 14% 7% [libx264 @ 0x3ed21e0] i8c dc,h,v,p: 75% 15% 9% 2% [libx264 @ 0x3ed21e0] kb/s:256.32 [libx264 @ 0x4a20300] frame I:11 Avg QP:23.03 size: 10997 [libx264 @ 0x4a20300] frame P:266 Avg QP:26.01 size: 2769 [libx264 @ 0x4a20300] frame B:271 Avg QP:26.50 size: 585 [libx264 @ 0x4a20300] consecutive B-frames: 22.1% 34.7% 3.8% 39.4% [libx264 @ 0x4a20300] mb I I16..4: 9.4% 73.4% 17.2% [libx264 @ 0x4a20300] mb P I16..4: 2.8% 8.2% 1.8% P16..4: 24.4% 8.7% 3.6% 0.0% 0.0% skip:50.5% [libx264 @ 0x4a20300] mb B I16..4: 2.1% 1.1% 0.1% B16..8: 14.1% 3.0% 0.2% direct: 3.5% skip:76.0% L0:37.5% L1:54.9% BI: 7.6% [libx264 @ 0x4a20300] 8x8 transform intra:61.0% inter:68.4% [libx264 @ 0x4a20300] coded y,uvDC,uvAC intra: 38.8% 36.1% 13.1% inter: 7.7% 6.5% 0.5% [libx264 @ 0x4a20300] i16 v,h,dc,p: 29% 56% 7% 8% [libx264 @ 0x4a20300] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 29% 21% 22% 4% 4% 5% 5% 4% 6% [libx264 @ 0x4a20300] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 27% 22% 16% 5% 8% 8% 6% 5% 4% [libx264 @ 0x4a20300] i8c dc,h,v,p: 71% 16% 11% 2% [libx264 @ 0x4a20300] Weighted P-Frames: Y:7.5% UV:3.0% [libx264 @ 0x4a20300] ref P L0: 83.0% 17.0% [libx264 @ 0x4a20300] ref B L0: 88.3% 11.7% [libx264 @ 0x4a20300] ref B L1: 98.9% 1.1% [libx264 @ 0x4a20300] kb/s:370.76 [libx264 @ 0x4a2c300] frame I:3 Avg QP:27.67 size: 15516 [libx264 @ 0x4a2c300] frame P:545 Avg QP:28.81 size: 3041 [libx264 @ 0x4a2c300] mb I I16..4: 100.0% 0.0% 0.0% [libx264 @ 0x4a2c300] mb P I16..4: 12.5% 0.0% 0.0% P16..4: 26.3% 0.0% 0.0% 0.0% 0.0% skip:61.2% [libx264 @ 0x4a2c300] coded y,uvDC,uvAC intra: 21.5% 15.8% 4.9% inter: 11.3% 5.4% 0.7% [libx264 @ 0x4a2c300] i16 v,h,dc,p: 45% 34% 13% 8% [libx264 @ 0x4a2c300] i8c dc,h,v,p: 73% 15% 10% 3% [libx264 @ 0x4a2c300] kb/s:621.95 [libx264 @ 0x3e28580] frame I:3 Avg QP:26.00 size: 25058 [libx264 @ 0x3e28580] frame P:545 Avg QP:26.92 size: 5570 [libx264 @ 0x3e28580] mb I I16..4: 100.0% 0.0% 0.0% [libx264 @ 0x3e28580] mb P I16..4: 13.9% 0.0% 0.0% P16..4: 27.4% 0.0% 0.0% 0.0% 0.0% skip:58.7% [libx264 @ 0x3e28580] coded y,uvDC,uvAC intra: 19.0% 17.3% 4.8% inter: 11.7% 7.2% 0.8% [libx264 @ 0x3e28580] i16 v,h,dc,p: 48% 33% 11% 8% [libx264 @ 0x3e28580] i8c dc,h,v,p: 72% 15% 11% 3% [libx264 @ 0x3e28580] kb/s:1135.32 [libx264 @ 0x429bd00] frame I:3 Avg QP:24.33 size: 41327 [libx264 @ 0x429bd00] frame P:546 Avg QP:25.45 size: 9727 [libx264 @ 0x429bd00] mb I I16..4: 100.0% 0.0% 0.0% [libx264 @ 0x429bd00] mb P I16..4: 14.6% 0.0% 0.0% P16..4: 26.9% 0.0% 0.0% 0.0% 0.0% skip:58.5% [libx264 @ 0x429bd00] coded y,uvDC,uvAC intra: 18.3% 20.8% 5.8% inter: 11.2% 8.0% 0.7% [libx264 @ 0x429bd00] i16 v,h,dc,p: 48% 32% 11% 9% [libx264 @ 0x429bd00] i8c dc,h,v,p: 69% 15% 12% 4% [libx264 @ 0x429bd00] kb/s:1979.90 [libx264 @ 0x4a236e0] frame I:3 Avg QP:22.93 size: 76689 [libx264 @ 0x4a236e0] frame P:545 Avg QP:23.89 size: 24064 [libx264 @ 0x4a236e0] mb I I16..4: 100.0% 0.0% 0.0% [libx264 @ 0x4a236e0] mb P I16..4: 16.0% 0.0% 0.0% P16..4: 27.4% 0.0% 0.0% 0.0% 0.0% skip:56.6% [libx264 @ 0x4a236e0] coded y,uvDC,uvAC intra: 16.6% 29.8% 11.6% inter: 10.9% 10.6% 1.8% [libx264 @ 0x4a236e0] i16 v,h,dc,p: 48% 30% 12% 10% [libx264 @ 0x4a236e0] i8c dc,h,v,p: 62% 14% 19% 4% [libx264 @ 0x4a236e0] kb/s:4870.36 }}} PCR diffs: {{{ pid: 256 pcr: 366660000 pcr delta (ms): 80.0 pid: 256 pcr: 368820000 pcr delta (ms): 80.0 pid: 256 pcr: 370980000 pcr delta (ms): 80.0 pid: 256 pcr: 373140000 pcr delta (ms): 80.0 pid: 256 pcr: 375300000 pcr delta (ms): 80.0 pid: 256 pcr: 377460000 pcr delta (ms): 80.0 pid: 256 pcr: 379620000 pcr delta (ms): 80.0 pid: 256 pcr: 381780000 pcr delta (ms): 80.0 pid: 256 pcr: 383940000 pcr delta (ms): 80.0 }}} Transcode with mpeg2video: {{{ ~# bin/ffmpeg -threads auto -i pipe:0 -async 1 -vsync 1 -r 25 -b:0 270k -codec:0 mpeg2video -maxrate:0 300k -bufsize:0 900k -map 0:0 -b:1 460k -codec:1 mpeg2video -maxrate:1 512k -bufsize:1 1536k -map 0:1 -b:2 675k -codec:2 mpeg2video -maxrate:2 750k -bufsize:2 2250k -map 0:2 -b:3 1260k -codec:3 mpeg2video -maxrate:3 1400k -bufsize:3 4200k -map 0:3 -b:4 2200k -codec:4 mpeg2video -maxrate:4 2500k -bufsize:4 7500k -map 0:4 -b:5 5400k -codec:5 mpeg2video -maxrate:5 6000k -bufsize:5 18000k -map 0:5 -f mpegts pipe:1 < input.ts > out.ts ffmpeg version N-81231-g5469293 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 --enable-gpl --enable-libx264 --enable-libx265 --enable-libmp3lame libavutil 55. 28.100 / 55. 28.100 libavcodec 57. 51.100 / 57. 51.100 libavformat 57. 44.100 / 57. 44.100 libavfilter 6. 49.100 / 6. 49.100 libswscale 4. 1.100 / 4. 1.100 libswresample 2. 1.100 / 2. 1.100 libpostproc 54. 0.100 / 54. 0.100 Input #0, mpegts, from 'pipe:0': Duration: N/A, start: 1.480000, bitrate: N/A Program 1 Metadata: service_name : Service01 service_provider: FFmpeg Stream #0:0[0x100]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p, 480x270 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc Stream #0:1[0x101]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p, 640x360 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc Stream #0:2[0x102]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p, 720x404 [SAR 404:405 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc Stream #0:3[0x103]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p, 960x540 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc Stream #0:4[0x104]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc Stream #0:5[0x105]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc Stream #0:6[0x106](rus): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 192 kb/s [mpegts @ 0x44a2660] Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead. Last message repeated 5 times Output #0, mpegts, to 'pipe:1': Metadata: encoder : Lavf57.44.100 Stream #0:0: Video: mpeg2video (Main), yuv420p, 480x270 [SAR 1:1 DAR 16:9], q=2-31, 270 kb/s, 25 fps, 90k tbn, 25 tbc Metadata: encoder : Lavc57.51.100 mpeg2video Side data: cpb: bitrate max/min/avg: 300000/0/270000 buffer size: 900000 vbv_delay: -1 Stream #0:1: Video: mpeg2video (Main), yuv420p, 640x360 [SAR 1:1 DAR 16:9], q=2-31, 460 kb/s, 25 fps, 90k tbn, 25 tbc Metadata: encoder : Lavc57.51.100 mpeg2video Side data: cpb: bitrate max/min/avg: 512000/0/460000 buffer size: 1536000 vbv_delay: -1 Stream #0:2: Video: mpeg2video (Main), yuv420p, 720x404 [SAR 404:405 DAR 16:9], q=2-31, 675 kb/s, 25 fps, 90k tbn, 25 tbc Metadata: encoder : Lavc57.51.100 mpeg2video Side data: cpb: bitrate max/min/avg: 750000/0/675000 buffer size: 2250000 vbv_delay: -1 Stream #0:3: Video: mpeg2video (Main), yuv420p, 960x540 [SAR 1:1 DAR 16:9], q=2-31, 1260 kb/s, 25 fps, 90k tbn, 25 tbc Metadata: encoder : Lavc57.51.100 mpeg2video Side data: cpb: bitrate max/min/avg: 1400000/0/1260000 buffer size: 4200000 vbv_delay: -1 Stream #0:4: Video: mpeg2video (Main), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], q=2-31, 2200 kb/s, 25 fps, 90k tbn, 25 tbc Metadata: encoder : Lavc57.51.100 mpeg2video Side data: cpb: bitrate max/min/avg: 2500000/0/2200000 buffer size: 7500000 vbv_delay: -1 Stream #0:5: Video: mpeg2video (Main), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 5400 kb/s, 25 fps, 90k tbn, 25 tbc Metadata: encoder : Lavc57.51.100 mpeg2video Side data: cpb: bitrate max/min/avg: 6000000/0/5400000 buffer size: 18000000 vbv_delay: -1 Stream mapping: Stream #0:0 -> #0:0 (h264 (native) -> mpeg2video (native)) Stream #0:1 -> #0:1 (h264 (native) -> mpeg2video (native)) Stream #0:2 -> #0:2 (h264 (native) -> mpeg2video (native)) Stream #0:3 -> #0:3 (h264 (native) -> mpeg2video (native)) Stream #0:4 -> #0:4 (h264 (native) -> mpeg2video (native)) Stream #0:5 -> #0:5 (h264 (native) -> mpeg2video (native)) [mpeg2video @ 0x44bd080] rc buffer underflow4.8 q=24.8 q=9.8 size= 9227kB time=00:00:06.12 bitrate=12350.2kbits/s speed= 1.1x [mpeg2video @ 0x44bd080] max bitrate possibly too small or try trellis with large lmax or increase qmax [mpeg2video @ 0x44bd080] rc buffer underflow [mpeg2video @ 0x44bd080] max bitrate possibly too small or try trellis with large lmax or increase qmax [h264 @ 0x545ade0] error while decoding MB 48 39, bytestream -5ize= 29679kB time=00:00:20.76 bitrate=11711.6kbits/s speed=1.14x [h264 @ 0x545ade0] concealing 3481 DC, 3481 AC, 3481 MV errors in B frame frame= 549 fps= 29 q=31.0 Lq=26.0 q=19.2 q=14.5 q=14.0 q=9.9 size= 31148kB time=00:00:21.88 bitrate=11662.1kbits/s dup=2 drop=0 speed=1.14x video:28490kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 9.331204% }}} PCR diffs: {{{ pid: 256 pcr: 558900000 pcr delta (ms): 40.0 pid: 256 pcr: 561060000 pcr delta (ms): 80.0 pid: 256 pcr: 563220000 pcr delta (ms): 80.0 pid: 256 pcr: 565380000 pcr delta (ms): 80.0 pid: 256 pcr: 566460000 pcr delta (ms): 40.0 pid: 256 pcr: 567540000 pcr delta (ms): 40.0 pid: 256 pcr: 569700000 pcr delta (ms): 80.0 pid: 256 pcr: 571860000 pcr delta (ms): 80.0 pid: 256 pcr: 574020000 pcr delta (ms): 80.0 pid: 256 pcr: 576180000 pcr delta (ms): 80.0 pid: 256 pcr: 578340000 pcr delta (ms): 80.0 }}} Remux from mpeg2video: {{{ ~# bin/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 < out.ts > out1.ts ffmpeg version N-81231-g5469293 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 --enable-gpl --enable-libx264 --enable-libx265 --enable-libmp3lame libavutil 55. 28.100 / 55. 28.100 libavcodec 57. 51.100 / 57. 51.100 libavformat 57. 44.100 / 57. 44.100 libavfilter 6. 49.100 / 6. 49.100 libswscale 4. 1.100 / 4. 1.100 libswresample 2. 1.100 / 2. 1.100 Input #0, mpegts, from 'pipe:0': Duration: N/A, start: 1.440000, bitrate: N/A Program 1 Metadata: service_name : Service01 service_provider: FFmpeg Stream #0:0[0x100]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv), 480x270 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc Stream #0:1[0x101]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv), 640x360 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc Stream #0:2[0x102]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv), 720x404 [SAR 404:405 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc Stream #0:3[0x103]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv), 960x540 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc Stream #0:4[0x104]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv), 1280x720 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc Stream #0:5[0x105]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv), 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc [mpegts @ 0x3f469a0] Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead. Last message repeated 5 times Output #0, mpegts, to 'pipe:1': Metadata: encoder : Lavf57.44.100 Stream #0:0: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv), 480x270 [SAR 1:1 DAR 16:9], q=2-31, 25 fps, 25 tbr, 90k tbn, 90k tbc Stream #0:1: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv), 640x360 [SAR 1:1 DAR 16:9], q=2-31, 25 fps, 25 tbr, 90k tbn, 90k tbc Stream #0:2: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv), 720x404 [SAR 404:405 DAR 16:9], q=2-31, 25 fps, 25 tbr, 90k tbn, 90k tbc Stream #0:3: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv), 960x540 [SAR 1:1 DAR 16:9], q=2-31, 25 fps, 25 tbr, 90k tbn, 90k tbc Stream #0:4: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv), 1280x720 [SAR 1:1 DAR 16:9], q=2-31, 25 fps, 25 tbr, 90k tbn, 90k tbc Stream #0:5: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 25 fps, 25 tbr, 90k tbn, 90k tbc Stream mapping: Stream #0:0 -> #0:0 (copy) Stream #0:1 -> #0:1 (copy) Stream #0:2 -> #0:2 (copy) Stream #0:3 -> #0:3 (copy) Stream #0:4 -> #0:4 (copy) Stream #0:5 -> #0:5 (copy) frame= 549 fps=0.0 q=-1.0 Lq=-1.0 q=-1.0 q=-1.0 q=-1.0 q=-1.0 size= 34966kB time=00:00:21.88 bitrate=13091.3kbits/s speed= 133x video:28535kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 22.536819% }}} PCR diffs: {{{ pid: 256 pcr: 521312727 pcr delta (ms): 69.184 pid: 256 pcr: 522774615 pcr delta (ms): 54.144 pid: 256 pcr: 523952247 pcr delta (ms): 43.616 pid: 256 pcr: 538752301 pcr delta (ms): 548.15 pid: 256 pcr: 544559245 pcr delta (ms): 215.072 pid: 256 pcr: 551943654 pcr delta (ms): 273.497 pid: 256 pcr: 566262659 pcr delta (ms): 530.334 pid: 256 pcr: 568621047 pcr delta (ms): 87.348 pid: 256 pcr: 576986295 pcr delta (ms): 309.824 pid: 256 pcr: 585813849 pcr delta (ms): 326.946 pid: 256 pcr: 590236998 pcr delta (ms): 163.82 pid: 256 pcr: 595312998 pcr delta (ms): 188.0 pid: 256 pcr: 603787575 pcr delta (ms): 313.873 }}} I've tried both 3.1.1 and git master head. Are you still can't reproduce the problem? I have 100% reproducibility. -- Ticket URL: <https://trac.ffmpeg.org/ticket/5750#comment:10> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#5750: ffmpeg generates rarerly PCR for mpegts with multiple video streams copy and muxrate specified. -------------------------------------+------------------------------------- Reporter: xzerth | Owner: Type: defect | Status: new Priority: normal | Component: Version: unspecified | undetermined Keywords: mpegts | Resolution: Blocking: | Blocked By: Analyzed by developer: 0 | Reproduced by developer: 0 -------------------------------------+------------------------------------- Comment (by cehoyos): Replying to [comment:10 xzerth]:
Are you still can't reproduce the problem? I was just wondering if the issue is related to h264 timestamps (that are known to cause issues in FFmpeg).
-- Ticket URL: <https://trac.ffmpeg.org/ticket/5750#comment:11> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#5750: ffmpeg generates rarerly PCR for mpegts with multiple video streams copy and muxrate specified. -------------------------------------+------------------------------------- Reporter: xzerth | Owner: Type: defect | Status: new Priority: normal | Component: Version: unspecified | undetermined Keywords: mpegts | Resolution: Blocking: | Blocked By: Analyzed by developer: 0 | Reproduced by developer: 0 -------------------------------------+------------------------------------- Comment (by xzerth): Replying to [comment:11 cehoyos]:
Replying to [comment:10 xzerth]:
Are you still can't reproduce the problem? I was just wondering if the issue is related to h264 timestamps (that are known to cause issues in FFmpeg).
Understand. Well, I have no problem with transcoding streams. Only with copying. Maybe the problem here because of vbv buffer which requirments ffmpeg do not take into account while copying streams? -- Ticket URL: <https://trac.ffmpeg.org/ticket/5750#comment:12> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#5750: ffmpeg generates rarerly PCR for mpegts with multiple video streams copy and muxrate specified. -------------------------------------+------------------------------------- Reporter: xzerth | Owner: Type: defect | Status: new Priority: normal | Component: Version: unspecified | undetermined Keywords: mpegts | Resolution: Blocking: | Blocked By: Analyzed by developer: 0 | Reproduced by developer: 0 -------------------------------------+------------------------------------- Comment (by xzerth): Hi, is there any news? Can you reproduce behavior? Can I help you and provide more info? There is 3.1.2 release soon - is this bug serious or we can catch the bus? ) -- Ticket URL: <https://trac.ffmpeg.org/ticket/5750#comment:13> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#5750: ffmpeg generates rarerly PCR for mpegts with multiple video streams copy and muxrate specified. -------------------------------------+------------------------------------- Reporter: xzerth | Owner: Type: defect | Status: new Priority: normal | Component: Version: unspecified | undetermined Keywords: mpegts | Resolution: Blocking: | Blocked By: Analyzed by developer: 0 | Reproduced by developer: 0 -------------------------------------+------------------------------------- Comment (by cehoyos): If this is not a regression, I would strongly suggest not to backport a fix, this nearly always leads to trouble. -- Ticket URL: <https://trac.ffmpeg.org/ticket/5750#comment:14> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#5750: ffmpeg generates rarerly PCR for mpegts with multiple video streams copy and muxrate specified. -------------------------------------+------------------------------------- Reporter: xzerth | Owner: Type: defect | Status: new Priority: normal | Component: Version: unspecified | undetermined Keywords: mpegts | Resolution: Blocking: | Blocked By: Analyzed by developer: 0 | Reproduced by developer: 0 -------------------------------------+------------------------------------- Comment (by tmaxwell): I hit a very similar issue by demuxing a TS file which has multiple video and audio streams. (Different resolutions and different compressions) My command line was: ffmpeg -i big.ts -map 0:0 -vcodec copy video01.ts The output file had PCR entries sporadically, ~23ms - ~8s intervals random. I executed ffmpeg on Windows and tried 2 versions: ffmpeg-20180319-e4eaaf7-win64-static --> issue can be reproduced ffmpeg-20140525-git-f276bf3-win64-static --> output has PCR every 67ms I checked out the 2014 version from GIT (f276bf303cbb7a8fed3c388135007bc29f45f8d5) and run it on Linux. It worked fine. Something had to happen between 2014 and 2016 which broke the functionality. As soon as I will have some time I will try to find out which commit broke the code. Output PCR differences using the 20180319 version: (seconds) 1.735, 1.969, 3.303, 2.035, 4.771, 1.201, 1.134, 0.968, 1.001, 1.001, 1.502, 1.502, 1.201, 8.308, 1.168, 2.069 and using the 20140525 version: (seconds) 0.067, 0.067, 0.067, 0.067, 0.067, 0.067, 0.067 Original file has PCR values in every 0.067 seconds (sometimes 0.033 seconds) Output of the 2014 version: {{{ ffmpeg version N-63418-gf276bf3 Copyright (c) 2000-2014 the FFmpeg developers built on May 24 2014 22:09:02 with gcc 4.8.2 (GCC) configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable- libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable- libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable- libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc --enable- libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable- libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable- decklink --enable-zlib libavutil 52. 86.100 / 52. 86.100 libavcodec 55. 65.100 / 55. 65.100 libavformat 55. 40.100 / 55. 40.100 libavdevice 55. 13.101 / 55. 13.101 libavfilter 4. 5.100 / 4. 5.100 libswscale 2. 6.100 / 2. 6.100 libswresample 0. 19.100 / 0. 19.100 libpostproc 52. 3.100 / 52. 3.100 [h264 @ 00000000054e8c40] mmco: unref short failure Last message repeated 1 times [h264 @ 00000000054e8c40] number of reference frames (0+4) exceeds max (3; probably corrupt input), discarding one Input #0, mpegts, from 'big.ts': Duration: 00:10:00.14, start: 1.400000, bitrate: 21551 kb/s Program 1 Metadata: service_name : Service01 service_provider: FFmpeg Stream #0:0[0x100]: Video: h264 (Constrained Baseline) ([27][0][0][0] / 0x001B), yuv420p, 480x270 [SAR 1:1 DAR 16:9], 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc Stream #0:1[0x101]: Video: h264 (Constrained Baseline) ([27][0][0][0] / 0x001B), yuv420p, 480x270 [SAR 1:1 DAR 16:9], 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc Stream #0:2[0x102]: Video: h264 (Constrained Baseline) ([27][0][0][0] / 0x001B), yuv420p, 640x360 [SAR 1:1 DAR 16:9], 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc Stream #0:3[0x103]: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p, 960x540 [SAR 1:1 DAR 16:9], 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc Stream #0:4[0x104]: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p, 960x540 [SAR 1:1 DAR 16:9], 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc Stream #0:5[0x105]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc Stream #0:6[0x106]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc Stream #0:7[0x107]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc Stream #0:8[0x108]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 29.97 fps, 59.94 tbr, 90k tbn, 59.94 tbc Stream #0:9[0x109](eng): Audio: ac3 ([129][0][0][0] / 0x0081), 48000 Hz, 5.1(side), fltp, 384 kb/s Stream #0:10[0x10a](eng): Audio: aac ([15][0][0][0] / 0x000F), 48000 Hz, 5.1, fltp, 96 kb/s Stream #0:11[0x10b](eng): Audio: aac ([15][0][0][0] / 0x000F), 48000 Hz, 5.1, fltp, 63 kb/s Stream #0:12[0x10c](eng): Audio: aac ([15][0][0][0] / 0x000F), 48000 Hz, 5.1, fltp, 50 kb/s Stream #0:13[0x10d](eng): Audio: eac3 ([135][0][0][0] / 0x0087), 48000 Hz, 5.1(side), fltp, 256 kb/s Output #0, mpegts, to 'video01.ts': Metadata: encoder : Lavf55.40.100 Stream #0:0: Video: h264 ([27][0][0][0] / 0x001B), yuv420p, 480x270 [SAR 1:1 DAR 16:9], q=2-31, 29.97 fps, 90k tbn, 29.97 tbc Stream mapping: Stream #0:0 -> #0:0 (copy) Press [q] to stop, [?] for help frame=17953 fps=7835 q=-1.0 Lsize= 9524kB time=00:09:59.03 bitrate= 130.2kbits/s video:6840kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 39.238743% }}} -- Ticket URL: <https://trac.ffmpeg.org/ticket/5750#comment:15> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#5750: ffmpeg generates rarerly PCR for mpegts with multiple video streams copy and muxrate specified. -------------------------------------+------------------------------------- Reporter: xzerth | Owner: Type: defect | Status: new Priority: normal | Component: Version: unspecified | undetermined Keywords: mpegts | Resolution: Blocking: | Blocked By: Analyzed by developer: 0 | Reproduced by developer: 0 -------------------------------------+------------------------------------- Changes (by neon18): * cc: neon18@… (added) -- Ticket URL: <https://trac.ffmpeg.org/ticket/5750#comment:16> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#5750: ffmpeg generates rarerly PCR for mpegts with multiple video streams copy and muxrate specified. -------------------------------------+------------------------------------- Reporter: xzerth | Owner: Type: defect | Status: closed Priority: normal | Component: | undetermined Version: unspecified | Resolution: fixed Keywords: mpegts | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+------------------------------------- Changes (by cus): * status: new => closed * resolution: => fixed Comment: Fixed in 88ac76be796025dfa7cc55124e881fbc59b7377a. -- Ticket URL: <https://trac.ffmpeg.org/ticket/5750#comment:17> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
participants (1)
-
FFmpeg