Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Frames dropped during long recordings #863

Open
iamdamosuzuki opened this issue Jan 10, 2025 · 4 comments
Open

Frames dropped during long recordings #863

iamdamosuzuki opened this issue Jan 10, 2025 · 4 comments

Comments

@iamdamosuzuki
Copy link
Contributor

I've been doing stress tests to see how much I can throw at vrecord before it drops frames. Before concurrent QCTools reports were working I was making files with the following concurrent deliverables. These would drop frames about 7.71 hours into recording

  • FFV1/MKV
  • MP4
  • FrameMD5

Now that concurrent QCTools reports are working, I made a file with the following concurrent deliverables that dropped frames about 3.5 hours into reccording

  • FFV1/MKV
  • MP4
  • FrameMD5
  • QCTools

The test pattern being captured is an MPEG-2 Encoder Breaker pattern. That said, the issue seems to persist regardless of what files or formats are being captured, or what the input is. I can run more tests if that would be helpful. Also, all of these tests were run on a single M2 Mac mini. I have a few more setup now and will test those out shortly to rule out faulty hardware.

Here are the log files and capture options:

The frameMD5 files I used to determine where the frames dropped are too large to copy into this post, but I'm happy to share them. In both cases two bad frames were made, then a bunch of frames were dropped.

The following is the terminal output from vrecord during and after a 480 minute capture:

videolabmini@Videos-Mac-mini-2 ~ % vrecord -e
2025-01-08 16:21:05.444 defaults[821:8869] 
The domain/default pair of (/Library/Extensions/DeckLink_Driver.kext/Contents/Info.plist, CFBundleVersion) does not exist
And place logs at /Volumes/PRO-G40/20250108_Tests too.
Summary: FFV1 version 3/matroska yuv422p10 file from ntsc sdi embedded. Technician=Morgan M. Frame MD5s=true, QCTools XML=Yes, concurrent with recording. Inputs recorded to /Volumes/PRO-G40/20250108_Tests/QCT_FD5_MP4_480min.mkv and Auxiliary Files created in /Volumes/PRO-G40/20250108_Tests. Tape duration set to: 480 minutes.
Hit enter to start recording

Close the playback window to stop recording.
Guessed Channel Layout for Input Stream #0.0 : 7.1
[Parsed_pan_1 @ 0x600000ba9130] [SWR @ 0x138b80000] Input channel layout has a different number of channels than the number of used channels, ignoring layout
[Parsed_pan_0 @ 0x600000ba9080] [SWR @ 0x138b98000] Input channel layout has a different number of channels than the number of used channels, ignoring layout
qcli dev build, Dec 31 2024 08:21:00KB vq=    0KB sq=    0B f=0/0   
filters selected: signalstats aphasemeter astats ssim 
[Parsed_amovie_0 @ 0x600001b98b00] Channel layout is not set in output stream 1, guessed channel layout is '7.1'

analyzing input file... -
                                                   0 of 100 %[Parsed_pan_1 @ 0x600001b94790] [SWR @ 0x130180000] Input channel layout has a different number of channels than the number of used channels, ignoring layout
[Parsed_pan_1 @ 0x600001b94790] Pure channel mapping detected: 0 1 2 3
[Parsed_pan_5 @ 0x600000bac4d0] [SWR @ 0x15a730000] Input channel layout has a different number of channels than the number of used channels, ignoring layout
[Parsed_pan_4 @ 0x600000bac420] [SWR @ 0x15aa60000] Input channel layout has a different number of channels than the number of used channels, ignoring layout
Input #0, lavfi, from 'amovie='pipe\:0':streams=dv+da[vid][aud],    [aud]pan=quad|c0=c0|c1=c1|c2=c2|c3=c3,asplit=2[aud1][out1];    [aud1]showvolume=t=0:dm=5400:rate=30000/1001[aud2];    [vid]split=5[a][b][c][d][e];    [a]copy[a1];    [b]field=top,    format=yuv422p,    waveform=scale=digital:intensity=0.1:mode=column:mirror=1:c=1:f=lowpass:e=instant:graticule=green:flags=numbers+dots[b1];    [c]field=bottom,    format=yuv422p,    waveform=scale=digital:intensity=0.1:mode=column:mirror=1:c=1:f=lowpass:e=instant:graticule=green:flags=numbers+dots[c1];    [d]    format=yuv422p,    vectorscope=i=0.04:mode=color2:c=1:envelope=instant:graticule=green:flags=name,    scale=512:512,    drawbox=w=9:h=9:t=1:x=128-3:y=512-452-5:[email protected],    drawbox=w=9:h=9:t=1:x=160-3:y=512-404-5:[email protected],    drawbox=w=9:h=9:t=1:x=192-3:y=512-354-5:[email protected],    drawbox=w=9:h=9:t=1:x=224-3:y=512-304-5:[email protected],    drawgrid=w=32:h=32:t=1:[email protected],    drawgrid=w=256:h=256:t=1:[email protected][d1];    [e]scale=512:ih,signalstats=out=brng[e1];    [a1][b1][c1][e1][d1]xstack=inputs=5:layout=0_0|0_h0|0_h0+h1|w0_0|w0_h0[vidstack];    [vidstack][aud2]overlay=10:10[out0]':
  Duration: N/A, start: 0.000000, bitrate: N/A
  Stream #0:0: Video: rawvideo (Y4[11][8] / 0x80B3459), yuva420p, 1232x998 [SAR 1:1 DAR 616:499], 29.97 fps, 29.97 tbr, 1k tbn
  Stream #0:1: Audio: pcm_s32le, 48000 Hz, quad, s32, 6144 kb/s
[swscaler @ 0x150180000] [swscaler @ 0x1508f8000] No accelerated colorspace conversion found from yuva420p to rgba.
[swscaler @ 0x150180000] [swscaler @ 0x150038000] No accelerated colorspace conversion found from yuva420p to rgba.
[swscaler @ 0x150180000] [swscaler @ 0x150048000] No accelerated colorspace conversion found from yuva420p to rgba.
[swscaler @ 0x150180000] [swscaler @ 0x130788000] No accelerated colorspace conversion found from yuva420p to rgba.
[swscaler @ 0x150180000] [swscaler @ 0x132d58000] No accelerated colorspace conversion found from yuva420p to rgba.
[swscaler @ 0x150180000] [swscaler @ 0x132d68000] No accelerated colorspace conversion found from yuva420p to rgba.
[swscaler @ 0x150180000] [swscaler @ 0x1224b8000] No accelerated colorspace conversion found from yuva420p to rgba.
[swscaler @ 0x150180000] [swscaler @ 0x121270000] No accelerated colorspace conversion found from yuva420p to rgba.
[swscaler @ 0x150180000] [swscaler @ 0x121280000] No accelerated colorspace conversion found from yuva420p to rgba.
[decklink @ 0x152f04830] Decklink input buffer overrun!   0B f=0/0   06 A-V:  0.022 fd=   0 aq=    0KB vq=    0KB sq=    0B f=0/0   
    Last message repeated 1706 times0KB vq=    0KB sq=    0B f=0/0   54 A-V:  0.022 fd=   0 aq=    0KB vq=    0KB sq=    0B f=0/0   
[Parsed_amovie_0 @ 0x600001b98b00] EOF timestamp not reliable
[Parsed_amovie_0 @ 0x600001b98b00] EOF timestamp not reliablef=0/0   
.................................................. 100 of 100 %0/0   01 A-V: -0.024 fd=   1 aq=    0KB vq= 9005KB sq=    0B f=0/0   
analyzing completed

generating QCTools report... 
....................                               41 of 100 %
adding thumbnails to QCTools report... 
.................................................. 100 of 100 %
adding panels to QCTools report... 
.................................................. 100 of 100 %
generating QCTools report... done, in /Volumes/PRO-G40/20250108_Tests/QCT_FD5_MP4_480min.mkv.qctools.mkv
mv: /Volumes/PRO-G40/20250108_Tests/QCT_FD5_MP4_480min_vrecord_input.log: set owner/group (was: 501/0): Operation not permitted
Vrecord is analyzing your video file. Please be patient.
-:1045933.1: Premature end of data in tag frame line 1045932

^
-:1568893.1: Premature end of data in tag frame line 1568891

^
-:1045933.1: Premature end of data in tag frame line 1045932

^
Vrecord is generating graphs from the QCTools data. One moment please.
-:3137773.1: Premature end of data in tag frame line 3137768

^
-:1045933.1: Premature end of data in tag frame line 1045932

^
-:13.1: Premature end of data in tag ffprobe line 3

^
           line 0: warning: Skipping data file with no valid points
           line 0: warning: Skipping data file with no valid points

multiplot> plot '/tmp/vrecord.uuNu4j.astats_A.csv' using 1:2:2 with boxes palette title 'Max Level', '' using 1:3:3 with boxes palette title 'Min Level'
                                                                                                                                                        ^
           line 0: x range is invalid

           line 0: warning: Skipping data file with no valid points

multiplot> plot '' using 1:4:4 with lines ls 15 title 'Peak Level (dB)'
                                                                       ^
           line 0: x range is invalid

           line 0: warning: Skipping data file with no valid points

multiplot> plot '' using 1:5:5 with lines ls 25 title 'Audio Phase'
                                                                   ^
           line 0: x range is invalid

           line 0: warning: Skipping data file with no valid points

multiplot> plot '/tmp/vrecord.miHlES.signalstats.V.csv' using 1:3:3 with boxes palette title '% Outside of Broadcast Range'
                                                                                                                           ^
           line 0: x range is invalid

           line 0: warning: Skipping data file with no valid points

multiplot> plot '' using 1:2 with lines ls 10 title '% Temporal OUTliers'
                                                                         ^
           line 0: x range is invalid

           line 0: warning: Skipping data file with no valid points
           line 0: warning: Skipping data file with no valid points

multiplot> plot '' using 1:4:4 with boxes palette title 'SatMax', '' using 1:5 with lines ls 5 title 'SatAvg'
                                                                                                             ^
           line 0: x range is invalid

           line 0: warning: Skipping data file with no valid points
           line 0: warning: Skipping data file with no valid points
           line 0: warning: Skipping data file with no valid points

multiplot> plot '' using 1:6 with lines ls 5 title 'SSIM-Y', '' using 1:7 with lines ls 2 title 'SSIM-U', '' using 1:8 with lines ls 6 title 'SSIM-V'
                                                                                                                                                     ^
           line 0: x range is invalid

QCTools analysis is complete.
 ________________________________________
/ WARNING: FFmpeg Decklink input    \
| reported a buffer overrun. The file is |
| likely missing frames or contains      |
| artifacts from the buffer              |
\ overrun.                         /
 ----------------------------------------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||
Checking file conformance against FFV1 video policy...
@iamdamosuzuki
Copy link
Contributor Author

I think this may have been caused be a host of system preference and hardware issues on my end. I haven't properly turned off sleep and screensavers, which may have contributed to the issue. I also found that I had some faulty hardware and have switched over to another computer for testing purposes. I still noticed some frame dropouts sometimes, but it's less common. I'm hesitant to mark this resolved until all frame dropouts are completely resolved however.

As far as the proper sleep settings, this is what I would recommend for macOS Sonoma:

Lock Screen Settings:

  • Start Screen Saver when inactive: Never
  • Turn display off when inactive: Never

These may not be the correct settings, but I'm getting better results not.

@iamdamosuzuki
Copy link
Contributor Author

Unfortunately I seem to have spoken too soon. The issues are continuing, it's just that sometimes vrecord / cowsay doesn't report them. The dropouts are consistently happening around 3 hours and 15 minutes or 3 hours and 30 minutes.

@bturkus
Copy link
Collaborator

bturkus commented Jan 21, 2025

I would to recreate some of these tests...how are you generating the MPEG-2 Encoder Breaker pattern, and does that include audio?

@iamdamosuzuki
Copy link
Contributor Author

iamdamosuzuki commented Jan 21, 2025

Thanks @bturkus! Unfortunately the breaker patteris proprietary so I think it'd break a license agreement if I were to share it. That said, I had similar issues with other test patterns. I have been capturing audio. I will look to see if I can legally share the encoder breaker. Do you have access to an SDI TSG?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants