~octaspire/tagmov

tagmov/README.org -rw-r--r-- 2.9 KiB
652fa626octaspire Fix indentation, fix test runner after failure test 4 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
#+TITLE: Utility for tagging movie files

* About

~tagmov~ is a utility program for tagging movie files
with things like progress bar and texts. When given
multiple inputs, combines them (stacks horizontally)
into one video.

* Getting Started

Prerequisites:

=Common Lisp= implementation (tested with SBCL), =Quicklisp=,
=make= and =ffmpeg= are required. =ffmpeg= must be compiled
with support for drawing text. Also, the default font used
is =IBMPlexMono-Bold.ttf=, so that should be installed, or
another font should be defined using the ~font-file~ option.

Get sources and build by issuing commands:

#+begin_src shell
git clone https://github.com/octaspire/tagmov.git
cd tagmov
make
#+end_src

* Usage

Please note that these examples require movie files
=video01.mp4= and =video02.mp4= to be present in
the current working directory.

If using a video with different name or different format,
please use the correct name in the following commands.

*** One Input

This adds a red progress bar and three texts to the video:

#+begin_src shell
./tagmov --font-color blue --text '1 3 10 10 Text at (10,100) during 1s-3s'      \
                           --text '2 3 10 60 This text is shown between 2s-3s'   \
         --font-color red  --font-size 40                                        \
                           --text '1 3 10 110 This is in red and different size' \
         --input video01.mp4 --bar red
#+end_src

*** Two Inputs

This combines the two given videos horizontally and adds two texts
into the result. Note how the ~x~-coordinate of the second text
is calculated using expression ~W-200~; this puts the text to
start 200 pixels from the right side of the video. This way
there is no need to calculate the position by adding the widths
of the different input videos manually. Note also, that there can
be more than two videos.

#+begin_src shell
./tagmov --font-color red -i video01.mp4 -i video02.mp4 \
         --text "1 3 100 100 BEFORE"                    \
         --text "1 3 W-200 100 AFTER"
#+end_src

The font and text size can also be changed. So can the
height of the progress bar. Font, size and color settings
are in effect as long as they are not changed.

See all available options with command ~tagmov --help~.

* License

#+begin_example
   Octaspire tagmov - Utility for tagging video files
   Copyright 2020 octaspire.com

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
#+end_example