From: Good Guy Date: Mon, 10 Aug 2020 01:03:53 +0000 (-0600) Subject: Andrea added timecodes and other minor changes X-Git-Tag: 2021-05~63 X-Git-Url: https://git.cinelerra-gg.org/git/?p=goodguy%2Fcin-manual-latex.git;a=commitdiff_plain;h=d944110369dd019b349e5688adc542a61f314f51 Andrea added timecodes and other minor changes --- diff --git a/images/timecode-01.png b/images/timecode-01.png new file mode 100644 index 0000000..e7430e1 Binary files /dev/null and b/images/timecode-01.png differ diff --git a/images/timecode-02.png b/images/timecode-02.png new file mode 100644 index 0000000..3f7c979 Binary files /dev/null and b/images/timecode-02.png differ diff --git a/images/timecode-03.png b/images/timecode-03.png new file mode 100644 index 0000000..e781833 Binary files /dev/null and b/images/timecode-03.png differ diff --git a/images/timecode-04.png b/images/timecode-04.png new file mode 100644 index 0000000..2206537 Binary files /dev/null and b/images/timecode-04.png differ diff --git a/parts/Configuration.tex b/parts/Configuration.tex index 14f80bf..9e1523d 100644 --- a/parts/Configuration.tex +++ b/parts/Configuration.tex @@ -345,6 +345,7 @@ to this file and rendered, any other uses of the same file will be affected and \item[Set Input Focus when window entered] this is checked on by default because on some operating system distros, when you move your mouse to a different window, nothing happens and you are left wondering why you can not enter information. When checked this causes the input focus to shift to any \CGG{} window when the cursor enters an exposed region of the window which eliminates the need to switch input focus by tabbing. \item[Click to activate text focus] Click to activate text focus \item [Click to deactivate text focus] if checked, you will have to click to deactivate text focus. + \item [Auto rotate ffmpeg media] this is the default setting so that your media will automatically be rotated when there is metadata in the file with a rotation value. Especially useful for cell phone. \item[Always show next frame] in this mode the insertion pointer reflects the same as the Compositor so that for playing forward, the result is what looks like 1 was added to the frame displayed in the Compositor window. This is fully explained in another section (\hyperref[sub:playing_seeking]{Playing is Different than Seeking/Positioning!}). \item[Use thumbnails in resource window] the Resource Window displays thumbnails of assets by default, but drawing asset thumbnails can take more time and CPU so you may want to uncheck this. \item[Perpetual session] is very useful for working on a project over many days so you can just quit before diff --git a/parts/Editing.tex b/parts/Editing.tex index 932e7ee..0021db7 100644 --- a/parts/Editing.tex +++ b/parts/Editing.tex @@ -1809,6 +1809,20 @@ tab, Nested Proxy Path. \label{fig:nesting} \end{figure} +\paragraph{Notes:} creating nested clips is a complicated internal process for \CGG{}, especially for managing audio tracks. Therefore you need to make sure you have your project set up as you expect before you start nesting with the \texttt{Nest to Media} command. Below are several things to remember. + +\begin{itemize} + \item The creation of the nested clip is based on the settings in \texttt{Settings $\rightarrow$ Format}. Be sure that the number of audio tracks and channels is the same as we want to have in the nested clip. In addition, it is better to make each audio track independent from the others (which could be linked in more than one channel) using the option: \texttt{Audio $\rightarrow$ Map 1:1} + \item You can do any editing on the nested clip once it is loaded to the timeline. For example we can start an OpenEDL session to make the changes. Once out of the OpenEDL session it may be that the changes made are not visible in the original nested clip. You can fix this by doing RMB on the nested clip in the \textit{Resources/Media} window and choosing \texttt{Rebuild index}. This process may take some time depending on the size of +the media; because of the additional time required to do this, it is not done automatically in order to allow +the user to make the decision as to when they are done editing enough and need to see the exact results +in order to save time. + \item Because of the way the timeline thumbnails are displayed, after editing using OpenEDL of a +nested clip, the thumbnails of the video track may be redrawn and may look different and out of sync with the +way they did originally with respect to the audio waveforms. This is simply a result of the redrawing of the + video track which is independent from the redrawing of the audio tracks. The playback is still synchronized. +\end{itemize} + \paragraph{Usage Examples of Nested Clips} \begin{description} diff --git a/parts/Keyframes.tex b/parts/Keyframes.tex index 4ef4af4..2a85ec2 100644 --- a/parts/Keyframes.tex +++ b/parts/Keyframes.tex @@ -108,7 +108,9 @@ audio, with a double click. The curves to be affected must be both armed and gan patchbays to be included in the operation. You can see the advantage of having different media types ganged the same so that they will remain synchronized. However, if as recommended you have Settings of \textit{Align cursor on frames} set, video will always snap to a frame, whereas audio does not. Because the smallest pieces are audio and not video, when video is present in order to maintain synchronization be sure to do the double click on the video track. The single/double click feature also works in the same manner for Fade Automation. -The conversion algorithms that calculate the duration are approximate, not exact. Speed is not checked when inserting media on a track that already has speed adjustments so duration will not be corrected in that case. You can not do negative time and you can not play backwards. +The conversion algorithms that calculate the duration are approximate, not exact. Speed is not checked when inserting media on a track that already has speed adjustments so duration will not be corrected in that case. You can not do negative time and you can not play backwards. When working with edits and the speed auto, if you +make a "cut" in a section, the speed curve values should not change over the remaining playable edits. It is +possible to easily add "disjoint" curve points at the boundaries of the edit to preserve the curve shape. Steps to demonstrate Auto Gang of Speed/Fade on all of the audio and video tracks are listed below: diff --git a/parts/Multi5s.tex b/parts/Multi5s.tex index 8c21ff1..5d9cbf3 100644 --- a/parts/Multi5s.tex +++ b/parts/Multi5s.tex @@ -288,6 +288,126 @@ Repeat steps 2 through 7 for each of the mixer viewers you need going down the p Sometimes the association does not stick initially. If not, highlight the mixer viewer with the problem, change the mixer arrows to point up, and reassociate. +\section{Align Timecodes}% +\label{sec:align_timecodes} + +Align Timecodes is especially useful in the case where you create video with multiple cameras capable of recording a timecode in the metadata of each file. Let’s say we have recorded three videos at the same time at a concert with each camera set up at unique positions and at different angles. All of the cameras start recording at various times but were synchronized with the same master clock so that the recordings are timestamped with that synchronized time. For example, the 3 cameras have embedded metadata as follows: + +\begin{center} + \begin{tabular}{l r} + camera 1 & 00:00:00:01 \\ + camera 2 & 00:00:10:07 \\ + camera 3 & 00:00:17:22 \\ + \end{tabular} +\end{center} + +\begin{figure}[ht] + \centering + \includegraphics[width=1.0\linewidth]{timecode-01.png} + \caption{Before sync} + \label{fig:timecode-01} +\end{figure} + +Timecode synchronization is performed by the program when you choose the option \textit{Align Timecodes} and works in 2 steps. The first automatic step is to locate the earliest timecode and the second step is to align the edits on the armed tracks using that time on the timeline. + +When you load in the three files to different tracks, they'll be placed on a timeline that starts from $00:00:00:00$ as usual. But, by middle mouse clicking (MMB) on any of the video tracks, you can view the timecode embedded at that point in that file. + +To make it easy to align the videos onto the timeline manually, set the \textit{origin point}, that is the leftmost time index, of the timebar to the timecode of the earliest video. For the 3 aforementioned cameras this would be camera 1 with a timeecode of $00:00:00:01$. By using the \textit{clapboard} button on the main timeline, you can set $00:00:00:01$ as the start timecode. Then positioning the camera 1 video at the start of the timeline will line its frames up with the times on the timebar. + +\begin{figure}[ht] + \centering + \includegraphics[width=1.0\linewidth]{timecode-02.png} + \caption{Clapperboard button} + \label{fig:timecode-02} +\end{figure} + +Similarly, using the middle mouse button to view the other 2 camera’s timecodes, you can position them so their timecodes line up and now all three tracks will be in sync. You can do this manually or simply do it automatically with the option under: \texttt{Tracks $\rightarrow$ Align Timecodes}. + +\begin{figure}[ht] + \centering + \includegraphics[width=1.0\linewidth]{timecode-03.png} + \caption{After sync} + \label{fig:timecode-03} +\end{figure} + +Timecode synchronization in \CGG{} is based on the inclusion of an actual \textit{timecode} saved in +the media as can be seen using the \texttt{ffprobe} or \texttt{mediainfo} command line. Examples are shown here: + +\begin{lstlisting}[style=sh] +# ffprobe tut1.mov + Metadata: + handler_name: VideoHandler + timecode: 00:00:20:01 + +# mediainfo mtb.mp4 + Time code of first frame: 11:05:49:41 + Time code, striped: Yes + Title: GoPro AVC +\end{lstlisting} + +Many newer cameras and media in a MOV container have valid timecodes often with SMPTE +compliant start Timecode in Quicktime format, whereas others do not. Most low end cameras do not. +When no timecode is present, various clock time values may be used to synchronize instead. + +There are various types of timecodes and they are written in metadata in various ways. Because it is not clear which timecode in the file is the one to use or there is none, the precedence as described next is followed. The contexts, packets, streams, and data refer to the corresponding ffmpeg data or metadata objects: + +\begin{enumerate} + \item if the format context has a timecode use: \texttt{fmt\_ctx $\rightarrow$ timecode - 0} + \item if the layer/channel has a timecode use: \texttt{st $\rightarrow$ timecode - (start\_time -nudge)} + \item find the first program stream with video stream, and if the video stream has a timecode use: + \texttt{st $\rightarrow$ timecode - (start\_time-nudge)} + \item find timecode in any stream use: \texttt{st $\rightarrow$ timecode} + \item read 100 packets, save \texttt{ofs=pkt.pts*st $\rightarrow$ time\_base - st $\rightarrow$ nudge}: + \begin{itemize} + \item decode frame for video stream of the first program + \item if \texttt{frame $\rightarrow$ timecode} has a timecode use:\texttt{ frame $\rightarrow$ timecode - ofs} + \item if side\_data has gop (group of pictures) timecode use: \texttt{gop $\rightarrow$ timecode - ofs} + \item if side\_data has smpte timecode use: \texttt{smpte $\rightarrow$ timecode - ofs} + \end{itemize} + \item if the \texttt{filename/url} scans \texttt{*date\_time.ext} use: \texttt{date\_time} (yr, month, day, hr, min, sec, nanosecond) + \item if stat (display file status) works on the \texttt{filename/url} use: \texttt{mtime} (modification time) + \item finally, if none of the above are usable, then return \texttt{failure} +\end{enumerate} + +Operation of Align Timecodes includes the following options to help in your setup and review: + +\begin{itemize} + \item \textit{Align Timecodes} under the \textit{Tracks} pulldown + \item \textit{Clapperboard} icon on the main timeline to set a timecode. + \item Timecode option added to timebar choices (in timecode $hh:mm:ss:ff$) with use of the session frame + rate as a time standard. + \item Time Code Start in the Resources window on the bottom of \textit{Info} for the media if the timecode for that + asset has been scanned and is known. You can scan the asset’s Timecode by using the middle mouse + button on its track which then displays the timecode for that on the timebar. +\end{itemize} + +\begin{figure}[ht] + \centering + \includegraphics[width=1.0\linewidth]{timecode-04.png} + \caption{Timecode via MMB on track and via Resources windows/Info} + \label{fig:timecode-04} +\end{figure} + +\paragraph*{Notes} + +\begin{itemize} + \item \textit{Align Timecodes} is a good first step to quickly sync media up either perfectly or roughly. + \item Currently this is not known to function for syncing audio recorded on a separate audio device, + because no test material was provided to ensure that this works. + \item Disarmed tracks will not be affected by using \textit{Align Timecodes}. + \item No edits or sections will get cut off on the left or elsewhere, unless the moved edits overlap. + \item You can add a timecode to video using an \texttt{ffmpeg} command if you want to align a particular video + which has no timecode to ones that do. For example: +\end{itemize} + +\begin{lstlisting}[style=sh] +ffmpeg -i originalfile.mp4 -metadata timecode="14:36:08:29" -c copy newfile.mp4 + +# where "-i" is followed by the input filename +# where "-metadata timecode" is followed by the timecode key +# where "-c copy" just copies the video/audio to the following output filename +\end{lstlisting} + \section{Multi-Pane Support}% \label{sec:multipane_support}