1 \chapter{Auxiliary Programs}%
2 \label{cha:auxiliary_programs}
4 \section{Using Ydiff to check results}
5 \label{sec:ydiff_check_results}
8 Delivered with Infinity \CGG{} and in the \CGG{} path, there is a file \texttt{ydiff.C} This program compares the output from 2 files to see the differences . Do: \texttt{cd cin\_path} and key in \texttt{make ydiff}.
10 % The following does not work like this.
11 % { % uses braces to localize caption alignment changes.
13 % \captionsetup{justification=raggedright,singlelinecheck=false}
14 % \includegraphics[width=0.4\linewidth]{ydiff_same.png}
15 % \caption{Exact match}
17 % \hspace{0.4\linewidth}
18 % \captionsetup{justification=raggedleft,singlelinecheck=false}
19 % \includegraphics[width=0.4\linewidth]{ydiff_change.png}
20 % \caption{"giraffe" artifacts on 2 files spaced differently}
24 % We pack two pictures of unequal height next to each other and
26 % a) the first line of the caption.
27 % b) or tricks with strut, it's flush at the top.
29 \begin{minipage}[t]{0.49\textwidth}
31 \includegraphics[width=\linewidth]{ydiff_same.png}
35 \begin{minipage}[t]{0.49\textwidth}
37 \includegraphics[width=\linewidth]{ydiff_change.png}
38 \caption{"Giraffe" artifacts on 2 files spaced differently}
42 You can now use this to check the quality differences of various
43 outputs. For example, in this same directory key in:
44 % The indentation of an environment matches the type area.
46 \item \texttt{./ydiff /tmp/yourfile.mp4 /tmp/yourfile.mp4}
48 %\hspace{2em}\texttt{./ydiff /tmp/yourfile.mp4 /tmp/yourfile.mp4}
50 Since you are comparing a file to itself, you will see a clean looking white window in the left-hand corner and columns 2,3,4 will be all zeros. Run this same command with a 3rd spacing parameter of {}-1 as shown below, and you will see artifacts of comparing 2 files starting in a different position.
52 \item \texttt{./ydiff /tmp/yourfile.mp4 /tmp/yourfile.mp4 -1}
54 % \hspace{2em}\texttt{./ydiff /tmp/yourfile.mp4 /tmp/yourfile.mp4 -1}
56 Now render yourfile using different quality levels and run ydiff to compare the 2 results. You will see only noise difference which accounts for the quality level. Columns 2,3,4 might no longer be exactly zero but will represent only noise differences. The ydiff output is debug data with lines that show frame size in bytes, sum of error, and sum of absolute value of error. The frames size is sort of useless, the sum of error shows frame gray point drift and the abs error is the total linear color error between the images. At the very end is the total gray point drift and total absolute error on the last line.
59 \section{Image Sequence Creation}
60 \label{sec:image_sequence_creation}
61 \index{image sequence}
63 Example script to create a jpeglist sequence file is next. It can be modified to instead
64 create a list for \textit{exr}, \textit{gif}, \textit{ppm}, \textit{png}, \textit{tga}, or \textit{tiff}
65 sequences instead by changing JPEGLIST
66 to be EXRLIST, GIFLIST, PPMLIST, PNGLIST, TGALIST, or TIFFLIST.
67 \begin{lstlisting}[numbers=none]
72 geom=$(anytopnm "$1" | head -2 | tail -1)
73 w="$(echo $geom | cut -d " " -f1)"
74 h="$(echo $geom | cut -d " " -f2)"
77 echo "# First line is always format_typeLIST"
84 echo "# List of image files follows"
85 while [ $# -gt 0 ]; do
86 if [ x$(dirname "$1") = x"$dir" ]; then
95 To use this script, you will have to install the package on your operating system that
96 includes \textit{anytopnm} which is ususally \textit{netpbm}.
97 Example usage of this script follows:
99 \qquad \texttt{./jpeglist.sh outfile infiles/*.jpg}
101 where \textit{jpeglist.sh} is just the name chosen for this script which could
102 be anything but has to be executable, \textit{outfile} is the sequence list
103 that is created, \textit{infiles} is the directory containing the
104 format\_type files such as \textit{jpg} in this example.
106 \section{Details about .bcast5 Files}
107 \label{sec:details_.bcast5_files}
110 The following extensions of files in \CGG{}'s \texttt{.bcast5} directory are explained below.
112 % Labeling requires a parameter with the longest word of the labels.
113 \begin{labeling}{ladspa\_plugins{\dots}}
114 \item [.dat] represent saved \textit{data} for perpertual sessions and color palettes; maybe others
115 \item [.idx] original \textit{index} files that were created for loaded video to speed up seeking
116 \item [.mkr] ffmpeg specific \textit{marker} index file that is created for each video to aid seeks
117 \item [.rc] rc stands for \textit{run commands} so basically represents a script
118 \item [.toc] toc is \textit{table of contents} file for MPEG video files (a type of index)
119 \item [Cinelerra\_plugins] a list of the currently loaded plugins available in your \CGG{} session
120 \item [Cinelerra{}\_rc] the user's preferences and settings are saved in this file to be used on startup. This file can be carefully edited to change startup values for certain parameters, but if you inadvertently set up something incorrectly, you may end up crashing the program.
121 \item [ladspa\_plugins{\dots}] list of currently loaded ladspa plugins for each version of \CGG{} being used
122 \item [layout\#...\_rc] user-defined window layout setup with the layout name as part of the file name
123 \item [.xml] used for various backups or for the current settings of plugins that you have used
124 \item [.png] thumbnails of files in Resources so they do not have to be created over and over
127 \section{Focusing the 4 main windows as a group}
128 \label{sec:focus_group}
130 When working with multiple programs it is often the case where a set of windows needs to be minimized
131 or maximized temporarily while working with a different program. This can be a little awkward with
132 \CGG{} because there are 4 distinct windows that are treated individually. To improve the workflow
133 so that the 4 are minimized or maximized together as a group, you can use a routine called \textit{xdotool}.
134 This will help to automatically focus all 4 of the windows as one window while still letting the user
135 reposition the 4 screens. The "focusing windows as a group" option makes it so that you can quickly
136 move back and forth between this program and other programs. Here is how to do this.
139 \item Install xdotool \url{https://www.semicomplete.com/projects/xdotool/}
141 \item Iconifying all Cinelerra windows at once:
142 \newline xdotool search --name Cinelerra windowminimize \%@
143 \item Reactivating all Cinelerra windows at once:
144 \newline xdotool search --name Cinelerra windowactivate \%@
149 %%% TeX-master: "../CinelerraGG_Manual"