1 \chapter{Auxiliary Programs}%
2 \label{cha:Auxiliary_Programs}
3 \section{Using Ydiff to check results}
4 \label{sec:Ydiff to check results}
6 Delivered with Infinity Cinelerra and in the Cinelerra path, there is a file \ {}``ydiff.C''. \ This program compares the output from 2 files to see the differences . \ Do: cd cin\_path and key in ``make ydiff''.
9 You can now use this to check the quality differences of various outputs. \ For example, in this same directory key in:
10 \hspace{2em}./ydiff /tmp/yourfile.mp4 /tmp/yourfile.mp4
13 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.
16 \hspace{2em}./ydiff /tmp/yourfile.mp4 /tmp/yourfile.mp4 -1
19 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.
21 { % uses braces to localize caption alignment changes.
23 \captionsetup{justification=raggedright,singlelinecheck=false}
24 \includegraphics[width=0.4\linewidth]{ydiff_same.png}
27 \hspace{0.4\linewidth}
28 \captionsetup{justification=raggedleft,singlelinecheck=false}
29 \includegraphics[width=0.4\linewidth]{ydiff_change.png}
30 \caption{{\textquotedbl}giraffe{\textquotedbl} artifacts on 2 files spaced differently}
35 \section{Image Sequence Creation}
36 \label{sec:Image Sequence Creation}
37 Example script to create a jpeglist sequence file is next:
40 \begin{lstlisting}[numbers=none]
45 geom=`jpegtopnm "$1" | head -2 | tail -1`
46 w=`(set - $geom; echo $1)`
47 h=`(set - $geom; echo $2)`
50 echo "# First line is always JPEGLIST"
57 echo "# List of image files follows"
58 while [ $# -gt 0 ]; do
59 if [ x`dirname "$1"` = x"$dir" ]; then f=./`basename "$1"`; else f="$1"; fi
66 Example usage of this script follows:
69 \ \ \ \ \ jpeglist.sh outfile infiles*.jpg
72 \section{Webm / Vp9 Usage and Example File (credit Frederic Roenitz)}
73 \label{sec:Webm / Vp9 Usage and Example File}
75 There are some common VP9 rendering options files that support creation of video for YouTube, Dailymotion, and other online video services. \ Webm / VP9 \ is a media file format which is free to use under the BSD license and is open-source; thus there are no licensing issues to be concerned about. \ The Webm container is based on Matroska for video and Opus for audio.
78 Youtube easy startup steps are documented in the Appendix (\ref{sec:youtube_with_cinelerra}). \ These same steps have been verified to work for creating Dailymotion videos -- however, the created files must be renamed before uploading to change the youtube extension to webm instead for Dailymotion.
80 {}- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
83 Below is one of the VP9 rendering options file with documentation for specifics:
90 \# from https://developers.google.com/media/vp9/settings/vod/
91 \# 1280x720 (24, 25 or 30 frames per second)
97 \# VP9 supports several different bitrate modes:
99 \# Constant Quantizer (Q) \ \ Allows you to specify a fixed quantizer value; bitrate will vary
100 \# Constrained Quality (CQ) Allows you to set a maximum quality level. Quality may vary within bitrate parameters
101 \# Variable Bitrate (VBR) \ \ Balances quality and bitrate over time within constraints on bitrate
102 \# Constant Bitrate (CBR) \ \ Attempts to keep the bitrate fairly constant while quality varies
105 \# CQ mode is recommended for file-based video (as opposed to live
106 \# streaming). The following FFMpeg command-line parameters are used
110 \# -b:v {\textless}arg{\textgreater} \ \ \ \ \ Sets target bitrate (e.g. 500k)
111 \# -minrate {\textless}arg{\textgreater} Sets minimum bitrate.
112 \# -maxrate {\textless}arg{\textgreater} Sets maximum bitrate.
113 \# -crf {\textless}arg{\textgreater} Sets maximum quality level. Valid values are 0-63, lower numbers are higher quality.
115 \# Note: Bitrate is specified in kbps, or kilobits per second. In video
116 \# compression a kilobit is generally assumed to be 1000 bits (not
119 \# Note: Other codecs in FFMpeg accept the -crf parameter but may
120 \# interpret the value differently. If you are using -crf with other
121 \# codecs you will likely use different values for VP9.
132 \# Tiling splits the video into rectangular regions, which allows
133 \# multi-threading for encoding and decoding. The number of tiles is
134 \# always a power of two. 0=1 tile, 1=2, 2=4, 3=8, 4=16, 5=32.
138 \# modified from https://trac.ffmpeg.org/wiki/EncodingForStreamingSites
139 \# To use a 2 second GOP (Group of Pictures), simply multiply your output
140 \# frame rate * 2. For example, if your input is -framerate 30, then use
145 \# number of threads to use during encoding.
149 \# May be set to good, best, or realtime
153 \# This parameter has different meanings depending upon whether quality
154 \# is set to good or realtime. Speed settings 0-4 apply for VoD in good
155 \# and best, with 0 being the highest quality and 4 being the
156 \# lowest. Realtime valid values are 5-8; lower numbers mean higher
162 \section{Details about .bcast5 Files}
163 \label{sec:Details about .bcast5 Files}
166 The following extensions of files in Cinelerra's .bcast5 directory are explained below.
168 % Labeling requires a parameter with the longest word of the labels.
169 \begin{labeling}{ladspa\_plugins{\dots}}
170 \item [.dat] represent saved ``data'' for perpertual sessions and color palettes; maybe others
171 \item [.idx] original ``index'' files that were created for loaded video to speed up seeking
172 \item [.mkr] ffmpeg specific ``marker'' index file that is created for each video to aid seeks
173 \item [.rc] rc stands for ``run commands'' so basically represents a script
174 \item [.toc] toc is ``table of contents'' file for MPEG video files (a type of index)
175 \item [Cinelerra\_plugins] a list of the currently loaded plugins available in your Cinelerra session
176 \item [Cinelerra\_rc] the user's preferences and settings are saved in this file to be used on startup
177 \item [ladspa\_plugins{\dots}] list of currently loaded ladspa plugins for each version of Cinelerra being used
178 \item [layout\#...\_rc] user-defined window layout setup with the layout name as part of the file name
179 \item [.xml] used for various backups or for the current settings of plugins that you have used
180 \item [.png] thumbnails of files in Resources so they do not have to be created over and over