'Check decoder errors' improvements
Hi - I'm currently working with HDV rips using DVHScap as the capture tool. This creates mpeg transport streams, and decoding the file with ffmpeg is an amazing way of being told where glitches are. However - using the ffmprovisr recipe - https://amiaopensource.github.io/ffmprovisr/index.html#check_decoder_errors , it's pretty difficult to find the timestamps for the errors, so I've found that adding -loglevel debug -report is really useful ,as the -report gives you a text log file in your current working directory, and -loglevel debug logs at the appropriate level to catch these errors.
For example this is a snippet from the text logfile gives you a rough area (00:30:51.44) to check in a video player and you can see where the glitch is:
frame=46281 fps=369 q=-0.0 size=N/A time=00:30:51.44 bitrate=N/A speed=14.8x
[mpegts @ 00000225457b34c0] Continuity check failed for pid 31 expected 10 got 5
[mpegts @ 00000225457b34c0] Continuity check failed for pid 0 expected 8 got 5
[mpegts @ 00000225457b34c0] Continuity check failed for pid 129 expected 7 got 4
[mpegts @ 00000225457b34c0] Continuity check failed for pid 2065 expected 8 got 0
[mpegts @ 00000225457b34c0] Continuity check failed for pid 2069 expected 6 got 0
[mpegts @ 00000225457b34c0] Continuity check failed for pid 2068 expected 13 got 11
[mpegts @ 00000225457b34c0] Continuity check failed for pid 2064 expected 12 got 5
[mpegts @ 00000225457b34c0] Packet corrupt (stream = 0, dts = 166788000).
[mpeg2video @ 00000225457ba080] ac-tex damaged at 8 3
[mpeg2video @ 00000225457ba080] Warning MVs not available
[mpeg2video @ 00000225457ba080] concealing 5850 DC, 5850 AC, 5850 MV errors in I frame
C:\Users\kieran.oleary\Downloads\wwwspecialistav-a49d80\MV8805\MV8805.m2t: corrupt decoded frame in stream 0
frame=46442 fps=369 q=-0.0 size=N/A time=00:30:58.80 bitrate=N/A speed=14.8x
What do ye think - anyone have similar experiences or ways to refine this?
If I remember carefully, we just grep twice the output of the recipe: the first one to isolate the relevant lines and the second one to isolate the time values.
That could work I guess if piping, but here's what it just looks like when run in the terminal - the text wrapping cuts off the timestamps - could be a terminal-specific issue in windows though:
[mpegts @ 0000011ea1602cc0] Packet corrupt (stream = 0, dts = 5317200).6.0kbits/s dup=11 drop=0 speed=0.865x
[mpeg2video @ 0000011ea16098c0] ac-tex damaged at 84 42
[mpeg2video @ 0000011ea16098c0] Warning MVs not available
[mpeg2video @ 0000011ea16098c0] concealing 2305 DC, 2305 AC, 2305 MV errors in P frame
C:\Users\kieran.oleary\Downloads\wwwspecialistav-5ba5be\MV8782\MV8782.m2t: corrupt decoded frame in stream 0
[mpegts @ 0000011ea1602cc0] Packet corrupt (stream = 0, dts = 10821600)..3kbits/s dup=28 drop=0 speed=0.633x
[mpeg2video @ 0000011ea16098c0] ac-tex damaged at 86 1
[mpeg2video @ 0000011ea16098c0] Warning MVs not available
[mpeg2video @ 0000011ea16098c0] concealing 6030 DC, 6030 AC, 6030 MV errors in B frame
C:\Users\kieran.oleary\Downloads\wwwspecialistav-5ba5be\MV8782\MV8782.m2t: corrupt decoded frame in stream 0
[mpegts @ 0000011ea1602cc0] Packet corrupt (stream = 0, dts = 116416800).3kbits/s dup=52 drop=0 speed=1.08x
[mpeg2video @ 0000011ea16098c0] ac-tex damaged at 42 10
[mpeg2video @ 0000011ea16098c0] Warning MVs not available
[mpeg2video @ 0000011ea16098c0] concealing 5220 DC, 5220 AC, 5220 MV errors in P frame
C:\Users\kieran.oleary\Downloads\wwwspecialistav-5ba5be\MV8782\MV8782.m2t: corrupt decoded frame in stream 0
[mpegts @ 0000011ea1602cc0] PES packet size mismatch
[mpegts @ 0000011ea1602cc0] Packet corrupt (stream = 1, dts = 116398800).
[mp2 @ 0000011ea1bd5040] Header missing4kB time=00:21:29.86 bitrate=3063.1kbits/s dup=69 drop=0 speed=1.08x
Error while decoding stream #0:1: Invalid data found when processing input
[mpegts @ 0000011ea1602cc0] Packet corrupt (stream = 0, dts = 332654400).7kbits/s dup=69 drop=0 speed=1.25x
[mpegts @ 0000011ea1602cc0] PES packet size mismatch
[mpegts @ 0000011ea1602cc0] Packet corrupt (stream = 1, dts = 332636400).
[mp2 @ 0000011ea1bd5040] Header missing
Error while decoding stream #0:1: Invalid data found when processing input
[mpeg2video @ 0000011ea16098c0] ac-tex damaged at 75 12
[mpeg2video @ 0000011ea16098c0] Warning MVs not available
[mpeg2video @ 0000011ea16098c0] concealing 5014 DC, 5014 AC, 5014 MV errors in I frame
C:\Users\kieran.oleary\Downloads\wwwspecialistav-5ba5be\MV8782\MV8782.m2t: corrupt decoded frame in stream 0
[mpegts @ 0000011ea1602cc0] PES packet size mismatch20:56.80 bitrate=2577.8kbits/s dup=92 drop=0 speed=1.29x
[mpegts @ 0000011ea1602cc0] Packet corrupt (stream = 1, dts = 437428800).
[mpeg2video @ 0000011ea16098c0] ac-tex damaged at 53 48
[mpeg2video @ 0000011ea16098c0] Warning MVs not available
[mpeg2video @ 0000011ea16098c0] concealing 1800 DC, 1800 AC, 1800 MV errors in B frame
Hmm… I don’t remember having encountered difficulties. I have to check what I did.
For my own workflow, I'm going to move to using ffprobe and taking a qctools-escue xml approach - more info here: http://ffmpeg.org/pipermail/ffmpeg-user/2020-June/049011.html But this recipe is still super useful for a more human readable display vs a barrage of XML/JSON