├── CONTRIBUTING.md
├── LICENSE.txt
├── README.md
├── Resources
├── Documentation
│ ├── analog_digitization.md
│ ├── audio_info.md
│ ├── dv_info.md
│ ├── hardware.md
│ ├── installation_and_setup.md
│ ├── linux_installation.md
│ ├── passthrough.md
│ ├── settings.md
│ ├── troubleshooting.md
│ └── vrecord_window.md
├── audioPlusVideoMode-small.png
├── audio_mode.gif
├── audio_mode.png
├── dv_vrecord_bitstream_concealment.png
├── dv_vrecord_check-files.jpg
├── dv_vrecord_configuration.jpg
├── dv_vrecord_configuration2.jpg
├── dv_vrecord_decklink.jpg
├── dv_vrecord_device_identifier.jpg
├── dv_vrecord_end-capture.jpg
├── dv_vrecord_permissions_error.png
├── dv_vrecord_playback.jpg
├── dv_vrecord_record-instructions.mp4
├── dv_vrecord_timecode-record-start.gif
├── dvrecord.png
├── qcview.lua
├── vrecord_QC_output_graphs_ver2.jpeg
├── vrecord_broadcast_range_visual_2016-11-22.jpg
├── vrecord_color_matrix_2016-11-22.jpg
├── vrecord_functions
├── vrecord_gui_mode.png
├── vrecord_logo.png
├── vrecord_logo_audio.png
├── vrecord_logo_documentation.png
├── vrecord_logo_edit.png
├── vrecord_logo_help.png
├── vrecord_logo_logs.png
├── vrecord_logo_playback.png
├── vrecord_qcview_splitfields.png
├── vrecord_settings.png
├── vrecord_visual_numerical.jpg
├── vrecord_visual_numerical_2016-11-22.jpg
└── vrecord_window_visual.jpg
├── vplay
├── vrecord
├── vrecord.1
├── vrecord_logo.png
├── vtest
└── vtest.1
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contribution Guide
2 |
3 | ## Rules for contributing
4 |
5 | This project welcomes contributions and feedback. Open source feedback and participation of all kinds and from any interested party or institution is encouraged and can be made through opening an issue or pull request on GitHub.
6 |
7 | ## How to contribute
8 |
9 | The maintainers of this repository welcome feedback, questions, criticism and contributions. There are several ways to participate:
10 |
11 | ### Add or Comment on Issues
12 |
13 | Anyone is welcome to start a new issue by selecting the `Issues` tab in GitHub and clicking [New Issue](https://github.com/amiaopensource/vrecord/issues/new).
14 |
15 | All existing issues, open and closed, may be reviewed or commented upon in the [Issues](https://github.com/amiaopensource/vrecord/issues?utf8=%E2%9C%93&q=is%3Aissue) section.
16 |
17 | ### Reviewing Comments
18 |
19 | The recent work on this repository can be reviewed in the [Commit Log](https://github.com/amiaopensource/vrecord/commits/master). Clicking on an issue will show a summary of what was added, removed, or changed. Any commit may be commented upon to request further clarification, propose a suggestion, offer support, or suggest an alternate approach.
20 |
21 | ### Pull Requests
22 |
23 | Pull requests are proposals to apply changes to the repository which could include adding or editing existing documentation, adding images, or providing or changing content. There are several guides that document how to contribute to GitHub repositories such as:
24 |
25 | - https://guides.github.com/activities/contributing-to-open-source/
26 | - https://www.thinkful.com/learn/github-pull-request-tutorial/
27 |
28 | If you'd like to contribute to the repository but are unsure how to do this, please feel welcome to contact the project maintainers.
29 |
--------------------------------------------------------------------------------
/LICENSE.txt:
--------------------------------------------------------------------------------
1 | Attribution 4.0 International
2 |
3 | =======================================================================
4 |
5 | Creative Commons Corporation ("Creative Commons") is not a law firm and
6 | does not provide legal services or legal advice. Distribution of
7 | Creative Commons public licenses does not create a lawyer-client or
8 | other relationship. Creative Commons makes its licenses and related
9 | information available on an "as-is" basis. Creative Commons gives no
10 | warranties regarding its licenses, any material licensed under their
11 | terms and conditions, or any related information. Creative Commons
12 | disclaims all liability for damages resulting from their use to the
13 | fullest extent possible.
14 |
15 | Using Creative Commons Public Licenses
16 |
17 | Creative Commons public licenses provide a standard set of terms and
18 | conditions that creators and other rights holders may use to share
19 | original works of authorship and other material subject to copyright
20 | and certain other rights specified in the public license below. The
21 | following considerations are for informational purposes only, are not
22 | exhaustive, and do not form part of our licenses.
23 |
24 | Considerations for licensors: Our public licenses are
25 | intended for use by those authorized to give the public
26 | permission to use material in ways otherwise restricted by
27 | copyright and certain other rights. Our licenses are
28 | irrevocable. Licensors should read and understand the terms
29 | and conditions of the license they choose before applying it.
30 | Licensors should also secure all rights necessary before
31 | applying our licenses so that the public can reuse the
32 | material as expected. Licensors should clearly mark any
33 | material not subject to the license. This includes other CC-
34 | licensed material, or material used under an exception or
35 | limitation to copyright. More considerations for licensors:
36 | wiki.creativecommons.org/Considerations_for_licensors
37 |
38 | Considerations for the public: By using one of our public
39 | licenses, a licensor grants the public permission to use the
40 | licensed material under specified terms and conditions. If
41 | the licensor's permission is not necessary for any reason--for
42 | example, because of any applicable exception or limitation to
43 | copyright--then that use is not regulated by the license. Our
44 | licenses grant only permissions under copyright and certain
45 | other rights that a licensor has authority to grant. Use of
46 | the licensed material may still be restricted for other
47 | reasons, including because others have copyright or other
48 | rights in the material. A licensor may make special requests,
49 | such as asking that all changes be marked or described.
50 | Although not required by our licenses, you are encouraged to
51 | respect those requests where reasonable. More considerations
52 | for the public:
53 | wiki.creativecommons.org/Considerations_for_licensees
54 |
55 | =======================================================================
56 |
57 | Creative Commons Attribution 4.0 International Public License
58 |
59 | By exercising the Licensed Rights (defined below), You accept and agree
60 | to be bound by the terms and conditions of this Creative Commons
61 | Attribution 4.0 International Public License ("Public License"). To the
62 | extent this Public License may be interpreted as a contract, You are
63 | granted the Licensed Rights in consideration of Your acceptance of
64 | these terms and conditions, and the Licensor grants You such rights in
65 | consideration of benefits the Licensor receives from making the
66 | Licensed Material available under these terms and conditions.
67 |
68 |
69 | Section 1 -- Definitions.
70 |
71 | a. Adapted Material means material subject to Copyright and Similar
72 | Rights that is derived from or based upon the Licensed Material
73 | and in which the Licensed Material is translated, altered,
74 | arranged, transformed, or otherwise modified in a manner requiring
75 | permission under the Copyright and Similar Rights held by the
76 | Licensor. For purposes of this Public License, where the Licensed
77 | Material is a musical work, performance, or sound recording,
78 | Adapted Material is always produced where the Licensed Material is
79 | synched in timed relation with a moving image.
80 |
81 | b. Adapter's License means the license You apply to Your Copyright
82 | and Similar Rights in Your contributions to Adapted Material in
83 | accordance with the terms and conditions of this Public License.
84 |
85 | c. Copyright and Similar Rights means copyright and/or similar rights
86 | closely related to copyright including, without limitation,
87 | performance, broadcast, sound recording, and Sui Generis Database
88 | Rights, without regard to how the rights are labeled or
89 | categorized. For purposes of this Public License, the rights
90 | specified in Section 2(b)(1)-(2) are not Copyright and Similar
91 | Rights.
92 |
93 | d. Effective Technological Measures means those measures that, in the
94 | absence of proper authority, may not be circumvented under laws
95 | fulfilling obligations under Article 11 of the WIPO Copyright
96 | Treaty adopted on December 20, 1996, and/or similar international
97 | agreements.
98 |
99 | e. Exceptions and Limitations means fair use, fair dealing, and/or
100 | any other exception or limitation to Copyright and Similar Rights
101 | that applies to Your use of the Licensed Material.
102 |
103 | f. Licensed Material means the artistic or literary work, database,
104 | or other material to which the Licensor applied this Public
105 | License.
106 |
107 | g. Licensed Rights means the rights granted to You subject to the
108 | terms and conditions of this Public License, which are limited to
109 | all Copyright and Similar Rights that apply to Your use of the
110 | Licensed Material and that the Licensor has authority to license.
111 |
112 | h. Licensor means the individual(s) or entity(ies) granting rights
113 | under this Public License.
114 |
115 | i. Share means to provide material to the public by any means or
116 | process that requires permission under the Licensed Rights, such
117 | as reproduction, public display, public performance, distribution,
118 | dissemination, communication, or importation, and to make material
119 | available to the public including in ways that members of the
120 | public may access the material from a place and at a time
121 | individually chosen by them.
122 |
123 | j. Sui Generis Database Rights means rights other than copyright
124 | resulting from Directive 96/9/EC of the European Parliament and of
125 | the Council of 11 March 1996 on the legal protection of databases,
126 | as amended and/or succeeded, as well as other essentially
127 | equivalent rights anywhere in the world.
128 |
129 | k. You means the individual or entity exercising the Licensed Rights
130 | under this Public License. Your has a corresponding meaning.
131 |
132 |
133 | Section 2 -- Scope.
134 |
135 | a. License grant.
136 |
137 | 1. Subject to the terms and conditions of this Public License,
138 | the Licensor hereby grants You a worldwide, royalty-free,
139 | non-sublicensable, non-exclusive, irrevocable license to
140 | exercise the Licensed Rights in the Licensed Material to:
141 |
142 | a. reproduce and Share the Licensed Material, in whole or
143 | in part; and
144 |
145 | b. produce, reproduce, and Share Adapted Material.
146 |
147 | 2. Exceptions and Limitations. For the avoidance of doubt, where
148 | Exceptions and Limitations apply to Your use, this Public
149 | License does not apply, and You do not need to comply with
150 | its terms and conditions.
151 |
152 | 3. Term. The term of this Public License is specified in Section
153 | 6(a).
154 |
155 | 4. Media and formats; technical modifications allowed. The
156 | Licensor authorizes You to exercise the Licensed Rights in
157 | all media and formats whether now known or hereafter created,
158 | and to make technical modifications necessary to do so. The
159 | Licensor waives and/or agrees not to assert any right or
160 | authority to forbid You from making technical modifications
161 | necessary to exercise the Licensed Rights, including
162 | technical modifications necessary to circumvent Effective
163 | Technological Measures. For purposes of this Public License,
164 | simply making modifications authorized by this Section 2(a)
165 | (4) never produces Adapted Material.
166 |
167 | 5. Downstream recipients.
168 |
169 | a. Offer from the Licensor -- Licensed Material. Every
170 | recipient of the Licensed Material automatically
171 | receives an offer from the Licensor to exercise the
172 | Licensed Rights under the terms and conditions of this
173 | Public License.
174 |
175 | b. No downstream restrictions. You may not offer or impose
176 | any additional or different terms or conditions on, or
177 | apply any Effective Technological Measures to, the
178 | Licensed Material if doing so restricts exercise of the
179 | Licensed Rights by any recipient of the Licensed
180 | Material.
181 |
182 | 6. No endorsement. Nothing in this Public License constitutes or
183 | may be construed as permission to assert or imply that You
184 | are, or that Your use of the Licensed Material is, connected
185 | with, or sponsored, endorsed, or granted official status by,
186 | the Licensor or others designated to receive attribution as
187 | provided in Section 3(a)(1)(A)(i).
188 |
189 | b. Other rights.
190 |
191 | 1. Moral rights, such as the right of integrity, are not
192 | licensed under this Public License, nor are publicity,
193 | privacy, and/or other similar personality rights; however, to
194 | the extent possible, the Licensor waives and/or agrees not to
195 | assert any such rights held by the Licensor to the limited
196 | extent necessary to allow You to exercise the Licensed
197 | Rights, but not otherwise.
198 |
199 | 2. Patent and trademark rights are not licensed under this
200 | Public License.
201 |
202 | 3. To the extent possible, the Licensor waives any right to
203 | collect royalties from You for the exercise of the Licensed
204 | Rights, whether directly or through a collecting society
205 | under any voluntary or waivable statutory or compulsory
206 | licensing scheme. In all other cases the Licensor expressly
207 | reserves any right to collect such royalties.
208 |
209 |
210 | Section 3 -- License Conditions.
211 |
212 | Your exercise of the Licensed Rights is expressly made subject to the
213 | following conditions.
214 |
215 | a. Attribution.
216 |
217 | 1. If You Share the Licensed Material (including in modified
218 | form), You must:
219 |
220 | a. retain the following if it is supplied by the Licensor
221 | with the Licensed Material:
222 |
223 | i. identification of the creator(s) of the Licensed
224 | Material and any others designated to receive
225 | attribution, in any reasonable manner requested by
226 | the Licensor (including by pseudonym if
227 | designated);
228 |
229 | ii. a copyright notice;
230 |
231 | iii. a notice that refers to this Public License;
232 |
233 | iv. a notice that refers to the disclaimer of
234 | warranties;
235 |
236 | v. a URI or hyperlink to the Licensed Material to the
237 | extent reasonably practicable;
238 |
239 | b. indicate if You modified the Licensed Material and
240 | retain an indication of any previous modifications; and
241 |
242 | c. indicate the Licensed Material is licensed under this
243 | Public License, and include the text of, or the URI or
244 | hyperlink to, this Public License.
245 |
246 | 2. You may satisfy the conditions in Section 3(a)(1) in any
247 | reasonable manner based on the medium, means, and context in
248 | which You Share the Licensed Material. For example, it may be
249 | reasonable to satisfy the conditions by providing a URI or
250 | hyperlink to a resource that includes the required
251 | information.
252 |
253 | 3. If requested by the Licensor, You must remove any of the
254 | information required by Section 3(a)(1)(A) to the extent
255 | reasonably practicable.
256 |
257 | 4. If You Share Adapted Material You produce, the Adapter's
258 | License You apply must not prevent recipients of the Adapted
259 | Material from complying with this Public License.
260 |
261 |
262 | Section 4 -- Sui Generis Database Rights.
263 |
264 | Where the Licensed Rights include Sui Generis Database Rights that
265 | apply to Your use of the Licensed Material:
266 |
267 | a. for the avoidance of doubt, Section 2(a)(1) grants You the right
268 | to extract, reuse, reproduce, and Share all or a substantial
269 | portion of the contents of the database;
270 |
271 | b. if You include all or a substantial portion of the database
272 | contents in a database in which You have Sui Generis Database
273 | Rights, then the database in which You have Sui Generis Database
274 | Rights (but not its individual contents) is Adapted Material; and
275 |
276 | c. You must comply with the conditions in Section 3(a) if You Share
277 | all or a substantial portion of the contents of the database.
278 |
279 | For the avoidance of doubt, this Section 4 supplements and does not
280 | replace Your obligations under this Public License where the Licensed
281 | Rights include other Copyright and Similar Rights.
282 |
283 |
284 | Section 5 -- Disclaimer of Warranties and Limitation of Liability.
285 |
286 | a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
287 | EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
288 | AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
289 | ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
290 | IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
291 | WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
292 | PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
293 | ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
294 | KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
295 | ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
296 |
297 | b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
298 | TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
299 | NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
300 | INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
301 | COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
302 | USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
303 | ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
304 | DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
305 | IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
306 |
307 | c. The disclaimer of warranties and limitation of liability provided
308 | above shall be interpreted in a manner that, to the extent
309 | possible, most closely approximates an absolute disclaimer and
310 | waiver of all liability.
311 |
312 |
313 | Section 6 -- Term and Termination.
314 |
315 | a. This Public License applies for the term of the Copyright and
316 | Similar Rights licensed here. However, if You fail to comply with
317 | this Public License, then Your rights under this Public License
318 | terminate automatically.
319 |
320 | b. Where Your right to use the Licensed Material has terminated under
321 | Section 6(a), it reinstates:
322 |
323 | 1. automatically as of the date the violation is cured, provided
324 | it is cured within 30 days of Your discovery of the
325 | violation; or
326 |
327 | 2. upon express reinstatement by the Licensor.
328 |
329 | For the avoidance of doubt, this Section 6(b) does not affect any
330 | right the Licensor may have to seek remedies for Your violations
331 | of this Public License.
332 |
333 | c. For the avoidance of doubt, the Licensor may also offer the
334 | Licensed Material under separate terms or conditions or stop
335 | distributing the Licensed Material at any time; however, doing so
336 | will not terminate this Public License.
337 |
338 | d. Sections 1, 5, 6, 7, and 8 survive termination of this Public
339 | License.
340 |
341 |
342 | Section 7 -- Other Terms and Conditions.
343 |
344 | a. The Licensor shall not be bound by any additional or different
345 | terms or conditions communicated by You unless expressly agreed.
346 |
347 | b. Any arrangements, understandings, or agreements regarding the
348 | Licensed Material not stated herein are separate from and
349 | independent of the terms and conditions of this Public License.
350 |
351 |
352 | Section 8 -- Interpretation.
353 |
354 | a. For the avoidance of doubt, this Public License does not, and
355 | shall not be interpreted to, reduce, limit, restrict, or impose
356 | conditions on any use of the Licensed Material that could lawfully
357 | be made without permission under this Public License.
358 |
359 | b. To the extent possible, if any provision of this Public License is
360 | deemed unenforceable, it shall be automatically reformed to the
361 | minimum extent necessary to make it enforceable. If the provision
362 | cannot be reformed, it shall be severed from this Public License
363 | without affecting the enforceability of the remaining terms and
364 | conditions.
365 |
366 | c. No term or condition of this Public License will be waived and no
367 | failure to comply consented to unless expressly agreed to by the
368 | Licensor.
369 |
370 | d. Nothing in this Public License constitutes or may be interpreted
371 | as a limitation upon, or waiver of, any privileges and immunities
372 | that apply to the Licensor or You, including from the legal
373 | processes of any jurisdiction or authority.
374 |
375 |
376 | =======================================================================
377 |
378 | Creative Commons is not a party to its public
379 | licenses. Notwithstanding, Creative Commons may elect to apply one of
380 | its public licenses to material it publishes and in those instances
381 | will be considered the “Licensor.” The text of the Creative Commons
382 | public licenses is dedicated to the public domain under the CC0 Public
383 | Domain Dedication. Except for the limited purpose of indicating that
384 | material is shared under a Creative Commons public license or as
385 | otherwise permitted by the Creative Commons policies published at
386 | creativecommons.org/policies, Creative Commons does not authorize the
387 | use of the trademark "Creative Commons" or any other trademark or logo
388 | of Creative Commons without its prior written consent including,
389 | without limitation, in connection with any unauthorized modifications
390 | to any of its public licenses or any other arrangements,
391 | understandings, or agreements concerning use of licensed material. For
392 | the avoidance of doubt, this paragraph does not form part of the
393 | public licenses.
394 |
395 | Creative Commons may be contacted at creativecommons.org.
396 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Vrecord Documentation
2 |
3 | This documentation is up to date as of vrecord version 2020-02-10.
4 |
5 | ## Table of Contents
6 |
7 | 1. [Summary](#summary)
8 | 1. [Contributing to vrecord](#contributing)
9 | 1. [License](#license)
10 | 1. [Installation and Basic Use](Resources/Documentation/installation_and_setup.md)
11 | 1. [Installing vrecord](Resources/Documentation/installation_and_setup.md#installing-vrecord)
12 | 1. [Installing on Linux](Resources/Documentation/linux_installation.md)
13 | 1. [Using vrecord](Resources/Documentation/installation_and_setup.md#using-vrecord)
14 | 1. [Setting Up vrecord for the First Time](Resources/Documentation/installation_and_setup.md#setting-up-vrecord-for-the-first-time)
15 | 1. [Basic Usage](Resources/Documentation/installation_and_setup.md#basic-usage)
16 | 1. [Ending a Capture](Resources/Documentation/installation_and_setup.md#ending-a-capture)
17 | 1. [The vrecord Window](Resources/Documentation/vrecord_window.md)
18 | 1. [Passthrough](Resources/Documentation/passthrough.md)
19 | 1. [Passthrough Mode](Resources/Documentation/passthrough.md#passthrough-mode)
20 | 1. [Audio Passthrough Mode](Resources/Documentation/passthrough.md#audio-passthrough-mode)
21 | 1. [Editing Settings](Resources/Documentation/settings.md)
22 | 1. [Options for Video Capture](Resources/Documentation/settings.md#options-for-video-capture)
23 | 1. [Video Capture Views](Resources/Documentation/settings.md#video-views)
24 | 1. [Clearing the Configuration File](Resources/Documentation/settings.md#clearing-the-configuration-file)
25 | 1. [DV Capture](Resources/Documentation/dv_info.md)
26 | 1. [Audio Capture](Resources/Documentation/audio_info.md)
27 | 1. [Analog Digitization Tips](Resources/Documentation/analog_digitization.md)
28 | 1. [Help and Troubleshooting](Resources/Documentation/troubleshooting.md)
29 | 1. [Testing Your Equipment](Resources/Documentation/troubleshooting.md#testing-your-equipment)
30 | 1. [Known Issues](Resources/Documentation/troubleshooting.md#known-issues)
31 | 1. [Timing of Recording](Resources/Documentation/troubleshooting.md#timing-of-recording)
32 | 1. [FFmpeg Error Message](Resources/Documentation/troubleshooting.md#ffmpeg-error-message)
33 | 1. [Common Questions](Resources/Documentation/troubleshooting.md#common-questions)
34 | 1. [Other Issues](Resources/Documentation/troubleshooting.md#other-issues)
35 |
36 | ---
37 |
38 | ## Summary
39 |
40 | Vrecord is open-source software for capturing a video signal and turning it into a digital file. Its purpose is to make videotape digitization or transfer easier. Vrecord can capture analog and digital signals through a variety of inputs and can create digital video files in a variety of formats and codecs. Vrecord has been designed with needs of audiovisual archivists in mind.
41 |
42 | Vrecord uses AMIA Open Source’s [ffmpegdecklink](https://github.com/amiaopensource/homebrew-amiaos/blob/master/ffmpegdecklink.rb) to do its dirty work. Other dependencies are: cowsay, [decklinksdk](https://github.com/amiaopensource/homebrew-amiaos/blob/master/decklinksdk.rb), [gtkdialog](https://github.com/amiaopensource/homebrew-amiaos/blob/master/gtkdialog.rb), freetype, sdl and xmlstarlet. Optional dependencies are: deckcontrol, gnuplot, mediaconch, mkvtoolnix, mpv and qcli.
43 |
44 | Currently vrecord supports macOS or Linux, and Blackmagic Design capture cards with the Blackmagic driver installed or
45 | AVFoundation for DV capture on macOS. Some notes on [needed hardware](Resources/Documentation/hardware.md) are provided.
46 |
47 | If you want to see a more detailed description about how to digitize analog videotape see our document on [analog digitization](Resources/Documentation/analog_digitization.md).
48 |
49 |
50 | ## Contributing
51 |
52 | We want vrecord to be a helpful tool for audiovisual archivists and others. Anyone can contribute to vrecord! If you experience any problems with vrecord you can open a new issue with our GitHub [issue tracker](https://github.com/amiaopensource/vrecord/issues). Try to see if you can replicate the issue yourself first and describe in detail what factors led to it. Please let us know if you were able to successfully replicate the issue.
53 |
54 | For more tips on using GitHub and contributing directly to vrecord, please see our [Contribution Guide](CONTRIBUTING.md), but feel free to contribute to vrecord by creating a fork and sending pull requests.
55 |
56 | Enjoy!
57 |
58 | The vrecord Team
59 |
60 | ## License
61 |
62 | Vrecord is licensed under a Creative Commons Attribution 4.0 International License.
63 |
64 | ## Maintainers
65 | The vrecord maintainers are:
66 |
67 | Dave Rice (@dericed)
68 |
69 | Ben Turkus (@bturkus)
70 |
71 | Annie Schwiekert (@aeschweik)
72 |
73 | Andrew Weaver (@privatezero)
74 |
--------------------------------------------------------------------------------
/Resources/Documentation/analog_digitization.md:
--------------------------------------------------------------------------------
1 | # Digitizing Analog Videotapes with vrecord
2 |
3 | ## Digitizing Betacam Tapes
4 |
5 | There are several steps to digitizing a Betacam tape. This procedure assumes you already have vrecord and a Blackmagic capture card installed.
6 |
7 | 1. Route the video signal from the Betacam deck to the Blackmagic capture card for the computer that you plan to use.
8 | 2. Start by testing the signal to make sure that everything is routed properly. Play the tape in the deck. Run `vecord -p` and watch the vrecord window to make sure the video signal from the tape is coming through. If it's not coming through, there may be some issues with your settings or how the signal is routed. See the "Troubleshooting" section below.
9 | 3. If color bars exist on the tape, set the tape to the bars. Otherwise, you will have to adjust the levels by eye as well as using the vectorscope and waveform monitor.
10 |
11 | ### How to Set Up the Equipment to Color Bars on a Tape
12 |
13 | First, play the tape with the color bars. Now take a look at your waveform monitor to examine the signal. At CUNY TV you will need to route the signal to a monitor called QC-ING32. This monitor is connected to the combination waveform monitor, vectorscope, and audio monitor.
14 |
15 | **Using the Waveform Monitor**
16 |
17 | The waveform monitor is generally used to measure the luminance (brightness) levels of the signal. SMPTE color bars should look like this on a waveform monitor, similar to a staircase:
18 |
19 | 
20 |
21 | The color bars in the picture above are set up properly. Start by setting up the black level in the waveform monitor. The black level could also be called "Set up" or "Black" depending on your model of the time base corrector (TBC) or processing amplifier (proc amp). Adjust this dial until the second lowest line in the color bars (the black level), which runs along the bottom of the staircase is set to 7.5 IRE on the waveform monitor. This is usually represented by a dashed line near the bottom of the monitor. The black line should intersect the dashed 7.5 IRE line.
22 |
23 | Now set the luminance level so that the highest plateau of your bars reaches the 100 IRE mark on the waveform monitor. The luminance level could be represented on a TBC or proc amp by a dial labeled "Luma" or "Video" again, depending on your model of TBC or Proc Amp.
24 |
25 | Your black and luma levels should now be correctly set up.
26 |
27 | **Using the Vectorscope**
28 |
29 | The vectorscope is used to measure the chrominance (color) levels of the video signal. Correctly adjusted color bars should look like this in the vectorscope:
30 | 
31 |
32 | The vectorscope has a few square target boxes. Inside of the larger box is a smaller box with a crosshair inside of it. These boxes represent standard values for primary and secondary colors (R stands for "red," B stands for "blue," Y stands for "yellow" and so on). Ideally the points where lines intersect on the vectorscope should hit all of those targets.
33 |
34 | Start by adjusting the hue or phase. There should be one line that is on the left half of the vectorscope that is shorter than the others. This is the color reference signal. **Adjust the hue by turning the knob so that the color reference line is at 0 degrees on the vectorscope (or 9 o'clock).** This should move the other lines closer to their targets. If there is no color reference signal, adjust the hue dial so that the yellow dot is in line with its target.
35 |
36 | Now adjust the chroma which could also be labelled "color." If the dots are past their targets, reduce the chroma. If the dots are closer to the center than the target, increase the chroma. **Try to get all of the points as close to the middle of the crosshairs as possible.** Sometimes it is not possible to get all of the colors exactly inside of their respective crosshairs. If so, try to line up the yellow point with its target as closely as possible and let the other colors fall where they may.
37 |
38 | 4. You may have to rewind and replay the tape several times in order to set up the bars properly especially if the bars are onscreen for a short time. Be aware that sometimes the color bar signal can shift on a tape. Check for excessive jumping of the levels on the vectorscope or waveform monitor. Try to find the most consistent bars and line them up as best you can.
39 | 5. Be aware that the bars on a tape may not accurately represent the actual levels of the content. After you have successfully set up the bars fast forward and play some of the content. Make sure that large areas of the image are not falling outside of the broadcast range. You can see this in the vrecord window by seeing how much of the image on the right is yellow. If a significant portion of the image is yellow, the bars may not incorrect. You may need to ignore the bars and adjust the tape to the content. See the section below on setting up a tape without color bars.
40 |
41 | ### Setting up the Tape Without Color Bars
42 |
43 | Sometimes tapes you are digitizing do not include color bars at the beginning. If this is the case, and you have a test tape with color bars on hand, first set up your time base corrector (TBC) or processing amplifier (proc amp) to the color bars on a test tape. If you do not have a test tape, move on to the next step.
44 |
45 | Fast forward to some of the content, ideally a shot that has both pure white and black in it. Check the waveform monitor to make sure that both the white and black levels are within "broadcast range" (pure black in the image should be just above 7.5 IRE and pure white should be just below 100 IRE).
46 |
47 | If you can find a close up shot of person use this in combination with the vectorscope to try to set up hue and chroma. First, make sure that the chroma is within broadcast range. In other words, the lines in the vectorscope should not be going past the color target boxes. If they are, reduce the chroma. In general, the color of all human skin tones should fall on the line between the red and yellow target boxes (about 10:30–11 o'clock) on the vectorscope. Some people call this the "skin tone line." Adjust the hue until the levels in the vectorscope are centered around this line.
48 |
49 | You may want to fast forward to a few sections of the content to make sure that the adjustments you made are good for the entire tape. Sometimes shots and segments may be inconsistent. Sometimes you will need to compromise on the levels; one shot may need to be slightly out of broadcast range so that another shot is ok.
50 |
51 | ### Setting the Audio Levels
52 |
53 | You will need to watch an audio monitor to see the levels for the left and right audio channels. The test tone that accompanies the color bars on a tape should be set to hit either the -20 db or -12db mark depending on the tone. Now, fast forward the tape so that you can watch some of the content. If the content has stereo audio make sure the volume levels of the left and right channels are equal. You may need to raise or lower the left or right audio level to make both sides even. Make sure the audio levels are not peaking too high.
54 |
55 | Also note whether audio is coming in on both channels or just one channel. This will determine the vrecord settings that you will use later.
56 |
57 | **Now your tape is set up properly and you are ready to actually digitize.**
58 |
59 | ### Digitizing the Tape
60 |
61 | Run `vrecord -e` and check the window that pops up to make sure your settings are correct. We use the following settings for digitizing Betacam tapes at CUNY-TV:
62 |
63 | **Video input** — SDI
64 |
65 | **Audio input** — SDI embedded audio
66 |
67 | **Bit depth** — 10 bit
68 |
69 | **File format** — QuickTime
70 |
71 | **Codec for video** — FFV1 version 3
72 |
73 | **Audio channel mapping** — The channel mappings can vary from tape to tape. For a Betacam tape that has audio coming in through both tracks use the "2 Stereo Tracks" setting. If the tape only has audio coming in through one side you will have to use the Channel 1 or Channel 2 mono mappings depending on which channel you determine is carrying the audio.
74 |
75 | **Standard** — NTSC
76 |
77 | **Recording Time** — For a 30 minute tape set the recording time to 33. For a 60 minute tape set the recording time to 63. Usually tapes have the number 30 or 60 on them somewhere so you can figure out which kind of tape you have.
78 |
79 | As the color bars play, monitor your waveform, vectorscope, and audio levels. Make sure that all of the levels are still correct. If any of the levels are not correct, you will have to stop the recording (by closing the vrecord window), rewind the tape back to the beginning of the bars and then set them up again using passthrough mode. When they are properly set up, try recording again.
80 |
81 | ## Digitizing U-matic Tapes
82 | Before playing the tape it's a good idea to inspect it to make sure that it does not already have sticky shed syndrome.
83 |
84 | CUNY-TV uses the following settings for U-matic tapes:
85 |
86 | **Video input** — SDI
87 |
88 | **Audio input** — SDI embedded audio
89 |
90 | **Bit depth** — 10 bit
91 |
92 | **File format** — QuickTime
93 |
94 | **Codec for video** — FFV1 version 3
95 |
96 | **Audio channel mapping** — 1 stereo track is generally used unless audio is only coming in through one channel. If so, you will have to use the Channel 1 or Channel 2 mono options.
97 |
98 | **Standard** — NTSC
99 |
100 | **Recording Time** — For a 30 minute tape set the recording time to 33. For a 60 minute tape set the recording time to 63. Usually tapes have the number 30 or 60 on them somewhere so you can figure out which kind of tape you have.
101 |
102 | ## Checking the Files
103 |
104 | Check the terminal window for an error messages from vrecord. You may see a cow issuing a warning about your video file. If you get a cow warning you should examine the video file carefully to determine if there are any errors.
105 | You may also see a warning that says "packet too small." You can safely ignore this, it's just ffmpeg complaining that it didn't receive a full frame of video when vrecord stopped.
106 |
107 | Next, check to make sure vrecord produced the correct files. These are:
108 |
109 | 1. The video file itself
110 | 1. Bmdcapture log (filename\_bmdcapture.log)
111 | 1. FFmpeg log (filename\_ffmpeg\_date\_time.log)
112 | 1. FFplay log (filename\_ffplay\_date\_time.log)
113 | 1. Frame MD5 file (filename.framemd5) if you chose to record frame MD5s, which you should do
114 | 1. A capture options log (filename\_capture\_options.log)
115 | 1. A QCTools XML file, if you chose to create it (filename.qctools.xml.gz)
116 | 1. An image file of QC graphs (filename\_QC\_output\_graphs.jpeg) if you chose to create the QCTools XML file
117 |
118 | Scroll through the video file to make sure it is complete; in other words, you've captured the entire tape. If all these files exist and the video file looks complete you can move on to further QC.
119 |
120 | ### QC Graphs
121 | Vrecord can now create an image that contains seven graphs of the data collected during the QCTools analysis. These graphs include the min/max audio levels, the peak audio levels the audio phase, the percentage outside of broadcast range, percentage of temporal outliers, the saturation levels (avg and max), and the structural similarity metric (Y,U,V). These characteristics are plotted and colored to highlight values that fall outside acceptable ranges. This feature was introduced to help with the rapid assessment of a recording immediately after it has been generated. The characteristics selected and the highlighted values are intended to clearly illustrate the general success or failure of a recording without the need for additional QC. For example, if a recording is far too loud or the blacks are too dark, that will be immediately apparent and the recording can be redone without having to be extensively reviewed.
122 |
123 | Version 2 introduces the following updates:
124 |
125 | 1. The version number is now included into the Graph’s title
126 | 1. The color range for the plot of %Outside of Broadcast Range was widened from 0-3% to 0-5%. The new range defines 0 as green, 2% as yellow, and 5% as red
127 | 1. The label of for each plot has been moved to the top center of each plot and displayed over the plotted data
128 | 1. Minor changes have been made to fonts, size, and position of scales and keys
129 |
130 | **Example of QC Graphs Version 2**
131 |
132 |
133 |
--------------------------------------------------------------------------------
/Resources/Documentation/audio_info.md:
--------------------------------------------------------------------------------
1 | # Audio Capture
2 |
3 | ## Audio Settings
4 |
5 | 1. To select the audio input you would like to use, go into the configuration mode either by:
6 | - run `vrecord -e`
7 | - clicking on the "Edit Settings" button in the GUI (run `vrecord`)
8 |
9 | 1. Switch from the "Decklink" tab to the "AUDIO" tab under "Input Options" at the top of the configuration window.
10 |
11 | 
12 |
13 | 1. Select the name of the Audio device you want to use from the list.
14 |
15 | 1. Select desired capture settings. __IMPORTANT NOTE:__ These settings will behave slightly differently depending on what system you are on and/or your device.
16 |
17 | * macOS: These settings all relate to the __OUTPUT__ file and do not control the capture settings of your device. It is necessary to set the desired capture sample rate and bit depth either via your device's dedicated software, or through the [Audio MIDI Setup](https://support.apple.com/guide/audio-midi-setup/set-up-audio-devices-ams59f301fda/mac) configuration panel.
18 | * Linux: The sample rate selected in this window will be passed to your device and is both the input sample rate for controlling the device as well as applied to the output file. The bit depth selected here will be used for the output file, with vrecord's input defaulting to PCM signed 32-bit little-endian audio (subject to limitations of your device).
19 | * Blackmagic device: Using a Blackmagic device will always lock output (and input) to 48kHz. Desired bit depth of output file can still be specified.
20 |
21 | 1. Specify the playback, sidecar, file naming, recording event and directory options as you normally would for vrecord. For details see [Editing Settings](Resources/Documentation/settings.md)
22 |
23 | 1. Click "OK" to save.
--------------------------------------------------------------------------------
/Resources/Documentation/dv_info.md:
--------------------------------------------------------------------------------
1 | # DV Capture
2 |
3 | To capture DV formats (DV, DVCAM, MiniDV, DVCPRO and Digital8) in vrecord, you will need to have your DV deck connected directly to your computer via FireWire input. Make sure your deck is turned on and in “Remote” mode. Additional settings for your DV device may apply to ensure a successful connection. To view manuals and settings notes for specific decks, players and camcorders, please see the DVRescue Deck Guide. You may also need to adjust your privacy settings and allow each DV device to connect prior to use with vrecord.
4 |
5 | > **_NOTE:_** vrecord uses the DVRescue toolkit to facilitate dvcapture. HDV tapes are not in the current scope of this project and cannot be captured using DVRescue or vrecord.
6 | >
7 | > On Linux systems Vrecord can also use FFmpeg for DV capture in the event that DVRescue is not available/installed. To do this select 'FFmpeg iec61883 Default' from the list of DV devices in the GUI. Vrecord will then capture from the first detected DV device using FFmpeg instead of DVRescue.
8 |
9 | ## DV Settings
10 |
11 | 1. Open vrecord's configuration mode via one of the following options:
12 | - run `vrecord -e` to open the settings menu in the GUI.
13 | - run `vrecord` and click on the "Edit Settings" button in the GUI.
14 |
15 | 2. Select the "DV" tab under "Input Options" at the top of the configuration window. All of the devices you have connected via FireWire will be listed under the "DVRescue input options" at the top of the window.
16 |
17 | 
18 |
19 | > **_TIP:_** If no devices are listed, click the "Rescan" button below the list. If this doesn't produce any results, make sure your device is connected and turned on. For additional troubleshooting related to device connectivity, please see the Troubleshooting page on the DVRescue documentation website.
20 |
21 | 3. Select the name of the DV device you want to use from the "Select a DV Device" list. The names correspond with the make and model of the connected decks, as well as a unique device identifier.
22 | > **_TIP:_** If you have two decks of the same make and model connected, you will need to determine the corresponding identifier for each (the number listed before the make and model of each deck). To determine the device identifier numbers for two or more decks of the same make and model:
23 | > - Turn the decks off except one.
24 | > - Check the name of the device still listed in the vrecord GUI.
25 | > - Note the device identifier number displayed.
26 | > - Repeat this for all decks of the same make and model.
27 | > 
28 |
29 |
30 | 4. Specify the playback, sidecar, file naming, recording event and directory options as you normally would for vrecord. For details see [Editing Settings](Resources/Documentation/settings.md).
31 |
32 | 5. Click "Save Settings" to save.
33 |
34 | 6. You can then use the passthrough and record modes the same as you would with analog videotape in the "Decklink" tab. Make sure you have a tape inserted before attempting playback or recording. Please see the corresponding sections below for instructions on how to facilitate playback and recording DV tapes.
35 |
36 | 7. When using the GUI, environment parameters can be adjusted in the Config tab..
37 |
38 | 
39 |
40 |
41 |
42 | ## Playback
43 |
44 | 
45 |
46 | 1. Select the name of the DV device you want to use from the "Select a DV Device" list. If you have two decks of the same make and model connected, please see the "DV Settings" section for steps to determine the device identifier for each one.
47 |
48 | 2. Click the "Deck Control" button to allow vrecord to control your device. The status should switch to display "stopped" in the status field (the status will say "disabled" if "Deck Control" is not selected).
49 |
50 | 3. Use the corresponding buttons to fast forward, rewind, play and stop the tape. These buttons will not respond if "Deck Control" is disabled. The status of the deck (i.e. stopped, rewinding, play, etc.) will be displayed in the "Status" field based on what the deck is currently doing.
51 |
52 | 4. Click the "Repack" to repack your tape (fast forward the tape all the way and then rewind it). This button will not respond if "Deck Control" is disabled. The status of the deck (i.e. rewinding or fast forwarding) will be displayed in the "Status" field as the tape is repacked.
53 |
54 | 5. To preview the tape, click on the "Playback" button in the bottom right of the "Settings" window. The settings menu will close and the Terminal window will display the settings you have entered.
55 |
56 | 6. A window will open displaying the playback of the tape. It may take ~20 seconds for the deck to respond and begin playing.
57 | > **_NOTE:_** If the timecode does not start at the very beginning of the tape, the playback window will not open until the timecode is detected. As soon as the counter starts moving on your deck and in the Terminal window, the viewer window should pop-up and begin playback. 
58 |
59 | 7. To end playback, close the playback window or hit the "esc" key.
60 |
61 |
62 | ## Recording
63 |
64 |
65 |
66 | 1. Select the name of the DV device you want to use from the "Select a DV Device" list.
67 |
68 | 2. Click the "deck control" button to allow vrecord to control your device.
69 |
70 | 3. To record, select the recording directory (location where you want to save the file) and enter the recording name, name of the person digitizing this tape, recording time in minutes (if applicable) and any other options you would like applied to your file.
71 |
72 | 4. Click the "Record" button. The settings menu will close and the Terminal window will display the settings you have entered.
73 |
74 | 5. When you are ready hit the "Return" button to begin the recording.
75 |
76 | 6. A window will open displaying the playback of the tape once dvrescue starts the recording.
77 | > **_NOTE:_** If the timecode does not start at the very beginning of the tape, the record mode viewer will not open until the timecode is detected (as soon as the counter starts moving on your deck, the viewer window should pop-up). Please see the "Playback" section for an example.
78 |
79 | 7. When dvrescue encounters an error, the software will automatically rewind and attempt to recapture the problematic frames.
80 |
81 | 8. To begin another capture on a separate deck, open a new Terminal window and run `vrecord -e`.
82 | - Select a different device from the list in the "DV" tab.
83 | - Repeat steps 2-7 listed above.
84 |
85 | 9. Typically, vrecord will end the capture once the recording ends. If you entered a duration for the capture in "Settings," vrecord will end the capture when it reaches that duration. To end the capture manually, close the playback window or hit the "esc" key.
86 |
87 | 10. The Terminal window will display how the frames were merged for any moments when dvrescue reattempted to recapture problematic frames and how many frames remain with errors in the final recording.
88 |
89 | 11. Close the Terminal window.
90 |
91 | 12. Depending on the settings you selected, a set of logs and the video file should all be saved at the location you selected in the settings.
92 |
93 | 
94 |
95 |
96 | 13. Review your files and logs to ensure they were captured correctly.
97 |
98 |
99 | ## Bitstream Error Concealment
100 | If vrecord detects that the DV device is concealing bitstream errors, this will be noted in the Terminal.
101 | 
102 |
103 |
104 | ## Known Issues
105 |
106 | ### Deck control does not work/tape does not automatically start on playback/capture
107 | On some systems/players automated control of the DV Deck will not function as intended. In this case, the deck can be put into 'local' mode and playback manually controlled for capture in the same way as an analog tape.
108 |
109 | ### vrecord Permissions Error
110 | If you receive the following error while capturing via vrecord using macOS 10.14.6:
111 |
112 | 
113 |
114 | The key part here is “this app is not authorized to use DV-VCR” (the name of the deck noted in the error will reflect the one you selected from the list in the vrecord “Edit Settings” menu). You will need to change the OS camera permissions by following these steps:
115 | - Ensure you are logged into your computer as the Administrator.
116 | - Open "System Preferences."
117 | - Click on "Security and Privacy."
118 | - Select the "Privacy" tab.
119 | - Select "Camera" from the list on the left hand side of the window.
120 | - To make changes to the settings, you will need to unlock the lock located in the bottom left hand corner of the window, by clicking on the lock and entering your password when prompted.
121 | - If not already included, add the Terminal to the list, by clicking on the `+` button and selecting it from from the applications list.
122 | - If the Camera menu does not have the `+/-` you can add the Terminal to the "Full Disk Access" list instead.
123 | - Reboot your Mac for the changes to take effect.
124 |
--------------------------------------------------------------------------------
/Resources/Documentation/hardware.md:
--------------------------------------------------------------------------------
1 | # Needed Hardware
2 |
3 | - a computer running a recent version of macOS or [select linux](https://github.com/amiaopensource/vrecord/blob/main/Resources/Documentation/linux_installation.md) distributions
4 | - a Blackmagic capture device:
5 |
6 | - [UltraStudio](https://www.blackmagicdesign.com/products/ultrastudiothunderbolt)
7 | - [DeckLink](https://www.blackmagicdesign.com/products/decklink), except for the DeckLink 4K Extreme card (see https://github.com/amiaopensource/vrecord/issues/209#issuecomment-360862657)
8 | - [Intensity Pro 4K](https://www.blackmagicdesign.com/products/intensitypro4k)
9 | - [Teranex](https://www.blackmagicdesign.com/products/teranex)
10 |
11 | Please note that Blackmagic Mini Converters are not recommended, as they clip the video signal at broadcast levels.
12 |
13 | - the necessary [cables](https://amiaopensource.github.io/cable-bible/) for connecting the video desk to the card and to the computer
14 |
--------------------------------------------------------------------------------
/Resources/Documentation/installation_and_setup.md:
--------------------------------------------------------------------------------
1 | ## Installing vrecord
2 |
3 | ### macOS
4 |
5 | If you use macOS, you can easily install vrecord using a package manager called Homebrew. To install Homebrew, follow [these instructions](https://brew.sh/).
6 |
7 | To install vrecord, run the following two commands in a [Terminal window](https://en.wikipedia.org/wiki/Terminal_%28macOS%29):
8 | ```
9 | brew tap amiaopensource/amiaos
10 | brew install vrecord
11 | ```
12 | (The first taps the homebrew recipes of the amiaopensource account; the second installs vrecord and the other programs that it requires.)
13 |
14 | Once vrecord has been successfully installed, you can update it to the latest release by first running:
15 | ```
16 | brew update
17 | ```
18 | (This updates all of your Homebrew recipes to the latest versions.)
19 |
20 | Then running:
21 | ```
22 | brew upgrade vrecord
23 | ```
24 | (This downloads the latest release of vrecord and the latest releases of any other packages it depends on.)
25 |
26 | Alternatively, you can run:
27 | ```
28 | brew upgrade
29 | ```
30 | (This command will upgrade all of the programs you've installed through Homebrew.)
31 |
32 | #### Mac installation troubleshooting
33 | Workarounds for some issues users have reported while installing vrecord can be found at the [AMIA Open Source Homebrew troubleshooting](https://github.com/amiaopensource/homebrew-amiaos/blob/master/TROUBLESHOOTING.md#vrecord) page. If you are experiencing issues with installing vrecord check this page to see if the error you are experiencing has been addressed.
34 |
35 |
36 | ### Linux
37 |
38 | Vrecord can also be installed on select Linux distributions, also via [Homebrew](https://docs.brew.sh/Homebrew-on-Linux), and the AMIA-OS Homebrew tap reachable with:
39 |
40 | ```
41 | brew tap amiaopensource/amiaos
42 | ```
43 |
44 | Detailed instructions for installation can be found in the [Linux installation](./linux_installation.md) document.
45 |
46 | ## Using vrecord
47 |
48 | ### Setting up vrecord for the First Time
49 |
50 | In macOS, open System Preferences and click on the icon for Blackmagic Design. If you do not see this icon in System Preferences you may not have installed the Blackmagic driver.
51 |
52 | Open up the Blackmagic Design preferences and click on the "Settings" tab. Select your input and output from the dropdown menu depending on what cables you have connected to the capture device.
53 |
54 | Once your capture device is set up you can start vrecord by simply opening up a [Terminal window](https://en.wikipedia.org/wiki/Terminal_%28macOS%29) and typing
55 | ```
56 | vrecord
57 | ```
58 | The first time you use vrecord you will be asked to make some initial choices about how you want to capture. Any decisions you make will be saved in a configuration file. But don't worry, you will be able to alter these decisions later.
59 | Vrecord will ask you for video and audio inputs. These should agree with your settings for the Blackmagic capture device. Vrecord's other settings can be tailored to your liking. See the section on [Options for Video Capture](settings.md#options-for-video-capture) which explains all of the settings in detail.
60 |
61 | ### Basic Usage
62 |
63 | For those who want the simplest possible explanation on how to use vrecord:
64 |
65 | 1. Run `vrecord -p`.
66 | 1. Choose the appropriate options when prompted.
67 | 1. Play your tape in the connected VTR and set up to color bars and audio on the tape (if possible).
68 | 1. Close the vrecord window to end passthrough mode.
69 | 1. Now run `vrecord -e` and make sure all options are correct in vrecord's GUI window.
70 | 1. Type in a unique identifier for your video file when prompted.
71 | 1. Press "enter" to start recording.
72 | 1. Let 'er rip! Play your tape!
73 | 1. Let vrecord do its thing. Don't type any keys while the vrecord window is open, do not click the mouse inside the vrecord window, and do not start another instance of vrecord on the same computer. In fact it's best not to open or use any other programs on the computer that is capturing. Overtaxing the computer could cause errors in the capture.
74 | 1. If you are finished recording and the vrecord window hasn't already closed, close the window.
75 | 1. Check the Terminal window for any error messages. Hopefully you don't see any cows. (See [Ending a Capture](#ending-a-capture) below for more details)
76 | 1. Check to make sure that your video and metadata files were successfully created.
77 | 1. Repeat steps 1–12 as needed.
78 |
79 | ### Ending a Capture
80 |
81 | If you are finished recording and the player window hasn't already closed, close the window. You can also press `q` or `esc` while the player window is active.
82 |
83 | After the transfer is finished, vrecord will automatically check for the following transfer errors:
84 |
85 | * Presentation timestamp discontinuities in the frame MD5s (if they were created), or missing frames in the FFmpeg log (if frame MD5s were not created).
86 | * Error message: "WARNING: There were presentation timestamp discontinuities found in the framemd5s. This error may indicate frames dropped by FFmpeg or vrecord. The file may have sync issues." The message may give the frame numbers that are missing. Check the file immediately at these points and throughout the video to make sure there are no sync issues.
87 | * These errors are caused by digital encoding/decoding issues that lead to missing information.
88 | * Frames dropped because of a disconnected signal.
89 | * Error message: "WARNING: FFmpeg Decklink input reported dropped frames in the following ## locations. This error may indicate an interrupted signal between hardware components. The file may be missing content." The message will give the timestamps where content may be missing. Check the file at these points and throughout the video to make sure it is complete.
90 | * These errors are caused when no signal reaches the computer, and could be caused by a disconnect (e.g. unplugged cable) between the video deck and Blackmagic hardware, or Blackmagic and computer.
91 | * File conformity to codec standards.
92 | * If the video codec is Uncompressed Video or FFV1, vrecord will validate file against a vrecord MediaConch policy to ensure the file conforms to those standards. Conformance to these standards is important for long-term digital preservation.
93 | * If the file doesn't conform to these policies, it is probably because of a bug in vrecord itself or the tools it relies on. Please let us know if this happens by filing an issue in our GitHub [issue tracker](https://github.com/amiaopensource/vrecord/issues)!
94 |
95 | Check the Terminal window for any error messages. If you get these messages, the tape may need to be redigitized in order to ensure all information is encoded.
96 |
97 | If you [chose](settings.md#options-for-video-capture) to generate a QCTools file or embed logs from digitization, vrecord will start those processes as well.
98 |
--------------------------------------------------------------------------------
/Resources/Documentation/linux_installation.md:
--------------------------------------------------------------------------------
1 | # Steps for a successful install of Vrecord on Linux
2 |
3 | ## About
4 | There are many possible ways to install the various dependencies of Vrecord on Linux. The main body of this documentation is oriented towards installing on Ubuntu LTS. For Some information about installing on additional distributions see the section at the bottom of this document.
5 |
6 | ## via Homebrew
7 | The following instructions aim to minimize use of Homebrew installs for packages that can otherwise be installed via native Linux methods. When followed in order, these commands should result in a fully functional install of vrecord.
8 |
9 | ### Programs to be installed manually
10 |
11 | * Download and install the latest Linux version of 'Blackmagic Desktop Video' from the [Blackmagic website](https://www.blackmagicdesign.com/support/)
12 | * Download and install the latest version of the [QCTools CLI tool](https://mediaarea.net/QCTools/Download/Ubuntu) from the MediaArea website
13 | * Optional: If DV wrapping and splitting is desired, download and install [DVRescue](https://mediaarea.net/DVRescue) from the MediaArea website.
14 |
15 | ### Programs to be installed via PPA
16 |
17 | * Install MPV with the following steps:
18 | - Add the MPV PPA with: `sudo add-apt-repository ppa:mc3man/mpv-tests`
19 | - Update package manager with: `sudo apt-get update`
20 | - Install MPV with `sudo apt-get install mpv`
21 |
22 | ### Programs to be installed via standard package manager
23 |
24 | * Use the following commands to install additional dependencies for full vrecord use:
25 | - `sudo apt-get install curl`
26 | - `sudo apt-get install gnuplot`
27 | - `sudo apt-get install xmlstarlet`
28 | - `sudo apt-get install mkvtoolnix`
29 | - `sudo apt-get install mediaconch`
30 | * Install the following dependencies for enabling DV capture in vrecord's FFmpeg build:
31 | - `sudo apt-get install libiec61883-dev`
32 | - `sudo apt-get install libraw1394-dev`
33 | - `sudo apt-get install libavc1394-dev`
34 | - `sudo apt-get install libavc1394-tools`
35 | * If `make` and `gcc` are not already installed, install them with
36 | - `sudo apt-get install gcc`
37 | - `sudo apt-get install make`
38 | * Installing a standard version of FFmpeg is highly recommended as a fallback in case of issues with the Homebrew controlled build:
39 | - `sudo apt-get install ffmpeg`
40 |
41 | ### Install Homebrew
42 | * Use the following commands, (sourced from the [Homebrew docs](https://docs.brew.sh/Homebrew-on-Linux)) to install and configure Homebrew on Linux:
43 | - Install Homebrew with: `/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"`
44 | - Add linuxbrew to path with:
45 | ~~~
46 | test -d ~/.linuxbrew && eval $(~/.linuxbrew/bin/brew shellenv)
47 |
48 | test -d /home/linuxbrew/.linuxbrew && eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv)
49 |
50 | test -r ~/.bash_profile && echo "eval \$($(brew --prefix)/bin/brew shellenv)" >> ~/.bashrc
51 | ~~~
52 |
53 | - Alternately some issues (such as the sdl2 conflict) have been avoided by adding Linuxbrew lower down in the path order than the Linuxbrew instructions call for (Such as by editing `/etc/environment` to include `/home/linuxbrew/.linuxbrew/bin` after the other $PATH directories.) Your mileage may vary!
54 | * Add the AMIA Open Source tap for Homebrew:
55 | - `brew tap amiaopensource/amiaos`
56 |
57 | ### Install additional vrecord dependencies via Brew
58 | * `brew install decklinksdk && brew install ffmpegdecklink --with-iec61883 && brew install gtkdialog` _Note:_ Some users on Ubuntu have reported installation problems with `gtkdialog` at step. See [this note](https://github.com/amiaopensource/homebrew-amiaos/blob/master/TROUBLESHOOTING.md#vrecord) at the AMIA Open Source Homebrew repository for a possible fix.
59 | * `brew install vrecord`
60 |
61 | ### Fix conflicting SDL2 dependencies
62 | * `brew uninstall --ignore-dependencies sdl2`
63 | * `sudo apt install libsdl2-dev`
64 | * This step may not be required if Brew has been configured lower in $PATH than standard system directories.
65 |
66 | # Instructions/Tips for other Linux Distributions
67 | ## Linux Mint
68 | Installation on Linux Mint (20.1) it was necessary to run `apt install libc6-dev texinfo` for additional dependencies.
69 | ## via RPM (tested on CentOS 7/8 and Fedora 31)
70 | This method is maintained by [Jonáš Svatoš](mailto:jonas.svatos@nfa.cz) at [Národní filmový archiv](https://github.com/NFAcz)
71 | and contains patches which modify Vrecord source to bypass some hardcoded Homebrew-specific variables. It also adds a nice menu entry.
72 |
73 | ### Install RPM from COPR repository
74 | Follow the instructions on https://copr.fedorainfracloud.org/coprs/lsde/vrecord/
75 |
76 | ### Build the RPM yourself
77 | ```
78 | $ git clone https://github.com/NFAcz/vrecord-rpm.git
79 | $ spectool -g -R vrecord.spec
80 | $ cp *.patch ~/rpmbuild/SOURCES/
81 | $ rpmbuild -bb vrecord.spec
82 | ```
83 |
--------------------------------------------------------------------------------
/Resources/Documentation/passthrough.md:
--------------------------------------------------------------------------------
1 | ## Passthrough Mode
2 |
3 | Passthrough mode means that the vrecord window will appear with video feeds and scopes, but the incoming video signal will not be recorded to a file. Passthrough mode is best used for tasks like testing equipment or setting up a tape to bars before actually recording. When you are finished using passthrough mode, simply close the vrecord window.
4 |
5 | Run passthrough mode by typing:
6 | ```
7 | vrecord -p
8 | ```
9 | If you haven't already set up vrecord it will prompt you to make some selections related to your audio and video inputs. Otherwise the vrecord window will open up and start displaying any video signal coming through from the capture device.
10 |
11 | ## Audio Passthrough Mode
12 |
13 | Audio passthrough mode is a quick way to check audio characteristics of an input without needing to modify any settings in your configuration file - it will automatically open a passthrough window in 'Audio + Video' mode.
14 |
15 | Note: If in audio capture mode there is no difference between the standard preview window and audio passthrough.
16 |
17 | Run audio passthrough mode by typing:
18 | ```
19 | vrecord -a
20 | ```
21 |
--------------------------------------------------------------------------------
/Resources/Documentation/settings.md:
--------------------------------------------------------------------------------
1 | ## Edit Mode
2 |
3 | Running vrecord in edit mode opens a GUI window that allows you to change your recording options and then start digitizing a tape.
4 |
5 | Run edit mode by typing:
6 | ```
7 | vrecord -e
8 | ```
9 | 
10 |
11 | After selecting all of your options and clicking "OK," you will be prompted to enter a unique ID for the file. After the ID is entered, the incoming video signal will be recorded to a file with some associated metadata files. When you are finished recording, you can close the vrecord window. If you've set a time limit for capture, the vrecord window will automatically close when the time limit has been reached.
12 |
13 | By default, vrecord will create a video file, a framemd5 file (which creates an MD5 hash value [AKA a checksum] for every frame of video), an ffmpeg log, and a capture options log (which records the options that you selected in the GUI like codec and video bit depth). Vrecord will check all FFV1 and uncompressed video files in QuickTime or Matroska wrappers against local [MediaConch](https://mediaarea.net/MediaConch/about.html) policies, and will alert the user if the file does not conform to vrecord and archival standards. Vrecord can also create a [QCTools](https://github.com/bavc/qctools) XML file, which measures characteristics of the video signal, and a PNG file, which provides an easy-to-assess, overarching view of the video signal across time. The QCTools XML can be imported into QCTools for further analysis.
14 |
15 | ## Options for Video Capture
16 |
17 | All of the options in the vrecord GUI (which appears when running `vrecord -e`), or otherwise in terminal prompts, are explained below. If you want to feel like a college freshman, you can choose "Undeclared" for any of the options below. You will be prompted later to make a choice before the software actually begins recording:
18 |
19 | **Select a recording directory** — Choose the location (on an internal or external hard drive) where you want your resulting video files and logs to be saved.
20 |
21 | **Select video input** — Choose how the video signal will be entering the capture device. You can receive the video signal through Composite, SDI, Component, or S-Video cables.
22 |
23 | NOTE: Setting the video input in Desktop Video Setup to match this option will reduce the likelihood of some dropped frames at the beginning of the capture.
24 |
25 | **Select audio input** — Choose how the audio signal will be entering the capture device. You can receive the audio signal through Analog (such as XLR), SDI, or other digital audio cables.
26 |
27 | **Select file format** — Choose the file format that you want the video to be saved in. This is also often called the container.
28 |
29 | **Select codec for video** — Choose how you would like the video signal to be encoded digitally. You can choose from some uncompressed, lossless, and lossy codecs.
30 |
31 | **Select bit depth for video** — Choose the level of bit depth you would like for your video file. Vrecord supports 10 and 8-bit video capture.
32 |
33 | **Select FFV1 slice count** - If you select FFV1 as your video codec, you will be prompted to choose between a number of "slice count" options. An error detection/correction mechanism specific to FFV1, slices allow for each frame of video to be split into sub-sections, which will, in turn, each receive their own CRC checksum value. Keep in mind that the higher the slice count, the larger the resulting file.
34 |
35 | **Select codec for audio** - Choose how you would like the audio signal to be encoded digitally. You can choose between uncompressed or lossless codecs.
36 |
37 | **Select audio channel mapping** — Choose how you want the audio to be captured. Currently vrecord captures audio at 24-bits and can only capture 4 tracks. The options are:
38 | * "2 Stereo Tracks" — For capturing videotape formats that have four tracks which are arranged as stereo pairs.
39 | * "1 Stereo Track (From Channels 1 & 2)" — For capturing videotape formats that have two channels of audio which were recorded as a stereo pair.
40 | * "1 Stereo Track (From Channels 3 & 4)" — Same as above, but creates stereo track from second pair of inputs.
41 | * "Channel 1 -> 1st Track Mono, Channel 2 -> 2nd Track Mono" — For capturing videotapes with audio recorded on Channel 1 only. Vrecord will capture the audio from Channel 1 and create a mono track.
42 | * "Channel 2 -> 1st Mono, Channel 1 -> 2nd Track Mono" — For capturing videotapes with with audio recorded on Channel 2 only. Vrecord will take the audio from Channel 2 and place it in a Channel 1 mono track.
43 |
44 | **Select timecode format** - vrecord now offers limited timecode support by (1) storing a correct first timecode value within your file, and (2) creating a sidecar .txt that will contain the timecode values, continuous or not, for all video frames. If you are uncertain about the type of historical timecode recorded on your tape, the "Scan timecode formats" button located below this drop-down menu will test your tape and provide useful information. The options for timecode include:
45 | * rp188vitc
46 | * rp188vitc2
47 | * rp188ltc
48 | * rp188any
49 | * vitc
50 | * vitc2
51 | * serial
52 |
53 | **Select standard** — Select the television standard of the tape you are digitizing. Currently vrecord only supports NTSC and PAL.
54 |
55 | **Select view (for recording)** — Select the display you want to see as you digitize your tape. See [Video Views](#video-views) below for more details.
56 |
57 | **Select view (for passthrough)** — Select the display you want to see as you preview your tape before capture. See [Video Views](#video-views) below for more details.
58 |
59 | **Create QCTools XML?** — vrecord can create an XML file that contains a measurement of the characteristics of the video signal (such as luminance, color saturation, audio levels, etc.). vrecord can create this file either during capture, or as a post process. The XML will then be compressed using [gzip](https://www.gnu.org/software/gzip/).
60 | * Choosing to create a QCTools XML is highly recommended. These files can be easily imported into QCTools for further analysis and, if you choose this option, vrecord will also (1) analyze the video for potential errors (reporting in your terminal window, post-capture, about the signal's adherence to broadcast range specifications), and (2) use this QCTools data to generate a easy-to-review [image file](https://github.com/amiaopensource/vrecord/blob/master/Resources/Documentation/analog_digitization.md#qc-graphs).
61 |
62 | **Frame MD5s** — You can choose to create an MD5 hash value (AKA a checksum) for each frame of video captured. Frame MD5s are strongly recommended, as some dropped-frame errors will not be caught without the hash values. A separate .md5 file with all the hash values will be created along with the video file. Generally choosing to create frame-level MD5s will not slow down or hinder the capture of your video. To read more about the value of frame-level MD5s see this article: http://dericed.com/papers/reconsidering-the-checksum-for-audiovisual-preservation/
63 |
64 | **Embedding logs** — If you select the Matroska file format, vrecord can embed the logs it generates into the Matroska container. Preservation metadata will then be available to the user both as sidecar logs (the vrecord default) and within the file itself. After logs have been attached, you can extract and read them as follows:
65 | * To show a list of attachments to a video file and their IDs, type: `mkvmerge -i [video filename]`
66 | * To extract attachments with IDs 1 through 4, type: `mkvextract [video filename] attachments 1 2 3 4`
67 | * The logs will then be extracted into the directory you're in, where they can be opened with a text editor.
68 |
69 | **Set recording time** — Set the amount of time (in minutes) that you would like vrecord to capture for, or leave it blank to capture indefinitely. For example, if you are digitizing a tape with a capacity of 30 minutes of video, you might want set vrecord to capture for 33 minutes. After 33 minutes vrecord will automatically stop recording and shut down. You may select a preset length from the dropdown menu, or type a different number. If you enter a number, it should be an integer or decimal in minutes (e.g. `15` will record for 15 minutes, and `15.75` will record for 15 minutes and 45 seconds).
70 |
71 | **Enter the name of the person digitizing this tape** — This field is optional. You can enter the name of the technician digitizing the tape. The name will be written to the capture options log produced at the end of the transfer.
72 |
73 | **Invert Second Channel of Audio** — This option allows you to invert the phase of the second channel of audio on ingest. This option is only for rare cases. Use only if you are positive that the audio channels are 180 degrees out of phase!
74 |
75 | Click "OK" when you are finished with your selections. Vrecord will save all of your selections to a configuration file. If any selections are "Undeclared" vrecord will prompt you in the terminal window to make a choice.
76 |
77 | Vrecord will then prompt you for a unique ID. The ID that you type in will become a prefix for the filename of all the resulting files in that recording session. After entering your unique ID you will be asked to press enter to start recording. Press enter and start playing your tape. The vrecord window will appear. Do not type any keys or click the mouse inside the window while the vrecord is working.
78 |
79 | ## Video Views
80 |
81 | **Unfiltered mode** — Unfiltered mode display only the playback image in the vrecord window. This option works well to aviod buffer overruns, PTS discontinuties, and crashing for setups that cannot handle the additional processing during capture.
82 |
83 | **Visual mode** — Visual mode displays the video feed, the video feed with pixels out of selected range highlighted, the waveform monitor, and the vectorscope in the vrecord window. The video scale (Broadacast Range or Full Range) can be selected in the Config tab.
84 |
85 | **Audio + Video** — Audio + Video mode displays similar video information with Visual mode (out of range pixels, waveform monitor and vectorscope) along side scopes for audio information. These include the following seen in the below image:
86 | * Top Row - Graph and numerical value of audio phase, Audio Vectorscope, Video Preview with Audio Bars, Video Vectorscope
87 | * Middle Row - Waveform monitors for video fields
88 | * Bottom Row - Audio frequency spectrogram (combined channels)
89 | 
90 |
91 | **Visual + Numerical mode** — Visual and Numerical mode displays identical views as Visual mode with the addition of numerical values for the characteristics of the video signal in the left sidebar.
92 |
93 | 
94 |
95 | * The numerical values are as follows:
96 |
97 | * Y — Low, high, and average luminance of the video signal. "Diff" means the difference of the luminance between successive frames.
98 | * U — Low, high, and average of the U channel value of the video signal. "Diff" means the difference of the U value between successive frames.
99 | * V — Low, high, and average of the V channel value of the video signal. "Diff" means the difference of the V value between successive frames.
100 | * SAT — Low, high, and average saturation values (sometimes called chroma) of the video signal.
101 | * HUE — Low, high, and average hue values of the video signal.
102 | * TOUT — The percentage of pixels that are temporal outliers. Temporal Outliers are pixels which have different values from the pixels above or below them. This is useful for detecting noise in the video signal or other artifacts. However, the number will also increase with fast motion, camera movement, or cuts to different shots.
103 | * VREP — The amount of vertical line repetitions in the video. The VREP reading can be useful for detecting video artifacts, dropout, and especially head clogs.
104 | * BRNG — Percentage of pixels that are in broadcast range. This may be helpful for detecting problems with the video signal such as dropout or if the signal has not been calibrated properly. If BRNG is 0.1 or greater, you probably have an issue.
105 |
106 | **Color Matrix mode** — Color Matrix mode displays the video feed as seen through a matrix with hue and saturation differences to aid in calibrating hue and chroma. If the preferred image is not seen in the center square of the matrix, hue and chroma levels may need to be adjusted.
107 |
108 | 
109 |
110 | **Bit Planes mode** — Bit Planes mode allows to display the video according to the bit position of each plane.
111 |
112 | **Frame Positioning mode** — A 24x16 section of pixels from each corner of field 1 and field 2 is magnified and shown upon a grid. This view can assist in horizontal calibration of the video; for instance, position a 704 pixel wide image to the center of a 720 pixel wide scan.
113 |
114 | **Quality Control View mode** — Quality Control View mode can display all the views above, as well as several other quality control tools (waveforms, vectorscopes, and histograms). The menu in QC View shows options tied to keystrokes; pressing the key listed next to the name of the view you want will display that view. This feature means you can switch between several different views during the same transfer. QC View key bindings are as follows:
115 |
116 | * Views
117 | * 1 — Broadcast Range Visual
118 | * 2 — Full Range Visual
119 | * 3 — Visual + Numerical
120 | * 4 — Color Matrix
121 | * 5 — Bit Planes
122 | * 6 — Split Fields: Splits a video frame into its two fields (odd lines appear in the top half of the image, even lines in the bottom half). QC View shows these fields in four pairs. Clockwise from top left: entire image, Y-values only, V-values only, U-values only.
123 |
124 | 
125 |
126 | * Other tools to monitor video transfer
127 | * 7 — Color waveform: Full-screen waveform rendered in the actual color values of the signal.
128 | * 8 — Overlaid waveform: The above, but overlaid on the video signal.
129 | * 9 — Color vectorscope: Full-screen vectorscope rendered in the actual color values of the signal.
130 | * 0 — Overlaid vectorscope: The above, but overlaid on the video signal.
131 | * o — Oscilloscope: Displays luma and two chroma values for one line in the frame (line is indicated by white dots).
132 | * h — Histogram: Displays frequency with which values in each channel occur, with one graph per channel (YUV or RGB, depending on input).
133 | * H — Overlaid histogram: The above, but laid end-to-end and overlaid on the video signal.
134 | * Toggling the display
135 | * d — Toggle display filter: Switches between Y-only and YUV waveform displays (in views 1-3).
136 | * w — Toggle waveform filter: Switches between different waveform filters (in views 1-3): "lowpass," "flat," "aflat," "chroma," "color," "acolor." For more information, see [FFmpeg waveform filter documentation](https://ffmpeg.org/ffmpeg-filters.html#waveform).
137 | * g — Toggle graticule: Switch graticule (the lines and targets on waveforms and vectorscopes) on and off. (Applies in views 1-3 and 7-0.)
138 | * p — Toggle peak envelope: Switch between options to display the minimum and maximum values recorded by the waveform and vectorscope (in views 1-3). "None" means you won't see the peak values; "instant" means peak values will be highlighted as they occur; "peak" holds peak values across the full transfer for reference; and "peak+instant" combines the two.
139 | * i — Increase image intensity.
140 | * I — Decrease image intensity.
141 | * = — Refresh onscreen display. Useful if menu options disappear.
142 | * f — Make window fullscreen. (Press 'f' again to exit.)
143 | * ctrl + s — Turn off the above key assignments to use default mpv key bindings.
144 |
145 | ## Clearing the Configuration File
146 |
147 | By default vrecord saves the choices you made the last time you used the program in a configuration file so that these options are selected the next time you use vrecord. If you would like to clear this configuration file and create a new one type:
148 |
149 | ```
150 | vrecord -x
151 | ```
152 | Vrecord will then prompt you to make selections for video capture and proceed to start recording a new tape. If you want to interrupt vrecord hold down `ctrl + c`.
153 |
--------------------------------------------------------------------------------
/Resources/Documentation/troubleshooting.md:
--------------------------------------------------------------------------------
1 | ## Help and Troubleshooting
2 |
3 | ### Testing Your Equipment
4 |
5 | If you want to test and adjust your monitor without a test tape, whether to avoid overuse of a deck or because you don't have a test tape, you can pipe preset bars and tone, a local combination of test sources, or your own test file through your BlackMagic card.
6 |
7 | To pipe NTSC bars and tone through your BlackMagic card to your monitor, run:
8 | ```
9 | vtest -n
10 | ```
11 |
12 | To pipe PAL bars and tone through your BlackMagic card to your monitor, run:
13 | ```
14 | vtest -p
15 | ```
16 |
17 | To pipe an audio test with visuals to distinguish left and right channels, run:
18 | ```
19 | vtest -a
20 | ```
21 |
22 | To set a local combination of video and audio test sources, run:
23 | ```
24 | vtest -e
25 | ```
26 |
27 | To run the most recently set combination of video and audio test sources, run:
28 | ```
29 | vtest -l
30 | ```
31 |
32 | To play your own test file, run:
33 | ```
34 | vtest -f [TESTFILE]
35 | ```
36 | This test file must be in a format (frame size/frame rate combination) compatible with your BlackMagic device. To see a list of accepted formats, run `[ffmpegdecklink location] -f decklink -list_formats 1 -i [BlackMagic device name]` (for example, `/usr/local/opt/ffmpegdecklink/bin/ffmpeg-dl -f decklink -list_formats 1 -i 'UltraStudio 3D'`)
37 |
38 | To see this options in the command line interface, run `vtest -h`.
39 |
40 | ### Known Issues
41 |
42 | ##### Timing of Recording
43 | When you start recording there may be several seconds of delay before the vrecord window actually appears. But don't worry, once you've pressed enter, vrecord is already capturing the signal and encoding it into a file.
44 |
45 | If you are watching the videotape output on a separate monitor and the video feeds on vrecord appear to be slightly behind the monitor, don't panic; all of your video has still been captured.
46 |
47 | ##### FFmpeg Error Message
48 |
49 | At the end of your capture you may see a warning in the Terminal that looks similar to this:
50 |
51 | ```
52 | [v210 @ 0x7fad3c800000] packet too small
53 | Error while decoding stream #0:0: Invalid data found when processing input
54 | [v210 @ 0x7fe62301c000] packet too small
55 | ```
56 |
57 | You can safely ignore this warning, it's just FFmpeg complaining that it didn't receive a full frame of video when vrecord stopped.
58 |
59 | Or you may see
60 |
61 | ```
62 | av_interleaved_write_frame(): Broken pipe
63 | Error writing trailer of pipe:: Broken pipe
64 | ```
65 |
66 | This happens when vrecord stops because the ffplay playback window is closed, this stops ffplay but ffmpeg is still writing video data out but ffplay is no longer running, so ffmpeg provides this warning. This is a part of how vrecord is designed to end recordings and is expected.
67 |
68 | ### Common Questions
69 |
70 | **Q: I ran `vrecord -p` and no video is showing up in the vrecord window!**
71 |
72 | A: Check to make sure all of your cables are routed properly. Also check macOS System Preferences to make sure that the Black Magic capture device is set up properly. If you are using SDI for your input on vrecord, the output of the Blackmagic should be set to SDI.
73 |
74 | **Q: My tape finished early, how do I stop vrecord?**
75 |
76 | A: Simply close the vrecord window and the program will automatically stop. You should then examine your video file to make sure it's complete.
77 |
78 | **Q: The decklink input is not working in vrecord on macOS Big Sur?**
79 |
80 | A: First, try updating Desktop Video at the [Blackmagic site](https://www.blackmagicdesign.com/support/) and seeing if Media Express will see your decklink input. If still not working, the advise to uninstall and reinstall Desktop Video at https://github.com/amiaopensource/vrecord/issues/650#issuecomment-770501964 has stepped some.
81 |
82 | ### Other Issues
83 |
84 | If you are otherwise stuck and want to see vrecord's help menu run:
85 | ```
86 | vrecord -h
87 | ```
88 | or check the man page:
89 | ```
90 | man vrecord
91 | ```
92 |
93 | Please also consult and contribute to vrecord's [Issue Tracker](https://github.com/amiaopensource/vrecord/issues) on GitHub. Other users may be having the same problems, and developers can offer tips, troubleshooting and guidance!
94 |
--------------------------------------------------------------------------------
/Resources/Documentation/vrecord_window.md:
--------------------------------------------------------------------------------
1 | ## The vrecord Window
2 |
3 | 
4 |
5 | Shown above is the default layout of the vrecord window in "Broadcast Range Visual" mode. Vrecord also includes several other display modes discussed in [Video Capture Views](settings.md#video-capture-views).
6 |
7 | 1. **Video feed** — Displays the entire 720 x 486 video signal coming through. The image will appear a bit more stretched than it does on a television monitor.
8 | 1. **Video feed with broadcast-safe indicator** — Displays a feed of an underscanned version of the video signal. Pixels whose luminance or chrominance is outside of broadcast range are colored yellow. Due to space constraints in the vrecord window this feed will appear slightly squeezed.
9 | 1. **Waveform monitor** — Displays luminance values for each field of the signal separately.
10 | 1. **Vectorscope** — Displays chrominance values for the signal. The boxes represent the values for yellow, red, magenta, blue, cyan, and green. The boxes furthest from the center represent the broadcast limits for those colors.
11 |
--------------------------------------------------------------------------------
/Resources/audioPlusVideoMode-small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/amiaopensource/vrecord/15754ca4758e9b80502ea12b1e45de5691d80608/Resources/audioPlusVideoMode-small.png
--------------------------------------------------------------------------------
/Resources/audio_mode.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/amiaopensource/vrecord/15754ca4758e9b80502ea12b1e45de5691d80608/Resources/audio_mode.gif
--------------------------------------------------------------------------------
/Resources/audio_mode.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/amiaopensource/vrecord/15754ca4758e9b80502ea12b1e45de5691d80608/Resources/audio_mode.png
--------------------------------------------------------------------------------
/Resources/dv_vrecord_bitstream_concealment.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/amiaopensource/vrecord/15754ca4758e9b80502ea12b1e45de5691d80608/Resources/dv_vrecord_bitstream_concealment.png
--------------------------------------------------------------------------------
/Resources/dv_vrecord_check-files.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/amiaopensource/vrecord/15754ca4758e9b80502ea12b1e45de5691d80608/Resources/dv_vrecord_check-files.jpg
--------------------------------------------------------------------------------
/Resources/dv_vrecord_configuration.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/amiaopensource/vrecord/15754ca4758e9b80502ea12b1e45de5691d80608/Resources/dv_vrecord_configuration.jpg
--------------------------------------------------------------------------------
/Resources/dv_vrecord_configuration2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/amiaopensource/vrecord/15754ca4758e9b80502ea12b1e45de5691d80608/Resources/dv_vrecord_configuration2.jpg
--------------------------------------------------------------------------------
/Resources/dv_vrecord_decklink.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/amiaopensource/vrecord/15754ca4758e9b80502ea12b1e45de5691d80608/Resources/dv_vrecord_decklink.jpg
--------------------------------------------------------------------------------
/Resources/dv_vrecord_device_identifier.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/amiaopensource/vrecord/15754ca4758e9b80502ea12b1e45de5691d80608/Resources/dv_vrecord_device_identifier.jpg
--------------------------------------------------------------------------------
/Resources/dv_vrecord_end-capture.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/amiaopensource/vrecord/15754ca4758e9b80502ea12b1e45de5691d80608/Resources/dv_vrecord_end-capture.jpg
--------------------------------------------------------------------------------
/Resources/dv_vrecord_permissions_error.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/amiaopensource/vrecord/15754ca4758e9b80502ea12b1e45de5691d80608/Resources/dv_vrecord_permissions_error.png
--------------------------------------------------------------------------------
/Resources/dv_vrecord_playback.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/amiaopensource/vrecord/15754ca4758e9b80502ea12b1e45de5691d80608/Resources/dv_vrecord_playback.jpg
--------------------------------------------------------------------------------
/Resources/dv_vrecord_record-instructions.mp4:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/amiaopensource/vrecord/15754ca4758e9b80502ea12b1e45de5691d80608/Resources/dv_vrecord_record-instructions.mp4
--------------------------------------------------------------------------------
/Resources/dv_vrecord_timecode-record-start.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/amiaopensource/vrecord/15754ca4758e9b80502ea12b1e45de5691d80608/Resources/dv_vrecord_timecode-record-start.gif
--------------------------------------------------------------------------------
/Resources/dvrecord.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/amiaopensource/vrecord/15754ca4758e9b80502ea12b1e45de5691d80608/Resources/dvrecord.png
--------------------------------------------------------------------------------
/Resources/qcview.lua:
--------------------------------------------------------------------------------
1 | --[[
2 | qcview for vrecord, based on:
3 |
4 | mpv scopes
5 | Copyright 2017 Paul B Mahol
6 | License: public domain
7 | Source: https://paste.ubuntu.com/25318437/
8 |
9 | Default config:
10 | - Enter/exit scopes keys mode: ctrl+s
11 | --]]
12 | -- ------ config -------
13 | local mp_msg = require 'mp.msg'
14 | local start_keys_enabled = true -- if true then choose the keys wisely
15 | local key_toggle_bindings = 'ctrl+s' -- enable/disable scopes key bindings
16 | local intensity = 0.1
17 | local graticule = true
18 | local envelope = 0
19 | local scopefilter = 0
20 | local display = 0
21 | local last_key = 1
22 | local defaultfont = "/Library/Fonts/Tahoma.ttf"
23 | local hue = 20
24 | local sat = 0.3
25 | local scopes = {
26 | {keys = {'1'}, desc = {'Broadcast Range Visual'}},
27 | {keys = {'2'}, desc = {'Full Range Visual'}},
28 | {keys = {'3'}, desc = {'Visual + Numerical: Broadcast Range'}},
29 | {keys = {'4'}, desc = {'Visual + Numerical: Full Range'}},
30 | {keys = {'5'}, desc = {'Color Matrix'}},
31 | {keys = {'6'}, desc = {'Bit Planes'}},
32 | {keys = {'7'}, desc = {'Split Fields'}},
33 | {keys = {'8'}, desc = {'color waveform'}},
34 | {keys = {'9'}, desc = {'overlaid waveform'}},
35 | {keys = {'v'}, desc = {'color vectorscope'}},
36 | {keys = {'V'}, desc = {'overlaid vectorscope'}},
37 | {keys = {'o'}, desc = {'overlaid oscilloscope'}},
38 | {keys = {'h'}, desc = {'histogram parade'}},
39 | {keys = {'H'}, desc = {'overlaid histogram'}},
40 | {keys = {'a'}, desc = {'Audio Passthrough'}},
41 | {keys = {'d'}, desc = {'toggle display filter'}},
42 | {keys = {'w'}, desc = {'toggle waveform filter'}},
43 | {keys = {'g'}, desc = {'toggle graticule'}},
44 | {keys = {'p'}, desc = {'toggle peak envelope'}},
45 | {keys = {'i'}, desc = {'increase intensity'}},
46 | {keys = {'I'}, desc = {'decrease intensity'}},
47 | {keys = {'='}, desc = {'refresh onscreen display'}},
48 | }
49 | -- local waveform_filter = "format=yuv422p,waveform=c='..comp..':d='..disp..':f='..filW..':g='..grat..':e='..env..':fl=numbers+dots:s=ire:i='..intensity..',scale=iw:256"
50 | -- local vectorscope_filter = "format=yuv422p,vectorscope=m='..filV..':g='..grat..':e='..env..':i='..intensity..':c=601,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"
51 | -- bit planes filterchain breaks when it gets too long, so is separated into two chains below:
52 | local bitplanes1 = '[b0]bitplanenoise=bitplane=10,crop=iw/10:ih:(iw/10)*0:0,lutyuv=u=(maxval/2):v=(maxval/2):y=bitand(val\\,pow(2\\,10-1))*pow(2\\,1),pad=iw:ih+64:0:64,drawtext=fontfile='..defaultfont..':text=%{metadata\\\\:lavfi.bitplanenoise.0.10}:y=0:fontcolor=white:fontsize=20,drawtext=fontfile='..defaultfont..':text=%{metadata\\\\:lavfi.bitplanenoise.1.10}:y=20:fontcolor=white:fontsize=20,drawtext=fontfile='..defaultfont..':text=%{metadata\\\\:lavfi.bitplanenoise.2.10}:y=40:fontcolor=white:fontsize=20[b0c],[b1]bitplanenoise=bitplane=9,crop=iw/10:ih:(iw/10)*1:0,lutyuv=u=(maxval/2):v=(maxval/2):y=bitand(val\\,pow(2\\,10-2))*pow(2\\,2),pad=iw:ih+64:0:64,drawtext=fontfile='..defaultfont..':text=%{metadata\\\\:lavfi.bitplanenoise.0.9}:y=0:fontcolor=silver:fontsize=20,drawtext=fontfile='..defaultfont..':text=%{metadata\\\\:lavfi.bitplanenoise.1.9}:y=20:fontcolor=silver:fontsize=20,drawtext=fontfile='..defaultfont..':text=%{metadata\\\\:lavfi.bitplanenoise.2.9}:y=40:fontcolor=silver:fontsize=20[b1c],[b2]bitplanenoise=bitplane=8,crop=iw/10:ih:(iw/10)*2:0,lutyuv=u=(maxval/2):v=(maxval/2):y=bitand(val\\,pow(2\\,10-3))*pow(2\\,3),pad=iw:ih+64:0:64,drawtext=fontfile='..defaultfont..':text=%{metadata\\\\:lavfi.bitplanenoise.0.8}:y=0:fontcolor=white:fontsize=20,drawtext=fontfile='..defaultfont..':text=%{metadata\\\\:lavfi.bitplanenoise.1.8}:y=20:fontcolor=white:fontsize=20,drawtext=fontfile='..defaultfont..':text=%{metadata\\\\:lavfi.bitplanenoise.2.8}:y=40:fontcolor=white:fontsize=20[b2c],[b3]bitplanenoise=bitplane=7,crop=iw/10:ih:(iw/10)*3:0,lutyuv=u=(maxval/2):v=(maxval/2):y=bitand(val\\,pow(2\\,10-4))*pow(2\\,4),pad=iw:ih+64:0:64,drawtext=fontfile='..defaultfont..':text=%{metadata\\\\:lavfi.bitplanenoise.0.7}:y=0:fontcolor=silver:fontsize=20,drawtext=fontfile='..defaultfont..':text=%{metadata\\\\:lavfi.bitplanenoise.1.7}:y=20:fontcolor=silver:fontsize=20,drawtext=fontfile='..defaultfont..':text=%{metadata\\\\:lavfi.bitplanenoise.2.7}:y=40:fontcolor=silver:fontsize=20[b3c],[b4]bitplanenoise=bitplane=6,crop=iw/10:ih:(iw/10)*4:0,lutyuv=u=(maxval/2):v=(maxval/2):y=bitand(val\\,pow(2\\,10-5))*pow(2\\,5),pad=iw:ih+64:0:64,drawtext=fontfile='..defaultfont..':text=%{metadata\\\\:lavfi.bitplanenoise.0.6}:y=0:fontcolor=white:fontsize=20,drawtext=fontfile='..defaultfont..':text=%{metadata\\\\:lavfi.bitplanenoise.1.6}:y=20:fontcolor=white:fontsize=20,drawtext=fontfile='..defaultfont..':text=%{metadata\\\\:lavfi.bitplanenoise.2.6}:y=40:fontcolor=white:fontsize=20[b4c],[b5]bitplanenoise=bitplane=5,crop=iw/10:ih:(iw/10)*5:0,lutyuv=u=(maxval/2):v=(maxval/2):y=bitand(val\\,pow(2\\,10-6))*pow(2\\,6),pad=iw:ih+64:0:64,drawtext=fontfile='..defaultfont..':text=%{metadata\\\\:lavfi.bitplanenoise.0.5}:y=0:fontcolor=silver:fontsize=20,drawtext=fontfile='..defaultfont..':text=%{metadata\\\\:lavfi.bitplanenoise.1.5}:y=20:fontcolor=silver:fontsize=20,drawtext=fontfile='..defaultfont..':text=%{metadata\\\\:lavfi.bitplanenoise.2.5}:y=40:fontcolor=silver:fontsize=20[b5c]'
53 | local bitplanes2 = '[b6]bitplanenoise=bitplane=4,crop=iw/10:ih:(iw/10)*6:0,lutyuv=u=(maxval/2):v=(maxval/2):y=bitand(val\\,pow(2\\,10-7))*pow(2\\,7),pad=iw:ih+64:0:64,drawtext=fontfile='..defaultfont..':text=%{metadata\\\\:lavfi.bitplanenoise.0.4}:y=0:fontcolor=white:fontsize=20,drawtext=fontfile='..defaultfont..':text=%{metadata\\\\:lavfi.bitplanenoise.1.4}:y=20:fontcolor=white:fontsize=20,drawtext=fontfile='..defaultfont..':text=%{metadata\\\\:lavfi.bitplanenoise.2.4}:y=40:fontcolor=white:fontsize=20[b6c],[b7]bitplanenoise=bitplane=3,crop=iw/10:ih:(iw/10)*7:0,lutyuv=u=(maxval/2):v=(maxval/2):y=bitand(val\\,pow(2\\,10-8))*pow(2\\,8),pad=iw:ih+64:0:64,drawtext=fontfile='..defaultfont..':text=%{metadata\\\\:lavfi.bitplanenoise.0.3}:y=0:fontcolor=silver:fontsize=20,drawtext=fontfile='..defaultfont..':text=%{metadata\\\\:lavfi.bitplanenoise.1.3}:y=20:fontcolor=silver:fontsize=20,drawtext=fontfile='..defaultfont..':text=%{metadata\\\\:lavfi.bitplanenoise.2.3}:y=40:fontcolor=silver:fontsize=20[b7c],[b8]bitplanenoise=bitplane=2,crop=iw/10:ih:(iw/10)*8:0,lutyuv=u=(maxval/2):v=(maxval/2):y=bitand(val\\,pow(2\\,10-9))*pow(2\\,9),pad=iw:ih+64:0:64,drawtext=fontfile='..defaultfont..':text=%{metadata\\\\:lavfi.bitplanenoise.0.2}:y=0:fontcolor=white:fontsize=20,drawtext=fontfile='..defaultfont..':text=%{metadata\\\\:lavfi.bitplanenoise.1.2}:y=20:fontcolor=white:fontsize=20,drawtext=fontfile='..defaultfont..':text=%{metadata\\\\:lavfi.bitplanenoise.2.2}:y=40:fontcolor=white:fontsize=20[b8c],[b9]bitplanenoise=bitplane=1,crop=iw/10:ih:(iw/10)*9:0,lutyuv=u=(maxval/2):v=(maxval/2):y=bitand(val\\,pow(2\\,10-10))*pow(2\\,10),pad=iw:ih+64:0:64,drawtext=fontfile='..defaultfont..':text=%{metadata\\\\:lavfi.bitplanenoise.0.1}:y=0:fontcolor=silver:fontsize=20,drawtext=fontfile='..defaultfont..':text=%{metadata\\\\:lavfi.bitplanenoise.1.1}:y=20:fontcolor=silver:fontsize=20,drawtext=fontfile='..defaultfont..':text=%{metadata\\\\:lavfi.bitplanenoise.2.1}:y=40:fontcolor=silver:fontsize=20[b9c]'
54 |
55 | -- ------- utils --------
56 | function iff(cc, a, b) if cc then return a else return b end end
57 | function ss(s, from, to) return s:sub(from, to - 1) end
58 |
59 | -- the mpv command string for adding the filter
60 | local function get_cmd(filter)
61 | return 'no-osd vf set lavfi=[' .. filter[1] .. ']'
62 | end
63 | local function get_value(value)
64 | return value[1]
65 | end
66 |
67 | -- these two vars are used globally
68 | local bindings_enabled = start_keys_enabled
69 |
70 | -- ------ OSD handling -------
71 | local function ass(x)
72 | -- local gpo = mp.get_property_osd
73 | -- return gpo('osd-ass-cc/0') .. x .. gpo('osd-ass-cc/1')
74 |
75 | -- seemingly it's impossible to enable ass escaping with mp.set_osd_ass,
76 | -- so we're already in ass mode, and no need to unescape first.
77 | return x
78 | end
79 |
80 | local function fsize(s) -- 100 is the normal font size
81 | local s = 40
82 | return ass('{\\fscx' .. s .. '\\fscy' .. s ..'}')
83 | end
84 |
85 | local function color(c) -- c is RRGGBB
86 | return ass('{\\1c&H' .. ss(c, 5, 7) .. ss(c, 3, 5) .. ss(c, 1, 3) .. '&}')
87 | end
88 |
89 | local function cnorm() return color('ffffff') end -- white
90 | local function cdis() return color('909090') end -- grey
91 | local function ceq() return color('ffff90') end -- yellow-ish
92 | local function ckeys() return iff(bindings_enabled, color('90FF90'), cdis()) end -- green-ish
93 |
94 | local DUR_DEFAULT = 1.5 -- seconds
95 | local osd_timer = nil
96 | -- duration: seconds, or default if missing/nil, or infinite if 0 (or negative)
97 | local function ass_osd(msg, duration) -- empty or missing msg -> just clears the OSD
98 | duration = duration or DUR_DEFAULT
99 | if not msg or msg == '' then
100 | msg = '{}' -- the API ignores empty string, but '{}' works to clean it up
101 | duration = 0
102 | end
103 | mp.set_osd_ass(0, 0, msg)
104 | if osd_timer then
105 | osd_timer:kill()
106 | osd_timer = nil
107 | end
108 | if duration > 0 then
109 | osd_timer = mp.add_timeout(duration, ass_osd) -- ass_osd() clears without a timer
110 | end
111 | end
112 |
113 | -- some visual messing about
114 | local function updateOSD()
115 | local msg2 = fsize(50)
116 | .. 'Key-bindings: ' .. ckeys() .. iff(bindings_enabled, 'On', 'Off')
117 | .. ' [' .. key_toggle_bindings .. ']' .. cnorm()
118 | local msg3 = ''
119 |
120 | for i = 1, #scopes do
121 | local desc = scopes[i].desc
122 | local key = scopes[i].keys
123 | local info =
124 | fsize(30) .. 'key '.. ckeys() .. key[1] .. ' ' .. ceq() .. desc[1] .. '\n'
125 |
126 | msg3 = msg3 .. info
127 | end
128 |
129 | local msg = msg3 .. '\n' .. msg2
130 |
131 | local duration = iff(start_keys_enabled, iff(bindings_enabled, 6, nil))
132 | ass_osd(msg, duration);
133 | end
134 |
135 |
136 | local function getBind(key, index)
137 | return function() -- onKey
138 |
139 | -- adjustment filters (filters that toggle, cycle, etc.)
140 | if key[1] == 'i' then
141 | intensity = intensity + 0.01;
142 | intensity = math.min(intensity, 1)
143 | elseif key[1] == 'I' then
144 | intensity = intensity - 0.01;
145 | intensity = math.max(intensity, 0)
146 | elseif key[1] == 'g' then
147 | graticule = not graticule
148 | elseif key[1] == 'p' then
149 | envelope = envelope + 1;
150 | if envelope == 4 then
151 | envelope = 0
152 | end
153 | elseif key[1] == 'w' then
154 | scopefilter = scopefilter + 1;
155 | if scopefilter == 6 then
156 | scopefilter = 0
157 | end
158 | elseif key[1] == 'd' then
159 | display = display + 1;
160 | if display == 3 then
161 | display = 0
162 | end
163 | end
164 |
165 | if graticule == true then
166 | grat = 1
167 | else
168 | grat = 0
169 | end
170 |
171 | if envelope == 0 then
172 | env = "none"
173 | elseif envelope == 1 then
174 | env = "instant"
175 | elseif envelope == 2 then
176 | env = "peak"
177 | elseif envelope == 3 then
178 | env = "peak+instant"
179 | end
180 |
181 | if scopefilter == 0 then
182 | filW = "lowpass"
183 | filV = "gray"
184 | elseif scopefilter == 1 then
185 | filW = "flat"
186 | filV = "color"
187 | elseif scopefilter == 2 then
188 | filW = "aflat"
189 | filV = "color2"
190 | elseif scopefilter == 3 then
191 | filW = "chroma"
192 | filV = "color3"
193 | elseif scopefilter == 4 then
194 | filW = "color"
195 | filV = "color4"
196 | elseif scopefilter == 5 then
197 | filW = "acolor"
198 | filV = "color5"
199 | end
200 |
201 | if display == 0 then
202 | disp = "overlay"
203 | comment = "Y"
204 | comp = 1
205 | elseif display == 1 then
206 | disp = "overlay"
207 | comment = "YUV"
208 | comp = 7
209 | elseif display == 2 then
210 | disp = "parade"
211 | comment = "YUV"
212 | comp = 7
213 | end
214 |
215 | -- display filters
216 | -- key bindings are set in local scopes variable in config, above; filters are assigned to keys sequentially, so they must remain in order
217 | filters = {
218 | {filter = {'split=5[a][b][c][d][e],[b]field=top[b1],[c]field=bottom[c1],[b1]format=yuv422p,waveform=c='..comp..':d='..disp..':f='..filW..':g='..grat..':e='..env..':fl=numbers+dots:s=ire:i='..intensity..',scale=iw:256[b2],[c1]format=yuv422p,waveform=c='..comp..':d='..disp..':f='..filW..':g='..grat..':e='..env..':fl=numbers+dots:s=ire:i='..intensity..',scale=iw:256[c2],[a][b2][c2]vstack=inputs=3,format=yuv422p[abc1],[d]format=yuv422p,vectorscope=m='..filV..':g='..grat..':e='..env..':i='..intensity..':c=601,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]signalstats=out=brng,scale=512:ih[e1],[e1][d1]vstack[de1],[abc1][de1]hstack'}}, --1 broadcast
219 | {filter = {'split=5[a][b][c][d][e],[b]field=top[b1],[c]field=bottom[c1],[b1]format=yuv422p,waveform=c='..comp..':d='..disp..':f='..filW..':g='..grat..':e='..env..':fl=numbers+dots:s=ire:i='..intensity..',scale=iw:256[b2],[c1]format=yuv422p,waveform=c='..comp..':d='..disp..':f='..filW..':g='..grat..':e='..env..':fl=numbers+dots:s=ire:i='..intensity..',scale=iw:256[c2],[a][b2][c2]vstack=inputs=3,format=yuv422p[abc1],[d]format=yuv422p,vectorscope=m='..filV..':g='..grat..':e='..env..':i='..intensity..':c=601,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]format=yuv444p,pseudocolor=if(between(1\\,val\\,amax)+between(val\\,254\\,amax)\\,65\\,-1):if(between(1\\,val\\,amax)+between(val\\,254\\,amax)\\,100\\,-1):if(between(1\\,val\\,amax)+between(val\\,254\\,amax)\\,212\\,-1),scale=512:ih[e1],[e1][d1]vstack[de1],[abc1][de1]hstack'}}, --2 full range
220 | {filter = {'split=7[a][b][c][d][e][f][g],[b]field=top[b1],[c]field=bottom[c1],[b1]format=yuv422p,waveform=c='..comp..':d='..disp..':f='..filW..':g='..grat..':e='..env..':fl=numbers+dots:s=ire:i='..intensity..',scale=iw:256[b2],[c1]format=yuv422p,waveform=c='..comp..':d='..disp..':f='..filW..':g='..grat..':e='..env..':fl=numbers+dots:s=ire:i='..intensity..',scale=iw:256[c2],[a][b2][c2]vstack=inputs=3,format=yuv422p[abc1],[d]format=yuv422p,vectorscope=m='..filV..':g='..grat..':e='..env..':i='..intensity..':c=601,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]signalstats=out=brng,scale=512:ih[e1],[e1][d1]vstack[de1],[f]signalstats=stat=brng+vrep+tout,format=yuv422p,geq=lum=60:cb=128:cr=128,scale=180:ih+512,setsar=1/1,drawtext=fontcolor=white:fontsize=22:fontfile='..defaultfont..':textfile=/tmp/drawtext.txt,drawtext=fontcolor=white:fontsize=17:fontfile='..defaultfont..':textfile=/tmp/drawtext2.txt,drawtext=fontcolor=white:fontsize=52:fontfile='..defaultfont..':textfile=/tmp/drawtext3.txt[f1],[abc1][de1][f1]hstack=inputs=3[abcdef1],[g]scale=iw+512+180:82,format=yuv422p,geq=lum=60:cb=128:cr=128,drawtext=fontcolor=white:fontsize=22:fontfile='..defaultfont..':textfile=/tmp/vrecord_input.log:reload=1:y=100-th[g1],[abcdef1][g1]vstack'}}, --3 visual + numerical
221 | {filter = {'split=7[a][b][c][d][e][f][g],[b]field=top[b1],[c]field=bottom[c1],[b1]format=yuv422p,waveform=c='..comp..':d='..disp..':f='..filW..':g='..grat..':e='..env..':fl=numbers+dots:s=ire:i='..intensity..',scale=iw:256[b2],[c1]format=yuv422p,waveform=c='..comp..':d='..disp..':f='..filW..':g='..grat..':e='..env..':fl=numbers+dots:s=ire:i='..intensity..',scale=iw:256[c2],[a][b2][c2]vstack=inputs=3,format=yuv422p[abc1],[d]format=yuv422p,vectorscope=m='..filV..':g='..grat..':e='..env..':i='..intensity..':c=601,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]format=yuv444p,pseudocolor=if(between(1\\,val\\,amax)+between(val\\,254\\,amax)\\,65\\,-1):if(between(1\\,val\\,amax)+between(val\\,254\\,amax)\\,100\\,-1):if(between(1\\,val\\,amax)+between(val\\,254\\,amax)\\,212\\,-1),scale=512:ih[e1],[e1][d1]vstack[de1],[f]signalstats=stat=brng+vrep+tout,format=yuv422p,geq=lum=60:cb=128:cr=128,scale=180:ih+512,setsar=1/1,drawtext=fontcolor=white:fontsize=22:fontfile='..defaultfont..':textfile=/tmp/drawtext.txt,drawtext=fontcolor=white:fontsize=17:fontfile='..defaultfont..':textfile=/tmp/drawtext2.txt,drawtext=fontcolor=white:fontsize=52:fontfile='..defaultfont..':textfile=/tmp/drawtext3.txt[f1],[abc1][de1][f1]hstack=inputs=3[abcdef1],[g]scale=iw+512+180:82,format=yuv422p,geq=lum=60:cb=128:cr=128,drawtext=fontcolor=white:fontsize=22:fontfile='..defaultfont..':textfile=/tmp/vrecord_input.log:reload=1:y=100-th[g1],[abcdef1][g1]vstack'}}, --4 visual + numerical, full range
222 | {filter = {'scale=iw/4:ih/4,split=9[x][hm][hp][sm][sp][hmsm][hmsp][hpsm][hpsp],[hm]hue=h=-'..hue..'[hm1],[hp]hue=h='..hue..'[hp1],[sm]hue=s=1-'..sat..'[sm1],[sp]hue=s=1+'..sat..'[sp1],[hmsm]hue=h=-'..hue..':s=1-'..sat..'[hmsm1],[hmsp]hue=h=-'..hue..':s=1+'..sat..'[hmsp1],[hpsm]hue=h='..hue..':s=1-'..sat..'[hpsm1],[hpsp]hue=h='..hue..':s=1+'..sat..'[hpsp1],[hpsm1][hp1][hpsp1]hstack=3[top],[sm1][x][sp1]hstack=3[mid],[hmsm1][hm1][hmsp1]hstack=3[bottom],[top][mid][bottom]vstack=3'}}, --5 color matrix
223 | {filter = {'format=yuv420p10le|yuv422p10le|yuv444p10le|yuv440p10le,split=10[b0][b1][b2][b3][b4][b5][b6][b7][b8][b9],'..bitplanes1..','..bitplanes2..',[b0c][b1c][b2c][b3c][b4c][b5c][b6c][b7c][b8c][b9c]hstack=10,format=yuv444p,drawgrid=w=iw/10:h=ih:t=2:c=green@0.5'}}, --6 bit planes
224 | {filter = {'format=yuv444p,split=4[f][y][u][v],[f]il=l=d:c=d,pad=iw+10:ih+10:10:10[f1],[y]il=l=d,extractplanes=y,pad=iw+10:ih+10:10:10[y1],[u]il=c=d,extractplanes=u,pad=iw+10:ih+10:10:10[u1],[v]il=c=d,extractplanes=v,pad=iw+10:ih+10:10:10[v1],[f1][y1]hstack=2[a],[u1][v1]hstack=2[b],[a][b]vstack=2'}}, --7 split fields/planes view
225 | {filter = {'waveform=f=acolor:i='..intensity..':g='..grat}}, --8 color waveform
226 | {filter = {'split[a][b],[a]format=yuva444p,waveform=g='..grat..':f=acolor:i='..intensity..':[a],[b][a]overlay=x=W-w:y=H-h'}}, --9 overlaid waveform
227 | {filter = {'vectorscope=m=color3:i='..intensity..':g='..grat}}, --v color vectorscope
228 | {filter = {'split[a][b],[a]format=yuva444p,vectorscope=g='..grat..':i='..intensity..':m=color3[a],[b][a]overlay=x=W-w:y=H-h'}}, --V overlaid vectorscope
229 | {filter = {'oscilloscope'}}, --o oscilloscope
230 | {filter = {'histogram=c='..comp..':d='..disp}}, --h histogram
231 | {filter = {'split[a][b],[a]format=yuva444p,histogram=d=parade[a],[b][a]overlay=x=W-w:y=H-h'}}, --H overlaid histogram
232 | {filter = {'[aid1]asplit=2[z][ao],[z]channelsplit=channel_layout=quad[s1][s2][s3][s4],[s1][s2][s3][s4]amerge=inputs=4,aformat=channel_layouts=quad[zz],[zz]showvolume=t=0:h=17:w=200[xx],[vid1]split=5[a][b][c][d][e],[b]field=top[b1],[c]field=bottom[c1],[b1]format=yuv422p,waveform=c='..comp..':d='..disp..':f='..filW..':g='..grat..':e='..env..':fl=numbers+dots:s=ire:i='..intensity..',scale=iw:256[b2],[c1]format=yuv422p,waveform=c='..comp..':d='..disp..':f='..filW..':g='..grat..':e='..env..':fl=numbers+dots:s=ire:i='..intensity..',scale=iw:256[c2],[a][b2][c2]vstack=inputs=3,format=yuv422p[abc1],[d]format=yuv422p,vectorscope=m='..filV..':g='..grat..':e='..env..':i='..intensity..':c=601,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]signalstats=out=brng,scale=512:ih[e1],[e1][d1]vstack[de1],[abc1][de1]hstack[abcde1],[abcde1][xx]overlay=10:10[vo]'}}, --a audio passthrough - not yet working, needs lavfi-complex
233 | }
234 |
235 | -- toggling filters
236 | if key[1] == 'i' then
237 | mp.command(get_cmd(filters[last_key].filter))
238 | ass_osd("intensity: " .. intensity, duration);
239 | elseif key[1] == 'I' then
240 | mp.command(get_cmd(filters[last_key].filter))
241 | ass_osd("intensity: " .. intensity, duration);
242 | elseif key[1] == 'g' then
243 | mp.command(get_cmd(filters[last_key].filter))
244 | elseif key[1] == 'p' then
245 | mp.command(get_cmd(filters[last_key].filter))
246 | ass_osd("envelope: " .. env, duration);
247 | elseif key[1] == 'w' and last_key == 11 then
248 | mp.command(get_cmd(filters[last_key].filter))
249 | ass_osd("filter: " .. filW, duration);
250 | elseif key[1] == 'w' and last_key == 13 then
251 | mp.command(get_cmd(filters[last_key].filter))
252 | ass_osd("filter: " .. filV, duration);
253 | elseif key[1] == 'w' then
254 | mp.command(get_cmd(filters[last_key].filter))
255 | ass_osd("filter: " .. filV .. " " .. filW, duration);
256 | elseif key[1] == 'd' then
257 | mp.command(get_cmd(filters[last_key].filter))
258 | ass_osd("display: " .. disp .. " " .. comment, duration);
259 | elseif key[1] == '=' then
260 | updateOSD();
261 | else
262 | mp.command(get_cmd(filters[index].filter))
263 | last_key = index
264 | updateOSD()
265 | end
266 | end
267 | end
268 |
269 | local function update_key_binding(enable, key, name, fn)
270 | if enable then
271 | mp.add_forced_key_binding(key, name, fn, 'repeatable')
272 | else
273 | mp.remove_key_binding(name)
274 | end
275 | end
276 |
277 | local function toggle_bindings(explicit, no_osd)
278 | bindings_enabled = iff(explicit ~= nil, explicit, not bindings_enabled)
279 | for i = 1, #scopes do
280 | local k = scopes[i].keys
281 | update_key_binding(bindings_enabled, k[1], 'eq' .. k[1], getBind(k, i))
282 | end
283 | if not no_osd then updateOSD() end
284 | end
285 |
286 | updateOSD()
287 | mp.add_forced_key_binding(key_toggle_bindings, toggle_bindings)
288 | if bindings_enabled then toggle_bindings(true, true) end
289 |
--------------------------------------------------------------------------------
/Resources/vrecord_QC_output_graphs_ver2.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/amiaopensource/vrecord/15754ca4758e9b80502ea12b1e45de5691d80608/Resources/vrecord_QC_output_graphs_ver2.jpeg
--------------------------------------------------------------------------------
/Resources/vrecord_broadcast_range_visual_2016-11-22.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/amiaopensource/vrecord/15754ca4758e9b80502ea12b1e45de5691d80608/Resources/vrecord_broadcast_range_visual_2016-11-22.jpg
--------------------------------------------------------------------------------
/Resources/vrecord_color_matrix_2016-11-22.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/amiaopensource/vrecord/15754ca4758e9b80502ea12b1e45de5691d80608/Resources/vrecord_color_matrix_2016-11-22.jpg
--------------------------------------------------------------------------------
/Resources/vrecord_functions:
--------------------------------------------------------------------------------
1 | # these functions are appended to an include file that is sent to gtkdialog and allows for functions to be used within gtkdialog actions
2 |
3 | # functions
4 |
5 | _check_ffmpeg_install(){
6 | echo "Using ffmpeg at ${FFMPEG_BIN}"
7 | echo
8 | if [ ! -f "${FFMPEG_BIN}" ] ; then
9 | echo "${FFMPEG_BIN} is not found. Please install ffmpegdecklink via:"
10 | echo " brew install amiaopensource/amiaos/ffmpegdecklink"
11 | echo "Or install a version of ffmpeg that is compiled with decklink support if you wish to use that input."
12 | echo
13 | fi
14 | if [ ! -f "${FFPLAY_BIN}" ] ; then
15 | echo "${FFPLAY_BIN} is not found."
16 | echo
17 | fi
18 | if [ ! -f "${FFPROBE_BIN}" ] ; then
19 | echo "${FFPROBE_BIN} is not found."
20 | echo
21 | fi
22 | echo
23 | FFMPEG_V="$("${FFMPEG_BIN}" -version 2>&1)"
24 | echo "FFmpeg configuration: ${FFMPEG_V}"
25 | echo
26 | if [ "$(echo "${FFMPEG_V}" | grep "Library not loaded" >/dev/null)" ] ; then
27 | echo "Please reinstall 'ffmpegdecklink':"
28 | echo " brew reinstall amiaopensource/amiaos/ffmpegdecklink"
29 | echo "Or install a version of ffmpeg that is compiled with decklink support if you wish to use that input."
30 | echo "Exiting."
31 | exit 1
32 | fi
33 | if [ -z "$("${FFMPEG_BIN}" -nostdin -v 0 -sources decklink)" ] ; then
34 | echo "vrecord is set to use a decklink input but ${FFMPEG_BIN} does not appear to support decklink inputs."
35 | echo "Please review installation and troubleshooting information for vrecord or install ffmpegdecklink."
36 | exit 1
37 | fi
38 | }
39 |
40 | _update_config_file(){
41 | # write config file
42 | {
43 | echo "# Set these variables to a valid option or leave as empty quotes (like \"\") to request each run."
44 | echo "STARTUP_VIEW=\"${STARTUP_VIEW}\""
45 | echo "DEVICE_INPUT_CHOICE=\"${DEVICE_INPUT_CHOICE}\""
46 | echo "VIDEO_INPUT_CHOICE=\"${VIDEO_INPUT_CHOICE}\""
47 | echo "AUDIO_INPUT_CHOICE=\"${AUDIO_INPUT_CHOICE}\""
48 | echo "CONTAINER_CHOICE=\"${CONTAINER_CHOICE}\""
49 | echo "VIDEO_CODEC_CHOICE=\"${VIDEO_CODEC_CHOICE}\""
50 | echo "FFV1_SLICE_CHOICE=\"${FFV1_SLICE_CHOICE}\""
51 | echo "AUDIO_CODEC_CHOICE=\"${AUDIO_CODEC_CHOICE}\""
52 | echo "AUDIO_DEV_CHOICE=\"${AUDIO_DEV_CHOICE}\""
53 | echo "AUDIO_MODE_CODEC_CHOICE=\"${AUDIO_MODE_CODEC_CHOICE}\""
54 | echo "AUDIO_CHANNEL_CHOICE=\"${AUDIO_CHANNEL_CHOICE}\""
55 | echo "AUDIO_MODE_SR_CHOICE=\"${AUDIO_MODE_SR_CHOICE}\""
56 | echo "VIDEO_BIT_DEPTH_CHOICE=\"${VIDEO_BIT_DEPTH_CHOICE}\""
57 | echo "ASPECT_RATIO_CHOICE=\"${ASPECT_RATIO_CHOICE}\""
58 | echo "NTSC_43_SAR_CHOICE=\"${NTSC_43_SAR_CHOICE}\""
59 | echo "NTSC_169_SAR_CHOICE=\"${NTSC_169_SAR_CHOICE}\""
60 | echo "PAL_43_SAR_CHOICE=\"${PAL_43_SAR_CHOICE}\""
61 | echo "PAL_169_SAR_CHOICE=\"${PAL_169_SAR_CHOICE}\""
62 | echo "AUDIO_MAPPING_CHOICE=\"${AUDIO_MAPPING_CHOICE}\""
63 | echo "TIMECODE_CHOICE=\"${TIMECODE_CHOICE}\""
64 | echo "STANDARD_CHOICE=\"${STANDARD_CHOICE}\""
65 | echo "QCTOOLSXML_CHOICE=\"${QCTOOLSXML_CHOICE}\""
66 | echo "MP4_CHOICE=\"${MP4_CHOICE}\""
67 | echo "FRAMEMD5_CHOICE=\"${FRAMEMD5_CHOICE}\""
68 | echo "EMBED_LOGS_CHOICE=\"${EMBED_LOGS_CHOICE}\""
69 | echo "PLAYBACKVIEW_CHOICE=\"${PLAYBACKVIEW_CHOICE}\""
70 | echo "PLAYBACKVIEW_CHOICE_PASS=\"${PLAYBACKVIEW_CHOICE_PASS}\""
71 | echo "DIR=\"${DIR}\""
72 | echo "LOGDIR=\"${LOGDIR}\""
73 | echo "INVERT_PHASE=\"${INVERT_PHASE}\""
74 | echo "DURATION=\"${DURATION}\""
75 | echo "PREFIX=\"${PREFIX}\""
76 | echo "USER_SUFFIX=\"${USER_SUFFIX}\""
77 | echo "YES_SUFFIX=\"${YES_SUFFIX}\""
78 | echo "TECHNICIAN=\"${TECHNICIAN}\""
79 | echo "DVRESCUE_INPUT_CHOICE=\"${DVRESCUE_INPUT_CHOICE}\""
80 | echo "DECKLINK_INPUT_CHOICE=\"${DECKLINK_INPUT_CHOICE}\""
81 | echo "DECKLINK_UTILITY_CHOICE=\"${DECKLINK_UTILITY_CHOICE}\""
82 | echo "WAVEFORM_SCALE_CHOICE=\"${WAVEFORM_SCALE_CHOICE}\""
83 | echo "MONITOR_AUDIO_CHOICE=\"${MONITOR_AUDIO_CHOICE}\""
84 | echo "SIGNAL_VIEW_CHOICE=\"${SIGNAL_VIEW_CHOICE}\""
85 | echo "DV_CONTAINER_CHOICE=\"${DV_CONTAINER_CHOICE}\""
86 | echo "DV_RESCUE_OPTION_S=\"${DV_RESCUE_OPTION_S}\""
87 | echo "DV_RESCUE_OPTION_D=\"${DV_RESCUE_OPTION_D}\""
88 | echo "DV_RESCUE_OPTION_T=\"${DV_RESCUE_OPTION_T}\""
89 | echo "DV_RESCUE_OPTION_TC=\"${DV_RESCUE_OPTION_TC}\""
90 | echo "MP4_CRF_VALUE=\"${MP4_CRF_VALUE}\""
91 | echo "CC2VTT=\"${CC2VTT}\""
92 | echo "CC2SRT=\"${CC2SRT}\""
93 | } > "${CONFIG_FILE}"
94 | . "${CONFIG_FILE}"
95 | }
96 |
97 | _validate_form(){
98 | if [ "${VIDEO_CODEC_CHOICE}" = "FFV1 version 3" ] && [ "${CONTAINER_CHOICE}" = "MXF" ] ; then
99 | echo "ERROR: Incompatible video codecs and containers have been selected."
100 | elif [ "${AUDIO_CODEC_CHOICE}" = "24-bit FLAC" ] && [ "${CONTAINER_CHOICE}" = "QuickTime" ] ; then
101 | echo "ERROR: Incompatible audio codecs and containers have been selected."
102 | fi
103 | if [ -z "${DIR}" ] ; then
104 | NEW_DEFAULT_DIR="$(pwd)"
105 | echo "WARNING: The recording directory is not set. ${NEW_DEFAULT_DIR} will be used."
106 | DIR="${NEW_DEFAULT_DIR}"
107 | fi
108 | if [ -d "${DIR}" ] ; then
109 | if [ $(mount | grep $(df -P "${DIR}" | tail +2 | awk '{print $1}') | grep -c "(.*local,") = "0" ] && [ "${OS_TYPE}" != "linux" ] ; then
110 | echo "WARNING: The recording directory at ${DIR} is not a local directory. Please verify that you can write to the disk fast enough."
111 | fi
112 | if [ "${OS_TYPE}" = "linux" ] ; then
113 | FREE_SPACE="$(df -BG "${DIR}" | tail +2 | awk '{print $4}' | tr 'G' ' ')"
114 | else
115 | FREE_SPACE="$(df -g "${DIR}" | tail +2 | awk '{print $4}')"
116 | fi
117 | if [ "${FREE_SPACE}" -le 40 ] ; then
118 | echo "WARNING: The recording directory at ${DIR} only has ${FREE_SPACE} gigabytes available."
119 | fi
120 | else
121 | echo "ERROR: The recording directory (${DIR}) does not exist. Please set or $(pwd) will be used instead."
122 | fi
123 | if [ ! -d "${LOGDIR}" ] && [ -n "${LOGDIR}" ] ; then
124 | echo "ERROR: The auxiliary directory (${LOGDIR}) does not exist. Create this folder or leave blank to use the recording directory."
125 | fi
126 | # validate duration
127 | if [ -n "${DURATION}" ] ; then
128 | if ! [ "$(echo "${DURATION} > 0" | bc)" = "1" ] ; then
129 | echo "ERROR: Illegal value for recording time. The duration must be a positive number."
130 | fi
131 | fi
132 | if [ "${VIDEO_CODEC_CHOICE}" = "ProRes" -o "${VIDEO_CODEC_CHOICE}" = "ProRes (HQ)" ] && [ "${VIDEO_BIT_DEPTH_CHOICE}" = "8 bit" ] ; then
133 | echo "WARNING: ProRes (which is a 10 bit encoding) is selected but the input device is set to use 8 bits."
134 | fi
135 | if [ "${INVERT_PHASE_2}" = "true" ] ; then
136 | echo "WARNING: Option to invert phase of second audio channel has been selected."
137 | fi
138 | if [ "${INVERT_PHASE_4}" = "true" ] ; then
139 | echo "WARNING: Option to invert phase of fourth audio channel has been selected."
140 | fi
141 |
142 | if [ "${STANDARD_CHOICE}" = "Hi59" ] && [ "${PLAYBACKVIEW_CHOICE}" != "Unfiltered" ] ; then
143 | echo "WARNING: For playback of HD signals, we recommend the 'Unfiltered' view."
144 | fi
145 | if [ "${STANDARD_CHOICE}" = "Hi59" ] && [ "${ASPECT_RATIO_CHOICE}" != "16/9" ] ; then
146 | echo "WARNING: We noticed that you're recording Hi59 but to ${ASPECT_RATIO_CHOICE} rather than 16/9. Maybe it's fine, just noting."
147 | fi
148 |
149 | if [ "${SIGNAL_INT_CHOICE}" != "auto" ] && [ -n "${SIGNAL_INT_CHOICE}" ] ; then
150 | echo "WARNING: The configuration ignores the interlacement of the input and forces it to ${SIGNAL_INT_CHOICE}. Set to 'auto' if you prefer to keep the interlacement as the device describes it."
151 | fi
152 | }
153 |
154 | _get_output_filename(){
155 | # Get user suffix preference of default per video codec
156 | if [[ -z "${DIR}" ]] ; then
157 | DIR="$(pwd)"
158 | fi
159 | if [ "${YES_SUFFIX}" = 'true' ] ; then
160 | SUFFIX=""
161 | if [ -n "${USER_SUFFIX}" ] ; then
162 | SUFFIX="${USER_SUFFIX}"
163 | elif [ "${DEVICE_INPUT_CHOICE}" = "0" ] ; then
164 | case "${VIDEO_CODEC_CHOICE}" in
165 | "FFV1 version 3") SUFFIX="_ffv1" ;;
166 | "JPEG2000") SUFFIX="_j2k" ;;
167 | "ProRes") SUFFIX="_prores" ;;
168 | "ProRes (HQ)") SUFFIX="_prores" ;;
169 | "h264") SUFFIX="_h264" ;;
170 | "HuffYUV") SUFFIX="_huff" ;;
171 | esac
172 | fi
173 | fi
174 |
175 | # Get extension by container choice
176 | if [ "${DEVICE_INPUT_CHOICE}" = "0" ] ; then
177 | case "${CONTAINER_CHOICE}" in
178 | "Matroska") EXTENSION="mkv" ;;
179 | "QuickTime") EXTENSION="mov" ;;
180 | "AVI") EXTENSION="avi" ;;
181 | "MXF") EXTENSION="mxf" ;;
182 | "MP4") EXTENSION="mp4" ;;
183 | esac
184 | elif [ "${DEVICE_INPUT_CHOICE}" = "1" ] ; then
185 | EXTENSION="dv"
186 | elif [ "${DEVICE_INPUT_CHOICE}" = "2" ] ; then
187 | case "${AUDIO_MODE_CODEC_CHOICE}" in
188 | "24-bit PCM") EXTENSION="wav" ;;
189 | "24-bit FLAC") EXTENSION="flac" ;;
190 | esac
191 | fi
192 |
193 | echo "${DIR}/${PREFIX}${ID}${SUFFIX}.${EXTENSION}"
194 | }
195 |
196 | _get_decklink_input_list(){
197 | # get information on what input device options are available
198 | #unset DECKLINK_DEVICES
199 | "${FFMPEG_BIN}" -nostdin -v 0 -sources decklink | awk -F'[][]' '{print $2}' | grep -v "^$"
200 | }
201 |
202 | _get_dvrescue_input_list(){
203 | # set dvrescue input options
204 | unset DVRESCUE_DEVICES
205 | dvrescue -list_devices | grep "\[DV\]"
206 | if [ "${OS_TYPE}" = "linux" ] ; then
207 | echo "FFmpeg iec61883 Default"
208 | fi
209 | }
210 |
211 | _get_audio_device_list(){
212 | if [ "${OS_TYPE}" = "linux" ] ; then
213 | arecord -l | grep -E '\[.*\]' | cut -d ':' -f1-2 | awk '{$1=$1;print}'
214 | elif [ "${OS_TYPE}" = "macOS" ] ; then
215 | "${FFMPEG_BIN}" -nostdin -hide_banner -f avfoundation -list_devices 1 -i dummy 2>&1 | grep -A 10 "AVFoundation audio devices" | grep -o "\[[0-9]\].*" | cut -d " " -f2-
216 | fi
217 | }
218 |
219 | _get_summary(){
220 | if [[ ! -f "${CONFIG_FILE}" ]] ; then
221 | echo "VRecord configuration file is missing, please visit the Settings panel."
222 | else
223 | . "${CONFIG_FILE}"
224 | if [ "${DEVICE_INPUT_CHOICE}" = "0" ] ; then
225 | echo "Device Input: Decklink"
226 | echo "Settings: ${VIDEO_CODEC_CHOICE} ${VIDEO_BIT_DEPTH_CHOICE} ${CONTAINER_CHOICE} File"
227 | echo "from ${VIDEO_INPUT_CHOICE} video input and ${AUDIO_INPUT_CHOICE} audio input"
228 | echo "Audio channel mapping: ${AUDIO_MAPPING_CHOICE}"
229 | echo "Recording audio to ${AUDIO_CODEC_CHOICE}"
230 | echo "Input utility: ${DECKLINK_UTILITY_CHOICE}"
231 | echo "Timecode format: ${TIMECODE_CHOICE}"
232 | echo "Standard: ${STANDARD_CHOICE}"
233 | echo "Inputs recorded to ${DIR}"
234 | echo "Auxiliary files created in ${LOGDIR}"
235 | echo "Access MP4: ${MP4_CHOICE}"
236 | echo "Frame MD5s: ${FRAMEMD5_CHOICE}"
237 | echo "QCTools XML: ${QCTOOLSXML_CHOICE}"
238 | echo "Playback: ${PLAYBACKVIEW_CHOICE} view (for recording) and ${PLAYBACKVIEW_CHOICE_PASS} view (for passthrough)"
239 | elif [ "${DEVICE_INPUT_CHOICE}" = "1" ] ; then
240 | echo "Device Input: DV"
241 | echo "Copying video from ${DVRESCUE_INPUT_CHOICE}."
242 | echo "Inputs recorded to ${DIR}"
243 | echo "Auxiliary files created in ${LOGDIR}"
244 | elif [ "${DEVICE_INPUT_CHOICE}" = "2" ] ; then
245 | echo "Device Input: Audio"
246 | echo "Recording audio from ${AUDIO_DEV_CHOICE}."
247 | echo "Audio codec: ${AUDIO_MODE_CODEC_CHOICE}"
248 | echo "${AUDIO_CHANNEL_CHOICE} channels"
249 | echo "Sampling rate: ${AUDIO_MODE_SR_CHOICE} "
250 | echo "Inputs recorded to ${DIR}"
251 | echo "Auxiliary files created in ${LOGDIR}"
252 | fi
253 | fi
254 | }
255 |
--------------------------------------------------------------------------------
/Resources/vrecord_gui_mode.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/amiaopensource/vrecord/15754ca4758e9b80502ea12b1e45de5691d80608/Resources/vrecord_gui_mode.png
--------------------------------------------------------------------------------
/Resources/vrecord_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/amiaopensource/vrecord/15754ca4758e9b80502ea12b1e45de5691d80608/Resources/vrecord_logo.png
--------------------------------------------------------------------------------
/Resources/vrecord_logo_audio.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/amiaopensource/vrecord/15754ca4758e9b80502ea12b1e45de5691d80608/Resources/vrecord_logo_audio.png
--------------------------------------------------------------------------------
/Resources/vrecord_logo_documentation.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/amiaopensource/vrecord/15754ca4758e9b80502ea12b1e45de5691d80608/Resources/vrecord_logo_documentation.png
--------------------------------------------------------------------------------
/Resources/vrecord_logo_edit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/amiaopensource/vrecord/15754ca4758e9b80502ea12b1e45de5691d80608/Resources/vrecord_logo_edit.png
--------------------------------------------------------------------------------
/Resources/vrecord_logo_help.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/amiaopensource/vrecord/15754ca4758e9b80502ea12b1e45de5691d80608/Resources/vrecord_logo_help.png
--------------------------------------------------------------------------------
/Resources/vrecord_logo_logs.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/amiaopensource/vrecord/15754ca4758e9b80502ea12b1e45de5691d80608/Resources/vrecord_logo_logs.png
--------------------------------------------------------------------------------
/Resources/vrecord_logo_playback.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/amiaopensource/vrecord/15754ca4758e9b80502ea12b1e45de5691d80608/Resources/vrecord_logo_playback.png
--------------------------------------------------------------------------------
/Resources/vrecord_qcview_splitfields.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/amiaopensource/vrecord/15754ca4758e9b80502ea12b1e45de5691d80608/Resources/vrecord_qcview_splitfields.png
--------------------------------------------------------------------------------
/Resources/vrecord_settings.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/amiaopensource/vrecord/15754ca4758e9b80502ea12b1e45de5691d80608/Resources/vrecord_settings.png
--------------------------------------------------------------------------------
/Resources/vrecord_visual_numerical.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/amiaopensource/vrecord/15754ca4758e9b80502ea12b1e45de5691d80608/Resources/vrecord_visual_numerical.jpg
--------------------------------------------------------------------------------
/Resources/vrecord_visual_numerical_2016-11-22.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/amiaopensource/vrecord/15754ca4758e9b80502ea12b1e45de5691d80608/Resources/vrecord_visual_numerical_2016-11-22.jpg
--------------------------------------------------------------------------------
/Resources/vrecord_window_visual.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/amiaopensource/vrecord/15754ca4758e9b80502ea12b1e45de5691d80608/Resources/vrecord_window_visual.jpg
--------------------------------------------------------------------------------
/vplay:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # vplay: a script to play back digitized video files with vrecord visualizations
4 |
5 | # Ensure a file is passed as an argument
6 | if [ -z "$1" ]; then
7 | echo "Usage: vplay [video file]"
8 | exit 1
9 | fi
10 |
11 | # Path to the Lua script
12 | RESOURCE_PATH="$(dirname "$0")/Resources"
13 | LUA_SCRIPT="${RESOURCE_PATH}/qcview.lua"
14 |
15 | # Check if the file exists
16 | VIDEO_FILE="$1"
17 | if [ ! -f "$VIDEO_FILE" ]; then
18 | echo "Error: File '$VIDEO_FILE' not found."
19 | exit 1
20 | fi
21 |
22 | # Check if mpv is installed
23 | if ! command -v mpv &> /dev/null; then
24 | echo "Error: mpv is not installed. Please install mpv."
25 | exit 1
26 | fi
27 |
28 | # mpv options
29 | MPVOPTS=(--no-osc)
30 | MPVOPTS+=(--load-scripts=no)
31 | MPVOPTS+=(--script="$LUA_SCRIPT")
32 | MPVOPTS+=(--really-quiet)
33 | MPVOPTS+=(--title="vplay - $(basename "$VIDEO_FILE")")
34 |
35 | # Play the file with visualizations
36 | mpv "${MPVOPTS[@]}" "$VIDEO_FILE"
37 |
--------------------------------------------------------------------------------
/vrecord.1:
--------------------------------------------------------------------------------
1 | .TH vrecord 1 "https://github.com/amiaopensource/vrecord" "2024-07-18" "AMIA Open Source"
2 | .\" Turn off justification for nroff.
3 | .if n .ad l
4 | .\" Turn off hyphenation.
5 | .nh
6 | .SH NAME
7 | vrecord - An Open-Source Video Capture Tool for Archivists
8 | .SH SYNOPSIS
9 | \fBvrecord\fR [\fB-e\fR | \fB-r \fIidentifier\fR | \fB-p\fR | \fB-a\fR | \fB-x\fR | \fB-n\fR | \fB-v\fR | \fB-h\fR]
10 | .SH DESCRIPTION
11 | Vrecord is open-source software for capturing a video signal and turning it into a digital file. Its purpose is to make videotape digitization or transfer easier. Vrecord can capture analog and digital signals through a variety of inputs and can create digital video files in a variety of formats and codecs. Vrecord has been designed with needs of audiovisual archivists in mind.
12 | .PP
13 | Currently vrecord only supports Blackmagic Design capture cards with the Blackmagic driver installed.
14 | .SH OPTIONS
15 | .TP 4
16 | .B -e
17 | Running vrecord in \fBEdit Mode\fR opens a GUI window that allows you to change your recording options and then start digitizing a tape.
18 | .TP
19 | .B -r
20 | \fBRecord Mode\fR enables recording of a signal. This is the default mode.
21 | .TP
22 | .B -p
23 | \fBPassthrough Mode\fR means that the vrecord window will appear with video feeds and scopes, but the incoming video signal will not be recorded to a file. Passthrough mode is best used for tasks like testing equipment or setting up a tape to bars before actually recording. When you are finished using passthrough mode simply close the vrecord window.
24 | .TP
25 | .B -a
26 | \fBAudio Passthrough Mode\fR is the same as Passthrough Mode with the addition of audio bars to monitor levels. It can be used to check audio track layout and confirm input levels before starting a transfer. Currently Audio Passthrough Mode does not support the Visual + Numerical view option.
27 | .TP
28 | .B -x
29 | \fBClear Configuration:\fR Use if you would like to clear all options set in the configuration file.
30 | .TP
31 | .B -n
32 | \fBReset environmental variables:\fR Use if you would like to reset stored environmental variables such as path to ffmpeg-dl dependency.
33 | .TP
34 | .B -v
35 | In the \fBVerbose Mode\fR ffmpeg runs with '-loglevel debug'. Using this option creates a very large log file, so avoid using this option with 'Visual + Numerical' or any playback option that display the log as part of the view.
36 | .TP
37 | .B -h
38 | \fBHelp:\fR Displays basic usage information.
39 | .SH ADVANCED OPTIONS
40 | .TP 4
41 | .B -I
42 | Provide a string of input options for the recording ffmpeg to use. For example "vrecord -I '-loglevel trace'" would force an ffmpeg logging level that is usually unaccessible via vrecord preferences.
43 | .TP
44 | .B -O
45 | Provide a string of output options for the recording ffmpeg to use.
46 | .TP
47 | .B -D
48 | Provide a directory containing vrecord dependencies to store their paths in vrecord's environmental variables instead of defaults.
49 | .TP
50 | .B -i
51 | Provide a file as an input to vrecord, rather than using the decklink device. For testing without a decklink device.
52 | .TP
53 | .B -G
54 | Share warnings from gtkdialog and vrecord, otherwise there are suppressed by default.
55 | .TP
56 | .B -c
57 | Provide a recording configuration file, rather than use the default one.
58 | .SH LICENSE
59 | Vrecord is licensed under a Creative Commons Attribution 4.0 International License.
60 |
--------------------------------------------------------------------------------
/vrecord_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/amiaopensource/vrecord/15754ca4758e9b80502ea12b1e45de5691d80608/vrecord_logo.png
--------------------------------------------------------------------------------
/vtest:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | # vtest
4 | # Open-source software for piping test streams and files from the computer out to a monitor through a BlackMagic card.
5 |
6 | SCRIPTNAME=$(basename "${0}")
7 | SCRIPTDIR=$(dirname "${0}")
8 | CONFIG_FILE="${HOME}/.${SCRIPTNAME}.conf"
9 | unset VERSION
10 | if [[ $(dirname "$(command -v "${0}")") = "/usr/local/bin" ]] ; then
11 | VERSION=$(TMP=$(brew info vrecord | grep ".*\*$" | grep -Eo "/vrecord/.* \(") ; echo "${TMP:9:(${#TMP}-11)}")
12 | fi
13 | BREW_PREFIX=$(brew --prefix ffmpegdecklink 2>/dev/null)
14 | FFMPEG_DECKLINK=("${BREW_PREFIX}/bin/ffmpeg-dl")
15 | FFPLAY_DECKLINK=("${BREW_PREFIX}/bin/ffplay-dl")
16 | DEVICE_NAME=$("${FFMPEG_DECKLINK[@]}" -f decklink -list_devices 1 -i dummy 2>&1 | grep -o "^\[decklink[^\]*][^']*'.*" | cut -d "'" -f2- | sed "s/'$//g")
17 |
18 | if [[ "$("${FFMPEG_DECKLINK[@]}" -version 2>&1 | grep "Library not loaded" >/dev/null)" || ! -f "${FFMPEG_DECKLINK}" || ! -f "${FFPLAY_DECKLINK}" ]] ; then
19 | echo "Please reinstall 'ffmpegdecklink':"
20 | echo " brew reinstall amiaopensource/amiaos/ffmpegdecklink"
21 | echo "Exiting."
22 | exit 1
23 | fi
24 |
25 | _usage(){
26 | cat <&1 | grep -o "^\[decklink[^\]*][^']*'.*" | cut -d "'" -f2- | sed "s/'$//g")
103 | if [[ -z "${DECKLINK_OUTPUT}" ]] ; then
104 | _report -w "No decklink inputs were found. Running \`${FFMPEG_DECKLINK} -hide_banner -f decklink -list_devices 1 -i dummy\` results in:"
105 | DECKLINK_RESULT=$("${FFMPEG_DECKLINK[@]}" -hide_banner -f decklink -list_devices 1 -i dummy)
106 | echo "${DECKLINK_RESULT}"
107 | _report -w "Please check connections and drivers and try again."
108 | exit 1
109 | else
110 | FIRST_DECKLINK_OUTPUT="$(echo "${DECKLINK_OUTPUT}" | head -n 1 )"
111 | fi
112 | }
113 |
114 | _lookup_video_source(){
115 | case "${1}" in
116 | "testsrc") VIDEO_SOURCE="testsrc" ;;
117 | "testsrc2") VIDEO_SOURCE="testsrc2" ;;
118 | "yuvtestsrc") VIDEO_SOURCE="yuvtestsrc" ;;
119 | "rgbtestsrc") VIDEO_SOURCE="rgbtestsrc" ;;
120 | "quit") _report -d "Bye then" ; exit 0 ;;
121 | *) _report -w "Error: Not a valid option, select a valid number." ; return 1 ;;
122 | esac
123 | }
124 |
125 | _lookup_standard(){
126 | case "${1}" in
127 | "SD: NTSC (720x486, 30000/1001 fps)")
128 | STANDARD="ntsc"
129 | FRAME_SIZE="720x486"
130 | FRAME_RATE="30000/1001"
131 | MIDDLE_OPTS=(-vf setfield="bff")
132 | ;;
133 | "SD: PAL (720x576, 25000/1000 fps)")
134 | STANDARD="pal "
135 | FRAME_SIZE="720x576"
136 | FRAME_RATE="25000/1000"
137 | MIDDLE_OPTS=(-vf setfield="tff")
138 | ;;
139 | "HD: 1080p 25 fps (1920x1080, 25000/1000 fps)")
140 | STANDARD="Hp25"
141 | FRAME_SIZE="1920x1080"
142 | FRAME_RATE="25000/1000"
143 | ;;
144 | "HD: 1080p 29.97 fps (1920x1080, 30000/1001 fps)")
145 | STANDARD="Hp29"
146 | FRAME_SIZE="1920x1080"
147 | FRAME_RATE="30000/1001"
148 | ;;
149 | "HD: 1080p 30 fps (1920x1080, 30000/1000 fps)")
150 | STANDARD="Hp30"
151 | FRAME_SIZE="1920x1080"
152 | FRAME_RATE="30000/1000"
153 | ;;
154 | "HD: 1080p 50 fps (1920x1080, 50000/1000 fps)")
155 | STANDARD="Hp50"
156 | FRAME_SIZE="1920x1080"
157 | FRAME_RATE="50000/1000"
158 | ;;
159 | "HD: 1080i 50 fps (1920x1080, 25000/1000 fps)")
160 | STANDARD="Hi50"
161 | FRAME_SIZE="1920x1080"
162 | FRAME_RATE="25000/1000"
163 | MIDDLE_OPTS=(-vf setfield="tff")
164 | ;;
165 | "HD: 1080p 59.94 fps (1920x1080, 60000/1001 fps)")
166 | STANDARD="Hp59"
167 | FRAME_SIZE="1920x1080"
168 | FRAME_RATE="60000/1001"
169 | ;;
170 | "HD: 1080i 59.94 fps (1920x1080, 30000/1001 fps)")
171 | STANDARD="Hi59"
172 | FRAME_SIZE="1920x1080"
173 | FRAME_RATE="30000/1001"
174 | MIDDLE_OPTS=(-vf setfield="tff")
175 | ;;
176 | "HD: 1080p 60 fps (1920x1080, 60000/1001 fps)")
177 | STANDARD="Hp60"
178 | FRAME_SIZE="1920x1080"
179 | FRAME_RATE="60000/1001"
180 | ;;
181 | "quit") _report -d "Bye then" ; exit 0 ;;
182 | *) _report -w "Error: Not a valid option, select a valid number." ; return 1 ;;
183 | esac
184 | }
185 |
186 | _lookup_audio_source(){
187 | AUDIO_OPTS=(-f lavfi -i)
188 | case "${1}" in
189 | "Stereo sine wave, 1000 Hz")
190 | AUDIO_OPTS+=(aevalsrc="sin(1000*2*PI*t):channel_layout=stereo")
191 | ;;
192 | "Stereo sine wave (L, 1000 Hz) and cosine wave (R, 440 Hz)")
193 | AUDIO_OPTS+=(aevalsrc="sin(1000*2*PI*t)|cos(440*2*PI*t):c=FL|FR")
194 | ;;
195 | "Mono sine wave, 1000 Hz")
196 | AUDIO_OPTS+=(aevalsrc="sin(1000*2*PI*t):channel_layout=mono")
197 | ;;
198 | "quit") _report -d "Bye then" ; exit 0 ;;
199 | *) _report -w "Error: Not a valid option, select a valid number." ; return 1 ;;
200 | esac
201 | }
202 |
203 | _duration_check(){
204 | # Sets up function to verify validity of duration settings
205 | if [[ -n "${DURATION}" ]] ; then
206 | if ! [[ "${DURATION}" =~ ^$|^[0-9]+$|^[0-9]+\.[0-9]*$|^\.[0-9]+$ ]] ; then
207 | _report -w "Illegal value for recording time. Input must only be numbers."
208 | exit 1
209 | fi
210 | if (( $(bc <<< "${DURATION} == 0") )) ; then
211 | _report -w "A recording duration of zero is invalid."
212 | exit 1
213 | fi
214 | fi
215 | }
216 |
217 | _config_check(){
218 | if [[ -f "${CONFIG_FILE}" ]] ; then
219 | . "${CONFIG_FILE}"
220 | else
221 | touch "${CONFIG_FILE}"
222 | exec "${SCRIPTDIR}/${SCRIPTNAME}" -e
223 | fi
224 | }
225 |
226 | _edit_prefs() {
227 | _expand_list2items(){
228 | LIST=( "$@" )
229 | for i in "${LIST[@]}" ; do
230 | echo "${i}"
231 | done
232 | }
233 |
234 | _get_index_of_value(){
235 | # run with function, value to look for as first argument, and array to look in as 2nd argument, such function as
236 | # _get_index_of_value "${VIDEO_INPUT_CHOICE}" "${VIDEO_INPUT_OPTIONS[@]}"
237 | VALUE="${1}"
238 | shift
239 | LIST=( "$@" )
240 | INDEX=0
241 | MATCH=""
242 | for ITEM in "${LIST[@]}" ; do
243 | if [[ "${VALUE}" = "${ITEM}" ]] ; then
244 | MATCH="$INDEX"
245 | fi
246 | (( ++INDEX ))
247 | done
248 | if [[ -n "${MATCH}" ]] ; then
249 | echo -n "${MATCH}"
250 | fi
251 | }
252 |
253 | export MAIN_DIALOG="
254 |
255 |
256 |
257 |
258 |
259 |
260 |
261 |
262 |
263 | VIDEO_SOURCE_CHOICE
264 | $(_expand_list2items "${VIDEO_SOURCE_OPTIONS[@]}")
265 |
266 |
267 |
268 |
269 |
270 |
271 |
272 | STANDARD_CHOICE
273 | $(_expand_list2items "${STANDARD_OPTIONS[@]}")
274 |
275 |
276 |
277 |
278 |
279 |
280 |
281 | AUDIO_SOURCE_CHOICE
282 | $(_expand_list2items "${AUDIO_SOURCE_OPTIONS[@]}")
283 |
284 |
285 |
286 |
287 |
288 |
289 |
290 | DURATION
291 |
292 |
293 |
294 |
295 |
298 |
300 |
301 |
302 |
303 | "
304 |
305 | eval $(gtkdialog --center --program MAIN_DIALOG)
306 | }
307 |
308 | _edit_mode(){
309 | _edit_prefs
310 | # check that gtkdialog _edit_prefs was exited with OK button
311 | if [[ "${EXIT}" = "OK" ]] ; then
312 | _duration_check
313 | # report back options
314 | _report -d "Test variables set:"
315 | _report -d " VIDEO SOURCE = ${VIDEO_SOURCE_CHOICE}"
316 | _report -d " VIDEO STANDARD = ${STANDARD_CHOICE}"
317 | _report -d " AUDIO SOURCE = ${AUDIO_SOURCE_CHOICE}"
318 | echo ""
319 | # write config file
320 | cat > "${CONFIG_FILE}" << EOF
321 | #${SCRIPTNAME} config file
322 | ${CONFIG_COMMENT}
323 | ${VIDEO_SOURCE_CHOICE_COMMENT}
324 | VIDEO_SOURCE_CHOICE="${VIDEO_SOURCE_CHOICE}"
325 |
326 | ${STANDARD_CHOICE_COMMENT}
327 | STANDARD_CHOICE="${STANDARD_CHOICE}"
328 |
329 | ${AUDIO_SOURCE_CHOICE_COMMENT}
330 | AUDIO_SOURCE_CHOICE="${AUDIO_SOURCE_CHOICE}"
331 |
332 | ${DURATION_COMMENT}
333 | DURATION="${DURATION}"
334 | EOF
335 | . "${CONFIG_FILE}"
336 | else
337 | _report -d "Editing of preferences was canceled by the user."
338 | fi
339 | }
340 |
341 | # selections GUI dialog
342 | CONF="
343 | # Set transparency: 0 is transparent, 1 is opaque
344 | *.transparency=0.95
345 | # Set window title
346 | *.title = vtest configuration
347 | # video test source
348 | VIDEO_SOURCE_CHOICE.x = 20
349 | VIDEO_SOURCE_CHOICE.y = 440
350 | VIDEO_SOURCE_CHOICE.type = radiobutton
351 | VIDEO_SOURCE_CHOICE.label = Select video source:
352 | VIDEO_SOURCE_CHOICE.default = ${VIDEO_SOURCE}
353 | VIDEO_SOURCE_CHOICE.option = testsrc
354 | VIDEO_SOURCE_CHOICE.option = testsrc2
355 | VIDEO_SOURCE_CHOICE.option = yuvtestsrc
356 | VIDEO_SOURCE_CHOICE.option = rgbtestsrc
357 | # video standard
358 | STANDARD_CHOICE.x = 20
359 | STANDARD_CHOICE.y = 210
360 | STANDARD_CHOICE.type = radiobutton
361 | STANDARD_CHOICE.label = Select Television Standard
362 | STANDARD_CHOICE.default = ${STANDARD_CHOICE}
363 | STANDARD_CHOICE.option = SD: NTSC (720x486, 30000/1001 fps)
364 | STANDARD_CHOICE.option = SD: PAL (720x576, 25000/1000 fps)
365 | STANDARD_CHOICE.option = HD: 1080p 25 fps (1920x1080, 25000/1000 fps)
366 | STANDARD_CHOICE.option = HD: 1080p 29.97 fps (1920x1080, 30000/1001 fps)
367 | STANDARD_CHOICE.option = HD: 1080p 30 fps (1920x1080, 30000/1000 fps)
368 | STANDARD_CHOICE.option = HD: 1080p 50 fps (1920x1080, 50000/1000 fps)
369 | STANDARD_CHOICE.option = HD: 1080i 50 fps (1920x1080, 25000/1000 fps)
370 | STANDARD_CHOICE.option = HD: 1080p 59.94 fps (1920x1080, 60000/1001 fps)
371 | STANDARD_CHOICE.option = HD: 1080i 59.94 fps (1920x1080, 30000/1001 fps)
372 | STANDARD_CHOICE.option = HD: 1080p 60 fps (1920x1080, 60000/1001 fps)
373 | # audio test source
374 | AUDIO_SOURCE_CHOICE.x = 20
375 | AUDIO_SOURCE_CHOICE.y = 120
376 | AUDIO_SOURCE_CHOICE.type = radiobutton
377 | AUDIO_SOURCE_CHOICE.label = Select audio source:
378 | AUDIO_SOURCE_CHOICE.default = ${AUDIO_SOURCE_CHOICE}
379 | AUDIO_SOURCE_CHOICE.option = Stereo sine wave, 1000 Hz
380 | AUDIO_SOURCE_CHOICE.option = Stereo sine wave (L, 1000 Hz) and cosine wave (R, 440 Hz)
381 | AUDIO_SOURCE_CHOICE.option = Mono sine wave, 1000 Hz
382 | # duration
383 | DURATION.x = 20
384 | DURATION.y = 50
385 | DURATION.type = combobox
386 | DURATION.label = Set test time in minutes, or leave blank for indefinite:
387 | DURATION.default = ${DURATION}
388 | DURATION.option = 1
389 | DURATION.option = 5
390 | DURATION.option = 10
391 | # Add a cancel button with default label
392 | cb.type=cancelbutton
393 | "
394 |
395 | # list of selections for each vtest option
396 | VIDEO_SOURCE_OPTIONS=("testsrc" "testsrc2" "yuvtestsrc" "rgbtestsrc" "quit")
397 | STANDARD_OPTIONS=("SD: NTSC (720x486, 30000/1001 fps)" "SD: PAL (720x576, 25000/1000 fps)" "HD: 1080p 25 fps (1920x1080, 25000/1000 fps)" "HD: 1080p 29.97 fps (1920x1080, 30000/1001 fps)" "HD: 1080p 30 fps (1920x1080, 30000/1000 fps)" "HD: 1080p 50 fps (1920x1080, 50000/1000 fps)" "HD: 1080i 50 fps (1920x1080, 25000/1000 fps)" "HD: 1080p 59.94 fps (1920x1080, 60000/1001 fps)" "HD: 1080i 59.94 fps (1920x1080, 30000/1001 fps)" "HD: 1080p 60 fps (1920x1080, 60000/1001 fps)" "quit")
398 | AUDIO_SOURCE_OPTIONS=("Stereo sine wave, 1000 Hz" "Stereo sine wave (L, 1000 Hz) and cosine wave (R, 440 Hz)" "Mono sine wave, 1000 Hz" "quit")
399 |
400 | # comments to be printed to vtest config file
401 | CONFIG_COMMENT="# Set each value to empty quotes (like \"\") to prompt during run, or set to a provided option."
402 | VIDEO_SOURCE_CHOICE_COMMENT="#Set VIDEO_SOURCE_CHOICE to one of these valid options or leave blank to request each run: $(printf "\"%s\" " "${VIDEO_SOURCE_OPTIONS[@]}")"
403 | STANDARD_CHOICE_COMMENT="#Set STANDARD_CHOICE to one of these valid options or leave blank to request each run: $(printf "\"%s\" " "${STANDARD_CHOICE_OPTIONS[@]}")"
404 | AUDIO_SOURCE_CHOICE_COMMENT="#Set AUDIO_SOURCE_CHOICE to one of these valid options or leave blank to request each run: $(printf "\"%s\" " "${AUDIO_SOURCE_OPTIONS[@]}")"
405 | DURATION_COMMENT="#Set the recording time as a number (integer or decimal) in minutes."
406 |
407 | # local and edit mode setup
408 | if [[ "${RUNTYPE}" = "edit" ]] || [[ "${RUNTYPE}" = "local" ]] ; then
409 | _config_check
410 | if [[ "${RUNTYPE}" = "edit" ]] ; then
411 | _edit_mode
412 | fi
413 | # terminal dialog for undeclared options
414 | if [[ "${VIDEO_SOURCE_CHOICE}" && -n "${VIDEO_SOURCE_CHOICE}" ]] ; then
415 | _lookup_video_source "${VIDEO_SOURCE_CHOICE}"
416 | else
417 | _report -q "Which video source are you testing?"
418 | PS3="Select a video source: "
419 | select VIDEO_SOURCE_CHOICE in "${VIDEO_SOURCE_OPTIONS[@]}" ; do
420 | _lookup_video_source "${VIDEO_SOURCE_CHOICE}"
421 | [[ "${?}" -eq 0 ]] && break
422 | done
423 | fi
424 |
425 | if [[ "${STANDARD_CHOICE}" && -n "${STANDARD_CHOICE}" ]] ; then
426 | _lookup_standard "${STANDARD_CHOICE}"
427 | else
428 | _report -q "Which television standard are you testing?"
429 | PS3="Select a television standard: "
430 | select STANDARD_CHOICE in "${STANDARD_OPTIONS[@]}" ; do
431 | _lookup_standard "${STANDARD_CHOICE}"
432 | [[ "${?}" -eq 0 ]] && break
433 | done
434 | fi
435 |
436 | if [[ "${AUDIO_SOURCE_CHOICE}" && -n "${AUDIO_SOURCE_CHOICE}" ]] ; then
437 | _lookup_audio_source "${AUDIO_SOURCE_CHOICE}"
438 | else
439 | _report -q "Which audio source are you testing?"
440 | PS3="Select an audio source: "
441 | select AUDIO_SOURCE_CHOICE in "${AUDIO_SOURCE_OPTIONS[@]}" ; do
442 | _lookup_audio_source "${AUDIO_SOURCE_CHOICE}"
443 | [[ "${?}" -eq 0 ]] && break
444 | done
445 | fi
446 | _duration_check
447 | if [[ -n "${DURATION}" ]] ; then
448 | DUR_SECONDS=$(bc <<< "${DURATION} * 60")
449 | DURATION=(-t "${DUR_SECONDS}")
450 | fi
451 | fi
452 |
453 | # set up playout options
454 | _get_decklink_output
455 | VIDEO_OPTS=(-f lavfi -i "${VIDEO_SOURCE}"=s="${FRAME_SIZE}":r="${FRAME_RATE}")
456 | DECKLINK_OPTS=(-f decklink)
457 | DECKLINK_OPTS+=(-c:v v210)
458 | DECKLINK_OPTS+=(-c:a pcm_s16le)
459 | DECKLINK_OPTS+=(-ar 48000)
460 | DECKLINK_OPTS+=(-ac 2)
461 | if [[ -n "${DURATION}" ]] ; then
462 | MIDDLE_OPTS+=(-t "${DUR_SECONDS}")
463 | fi
464 | if [[ "${RUNTYPE}" = "audio" ]] ; then
465 | AUDIO_MODE_VOPTS="if(lt(mod(t\,4)\,1)\,0.1*sin(1000*2*PI*t)\,0)|if(lt(mod(t+2\,4)\,1)\,0.1*sin(1000*2*PI*t)\,0):s=48000:c=stereo[a];color=color=black:s=720x486:r=30000/1001,drawtext=fontfile=/Library/Fonts/Courier\ New.ttf:text=Left:fontcolor=white:enable=lt(mod(t\,4)\,1),drawtext=fontfile=/Library/Fonts/Courier\ New.ttf:text=Right:fontcolor=white:enable=lt(mod(t+2\,4)\,1)[b];[a]showvolume=r=30000/1001,scale=720x250[a1];[b][a1]overlay=0:486-250,format=yuv422p,setfield=bff"
466 | AUDIO_MODE_AOPTS="if(lt(mod(t\,4)\,1)\,0.1*sin(1000*2*PI*t)\,0)|if(lt(mod(t+2\,4)\,1)\,0.1*sin(1000*2*PI*t)\,0):s=48000:c=stereo,aformat=sample_fmts=s32:sample_rates=48000:channel_layouts=stereo"
467 | fi
468 |
469 | # playback process
470 | _report -d "Press q or ctrl+c to end playback."
471 |
472 | if [[ "${RUNTYPE}" = "ntsc" ]] ; then
473 | "${FFMPEG_DECKLINK}" -f lavfi -i "smptebars=s=720x486:r=30000/1001" \
474 | -f lavfi -i sine -vf setfield=bff "${DECKLINK_OPTS[@]}" "${DECKLINK_OUTPUT}"
475 | elif [[ "${RUNTYPE}" = "pal" ]] ; then
476 | "${FFMPEG_DECKLINK}" -f lavfi -i "smptebars=s=720x576:r=25000/1000" \
477 | -f lavfi -i sine -vf setfield=tff "${DECKLINK_OPTS[@]}" "${DECKLINK_OUTPUT}"
478 | elif [[ "${RUNTYPE}" = "audio" ]] ; then
479 | "${FFMPEG_DECKLINK}" -f lavfi -i aevalsrc="${AUDIO_MODE_VOPTS}" -f lavfi -i aevalsrc="${AUDIO_MODE_AOPTS}" -map "1:a" -map "0:v" "${DECKLINK_OPTS[@]}" "${DECKLINK_OUTPUT}"
480 | elif [[ "${RUNTYPE}" = "file" ]] ; then
481 | "${FFMPEG_DECKLINK}" -i "${TESTFILE}" -f decklink -pix_fmt uyvy422 -c:a pcm_s16le -ar 48000 -ac 2 "${DECKLINK_OUTPUT}"
482 | elif [[ "${RUNTYPE}" = "local" ]] || [[ "${RUNTYPE}" = "edit" ]] ; then
483 | "${FFMPEG_DECKLINK}" "${VIDEO_OPTS[@]}" "${AUDIO_OPTS[@]}" "${MIDDLE_OPTS[@]}" "${DECKLINK_OPTS[@]}" "${DECKLINK_OUTPUT}"
484 | fi
485 | exit 0
486 |
--------------------------------------------------------------------------------
/vtest.1:
--------------------------------------------------------------------------------
1 | .TH vtest 1 "https://github.com/amiaopensource/vrecord" "2020-02-10" "AMIA Open Source"
2 | .\" Turn off justification for nroff.
3 | .if n .ad l
4 | .\" Turn off hyphenation.
5 | .nh
6 | .SH NAME
7 | \fBvtest\fR - Test streams from computer out to monitor through Blackmagic card
8 | .SH SYNOPSIS
9 | \fBvtest\fR [\fB-n\fR | \fB-p\fR | \fB-a\fR | \fB-l\fR | \fB-e\fR | \fB-f \fIfile\fR | \fB-h\fR]
10 | .SH DESCRIPTION
11 | \fBvtest\fR will pipe test files and output from the computer out to your monitor, via a Blackmagic capture card. It is useful for testing equipment without having to play a test tape.
12 | .SH OPTIONS
13 | .TP 4
14 | .B -n
15 | pipe NTSC SMPTE bars + sine wave tone through output device
16 | .TP
17 | .B -p
18 | pipe PAL SMPTE bars + sine wave tone through output device
19 | .TP
20 | .B -a
21 | pipe audio test for left and right channels through output device
22 | .TP
23 | .B -l
24 | pipe a local combination of video and audio test sources through output device (chooses the most recent combination stored in \fBvtest -e\fR)
25 | .TP
26 | .B -e
27 | edit the local combination of video and audio sources
28 | .TP
29 | .B -f
30 | play a test \fIfile\fR through output device (must be in format compatible with your Blackmagic device)
31 | .TP
32 | .B -h
33 | display basic usage information
34 | .SH LICENSE
35 | \fBvtest\fR is licensed under a Creative Commons Attribution 4.0 International License.
36 |
--------------------------------------------------------------------------------