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

Input Swapping on Each Boot #759

Closed gbagit closed 2 months ago

gbagit commented 10 months ago

This is a very small bug. Upon starting a vrecord session, the list of video devices are randomized slightly. It looks like ffmpeg gathers the inputs from this command:

ffmpeg -f avfoundation -list_devices true -i ""

Which gives this output:

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=/opt/homebrew/Cellar/ffmpeg/6.0 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libaribb24 --enable-libbluray --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librist --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libsvtav1 --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox --enable-audiotoolbox --enable-neon 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 [AVFoundation indev @ 0x13a7047a0] AVFoundation video devices: [AVFoundation indev @ 0x13a7047a0] [0] DV-VCR [AVFoundation indev @ 0x13a7047a0] [1] AJ-YAD120AG [AVFoundation indev @ 0x13a7047a0] [2] AJ-HD1400 [AVFoundation indev @ 0x13a7047a0] [3] AJ-YAD120AG [AVFoundation indev @ 0x13a7047a0] [4] Capture screen 0 [AVFoundation indev @ 0x13a7047a0] AVFoundation audio devices:

This list is then displayed here:

Screenshot 2023-08-28 at 2 02 41 PM

With the two AJ-YAD120AG, either of the two inputs could be listed as 1 or 3. For every new tape that is run, the order shuffles again. So, the two inputs swap around with each new tape throughout the day.

I am running this with ffmpeg6.0 on a 13.4 mac mini.

retokromer commented 10 months ago

I am running this with ffmpeg6.0 on a 13.4 mac mini.

Thank you for reporting!

Is there any reason, why you use ffmpeg (6.0) rather than ffmpegdecklink (5.1.2) for vrecord?

gbagit commented 10 months ago

Frankly, I was unaware that there was another option! The command was narrowed down to be specifically from ffmpeg from another IT member. If there's a way to specifically call ffmpegdecklink or use it within vrecord, I'd be willing to try it to see if it breaks.

retokromer commented 10 months ago

@gbagit No problem! If you have installed vrecord via our formula, then ffmpegdecklink should be installed and used by vrecord. Of course, you may have a regular installation of FFmpeg, which probably has not the decklinksdk enabled and therefore should not be used by vrecord.

Edit: On recent macs it should be:

/usr/local/opt/ffmpegdecklink/bin/ffmpeg-dl -f avfoundation -list_devices true -i ""
gbagit commented 9 months ago

Ran this command today. Initially, it didn't work because the path was slightly different. It's in opt/homebrew/cellar/. The output looks about the same.

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 --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 --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 [AVFoundation indev @ 0x131e049a0] AVFoundation video devices: [AVFoundation indev @ 0x131e049a0] [0] AJ-YAD120AG [AVFoundation indev @ 0x131e049a0] [1] AJ-YAD120AG [AVFoundation indev @ 0x131e049a0] [2] AJ-HD1400 [AVFoundation indev @ 0x131e049a0] [3] AJ-HD1400 [AVFoundation indev @ 0x131e049a0] [4] Capture screen 0 [AVFoundation indev @ 0x131e049a0] AVFoundation audio devices: : Input/output error