amiaopensource / vrecord

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

"Error Muxing a Packet" Upon Updating Vrecord #768

Open lavidtech-1 opened 1 year ago

lavidtech-1 commented 1 year ago

Hi All,

We were successfully using the V2023-03-01 version of Vrecord on an Intel Mac and decided to update to the V2023-08-07 earlier today.

Upon updating, we ran into "Error Muxing a Packet" and were unable to capture the video. After a quick search, I found a similar issue existed in Vrecord a long time ago and the solution was to not close the window, but use a durationand after the duration ends, the video would capture correctly.

I tested this and it worked, but I don't understand why the new version caused this issue. Below is the readout from capturing the tape:Last login: Wed Nov 1 15:30:47 on ttys000 1545media@LAVTS-MAC-CAPTURE-05 ~ % vrecord Starting the vrecord GUI. To bypass the GUI, run like 'vrecord FILENAME'. Summary: Apple ProRes 422 HQ/mov yuv422p10 file from ntsc component analog. Frame MD5s=No, QCTools XML=No. Inputs recorded to /Volumes/LAVTS-SHR-RAID/10821 - Arturo Velasco/VHS Captures/asdf.mov and Auxiliary Files created in /Volumes/LAVTS-SHR-RAID/10821 - Arturo Velasco/QCTOOLS. Tape duration set to: 1 minutes. Hit enter to start recording

Could not find disk: /Volumes/LAVTS-SHR-RAID Could not find disk: /dev/ Close the playback window to stop recording. ffmpeg version 6.0 Copyright (c) 2000-2023 the FFmpeg developers built with Apple clang version 14.0.3 (clang-1403.0.22.14.1) configuration: --prefix=/usr/local/Cellar/ffmpegdecklink/6.0 --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-libjack --disable-indev=jack --disable-htmlpages --enable-nonfree --enable-decklink --extra-cflags=-I/usr/local/include --extra-ldflags=-L/usr/local/include libavutil 58. 2.100 / 58. 2.100 libavcodec 60. 3.100 / 60. 3.100 libavformat 60. 3.100 / 60. 3.100 libavdevice 60. 1.100 / 60. 1.100 libavfilter 9. 3.100 / 9. 3.100 libswscale 7. 1.100 / 7. 1.100 libswresample 4. 10.100 / 4. 10.100 libpostproc 57. 1.100 / 57. 1.100 [decklink @ 0x7f8d89f047c0] Found Decklink mode 720 x 486 with rate 29.97(i) Guessed Channel Layout for Input Stream #0.0 : 7.1 Input #0, decklink, from 'UltraStudio Express': Duration: N/A, start: 0.000000, bitrate: 236013 kb/s Stream #0:0: Audio: pcm_s32le, 48000 Hz, 8 channels, 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 (prores_ks) pan:default (graph 0) -> Stream #0:1 (pcm_s24le) Stream #0:0 -> #1:0 (pcm_s32le (native) -> pcm_s24le (native)) Stream #0:1 -> #1:1 (copy) Output #1, matroska, to 'pipe:': Metadata: encoder : Lavf60.3.100 Stream #1:0: Audio: pcm_s24le ([1][0][0][0] / 0x0001), 48000 Hz, 7.1, s32, 9216 kb/s Metadata: encoder : Lavc60.3.100 pcm_s24le Stream #1: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 @ 0x7f780a704f40] Channel layout is not set in output stream 1, guessed channel layout is '7.1' [Parsed_pan_1 @ 0x7f8d89f07700] Pure channel mapping detected: 0 1
Output #0, mov, to '/Volumes/LAVTS-SHR-RAID/10821 - Arturo Velasco/VHS Captures/asdf.mov': Metadata: creation_time : now encoder : Lavf60.3.100 Stream #0:0: Video: prores (apch / 0x68637061), yuv422p10le(tv, smpte170m/smpte170m/bt709, bottom coded first (swapped)), 720x486 [SAR 9:10 DAR 4:3], q=2-31, 200 kb/s, 29.97 fps, 30k tbn Metadata: encoder : Apple ProRes 422 HQ Stream #0:1: Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, stereo, s32, 2304 kb/s Metadata: encoder : Lavc60.3.100 pcm_s24le 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=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: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: 12288 kb/s Stream #0:0: Video: wrapped_avframe, yuva420p, 1232x998 [SAR 1:1 DAR 616:499], 29.97 fps, 29.97 tbr, 1k tbn Stream #0:1: Audio: pcm_s32le, 48000 Hz, 7.1, s32, 12288 kb/s 0.96 A-V: -0.018 fd= 0 aq= 0KB vq= 1KB sq= 0B f=0/0
av_interleaved_write_frame(): Broken pipe [out#1/matroska @ 0x7f8d8a8085c0] Error muxing a packet

Any ideas on how to fix this so we can close the window upon capture without the error? Thanks in advance for your help.

siobhan-cernugelj commented 1 year ago

We're experiencing the same behavior over here at MARMIA. We ran into trouble after upgrading to the latest version of vrecord earlier this week, just like you.

dericed commented 1 year ago

yup, I confirmed it's a regression since https://github.com/amiaopensource/homebrew-amiaos/commit/cad790c4247f6ef372123617d4a6443fdc5ef48a. Fixing it now.

dericed commented 1 year ago

Hi @lavidtech-1 and @siobhan-cernugelj, please run brew upgrade. This should downgrade ffmpegdecklink from 6.0 to 5.1.2 which should fix the error.

bturkus commented 1 year ago

I'm having an issue rolling back; any ideas?

==> Installing dependencies for amiaopensource/amiaos/vrecord: amiaopensource/amiaos/ffmpegdecklink, glslang, python-markupsafe, vulkan-headers, vulkan-loader and libplacebo
==> Installing amiaopensource/amiaos/vrecord dependency: amiaopensource/amiaos/ffmpegdecklink
==> ./configure --disable-shared --enable-version3 --cc=clang --host-cflags= --host-ldflags= --enable-gpl --enable-libfreetype --enable-libmp3lame --enable-libopenjpeg --en
==> make
Last 15 lines from /Users/pamivideo2/Library/Logs/Homebrew/ffmpegdecklink/02.make:
makeinfo: error parsing ./doc/t2h.pm: Undefined subroutine &Texinfo::Config::set_from_init_file called at ./doc/t2h.pm line 24.
make: *** [doc/ffmpeg-bitstream-filters.html] Error 1
makeinfo: error parsing ./doc/t2h.pm: Undefined subroutine &Texinfo::Config::set_from_init_file called at ./doc/t2h.pm line 24.
make: *** [doc/ffmpeg-formats.html] Error 1
makeinfo: error parsing ./doc/t2h.pm: Undefined subroutine &Texinfo::Config::set_from_init_file called at ./doc/t2h.pm line 24.
make: *** [doc/ffmpeg-codecs.html] Error 1
makeinfo: error parsing ./doc/t2h.pm: Undefined subroutine &Texinfo::Config::set_from_init_file called at ./doc/t2h.pm line 24.
make: *** [doc/ffmpeg-resampler.html] Error 1
makeinfo: error parsing ./doc/t2h.pm: Undefined subroutine &Texinfo::Config::set_from_init_file called at ./doc/t2h.pm line 24.
make: *** [doc/ffmpeg-protocols.html] Error 1
makeinfo: error parsing ./doc/t2h.pm: Undefined subroutine &Texinfo::Config::set_from_init_file called at ./doc/t2h.pm line 24.
make: *** [doc/ffmpeg-devices.html] Error 1
STRIP   libavutil/x86/tx_float.o
STRIP   libavcodec/x86/vp9itxfm.o
rm libavfilter/metal/vf_yadif_videotoolbox.metal.air libavfilter/metal/vf_yadif_videotoolbox.metallib libavfilter/metal/vf_yadif_videotoolbox.metallib.c

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
bturkus commented 1 year ago

disabling htmlpages seemed to do the trick, but I fear I may have messed up one computer but futzing around with brew edit (ffmpegdecklink). I've tried uninstalling and reinstalling everything, untapping and retapping amiaos, but now no matter what I do I'm getting this error:

==> Installing amiaopensource/amiaos/ffmpegdecklink
==> ./configure --disable-shared --enable-version3 --cc=clang --host-cflags= --host-ldflags= --enable-gpl --enable-libfreetype --enable-libmp3lame --enable-libopenj
==> make
Last 15 lines from /Users/pamivideo2/Library/Logs/Homebrew/ffmpegdecklink/02.make:
        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/opt.o
CC  libavutil/parseutils.o
CC  libavutil/pixdesc.o
STRIP   libavcodec/x86/vp9lpf.o
STRIP   libswscale/x86/output.o
STRIP   libavcodec/x86/vp9itxfm.o
rm libavfilter/metal/vf_yadif_videotoolbox.metal.air

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

any ideas?

dericed commented 1 year ago

@bturkus, have you taken the advice of brew doctor?

siobhan-cernugelj commented 1 year ago

Hi @lavidtech-1 and @siobhan-cernugelj, please run brew upgrade. This should downgrade ffmpegdecklink from 6.0 to 5.1.2 which should fix the error.

Unfortunately, we're still experiencing the same behavior. It doesn't look like ffmpegdecklink was actually downgraded.

privatezero commented 1 year ago

@siobhan-cernugelj not sure if it will fix it on your end, but did you try running a brew remove --ignore-dependencies ffmpegdecklink and then reinstalling it from scratch? (Maybe a brew cleanup between those commands might help)

retokromer commented 1 year ago

(Possibly even a brew cleanup --prune=all.)

FolkHistory commented 1 year ago

I've also had this issue but can confirm that brew upgrade solved it for me.

lavidtech-1 commented 1 year ago

Hi Folks, can confirm on our end that brew upgrade worked for us and it allows us to close the window without corrupting the file.

siobhan-cernugelj commented 1 year ago

@siobhan-cernugelj not sure if it will fix it on your end, but did you try running a brew remove --ignore-dependencies ffmpegdecklink and then reinstalling it from scratch? (Maybe a brew cleanup between those commands might help)

I went ahead and ran brew upgrade again. For whatever reason, trying the same thing twice actually resolved the issue the second time around.

Everything seemed to be working fine again, but we were still seeing an alert about ffmpegdecklink at launch. I uninstalled it, ran brew cleanup, and reinstalled. This appears to have taken care of the problem, whatever it was.