Open stronk-dev opened 2 years ago
Hello!
So I took a quick look and with PTS=2 697 208 290 and DTS=2 697 211 980 the problem is kinda obvious: presentation timestamp is lower than decode timestamp, so the frame should be displayed before it gets decoded. Well, that is kinda impossible, but let's make sure. git grep "Invalid timestamp"
in ffmpeg sources returns only one result:
if (pkt->pts != AV_NOPTS_VALUE &&
pkt->dts != AV_NOPTS_VALUE &&
pkt->pts < pkt->dts) {
av_log(s, AV_LOG_WARNING,
"Invalid timestamps stream=%d, pts=%s, dts=%s, size=%d\n",
pkt->stream_index,
av_ts2str(pkt->pts),
av_ts2str(pkt->dts),
pkt->size);
}
So yeah, the problem is indeed pts being less than dts. Now, I will be happy to take this further, and I will examine the source code but it would be very helpful to have input stream that generates such output. @stronk-dev - any chance of sending me one?
I would if I could, but these are streams coming in to my orchestrator. LAX ingest node got reactivated on May 25th so I've got no clue where these streams are coming from...
They seem to come up at the start of a stream now... (i think there was a GCP bucket somewhere where segments could be pulled, but not sure how/where) Last occurences:
May 29 23:58:43 lasvegas livepeer[185605]: [mpegts @ 0x7face8ba3300] Invalid timestamps stream=0, pts=54864810, dts=54868500, size=11148
May 29 23:58:43 lasvegas livepeer[185605]: [mpegts @ 0x7face8ba3300] Invalid timestamps stream=0, pts=54872280, dts=54875970, size=8060
May 29 23:58:43 lasvegas livepeer[185605]: [mpegts @ 0x7face8ba3300] Invalid timestamps stream=0, pts=54876060, dts=54879750, size=8497
May 29 23:58:43 lasvegas livepeer[185605]: [mpegts @ 0x7face8ba3300] Invalid timestamps stream=0, pts=54879840, dts=54883530, size=9585
May 29 23:58:43 lasvegas livepeer[185605]: [mpegts @ 0x7face8ba3300] Invalid timestamps stream=0, pts=54883620, dts=54887310, size=9683
May 29 23:58:43 lasvegas livepeer[185605]: [mpegts @ 0x7face8ba3300] Invalid timestamps stream=0, pts=54891090, dts=54894780, size=8220
May 29 23:58:43 lasvegas livepeer[185605]: [mpegts @ 0x7face8ba3300] Invalid timestamps stream=0, pts=54894870, dts=54898560, size=8806
May 29 23:58:43 lasvegas livepeer[185605]: [mpegts @ 0x7face8ba3300] Invalid timestamps stream=0, pts=54898560, dts=54902250, size=10581
May 29 23:58:43 lasvegas livepeer[185605]: [mpegts @ 0x7face8ba3300] Invalid timestamps stream=0, pts=54902340, dts=54906030, size=10563
May 29 23:58:43 lasvegas livepeer[185605]: [mpegts @ 0x7face8ba3300] Invalid timestamps stream=0, pts=54909900, dts=54913590, size=9353
May 29 23:58:43 lasvegas livepeer[185605]: [mpegts @ 0x7face8ba3300] Invalid timestamps stream=0, pts=54913590, dts=54917280, size=11929
May 29 23:58:43 lasvegas livepeer[185605]: [mpegts @ 0x7face8ba3300] Invalid timestamps stream=0, pts=54917370, dts=54921060, size=11705
May 29 23:58:43 lasvegas livepeer[185605]: [mpegts @ 0x7face8ba3300] Invalid timestamps stream=0, pts=54921150, dts=54924840, size=12015
May 29 23:58:43 lasvegas livepeer[185605]: [mpegts @ 0x7face8ba3300] Invalid timestamps stream=0, pts=54928620, dts=54932310, size=13557
May 29 23:58:43 lasvegas livepeer[185605]: [mpegts @ 0x7face8ba3300] Invalid timestamps stream=0, pts=54932400, dts=54936090, size=13476
May 29 23:58:43 lasvegas livepeer[185605]: [mpegts @ 0x7face8ba3300] Invalid timestamps stream=0, pts=54478170, dts=54481860, size=23544
May 29 23:58:43 lasvegas livepeer[185605]: [mpegts @ 0x7face8ba3300] Invalid timestamps stream=0, pts=54481950, dts=54485640, size=23395
May 29 23:58:43 lasvegas livepeer[185605]: [mpegts @ 0x7face8ba3300] Invalid timestamps stream=0, pts=54485730, dts=54489420, size=14537
May 29 23:58:43 lasvegas livepeer[185605]: [h264_cuvid @ 0x7face807d580] ctx->cvdl->cuvidParseVideoData(ctx->cuparser, &cupkt) failed -> CUDA_ERROR_UNKNOWN: unknown error
May 29 23:58:43 lasvegas livepeer[185605]: ERROR: decoder.c:64] Error sending packet to decoder : Generic error in an external library
May 29 23:58:43 lasvegas livepeer[185605]: ERROR: transcoder.c:238] Could not decode; stopping : Generic error in an external library
May 29 23:58:43 lasvegas livepeer[185605]: E0529 23:58:43.879246 185605 ffmpeg.go:812] Transcoder Return : Generic error in an external library
May 29 23:58:43 lasvegas livepeer[185605]: E0529 23:58:43.879344 185605 orchestrator.go:559] manifestID=0c4d992e-7917-411f-a02d-4699772a3a2e seqNo=59 orchSessionID=95e4ee3d clientIP=89.187.185.130 sender=0xc3c7c
4C8f7061B7d6A72766Eee5359fE4F36e61E Error transcoding segName= err="Generic error in an external library"
May 29 23:58:43 lasvegas livepeer[185605]: E0529 23:58:43.880223 185605 segment_rpc.go:231] manifestID=0c4d992e-7917-411f-a02d-4699772a3a2e seqNo=59 orchSessionID=95e4ee3d sender=0xc3c7c4C8f7061B7d6A72766Eee5359
fE4F36e61E clientIP=89.187.185.130 Could not transcode err="Generic error in an external library"
May 29 23:58:45 lasvegas livepeer[185605]: I0529 23:58:45.415359 185605 player.go:105] LPMS got HTTP request @ /stream/ede50ea3/480p/1371.ts
May 29 23:58:47 lasvegas livepeer[185605]: I0529 23:58:47.233947 185605 player.go:105] LPMS got HTTP request @ /stream/ede50ea3/480p/1372.ts
May 29 23:58:49 lasvegas livepeer[185605]: I0529 23:58:49.252470 185605 player.go:105] LPMS got HTTP request @ /stream/ede50ea3/480p/1373.ts
May 29 23:58:51 lasvegas livepeer[185605]: I0529 23:58:51.169739 185605 player.go:105] LPMS got HTTP request @ /stream/ede50ea3/480p/1374.ts
May 29 23:58:53 lasvegas livepeer[185605]: I0529 23:58:53.203745 185605 player.go:105] LPMS got HTTP request @ /stream/ede50ea3/480p/1375.ts
May 29 23:58:55 lasvegas livepeer[185605]: I0529 23:58:55.486484 185605 player.go:105] LPMS got HTTP request @ /stream/ede50ea3/480p/1376.ts
May 29 23:58:57 lasvegas livepeer[185605]: I0529 23:58:57.509033 185605 player.go:105] LPMS got HTTP request @ /stream/ede50ea3/480p/1377.ts
May 29 23:58:59 lasvegas livepeer[185605]: I0529 23:58:59.484940 185605 player.go:105] LPMS got HTTP request @ /stream/ede50ea3/480p/1378.ts
May 29 23:59:01 lasvegas livepeer[185605]: I0529 23:59:01.350496 185605 player.go:105] LPMS got HTTP request @ /stream/ede50ea3/480p/1379.ts
May 29 23:59:03 lasvegas livepeer[185605]: I0529 23:59:03.324863 185605 player.go:105] LPMS got HTTP request @ /stream/ede50ea3/480p/1380.ts
May 29 23:59:05 lasvegas livepeer[185605]: I0529 23:59:05.224578 185605 player.go:105] LPMS got HTTP request @ /stream/ede50ea3/480p/1381.ts
May 29 23:59:07 lasvegas livepeer[185605]: I0529 23:59:07.511497 185605 player.go:105] LPMS got HTTP request @ /stream/ede50ea3/480p/1382.ts
May 29 23:59:09 lasvegas livepeer[185605]: I0529 23:59:09.518687 185605 player.go:105] LPMS got HTTP request @ /stream/ede50ea3/480p/1383.ts
May 30 00:56:19 lasvegas livepeer[185605]: [mpegts @ 0x7fac96439bc0] Invalid timestamps stream=0, pts=364474080, dts=364477770, size=23188
May 30 00:56:19 lasvegas livepeer[185605]: [mpegts @ 0x7fac96439bc0] Invalid timestamps stream=0, pts=364481640, dts=364485330, size=13320
May 30 00:56:19 lasvegas livepeer[185605]: [mpegts @ 0x7fac96439bc0] Invalid timestamps stream=0, pts=364485420, dts=364489110, size=17165
May 30 00:56:19 lasvegas livepeer[185605]: [mpegts @ 0x7fac96439bc0] Invalid timestamps stream=0, pts=364489110, dts=364492800, size=19291
May 30 00:56:19 lasvegas livepeer[185605]: [mpegts @ 0x7fac96439bc0] Invalid timestamps stream=0, pts=364492890, dts=364496580, size=21026
May 30 00:56:19 lasvegas livepeer[185605]: [mpegts @ 0x7fac96439bc0] Invalid timestamps stream=0, pts=364500360, dts=364504050, size=13191
May 30 00:56:19 lasvegas livepeer[185605]: [mpegts @ 0x7fac96439bc0] Invalid timestamps stream=0, pts=364504140, dts=364507830, size=17749
May 30 00:56:19 lasvegas livepeer[185605]: [mpegts @ 0x7fac96439bc0] Invalid timestamps stream=0, pts=364507920, dts=364511610, size=20538
May 30 00:56:19 lasvegas livepeer[185605]: [mpegts @ 0x7fac96439bc0] Invalid timestamps stream=0, pts=364511610, dts=364515300, size=23467
May 30 00:56:19 lasvegas livepeer[185605]: [mpegts @ 0x7fac96439bc0] Invalid timestamps stream=0, pts=364519170, dts=364522860, size=11406
May 30 00:56:19 lasvegas livepeer[185605]: [mpegts @ 0x7fac96439bc0] Invalid timestamps stream=0, pts=364522950, dts=364526640, size=17975
May 30 00:56:19 lasvegas livepeer[185605]: [mpegts @ 0x7fac96439bc0] Invalid timestamps stream=0, pts=364526640, dts=364530330, size=20733
May 30 00:56:19 lasvegas livepeer[185605]: [mpegts @ 0x7fac96439bc0] Invalid timestamps stream=0, pts=364530420, dts=364534110, size=21924
May 30 00:56:19 lasvegas livepeer[185605]: [mpegts @ 0x7fac96439bc0] Invalid timestamps stream=0, pts=364537890, dts=364541580, size=14685
May 30 00:56:19 lasvegas livepeer[185605]: [mpegts @ 0x7fac96439bc0] Invalid timestamps stream=0, pts=364541670, dts=364545360, size=18839
May 30 00:56:19 lasvegas livepeer[185605]: [mpegts @ 0x7fac96439bc0] Invalid timestamps stream=0, pts=364545450, dts=364549140, size=20515
May 30 00:56:19 lasvegas livepeer[185605]: [mpegts @ 0x7fac96439bc0] Invalid timestamps stream=0, pts=364549230, dts=364552920, size=22401
May 30 00:56:19 lasvegas livepeer[185605]: [mpegts @ 0x7fac96439bc0] Invalid timestamps stream=0, pts=364556700, dts=364560390, size=16428
May 30 00:56:19 lasvegas livepeer[185605]: [mpegts @ 0x7fac96439bc0] Invalid timestamps stream=0, pts=364560480, dts=364564170, size=19649
May 30 00:56:19 lasvegas livepeer[185605]: [mpegts @ 0x7fac96439bc0] Invalid timestamps stream=0, pts=364564170, dts=364567860, size=21386
May 30 00:56:19 lasvegas livepeer[185605]: [mpegts @ 0x7fac96439bc0] Invalid timestamps stream=0, pts=364567950, dts=364571640, size=23216
May 30 00:56:19 lasvegas livepeer[185605]: [mpegts @ 0x7fac96439bc0] Invalid timestamps stream=0, pts=364575510, dts=364579200, size=20195
May 30 00:56:19 lasvegas livepeer[185605]: [mpegts @ 0x7fac96439bc0] Invalid timestamps stream=0, pts=364579200, dts=364582890, size=26202
May 30 00:56:19 lasvegas livepeer[185605]: [mpegts @ 0x7fac96439bc0] Invalid timestamps stream=0, pts=364582980, dts=364586670, size=27295
May 30 00:56:19 lasvegas livepeer[185605]: [mpegts @ 0x7fac96439bc0] Invalid timestamps stream=0, pts=364586760, dts=364590450, size=27861
May 30 00:56:19 lasvegas livepeer[185605]: [mpegts @ 0x7fac96439bc0] Invalid timestamps stream=0, pts=364594230, dts=364597920, size=15428
May 30 00:56:19 lasvegas livepeer[185605]: [mpegts @ 0x7fac96439bc0] Invalid timestamps stream=0, pts=364598010, dts=364601700, size=23870
May 30 00:56:19 lasvegas livepeer[185605]: [mpegts @ 0x7fac96439bc0] Invalid timestamps stream=0, pts=364601700, dts=364605390, size=30735
May 30 00:56:19 lasvegas livepeer[185605]: [mpegts @ 0x7fac96439bc0] Invalid timestamps stream=0, pts=364605480, dts=364609170, size=31276
May 30 00:56:19 lasvegas livepeer[185605]: [mpegts @ 0x7fac96439bc0] Invalid timestamps stream=0, pts=364613040, dts=364616730, size=19352
May 30 00:56:19 lasvegas livepeer[185605]: [mpegts @ 0x7fac96439bc0] Invalid timestamps stream=0, pts=364616730, dts=364620420, size=28615
May 30 00:56:19 lasvegas livepeer[185605]: [mpegts @ 0x7fac96439bc0] Invalid timestamps stream=0, pts=364162590, dts=364166280, size=14249
May 30 00:56:19 lasvegas livepeer[185605]: [mpegts @ 0x7fac96439bc0] Invalid timestamps stream=0, pts=364166280, dts=364169970, size=16889
May 30 00:56:19 lasvegas livepeer[185605]: [mpegts @ 0x7fac96439bc0] Invalid timestamps stream=0, pts=364170060, dts=364173750, size=19433
May 30 00:56:19 lasvegas livepeer[185605]: [h264_cuvid @ 0x7fac953c7bc0] ctx->cvdl->cuvidParseVideoData(ctx->cuparser, &cupkt) failed -> CUDA_ERROR_UNKNOWN: unknown error
May 30 00:56:19 lasvegas livepeer[185605]: ERROR: decoder.c:64] Error sending packet to decoder : Generic error in an external library
May 30 00:56:19 lasvegas livepeer[185605]: ERROR: transcoder.c:238] Could not decode; stopping : Generic error in an external library
May 30 00:56:19 lasvegas livepeer[185605]: E0530 00:56:19.118274 185605 ffmpeg.go:812] Transcoder Return : Generic error in an external library
May 30 00:56:19 lasvegas livepeer[185605]: E0530 00:56:19.118385 185605 orchestrator.go:559] manifestID=9de85487-0a5c-458c-ab54-bc14e2bbb157 seqNo=2 orchSessionID=1da89ca0 clientIP=89.187.185.251 sender=0xc3c7c4
C8f7061B7d6A72766Eee5359fE4F36e61E Error transcoding segName= err="Generic error in an external library" May 30 00:56:19 lasvegas livepeer[185605]: E0530 00:56:19.119274 185605 segment_rpc.go:231] manifestID=9de85487-0a5c-458c-ab54-bc14e2bbb157 seqNo=2 orchSessionID=1da89ca0 clientIP=89.187.185.251 sender=0xc3c7c4C
8f7061B7d6A72766Eee5359fE4F36e61E Could not transcode err="Generic error in an external library" May 30 00:56:19 lasvegas livepeer[185605]: I0530 00:56:19.620077 185605 player.go:105] LPMS got HTTP request @ /stream/c9eb08f5/480p/3098.ts
May 30 00:56:21 lasvegas livepeer[185605]: I0530 00:56:21.015117 185605 player.go:105] LPMS got HTTP request @ /stream/b8575b7a/720p/504.ts
May 30 00:56:21 lasvegas livepeer[185605]: I0530 00:56:21.015401 185605 player.go:105] LPMS got HTTP request @ /stream/b8575b7a/480p/504.ts
May 30 00:56:21 lasvegas livepeer[185605]: I0530 00:56:21.522118 185605 player.go:105] LPMS got HTTP request @ /stream/c9eb08f5/480p/3099.ts
May 30 00:56:23 lasvegas livepeer[185605]: I0530 00:56:23.339176 185605 player.go:105] LPMS got HTTP request @ /stream/b8575b7a/720p/505.ts
May 30 00:56:23 lasvegas livepeer[185605]: I0530 00:56:23.339649 185605 player.go:105] LPMS got HTTP request @ /stream/b8575b7a/480p/505.ts
May 30 00:56:23 lasvegas livepeer[185605]: I0530 00:56:23.630902 185605 player.go:105] LPMS got HTTP request @ /stream/c9eb08f5/480p/3100.ts
May 30 00:56:24 lasvegas livepeer[185605]: I0530 00:56:24.830710 185605 player.go:105] LPMS got HTTP request @ /stream/b8575b7a/480p/506.ts
May 30 00:56:24 lasvegas livepeer[185605]: I0530 00:56:24.830734 185605 player.go:105] LPMS got HTTP request @ /stream/b8575b7a/720p/506.ts
May 30 00:56:25 lasvegas livepeer[185605]: I0530 00:56:25.595821 185605 player.go:105] LPMS got HTTP request @ /stream/c9eb08f5/480p/3101.ts
Describe the bug Got some invalid timestamps errors on one of the incoming transcoding jobs
Desktop (please complete the following information):
Additional context