amiaopensource / vrecord

Vrecord is open-source software for capturing a video signal and turning it into a digital file.
https://github.com/amiaopensource/vrecord
149 stars 44 forks source link

Reinstall troubles and Premature Termination #775

Closed DSohl closed 3 months ago

DSohl commented 6 months ago

This is my first issue report, and I'm a little out of my element. Please bear with me. I'm working on a Mac mini, with a Blackmagic UltraStudio.

I was having an issue with vrecord yesterday, wherein Passthrough was working fine, but every attempt to record would end prematurely (within one second). I powered everything down and rebooted, ran "brew update" and "brew upgrade record," but the only noticeable difference was that vrecord stopped recognizing the video card - the option disappeared in the GUI. Attempting to start vrecord gave me this message in Terminal:

The domain/default pair of (/Library/Extensions/Decklink_Driver.kext/Contents/Info.plist, CFBundleVersion) does not exist /opt/homebrew/bin/vrecord: line 229: /opt/homebrew/opt/ffmpegdecklink/bin/ffplay-dl: No such file or directory

This morning, I uninstalled ffmpeg and vrecord, and attempted reinstalling. ffmpeg has seemingly reinstalled fine, but the reinstallation of vrecord ended like so:

==> Downloading https://formulae.brew.sh/api/formula.jws.json

==> Downloading https://formulae.brew.sh/api/cask.jws.json

==> Fetching dependencies for amiaopensource/amiaos/vrecord: amiaopensource/amiaos/ffmpegdecklink
==> Fetching amiaopensource/amiaos/ffmpegdecklink
==> Downloading https://ffmpeg.org/releases/ffmpeg-5.1.2.tar.xz
Already downloaded: /Users/medialab/Library/Caches/Homebrew/downloads/7f8448ac2cf8ab4812d1b22a41a9e768f7b2c537f9a79a74bde1e0a91752a54c--ffmpeg-5.1.2.tar.xz
==> Fetching amiaopensource/amiaos/vrecord
==> Downloading https://github.com/amiaopensource/vrecord/archive/refs/tags/v202
Already downloaded: /Users/medialab/Library/Caches/Homebrew/downloads/7572b62b0bb2f7e515765a4e3864654bea01a8f07e1ff4f10780084b95d45597--vrecord-2023-08-07.tar.gz
==> Installing vrecord from amiaopensource/amiaos
==> Installing dependencies for amiaopensource/amiaos/vrecord: amiaopensource/amiaos/ffmpegdecklink
==> Installing amiaopensource/amiaos/vrecord dependency: amiaopensource/ami
==> ./configure --disable-shared --enable-version3 --cc=clang --host-cflags= --h
==> make
Last 15 lines from /Users/medialab/Library/Logs/Homebrew/ffmpegdecklink/02.make:
        optional_exts_num = FF_ARRAY_ELEMS(optional_device_exts);
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
libavutil/macros.h:53:34: note: expanded from macro 'FF_ARRAY_ELEMS'
#define FF_ARRAY_ELEMS(a) (sizeof(a) / sizeof((a)[0]))
                                 ^~~
libavutil/hwcontext_vulkan.c:1444:29: error: invalid application of 'sizeof' to an incomplete type 'const VulkanOptExtension[]' (aka 'const struct VulkanOptExtension[]')
        for (int j = 0; j < FF_ARRAY_ELEMS(optional_device_exts); j++) {
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
libavutil/macros.h:53:34: note: expanded from macro 'FF_ARRAY_ELEMS'
#define FF_ARRAY_ELEMS(a) (sizeof(a) / sizeof((a)[0]))
                                 ^~~
CC  libavutil/md5.o
4 errors generated.
make: *** [libavutil/hwcontext_vulkan.o] Error 1
make: *** Waiting for unfinished jobs....

If reporting this issue please do so at (not Homebrew/brew or Homebrew/homebrew-core):
  https://github.com/amiaopensource/homebrew-amiaos/issues

These open issues may also help:
ffmpegdecklink: fontconfig not found using pkg-config https://github.com/amiaopensource/homebrew-amiaos/issues/360
ffmpegdecklink: x264 not found using pkg-config https://github.com/amiaopensource/homebrew-amiaos/issues/362

I really hope there's an easy fix here, but I'm stumped. Thanks.

DSohl commented 6 months ago

For what it's worth, I've connected the UltraStudio to another Mac mini, and am having the same premature termination problem. This is what that looks like:

≈:≈ vrecord test4
And place logs at /Users/medialab/Desktop/JPC/20231219/JPC_AV_01637 too.
Summary: FFV1 version 3/matroska yuv422p10 file from ntsc sdi embedded. Technician=Sohl. Frame MD5s=Yes, QCTools XML=Yes, concurrent with recording. Inputs recorded to /Users/medialab/Desktop/JPC/20231219/JPC_AV_01637/test4.mkv and Auxiliary Files created in /Users/medialab/Desktop/JPC/20231219/JPC_AV_01637. 
Hit enter to start recording

Close the playback window to stop recording.
ffmpeg version 5.1.2 Copyright (c) 2000-2022 the FFmpeg developers
  built with Apple clang version 14.0.3 (clang-1403.0.22.14.1)
  configuration: --prefix=/opt/homebrew/Cellar/ffmpegdecklink/5.1.2_2 --disable-shared --enable-version3 --cc=clang --host-cflags= --host-ldflags= --enable-gpl --enable-libfreetype --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libsnappy --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-libfontconfig --disable-htmlpages --disable-libjack --disable-indev=jack --enable-neon --enable-nonfree --enable-decklink --extra-cflags=-I/opt/homebrew/include --extra-ldflags=-L/opt/homebrew/include
  libavutil      57. 28.100 / 57. 28.100
  libavcodec     59. 37.100 / 59. 37.100
  libavformat    59. 27.100 / 59. 27.100
  libavdevice    59.  7.100 / 59.  7.100
  libavfilter     8. 44.100 /  8. 44.100
  libswscale      6.  7.100 /  6.  7.100
  libswresample   4.  7.100 /  4.  7.100
  libpostproc    56.  6.100 / 56.  6.100
[decklink @ 0x15af042d0] Found Decklink mode 720 x 486 with rate 29.97(i)
qcli dev build, Nov 29 2023 02:59:07
filters selected: signalstats aphasemeter astats ssim 
Guessed Channel Layout for Input Stream #0.0 : 7.1
Input #0, decklink, from 'UltraStudio 4K Extreme 3':
  Duration: N/A, start: 0.000000, bitrate: 236013 kb/s
  Stream #0:0: Audio: pcm_s32le, 48000 Hz, 7.1, s32, 12288 kb/s
  Stream #0:1: Video: v210, yuv422p10le(bottom first), 720x486, 223725 kb/s, 29.97 fps, 29.97 tbr, 1000k tbn
Multiple -c, -codec, -acodec, -vcodec, -scodec or -dcodec options specified for stream 0, only the last option '-c:a pcm_s24le' will be used.
Stream mapping:
  Stream #0:0 (pcm_s32le) -> pan:default (graph 0)
  Stream #0:1 (v210) -> setdar:default (graph 0)
  setdar:default (graph 0) -> Stream #0:0 (ffv1)
  pan:default (graph 0) -> Stream #0:1 (pcm_s24le)
  Stream #0:1 -> #1:0 (v210 (native) -> rawvideo (native))
  Stream #0:0 -> #2:0 (pcm_s32le (native) -> pcm_s24le (native))
  Stream #0:1 -> #2:1 (copy)
Output #2, matroska, to 'pipe:':
  Metadata:
    encoder         : Lavf59.27.100
  Stream #2:0: Audio: pcm_s24le ([1][0][0][0] / 0x0001), 48000 Hz, 7.1, s32, 9216 kb/s
    Metadata:
      encoder         : Lavc59.37.100 pcm_s24le
  Stream #2:1: Video: v210 (v210 / 0x30313276), yuv422p10le(bottom first), 720x486, q=2-31, 223725 kb/s, 29.97 fps, 29.97 tbr, 1k tbn
[Parsed_amovie_0 @ 0x600002fd9600] Channel layout is not set in output stream 1, guessed channel layout is '7.1'

analyzing input file... -
                                                   0 of 100 %[matroska,webm @ 0x14b7156d0] File ended prematurely
[matroska,webm @ 0x14b7156d0] Seek to desired resync point failed. Seeking to earliest point available instead.
/opt/homebrew/bin/vrecord: line 2454: 10894 Broken pipe: 13         tee >("${PLAYER_COMMAND[@]}")
     10895 Segmentation fault: 11  | "${QCLI_COMMAND_PIPE[@]}"
av_interleaved_write_frame(): Broken pipe
[Parsed_pan_1 @ 0x600002162520] [SWR @ 0x151490000] Input channel layout has a different number of channels than the number of used channels, ignoring layout
[Parsed_pan_1 @ 0x600002162520] Pure channel mapping detected: 0 1
Finishing stream 0:0 without any data written to it.
[ffv1 @ 0x15ae06b70] bits_per_raw_sample > 8, forcing range coder
Output #0, matroska, to '/Users/medialab/Desktop/JPC/20231219/JPC_AV_01637/test4.mkv':
  Metadata:
    creation_time   : now
    encoder         : Lavf59.27.100
  Stream #0:0: Video: ffv1 (FFV1 / 0x31564646), yuv422p10le(tv, smpte170m/smpte170m/bt709), 720x486 [SAR 9:10 DAR 4:3], q=2-31, 200 kb/s, 29.97 fps, 1k tbn
    Metadata:
      encoder         : FFV1 version 3
  Stream #0:1: Audio: pcm_s24le ([1][0][0][0] / 0x0001), 48000 Hz, stereo, s32, 2304 kb/s
    Metadata:
      encoder         : Lavc59.37.100 pcm_s24le
Finishing stream 1:0 without any data written to it.
Output #1, framemd5, to '/Users/medialab/Desktop/JPC/20231219/JPC_AV_01637/test4.framemd5':
  Metadata:
    encoder         : Lavf59.27.100
  Stream #1:0: Video: rawvideo (Y3[10][10] / 0xA0A3359), yuv422p10le, 720x486, q=2-31, 209742 kb/s, 29.97 fps, 29.97 tbn
    Metadata:
      encoder         : Lavc59.37.100 rawvideo
Error writing trailer of pipe:: Broken pipe
frame=    0 fps=0.0 q=0.0 Lq=0.0 q=-1.0 size=       1kB time=00:00:00.13 bitrate=  58.0kbits/s speed=1.48x    
video:3645kB audio:150kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
Error closing file pipe:: Broken pipe
Conversion failed!
Vrecord is analyzing your video file. Please be patient.
[Parsed_amovie_0 @ 0x600002fd9600] EOF timestamp not reliable
    Last message repeated 1 times
Input #0, lavfi, from 'amovie='pipe\:0':streams=dv+da[vid][aud],    [aud]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=ire: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=ire: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:c=sienna@0.8,    drawbox=w=9:h=9:t=1:x=160-3:y=512-404-5:c=sienna@0.8,    drawbox=w=9:h=9:t=1:x=192-3:y=512-354-5:c=sienna@0.8,    drawbox=w=9:h=9:t=1:x=224-3:y=512-304-5:c=sienna@0.8,    drawgrid=w=32:h=32:t=1:c=white@0.1,    drawgrid=w=256:h=256:t=1:c=white@0.2[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.42 tbr, 1k tbn
  Stream #0:1: Audio: pcm_s32le, 48000 Hz, 7.1, s32, 12288 kb/s
qctools XML /Users/medialab/Desktop/JPC/20231219/JPC_AV_01637/test4.mkv.qctools.mkv is empty or does not exist!
QCTools analysis is complete.
Checking file conformance against FFV1 video policy...
[swscaler @ 0x1409c8000] [swscaler @ 0x1409d8000] No accelerated colorspace conversion found from yuva420p to rgba.
[swscaler @ 0x1409c8000] [swscaler @ 0x140018000] No accelerated colorspace conversion found from yuva420p to rgba.
[swscaler @ 0x1409c8000] [swscaler @ 0x140028000] No accelerated colorspace conversion found from yuva420p to rgba.
[swscaler @ 0x1409c8000] [swscaler @ 0x140038000] No accelerated colorspace conversion found from yuva420p to rgba.
[swscaler @ 0x1409c8000] [swscaler @ 0x140048000] No accelerated colorspace conversion found from yuva420p to rgba.
[swscaler @ 0x1409c8000] [swscaler @ 0x140058000] No accelerated colorspace conversion found from yuva420p to rgba.
[swscaler @ 0x1409c8000] [swscaler @ 0x140068000] No accelerated colorspace conversion found from yuva420p to rgba.
[swscaler @ 0x1409c8000] [swscaler @ 0x140078000] No accelerated colorspace conversion found from yuva420p to rgba.
[swscaler @ 0x1409c8000] [swscaler @ 0x140088000] No accelerated colorspace conversion found from yuva420p to rgba.
[swscaler @ 0x1409c8000] [swscaler @ 0x140098000] No accelerated colorspace conversion found from yuva420p to rgba.
[swscaler @ 0x1409c8000] [swscaler @ 0x1400a8000] No accelerated colorspace conversion found from yuva420p to rgba.
[swscaler @ 0x1409c8000] [swscaler @ 0x1400b8000] No accelerated colorspace conversion found from yuva420p to rgba.
[swscaler @ 0x1409c8000] [swscaler @ 0x1400c8000] No accelerated colorspace conversion found from yuva420p to rgba.
 2023-12-19T13:57:32 - File did not pass vrecord policy check for FFV1 video and may not conform to digital preservation standards. Try another file?
 2023-12-19T13:57:32 - See /Users/medialab/Desktop/JPC/20231219/JPC_AV_01637/test4_mediaconchreport.xml for a full MediaConch policy report.
Vrecord is attaching logs to your Matroska file:
The file is being analyzed.
The changes are written to the file.
Done.
The file is being analyzed.
The changes are written to the file.
Done.
Vrecord is done attaching logs to your Matroska file!
dericed commented 6 months ago

Hi @DSohl, in vrecord -e can you disable the concurrent qctools check (turn it off or set it to occur after) and try to record again. Following that please send the capture log here. For the above issue on reinstalling ffmpegdecklink, please run brew upgrade, then run brew doctor and see if you can follow any advice it offers, then you could retry brew reinstall ffmpegdecklink if you need.

DSohl commented 6 months ago

Hello, @dericed! Shifting the QCTools check to happen after the recording seems to have been the fix for the premature termination. Many thanks for that tip! The second computer is running VRecord just fine now.

The other problem of reinstalling VRecord on the first computer is still happening. ffmpeg seems to have reinstalled okay (yay), but it's the reinstall of VRecord that's giving me the issue; It still ceases installing during "vrecord dependency: amiaopensource/ami"

This is what the reinstall looks like, from soup to nuts:

/Users/medialab
≈:≈ brew reinstall vrecord
==> Fetching dependencies for amiaopensource/amiaos/vrecord: amiaopensource/amiaos/ffmpegdecklink
==> Fetching amiaopensource/amiaos/ffmpegdecklink
==> Downloading https://ffmpeg.org/releases/ffmpeg-5.1.2.tar.xz
Already downloaded: /Users/medialab/Library/Caches/Homebrew/downloads/7f8448ac2cf8ab4812d1b22a41a9e768f7b2c537f9a79a74bde1e0a91752a54c--ffmpeg-5.1.2.tar.xz
==> Fetching amiaopensource/amiaos/vrecord
==> Downloading https://github.com/amiaopensource/vrecord/archive/refs/tags/v202
Already downloaded: /Users/medialab/Library/Caches/Homebrew/downloads/7572b62b0bb2f7e515765a4e3864654bea01a8f07e1ff4f10780084b95d45597--vrecord-2023-08-07.tar.gz
==> Reinstalling amiaopensource/amiaos/vrecord 
==> Installing dependencies for amiaopensource/amiaos/vrecord: amiaopensource/amiaos/ffmpegdecklink
==> Installing amiaopensource/amiaos/vrecord dependency: amiaopensource/ami
==> ./configure --disable-shared --enable-version3 --cc=clang --host-cflags= --h
==> make
Last 15 lines from /Users/medialab/Library/Logs/Homebrew/ffmpegdecklink/02.make:
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
libavutil/macros.h:53:34: note: expanded from macro 'FF_ARRAY_ELEMS'
#define FF_ARRAY_ELEMS(a) (sizeof(a) / sizeof((a)[0]))
                                 ^~~
CC  libavutil/md5.o
libavutil/hwcontext_vulkan.c:1444:29: error: invalid application of 'sizeof' to an incomplete type 'const VulkanOptExtension[]' (aka 'const struct VulkanOptExtension[]')
        for (int j = 0; j < FF_ARRAY_ELEMS(optional_device_exts); j++) {
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
libavutil/macros.h:53:34: note: expanded from macro 'FF_ARRAY_ELEMS'
#define FF_ARRAY_ELEMS(a) (sizeof(a) / sizeof((a)[0]))
                                 ^~~
4 errors generated.
make: *** [libavutil/hwcontext_vulkan.o] Error 1
make: *** Waiting for unfinished jobs....
CC  libavutil/mem.o

If reporting this issue please do so at (not Homebrew/brew or Homebrew/homebrew-core):
  https://github.com/amiaopensource/homebrew-amiaos/issues

These open issues may also help:
ffmpegdecklink: fontconfig not found using pkg-config https://github.com/amiaopensource/homebrew-amiaos/issues/360
ffmpegdecklink: x264 not found using pkg-config https://github.com/amiaopensource/homebrew-amiaos/issues/362

/Users/medialab
dericed commented 6 months ago

Glad to hear it. Can you run qcli -v and share what it says. If it's version less than 1.3.1, please run brew upgrade qcli.

In what you shared about about reinstalling vrecord, it's the installation of the dependency called ffmpegdecklink that is giving the error. Can you try: brew reinstall fontconfig and brew reinstall x264 first and then retry reinstalling vrecord.

DSohl commented 6 months ago

Here's the result from qcli -v

/Users/medialab
≈:≈ qcli -v
qcli dev build, Nov 29 2023 02:59:07

FFMpeg version: 6.0
FFMpeg configuration: not available
FFMpeg libraries:         <library_version name="libavutil" major="58" minor="2" micro="100" version="3801700" ident="Lavu58.2.100"/>
        <library_version name="libavcodec" major="60" minor="3" micro="100" version="3933028" ident="Lavc60.3.100"/>
        <library_version name="libavformat" major="60" minor="3" micro="100" version="3933028" ident="Lavf60.3.100"/>
        <library_version name="libavfilter" major="9" minor="3" micro="100" version="590692" ident="Lavfi9.3.100"/>
        <library_version name="libswscale" major="7" minor="1" micro="100" version="459108" ident="SwS7.1.100"/>

Running brew upgrade qcli confirms it's 1.31. I tried brew reinstall fontconfig and brew reinstall x264 and still get errors:

/Users/medialab
≈:≈ brew reinstall vrecord
==> Fetching dependencies for amiaopensource/amiaos/vrecord: amiaopensource/amiaos/ffmpegdecklink
==> Fetching amiaopensource/amiaos/ffmpegdecklink
==> Downloading https://ffmpeg.org/releases/ffmpeg-5.1.2.tar.xz
Already downloaded: /Users/medialab/Library/Caches/Homebrew/downloads/7f8448ac2cf8ab4812d1b22a41a9e768f7b2c537f9a79a74bde1e0a91752a54c--ffmpeg-5.1.2.tar.xz
==> Fetching amiaopensource/amiaos/vrecord
==> Downloading https://github.com/amiaopensource/vrecord/archive/refs/tags/v202
Already downloaded: /Users/medialab/Library/Caches/Homebrew/downloads/7572b62b0bb2f7e515765a4e3864654bea01a8f07e1ff4f10780084b95d45597--vrecord-2023-08-07.tar.gz
==> Reinstalling amiaopensource/amiaos/vrecord 
==> Installing dependencies for amiaopensource/amiaos/vrecord: amiaopensource/amiaos/ffmpegdecklink
==> Installing amiaopensource/amiaos/vrecord dependency: amiaopensource/ami
==> ./configure --disable-shared --enable-version3 --cc=clang --host-cflags= --h
==> make
Last 15 lines from /Users/medialab/Library/Logs/Homebrew/ffmpegdecklink/02.make:
libavutil/macros.h:53:34: note: expanded from macro 'FF_ARRAY_ELEMS'
#define FF_ARRAY_ELEMS(a) (sizeof(a) / sizeof((a)[0]))
                                 ^~~
libavutil/hwcontext_vulkan.c:1444:29: error: invalid application of 'sizeof' to an incomplete type 'const VulkanOptExtension[]' (aka 'const struct VulkanOptExtension[]')
        for (int j = 0; j < FF_ARRAY_ELEMS(optional_device_exts); j++) {
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
libavutil/macros.h:53:34: note: expanded from macro 'FF_ARRAY_ELEMS'
#define FF_ARRAY_ELEMS(a) (sizeof(a) / sizeof((a)[0]))
                                 ^~~
CC  libavutil/md5.o
4 errors generated.
CC  libavutil/mem.o
make: *** [libavutil/hwcontext_vulkan.o] Error 1
make: *** Waiting for unfinished jobs....
CC  libavutil/murmur3.o

If reporting this issue please do so at (not Homebrew/brew or Homebrew/homebrew-core):
  https://github.com/amiaopensource/homebrew-amiaos/issues
DSohl commented 3 months ago

Closing this out. Never did identify the source of the problem, but something in a recent a brew update/upgrade fixed it. Vrecord is now A-OK.