Problem mapping out multiple programs simultaneously from MPEGTS
I have an srt stream that I ingest that includes three separate programs in a single mpegts stream. I was using ffmpeg to split it into 3 individual streams. This worked fine until recently when they must have changed something in the stream. They swear the stream works for others, and they are out of their depth in diagnosing what was changed on their end. I captured a couple minutes of this stream using tsduck, and the file can be pulled from https://faroutprojects.com/daystar.ts A simple example that fails is:
ffmpeg -i https://faroutprojects.com/daystar.ts -map p:1 -y daystar_hd.ts -map p:2 -y daystar_es.ts -map p:3 -y daystar_sd.ts
It gives tons of errors like this: [aist#0:5/ac3 @ 0x5e9de818bac0] timestamp discontinuity (stream id=53): 15975889, new offset= -15975973 or this: [vist#0:2/mpeg2video @ 0x5e9de81b1640] timestamp discontinuity (stream id=65): -15975878, new offset= -95 Basically, one for every frame/audio packet in every pid/stream id. I tried a version of ffmpeg from two years ago, and it fails with this file in the same way. What is strange, is that I can still pull any single program out of the file. So this works fine (as does p:2 and p:3):
ffmpeg -i https://faroutprojects.com/daystar.ts -map p:1 -y daystar_hd.ts
Any suggestions on were to look is much appreciated! Thanks, Deron Here is the console output.
ffmpeg -i daystar.ts -map p:1 -y daystar_hd.ts -map p:2 -y daystar_es.ts -map p:3 -y daystar_sd.ts
ffmpeg version N-124952-gb29bdd3715 Copyright (c) 2000-2026 the FFmpeg developers built with gcc 14 (Ubuntu 14.2.0-4ubuntu2) configuration: --enable-static --enable-shared --enable-gpl --enable-nonfree --enable-libxvid --enable-libx264 --enable-libmp3lame --enable-libvorbis --enable-libopus --enable-libfdk-aac --enable-libx265 --enable-libdav1d --enable-libsrt --enable-openssl --enable-libass --enable-libharfbuzz --enable-libfreetype --enable-libfontconfig --enable-libaom --enable-libklvanc --disable-libxcb --enable-libvpx --disable-stripping libavutil 60. 33.100 / 60. 33.100 libavcodec 62. 36.101 / 62. 36.101 libavformat 62. 19.101 / 62. 19.101 libavdevice 62. 4.100 / 62. 4.100 libavfilter 11. 17.100 / 11. 17.100 libswscale 9. 8.100 / 9. 8.100 libswresample 6. 4.100 / 6. 4.100 [mpeg2video @ 0x5e9de818e480] Invalid frame dimensions 0x0. Last message repeated 2 times [mpeg2video @ 0x5e9de8191400] Invalid frame dimensions 0x0. [mpeg2video @ 0x5e9de818e480] Invalid frame dimensions 0x0. Last message repeated 1 times [mpeg2video @ 0x5e9de8191400] Invalid frame dimensions 0x0. [mpeg2video @ 0x5e9de818e480] Invalid frame dimensions 0x0. [mpeg2video @ 0x5e9de8191400] Invalid frame dimensions 0x0. [mpeg2video @ 0x5e9de818e480] Invalid frame dimensions 0x0. Last message repeated 1 times [mpeg2video @ 0x5e9de8191400] Invalid frame dimensions 0x0. [mpeg2video @ 0x5e9de818e480] Invalid frame dimensions 0x0. Last message repeated 2 times [mpeg2video @ 0x5e9de8187fc0] Invalid frame dimensions 0x0. [mpeg2video @ 0x5e9de818e480] Invalid frame dimensions 0x0. Last message repeated 2 times [mpeg2video @ 0x5e9de8187fc0] Invalid frame dimensions 0x0. [mpeg2video @ 0x5e9de818e480] Invalid frame dimensions 0x0. [mpeg2video @ 0x5e9de8187fc0] Invalid frame dimensions 0x0. Last message repeated 1 times [mpeg2video @ 0x5e9de818e480] Invalid frame dimensions 0x0. Last message repeated 1 times [mpeg2video @ 0x5e9de8187fc0] Invalid frame dimensions 0x0. [mpeg2video @ 0x5e9de818e480] Invalid frame dimensions 0x0. [mpeg2video @ 0x5e9de8187fc0] Invalid frame dimensions 0x0. Last message repeated 1 times [mpeg2video @ 0x5e9de8191400] Invalid frame dimensions 0x0. [mpeg2video @ 0x5e9de818e480] Invalid frame dimensions 0x0. Last message repeated 2 times [mpeg2video @ 0x5e9de8187fc0] Invalid frame dimensions 0x0. [mpeg2video @ 0x5e9de818e480] Invalid frame dimensions 0x0. [mpeg2video @ 0x5e9de8187fc0] Invalid frame dimensions 0x0. [mpeg2video @ 0x5e9de818e480] Invalid frame dimensions 0x0. [mpeg2video @ 0x5e9de8187fc0] Invalid frame dimensions 0x0. [mpeg2video @ 0x5e9de818e480] Invalid frame dimensions 0x0. Last message repeated 3 times [mpeg2video @ 0x5e9de8187fc0] Invalid frame dimensions 0x0. Last message repeated 2 times [mpeg2video @ 0x5e9de818e480] Invalid frame dimensions 0x0. Last message repeated 2 times [mpeg2video @ 0x5e9de8187fc0] Invalid frame dimensions 0x0. Last message repeated 2 times [mpeg2video @ 0x5e9de818e480] Invalid frame dimensions 0x0. Last message repeated 2 times [mpeg2video @ 0x5e9de8187fc0] Invalid frame dimensions 0x0. Last message repeated 4 times [mpeg2video @ 0x5e9de818e480] Invalid frame dimensions 0x0. [mpeg2video @ 0x5e9de8187fc0] Invalid frame dimensions 0x0. [mpeg2video @ 0x5e9de818e480] Invalid frame dimensions 0x0. Last message repeated 1 times [mpeg2video @ 0x5e9de8187fc0] Invalid frame dimensions 0x0. Last message repeated 2 times [mpeg2video @ 0x5e9de818e480] Invalid frame dimensions 0x0. Last message repeated 2 times [mpeg2video @ 0x5e9de8187fc0] Invalid frame dimensions 0x0. Last message repeated 2 times [mpeg2video @ 0x5e9de818e480] Invalid frame dimensions 0x0. [mpeg2video @ 0x5e9de8187fc0] Invalid frame dimensions 0x0. [in#0/mpegts @ 0x5e9de8165080] PES packet size mismatch [in#0/mpegts @ 0x5e9de8165080] Packet corrupt (stream = 6, dts = 2090941230). [in#0/mpegts @ 0x5e9de8165080] PES packet size mismatch [in#0/mpegts @ 0x5e9de8165080] Packet corrupt (stream = 5, dts = 2090944110). [in#0/mpegts @ 0x5e9de8165080] stream 1 : no PTS found at end of file, duration not set [in#0/mpegts @ 0x5e9de8165080] stream 4 : no PTS found at end of file, duration not set Input #0, mpegts, from 'daystar.ts': Duration: 00:02:00.72, start: 23095.196733, bitrate: 17400 kb/s Program 1 Metadata: service_name : 1) Daystar HD service_provider: Harmonic Stream #0:3[0x31]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv, top first), 1920x1080 [SAR 1:1 DAR 16:9], 29.97 fps, 29.97 tbr, 90k tbn, start 23113.139833 Side data: CPB properties: bitrate max/min/avg: 14172400/0/0 buffer size: 7995392 vbv_delay: N/A Stream #0:6[0x34]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 5.1(side), fltp, 448 kb/s, start 23112.872333 Stream #0:5[0x35]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, fltp, 192 kb/s, start 23112.872333 (visual impaired) Program 2 Metadata: service_name : 2) Daystar Espanol service_provider: Harmonic Stream #0:2[0x41]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv, progressive), 1280x720 [SAR 1:1 DAR 16:9], 59.94 fps, 59.94 tbr, 90k tbn, start 23095.718900 Side data: CPB properties: bitrate max/min/avg: 14163600/0/0 buffer size: 7995392 vbv_delay: N/A Stream #0:4[0x44]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, fltp, 192 kb/s, start 23095.196733 Program 3 Metadata: service_name : 3) Reflections service_provider: Harmonic Stream #0:0[0x51]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv, top first), 704x480 [SAR 40:33 DAR 16:9], 29.97 fps, 29.97 tbr, 90k tbn, start 23112.430856 Side data: CPB properties: bitrate max/min/avg: 2917200/0/0 buffer size: 1835008 vbv_delay: N/A Stream #0:1[0x54]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, fltp, 192 kb/s, start 23111.829689 Stream mapping: Stream #0:3 -> #0:0 (mpeg2video (native) -> mpeg2video (native)) Stream #0:5 -> #0:1 (ac3 (native) -> mp2 (native)) Stream #0:6 -> #0:2 (ac3 (native) -> mp2 (native)) Stream #0:2 -> #1:0 (mpeg2video (native) -> mpeg2video (native)) Stream #0:4 -> #1:1 (ac3 (native) -> mp2 (native)) Stream #0:0 -> #2:0 (mpeg2video (native) -> mpeg2video (native)) Stream #0:1 -> #2:1 (ac3 (native) -> mp2 (native)) Press [q] to stop, [?] for help [vist#0:2/mpeg2video @ 0x5e9de81b1640] timestamp discontinuity (stream id=65): -17387555, new offset= -12 [vist#0:3/mpeg2video @ 0x5e9de81b3440] timestamp discontinuity (stream id=49): 17387556, new offset= -17387568 [vist#0:2/mpeg2video @ 0x5e9de81b1640] timestamp discontinuity (stream id=65): -17387545, new offset= -23 [vist#0:3/mpeg2video @ 0x5e9de81b3440] timestamp discontinuity (stream id=49): 17387544, new offset= -17387567 [vist#0:2/mpeg2video @ 0x5e9de81b1640] timestamp discontinuity (stream id=65): -17387545, new offset= -22 [vist#0:3/mpeg2video @ 0x5e9de81b3440] timestamp discontinuity (stream id=49): 17387544, new offset= -17387566 [vist#0:2/mpeg2video @ 0x5e9de81b1640] timestamp discontinuity (stream id=65): -17387544, new offset= -22 [vist#0:2/mpeg2video @ 0x5e9de81b1640] timestamp discontinuity (stream id=65): -15943945, new offset= -32 [vist#0:0/mpeg2video @ 0x5e9de829b440] timestamp discontinuity (stream id=81): 15943945, new offset= -15943977 [vist#0:2/mpeg2video @ 0x5e9de81b1640] timestamp discontinuity (stream id=65): -15943944, new offset= -33 [vist#0:0/mpeg2video @ 0x5e9de829b440] timestamp discontinuity (stream id=81): 15943944, new offset= -15943977 [vist#0:2/mpeg2video @ 0x5e9de81b1640] timestamp discontinuity (stream id=65): -15943934, new offset= -43 [vist#0:0/mpeg2video @ 0x5e9de829b440] timestamp discontinuity (stream id=81): 15943933, new offset= -15943976 [vist#0:2/mpeg2video @ 0x5e9de81b1640] timestamp discontinuity (stream id=65): -15943923, new offset= -53 [vist#0:0/mpeg2video @ 0x5e9de829b440] timestamp discontinuity (stream id=81): 15943922, new offset= -15943975 [vist#0:2/mpeg2video @ 0x5e9de81b1640] timestamp discontinuity (stream id=65): -15943922, new offset= -53 [vist#0:3/mpeg2video @ 0x5e9de81b3440] timestamp discontinuity (stream id=49): 15943922, new offset= -15943975 [vist#0:2/mpeg2video @ 0x5e9de81b1640] timestamp discontinuity (stream id=65): -15943912, new offset= -63 [vist#0:0/mpeg2video @ 0x5e9de829b440] timestamp discontinuity (stream id=81): 15943911, new offset= -15943974 [vist#0:2/mpeg2video @ 0x5e9de81b1640] timestamp discontinuity (stream id=65): -15943912, new offset= -62 [vist#0:0/mpeg2video @ 0x5e9de829b440] timestamp discontinuity (stream id=81): -842489, new offset= -15943973 [vist#0:2/mpeg2video @ 0x5e9de81b1640] timestamp discontinuity (stream id=65): -15943900, new offset= -73 [vist#0:3/mpeg2video @ 0x5e9de81b3440] timestamp discontinuity (stream id=49): 15943900, new offset= -15943973 [vist#0:2/mpeg2video @ 0x5e9de81b1640] timestamp discontinuity (stream id=65): -15943900, new offset= -73 [vist#0:3/mpeg2video @ 0x5e9de81b3440] timestamp discontinuity (stream id=49): 15943900, new offset= -15943973 [vist#0:2/mpeg2video @ 0x5e9de81b1640] timestamp discontinuity (stream id=65): -15943889, new offset= -84 [aist#0:5/ac3 @ 0x5e9de818bac0] timestamp discontinuity (stream id=53): 15975889, new offset= -15975973 [vist#0:2/mpeg2video @ 0x5e9de81b1640] timestamp discontinuity (stream id=65): -15975878, new offset= -95 [vist#0:3/mpeg2video @ 0x5e9de81b3440] timestamp discontinuity (stream id=49): 15975878, new offset= -15975973 [aist#0:4/ac3 @ 0x5e9de81960c0] timestamp discontinuity (stream id=68): -15943900, new offset= -32073 [vist#0:3/mpeg2video @ 0x5e9de81b3440] timestamp discontinuity (stream id=49): 15943900, new offset= -15975973 [vist#0:2/mpeg2video @ 0x5e9de81b1640] timestamp discontinuity (stream id=65): -15975878, new offset= -95 [aist#0:6/ac3 @ 0x5e9de829cec0] timestamp discontinuity (stream id=52): 16818367, new offset= -16818462 [vist#0:2/mpeg2video @ 0x5e9de81b1640] timestamp discontinuity (stream id=65): -16818356, new offset= -106 [vist#0:0/mpeg2video @ 0x5e9de829b440] timestamp discontinuity (stream id=81): 15975867, new offset= -15975973 [vist#0:2/mpeg2video @ 0x5e9de81b1640] timestamp discontinuity (stream id=65): -15975856, new offset= -117 [vist#0:0/mpeg2video @ 0x5e9de829b440] timestamp discontinuity (stream id=81): 15975855, new offset= -15975972 [vist#0:2/mpeg2video @ 0x5e9de81b1640] timestamp discontinuity (stream id=65): -15975845, new offset= -127 [vist#0:3/mpeg2video @ 0x5e9de81b3440] timestamp discontinuity (stream id=49): 15975844, new offset= -15975971 [vist#0:2/mpeg2video @ 0x5e9de81b1640] timestamp discontinuity (stream id=65): -15975834, new offset= -137 [vist#0:3/mpeg2video @ 0x5e9de81b3440] timestamp discontinuity (stream id=49): 15975833, new offset= -15975970 [aist#0:4/ac3 @ 0x5e9de81960c0] timestamp discontinuity (stream id=68): -15911889, new offset= -64081 [vist#0:0/mpeg2video @ 0x5e9de829b440] timestamp discontinuity (stream id=81): 15911889, new offset= -15975970 [vist#0:2/mpeg2video @ 0x5e9de81b1640] timestamp discontinuity (stream id=65): -15975834, new offset= -136 [vist#0:3/mpeg2video @ 0x5e9de81b3440] timestamp discontinuity (stream id=49): 15975833, new offset= -15975969 [vist#0:2/mpeg2video @ 0x5e9de81b1640] timestamp discontinuity (stream id=65): -15975822, new offset= -147 [aist#0:5/ac3 @ 0x5e9de818bac0] timestamp discontinuity (stream id=53): 16007834, new offset= -16007981 [vist#0:2/mpeg2video @ 0x5e9de81b1640] timestamp discontinuity (stream id=65): -16007833, new offset= -148 [vist#0:0/mpeg2video @ 0x5e9de829b440] timestamp discontinuity (stream id=81): 15975821, new offset= -15975969 [aist#0:4/ac3 @ 0x5e9de81960c0] timestamp discontinuity (stream id=68): -15879889, new offset= -96080 [vist#0:3/mpeg2video @ 0x5e9de81b3440] timestamp discontinuity (stream id=49): 15879888, new offset= -15975968 [vist#0:2/mpeg2video @ 0x5e9de81b1640] timestamp discontinuity (stream id=65): -15975811, new offset= -157 [vist#0:3/mpeg2video @ 0x5e9de81b3440] timestamp discontinuity (stream id=49): 15975810, new offset= -15975967 [vist#0:2/mpeg2video @ 0x5e9de81b1640] timestamp discontinuity (stream id=65): -15975800, new offset= -167 [aist#0:1/ac3 @ 0x5e9de818ae80] timestamp discontinuity (stream id=84): 16007800, new offset= -16007967 [aist#0:4/ac3 @ 0x5e9de81960c0] timestamp discontinuity (stream id=68): -15879889, new offset= -128078 [vist#0:2/mpeg2video @ 0x5e9de81b1640] timestamp discontinuity (stream id=65): -127911, new offset= -167 Output #0, mpegts, to 'daystar_hd.ts': Metadata: encoder : Lavf62.19.101 [vist#0:3/mpeg2video @ 0x5e9de81b3440] timestamp discontinuity (stream id=49): 15975800, new offset= -15975967 Stream #0:0: Video: mpeg2video (Main), yuv420p(tv, top coded first (swapped)), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 29.97 fps, 90k tbn Metadata: encoder : Lavc62.36.101 mpeg2video Side data: CPB properties: timestamp discontinuity (stream id=65): -15975789, new offset= -178 bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: N/A Stream #0:1: Audio: mp2, 48000 Hz, stereo, s16, 384 kb/s (default) (visual impaired) Metadata: encoder : Lavc62.36.101 mp2 Stream #0:2: Audio: mp2, 48000 Hz, stereo, s16, 384 kb/s Metadata: encoder : Lavc62.36.101 mp2 [vist#0:3/mpeg2video @ 0x5e9de81b3440] timestamp discontinuity (stream id=49): 15975789, new offset= -15975967 [vist#0:2/mpeg2video @ 0x5e9de81b1640] timestamp discontinuity (stream id=65): -15975778, new offset= -189 [vist#0:3/mpeg2video @ 0x5e9de81b3440] timestamp discontinuity (stream id=49): 15975777, new offset= -15975966 [vist#0:2/mpeg2video @ 0x5e9de81b1640] timestamp discontinuity (stream id=65): -15975767, new offset= -199 [vist#0:3/mpeg2video @ 0x5e9de81b3440] timestamp discontinuity (stream id=49): 15975767, new offset= -15975966 [vist#0:2/mpeg2video @ 0x5e9de81b1640] timestamp discontinuity (stream id=65): -15975755, new offset= -211 [vist#0:3/mpeg2video @ 0x5e9de81b3440] timestamp discontinuity (stream id=49): 15975755, new offset= -15975966 [vist#0:2/mpeg2video @ 0x5e9de81b1640] timestamp discontinuity (stream id=65): -15975745, new offset= -221 [aist#0:1/ac3 @ 0x5e9de818ae80] timestamp discontinuity (stream id=84): 16039744, new offset= -16039965 [vist#0:2/mpeg2video @ 0x5e9de81b1640] timestamp discontinuity (stream id=65): -16039745, new offset= -220 [vist#0:3/mpeg2video @ 0x5e9de81b3440] timestamp discontinuity (stream id=49): 15975744, new offset= -15975964 [vist#0:2/mpeg2video @ 0x5e9de81b1640] timestamp discontinuity (stream id=65): -15975744, new offset= -220 [vist#0:0/mpeg2video @ 0x5e9de829b440] timestamp discontinuity (stream id=81): 16039744, new offset= -16039964 [vist#0:2/mpeg2video @ 0x5e9de81b1640] timestamp discontinuity (stream id=65): -16039733, new offset= -231 [vist#0:0/mpeg2video @ 0x5e9de829b440] timestamp discontinuity (stream id=81): 16039733, new offset= -16039964 [vist#0:2/mpeg2video @ 0x5e9de81b1640] timestamp discontinuity (stream id=65): -16039734, new offset= -230 [vist#0:0/mpeg2video @ 0x5e9de829b440] timestamp discontinuity (stream id=81): 16039733, new offset= -16039963 [vist#0:2/mpeg2video @ 0x5e9de81b1640] timestamp discontinuity (stream id=65): -16039722, new offset= -241 [vist#0:0/mpeg2video @ 0x5e9de829b440] timestamp discontinuity (stream id=81): 16039722, new offset= -16039963 [vist#0:2/mpeg2video @ 0x5e9de81b1640] timestamp discontinuity (stream id=65): -16039711, new offset= -252 [vist#0:0/mpeg2video @ 0x5e9de829b440] timestamp discontinuity (stream id=81): 16039710, new offset= -16039962 [vist#0:2/mpeg2video @ 0x5e9de81b1640] timestamp discontinuity (stream id=65): -16039711, new offset= -251 [vist#0:0/mpeg2video @ 0x5e9de829b440] timestamp discontinuity (stream id=81): 16039711, new offset= -16039962 [vist#0:2/mpeg2video @ 0x5e9de81b1640] timestamp discontinuity (stream id=65): -16039700, new offset= -262 [vist#0:3/mpeg2video @ 0x5e9de81b3440] timestamp discontinuity (stream id=49): 15975700, new offset= -15975962 [vist#0:2/mpeg2video @ 0x5e9de81b1640] timestamp discontinuity (stream id=65): -15975701, new offset= -261 [vist#0:3/mpeg2video @ 0x5e9de81b3440] timestamp discontinuity (stream id=49): 15975711, new offset= -15975972 [vist#0:2/mpeg2video @ 0x5e9de81b1640] timestamp discontinuity (stream id=65): -15975689, new offset= -283 [vist#0:0/mpeg2video @ 0x5e9de829b440] timestamp discontinuity (stream id=81): 16039688, new offset= -16039971 [vist#0:2/mpeg2video @ 0x5e9de81b1640] timestamp discontinuity (stream id=65): -16039689, new offset= -282 [aist#0:6/ac3 @ 0x5e9de829cec0] timestamp discontinuity (stream id=52): 16007689, new offset= -16007971 [vist#0:2/mpeg2video @ 0x5e9de81b1640] timestamp discontinuity (stream id=65): -16007678, new offset= -293 [vist#0:3/mpeg2video @ 0x5e9de81b3440] timestamp discontinuity (stream id=49): 16039678, new offset= -16039971 Output #1, mpegts, to 'daystar_es.ts': Metadata: encoder : Lavf62.19.101 Stream #1:0: Video: mpeg2video (Main), yuv420p(tv, progressive), 1280x720 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 59.94 fps, 90k tbn Metadata: encoder : Lavc62.36.101 mpeg2video Side data: CPB properties: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: N/A Stream #1:1: Audio: mp2, 48000 Hz, stereo, s16, 384 kb/s Metadata: encoder : Lavc62.36.101 mp2 Output #2, mpegts, to 'daystar_sd.ts': Metadata: encoder : Lavf62.19.101 Stream #2:0: Video: mpeg2video (Main), yuv420p(tv, top coded first (swapped)), 704x480 [SAR 40:33 DAR 16:9], q=2-31, 200 kb/s, 29.97 fps, 90k tbn Metadata: encoder : Lavc62.36.101 mpeg2video Side data: CPB properties: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: N/A Stream #2:1: Audio: mp2, 48000 Hz, stereo, s16, 384 kb/s Metadata: encoder : Lavc62.36.101 mp2 [mpeg2video @ 0x5e9de838e140] Closed Caption size (1800) can not exceed 93 bytes and must be a multiple of 3 [mpeg2video @ 0x5e9de8535240] Closed Caption size (1230) can not exceed 93 bytes and must be a multiple of 3 [mpeg2video @ 0x5e9de81b50c0] Closed Caption size (360) can not exceed 93 bytes and must be a multiple of 3 [vist#0:2/mpeg2video @ 0x5e9de81b1640] timestamp discontinuity (stream id=65): -16039666, new offset= -305 [vist#0:3/mpeg2video @ 0x5e9de81b3440] timestamp discontinuity (stream id=49): 16039666, new offset= -16039971 [vist#0:2/mpeg2video @ 0x5e9de81b1640] timestamp discontinuity (stream id=65): -16039667, new offset= -304 [vist#0:0/mpeg2video @ 0x5e9de829b440] timestamp discontinuity (stream id=81): 16039667, new offset= -16039971 [vist#0:2/mpeg2video @ 0x5e9de81b1640] timestamp discontinuity (stream id=65): -16039656, new offset= -315 [aist#0:5/ac3 @ 0x5e9de818bac0] timestamp discontinuity (stream id=53): 16071656, new offset= -16071971 [vist#0:2/mpeg2video @ 0x5e9de81b1640] timestamp discontinuity (stream id=65): -16071656, new offset= -315 [vist#0:0/mpeg2video @ 0x5e9de829b440] timestamp discontinuity (stream id=81): 16039655, new offset= -16039970 [vist#0:2/mpeg2video @ 0x5e9de81b1640] timestamp discontinuity (stream id=65): -16039644, new offset= -326 [vist#0:3/mpeg2video @ 0x5e9de81b3440] timestamp discontinuity (stream id=49): 16071644, new offset= -16071970 [vist#0:2/mpeg2video @ 0x5e9de81b1640] timestamp discontinuity (stream id=65): -16071645, new offset= -325 [vist#0:3/mpeg2video @ 0x5e9de81b3440] timestamp discontinuity (stream id=49): 16071644, new offset= -16071969 [vist#0:2/mpeg2video @ 0x5e9de81b1640] timestamp discontinuity (stream id=65): -16071634, new offset= -335 [aist#0:1/ac3 @ 0x5e9de818ae80] timestamp discontinuity (stream id=84): 16071633, new offset= -16071968 [vist#0:2/mpeg2video @ 0x5e9de81b1640] timestamp discontinuity (stream id=65): -16071634, new offset= -334 [vist#0:0/mpeg2video @ 0x5e9de829b440] timestamp discontinuity (stream id=81): 16071633, new offset= -16071967 [aist#0:4/ac3 @ 0x5e9de81960c0] timestamp discontinuity (stream id=68): -16039678, new offset= -32289 [vist#0:3/mpeg2video @ 0x5e9de81b3440] timestamp discontinuity (stream id=49): 16039677, new offset= -16071966 [vist#0:2/mpeg2video @ 0x5e9de81b1640] timestamp discontinuity (stream id=65): -16071622, new offset= -344 [vist#0:3/mpeg2video @ 0x5e9de81b3440] timestamp discontinuity (stream id=49): 16071622, new offset= -16071966 [vist#0:2/mpeg2video @ 0x5e9de81b1640] timestamp discontinuity (stream id=65): -16071623, new offset= -343 [aost#1:1/mp2 @ 0x5e9de8189780] Non-monotonic DTS; previous: 22851, current: 22131; changing to 22852. This may result in incorrect timestamps in the output file. [aost#1:1/mp2 @ 0x5e9de8189780] Non-monotonic DTS; previous: 35091, current: 34371; changing to 35092. This may result in incorrect timestamps in the output file. [aost#1:1/mp2 @ 0x5e9de8189780] Non-monotonic DTS; previous: 47331, current: 46611; changing to 47332. This may result in incorrect timestamps in the output file. [aost#1:1/mp2 @ 0x5e9de8189780] Non-monotonic DTS; previous: 57411, current: 56691; changing to 57412. This may result in incorrect timestamps in the output file. [vist#0:3/mpeg2video @ 0x5e9de81b3440] timestamp discontinuity (stream id=49): 16071622, new offset= -16071965 [vist#0:2/mpeg2video @ 0x5e9de81b1640] timestamp discontinuity (stream id=65): -16071611, new offset= -354 [vist#0:3/mpeg2video @ 0x5e9de81b3440] timestamp discontinuity (stream id=49): 16071610, new offset= -16071964 [vist#0:2/mpeg2video @ 0x5e9de81b1640] timestamp discontinuity (stream id=65): -16071612, new offset= -352 [vist#0:0/mpeg2video @ 0x5e9de829b440] timestamp discontinuity (stream id=81): 16071610, new offset= -16071962 [vist#0:2/mpeg2video @ 0x5e9de81b1640] timestamp discontinuity (stream id=65): -16071600, new offset= -362 [vist#0:3/mpeg2video @ 0x5e9de81b3440] timestamp discontinuity (stream id=49): 16071600, new offset= -16071962 [vist#0:2/mpeg2video @ 0x5e9de81b1640] timestamp discontinuity (stream id=65): -16071589, new offset= -373 [vist#0:3/mpeg2video @ 0x5e9de81b3440] timestamp discontinuity (stream id=49): 16071589, new offset= -16071962 [vist#0:2/mpeg2video @ 0x5e9de81b1640] timestamp discontinuity (stream id=65): -16071589, new offset= -373 [vist#0:3/mpeg2video @ 0x5e9de81b3440] timestamp discontinuity (stream id=49): 16071588, new offset= -16071961 [aist#0:4/ac3 @ 0x5e9de81960c0] timestamp discontinuity (stream id=68): -16039612, new offset= -32349 [aist#0:5/ac3 @ 0x5e9de818bac0] timestamp discontinuity (stream id=53): 16071623, new offset= -16103972 [vist#0:2/mpeg2video @ 0x5e9de81b1640] timestamp discontinuity (stream id=65): -16071623, new offset= -32349 [aist#0:6/ac3 @ 0x5e9de829cec0] timestamp discontinuity (stream id=52): 16071623, new offset= -16103972 [vist#0:2/mpeg2video @ 0x5e9de81b1640] timestamp discontinuity (stream id=65): -16071611, new offset= -32361 [vist#0:3/mpeg2video @ 0x5e9de81b3440] timestamp discontinuity (stream id=49): 16071610, new offset= -16103971 [vist#0:2/mpeg2video @ 0x5e9de81b1640] timestamp discontinuity (stream id=65): -16071600, new offset= -32371 [aist#0:1/ac3 @ 0x5e9de818ae80] timestamp discontinuity (stream id=84): 16071600, new offset= -16103971 [aost#2:1/mp2 @ 0x5e9de854dd00] Non-monotonic DTS; previous: 84866, current: 84146; changing to 84867. This may result in incorrect timestamps in the output file.
Hello Deron, ffmpeg is trying to align streams, that is impossible - so you have many timestamp errors. btw. Your example is seriously ruining the quality ;p Try: ffmpeg -copyts -i https://faroutprojects.com/daystar.ts -map p:1 -c copy -y daystar_hd.ts -map p:2 -c copy -y daystar_es.ts -map p:3 -c copy -y daystar_sd.ts (yes, the key is "-copyts" of course) Have fun. W dniu 2026-06-25 o 00:58, Deron via ffmpeg-user pisze:
I have an srt stream that I ingest that includes three separate programs in a single mpegts stream. I was using ffmpeg to split it into 3 individual streams. This worked fine until recently when they must have changed something in the stream. They swear the stream works for others, and they are out of their depth in diagnosing what was changed on their end.
I captured a couple minutes of this stream using tsduck, and the file can be pulled from https://faroutprojects.com/daystar.ts
A simple example that fails is:
ffmpeg -i https://faroutprojects.com/daystar.ts -map p:1 -y daystar_hd.ts -map p:2 -y daystar_es.ts -map p:3 -y daystar_sd.ts
It gives tons of errors like this:
[aist#0:5/ac3 @ 0x5e9de818bac0] timestamp discontinuity (stream id=53): 15975889, new offset= -15975973 [... cut ...]
-- Pozdrawiam, bloodman@gmail.com
W dniu 2026-06-25 o 00:58, Deron via ffmpeg-user pisze:
I have an srt stream that I ingest that includes three separate programs in a single mpegts stream. I was using ffmpeg to split it into 3 individual streams. This worked fine until recently when they must have changed something in the stream. They swear the stream works for others, and they are out of their depth in diagnosing what was changed on their end.
I captured a couple minutes of this stream using tsduck, and the file can be pulled from https://faroutprojects.com/daystar.ts
A simple example that fails is:
> ffmpeg -i https://faroutprojects.com/daystar.ts -map p:1 -y daystar_hd.ts -map p:2 -y daystar_es.ts -map p:3 -y daystar_sd.ts
It gives tons of errors like this:
[aist#0:5/ac3 @ 0x5e9de818bac0] timestamp discontinuity (stream id=53): 15975889, new offset= -15975973 [... cut ...]
On 6/24/26 7:16 PM, BloodMan via ffmpeg-user wrote:
Hello Deron,
ffmpeg is trying to align streams, that is impossible - so you have many timestamp errors.
btw. Your example is seriously ruining the quality ;p
Try: ffmpeg -copyts -i https://faroutprojects.com/daystar.ts -map p:1 -c copy -y daystar_hd.ts -map p:2 -c copy -y daystar_es.ts -map p:3 -c copy -y daystar_sd.ts
(yes, the key is "-copyts" of course)
Have fun.
Thanks BloodMan,
btw. Your example is seriously ruining the quality ;p ;p
I am presuming then that the streams were originally encoding using the same machine/clock, and they must have moved one or more to different machines/clocks? I'm not sure why ffmpeg was trying to align the streams, but I clearly see this fixes the issue. Thanks again! I really appreciate it! Deron
participants (2)
-
BloodMan -
Deron