X-Git-Url: https://git.cinelerra-gg.org/git/?p=goodguy%2Fcin-manual-latex.git;a=blobdiff_plain;f=parts%2FLoadandsave.tex;h=3a4929a8900b0f2337490c75925d12da4f503685;hp=f7c96216476f4d880b564d6a11e6aa6f5366c04f;hb=2e137e8b2f9916663dd047ba683df0fe1ae843e3;hpb=daa38c1f81d506436b0d7e4c5921999abda81a59 diff --git a/parts/Loadandsave.tex b/parts/Loadandsave.tex index f7c9621..3a4929a 100644 --- a/parts/Loadandsave.tex +++ b/parts/Loadandsave.tex @@ -1,14 +1,23 @@ \chapter{Load, Save, and the EDL}% \label{cha:load_save_and_the_EDL} -There are many supported file formats that can be loaded and rendered to, that is to say, imported and exported. The format of the file affects what Cinelerra does with it. Some file formats are very slow to display on the timeline, especially video which is highly compressed. Drawing video thumbnails, picons, on the timeline can be very slow. (You can disable picon drawing for these files with the \textit{draw media} toggle in the patchbay to speed up operations). +There are many supported file formats that can be loaded and rendered to, that is to say, imported and exported. +The format of the file affects what Cinelerra does with it. +Some file formats are very slow to display on the timeline, especially video which is highly compressed. +Drawing video thumbnails, picons, on the timeline can be very slow. (You can disable picon drawing for these files with the \textit{draw media} toggle in the patchbay to speed up operations). -\section{EDL - Edit Decision List}% +\section{EDL --- Edit Decision List}% \label{sec:edl_edit_decision_list} -When Cinelerra saves a file, it saves the EDL, Edit Decision List, of the current project but does not save any media. Edit decision lists, more commonly referred to as the EDL, are generated by Cinelerra for storing projects. The EDL contains all the project settings and locations of every edit. Instead of media, the file contains pointers to the original media files on disk. EDL files are specific to Cinelerra. +When Cinelerra saves a file, it saves the EDL, Edit Decision List, of the current project but does not save any media. +Edit decision lists, more commonly referred to as the EDL, are generated by Cinelerra for storing projects. +The EDL contains all the project settings and locations of every edit. +Instead of media, the file contains pointers to the original media files on disk. +EDL files are specific to Cinelerra. -The EDL files generally have an extension of .xml. The purpose of the EDL is to separate the media from all of the editing operations so that the original media remains intact. When the .xml file is loaded, changes to the attributes of the current project are made based on the EDL. Edit decision lists are text files which means they can be edited in a text editor. EDL and XML are used interchangeably. +The EDL files generally have an extension of .xml. +The purpose of the EDL is to separate the media from all of the editing operations so that the original media remains intact. +When the .xml file is loaded, changes to the attributes of the current project are made based on the EDL. Edit decision lists are text files which means they can be edited in a text editor. EDL and XML are used interchangeably. \section{Supported File Formats}% \label{sec:supported_file_formats} @@ -24,10 +33,9 @@ Microsoft WAV, Raw DV and PCM, MPEG Audio and Video. -\vspace{1ex}\underline{Still Images} \\ -JPEG/EXR/PNG/PPM/TGA/TIFF +\paragraph{Still Images:} JPEG/EXR/PNG/PPM/TGA/TIFF -\vspace{1ex}\underline{MPEG Files} \\ +\paragraph{MPEG Files:} What is an MPEG file? A very common file format is MPEG because it works with many cameras and televisions. Mpeg2 video, an elementary codec stream for mpeg files, is the most common format. To read this format you need to decode the mpeg stream. You can read and write mpeg natively. Mpeg video encoding is done separately from mpeg audio encoding when using the native file format, meaning that 2 passes are required and then they have to be muxed together. However, if using ffmpeg it is rendered in only 1 pass. DVD uses MPEG as does NTSC and Pal. \subsection{Working with Still Images}% @@ -42,10 +50,14 @@ Rendering a video to a single image causes the final image file to be overwritte \subsection{Timelapse Sequence of Images, and Animation}% \label{sub:timelaps_sequence_images_animation} -The next areas covered in this section are the following: \hspace*{1ex} \textit{i)} file lists formats such as jpeglist \hspace*{1ex} \textit{ii)} image2ffmpeg. +The next areas covered in this section are the following: +\nameref{ssub:filelist_format} such as jpeglist and \nameref{ssub:image2ffmpeg}. In order to be reasonably fast to use, you will most likely want to prepare them by creating a script and then load by utilizing this file generated script. +\subsubsection{Filelist format}% +\label{ssub:filelist_format} + An image sequence is a series of ordered still pictures; for example a bunch of camera shots, frames of an animated scene, or series of frame shots. These can be loaded as multiple files. For timelapse sequences, as the size of camera images increases to 70 megabytes and beyond, and more images can be stored on a memory stick, more cache, memory, and system resources (such as file descriptors) are used by cinelerra to load the images when you use the \textit{concatenate tracks} or \textit{paste at insertion point} strategies. It is very time consuming and resource consuming when each of the image files is loaded and concatenated as edits, and it also plays super poorly. Here is an alternative to the usual \textit{load}. This technique may also be useful for just a bunch of pictures. File lists formats can be utilized in some way for the following list of types of \textit{Sequence files} The first line of the sequence list file identifies the list codec. @@ -56,16 +68,18 @@ PNGLIST = *.png & PPMLIST = *.ppm & TGALIST = *.tga & TIFFLIST = *.tiff \\ EXALIST = *.exa & CR2LIST = *.cr2 & JPEGLIST = *.jpg & GIFLIST = *.gif \end{tabular} -\vspace*{1ex} \noindent Using the example of jpeg’s, the jpeg list sequence file type is the easiest and fastest way to access a sequence of jpg images as a single asset. First build a jpeglist sequence file and name it something like jpeglist.sh. There is an example script of how to do this in the Auxiliary Programs section of the Appendix. Once the jpeglist.sh file is built you can then run it similar to this line: +\vspace*{1ex} +Using the example of jpeg’s, the jpeg list sequence file type is the easiest and fastest way to access a sequence of jpg images as a single asset. First build a jpeglist sequence file and name it something like jpeglist.sh. There is an example script of how to do this in the Auxiliary Programs section of the Appendix. Once the jpeglist.sh file is built you can then run it similar to this line: -\vspace*{1ex} jpeglist.sh \hspace*{1ex} //file.jpg \hspace*{1ex}//DSC*.jpg +\begin{lstlisting}[language=bash] +$ jpeglist.sh //file.jpg //DSC*.jpg +\end{lstlisting} \vspace*{1ex} \noindent If is the same on both outfile and infiles, then file.jpg is created in the same directory as infiles, the directory contains the entire asset, and the file list uses relative paths; otherwise the file list contains absolute paths. Since this creates outfile list as a single asset, the memory demand and access time is much lower. When you load the outfile in cinelerra, you will need to set \textit{Try ffmpeg last} since ffmpeg does not work with jpeglist sequence files. -An example output file from running this script residing in the directory where DSC*.jpg files exist is shown below. To use this, turn off ffmpeg probes first, and open timelapse.jpg using File ~$\rightarrow$ ~Load files. +An example output file from running this script residing in the directory where \texttt{DSC*.jpg} files exist is shown below. To use this, turn off ffmpeg probes first, and open \texttt{timelapse.jpg} using File ~$\rightarrow$ ~Load files. -\vspace*{1ex}Example: timelapse.jpg -\vspace*{1ex} \begin{lstlisting} +\begin{lstlisting}[language=bash,caption={Example: timelapse.jpg},captionpos=t] JPEGLIST # First line is always JPEGLIST # Frame rate: @@ -84,22 +98,29 @@ JPEGLIST ./DSC04998.jpg \end{lstlisting} -\vspace*{1ex} Image2file format is an alternative method to open an image sequence via ffmpeg. To do this, create 2 files in the same directory as the DSC*.jpg files named: DSC0\%04d.opts, and DSC0\%04d.jpg. DSC0\%04d.opts should contain the following lines which have to be modified to fit your exact requirements for duration, start\_number, and frame\_rate. +\subsubsection{Image2ffmpeg}% +\label{ssub:image2ffmpeg} + +Image2file format is an alternative method to open an image sequence via ffmpeg. To do this, create 2 files in the same directory as the \texttt{DSC*.jpg} files named: \texttt{DSC0\%04d.opts}, and \texttt{DSC0\%04d.jpg}. +\texttt{DSC0\%04d.opts} should contain the following lines which have to be modified to fit your exact requirements for duration, start\_number, and frame\_rate. -\vspace*{1ex} Example DSC0\%04d.opts : -\begin{lstlisting} +\begin{lstlisting}[ +language=bash, +caption={Example DSC0\%04d.opts}, +captionpos=t] loglevel=verbose threads=auto format=image2 codec=mjpeg -start\_number=4948 -frame\_rate=29.97 +start_number=4948 +frame_rate=29.97 duration=17.36 \end{lstlisting} -\vspace*{1ex} Example of the contents of the file DSC0\%04d.jpg would be just a single line as: JPEG -\noindent In this case, make sure \textit{Try ffmpeg first} is enabled, and load DSC0\%04d.jpg. This will access the media using ffmpeg which is slower so be patient. +Example of the contents of the file \texttt{DSC0\%04d.jpg} would be just a single line as: JPEG +In this case, make sure \textit{Try ffmpeg first} is enabled, and load \texttt{DSC0\%04d.jpg}. +This will access the media using ffmpeg which is slower so be patient. \subsection{Raw Image Format of Some Digital Cameras \& Probe Order}% \label{sub:raw_image_format_digital_camera_probe_order} @@ -118,7 +139,7 @@ The final screenshot showing the Resources Asset Info displaying the File format \begin{figure}[htpb] \centering - \includegraphics[width=0.9\linewidth]{images/raw.png} + \includegraphics[width=0.95\linewidth]{images/raw.png} \caption{Screenshots for RAW images} \label{fig:raw} \end{figure} @@ -181,10 +202,17 @@ All data that you work with in Cinelerra is acquired either by loading from disk This behavior is available in most listboxes. It is an especially useful method when used with \textit{Concatenate to existing tracks} insertion strategy to create an images slideshow or a song playlist. \item[Loading files from the command prompt] Another way to load files is to pass the filenames as arguments on the command line. This starts the program with all the arguments loaded and creates new tracks for every file. For example: - \{your\_cinelerra\_program\_path\} video1.mp4 video2.mp4 + \texttt{\{your\_cinelerra\_program\_path\} video1.mp4 video2.mp4} \item[Finding Files by Extension, Sub-list, or with Search] If there are too many files in your media directory, it can be difficult to find the file you want. For this reason, the Load window allows you to filter which files are displayed in the list box by extension name. Click the dropdown box on the right side of the \textit{Specify filter} list box below the file name text box, and select the file extension of your media (for example: mp4, mov, mp3, avi, jpg, etc). The file list now shows only files with the selected extension. Perhaps even easier is to use the Search box on the top underneath the \textit{Select files to load} listbox. Here you can keyin a character or string to look for. \\ You can also get a sub-list of potential files to choose from. For example, you know that the file you are looking for begins with the capital letter "C". If you keyin "C" into the selection box immediately below the list of files, and then click the left mouse button, a sub-list of files beginning with the "C" shows up under the selection box. Clicking the right mouse button cancels this sub-list. - \item[Loading the backup] There is one special XML file on disk at all times. After every editing operation, Cinelerra saves the current project to a backup in `\$HOME/.bcast/backup.xml'. In the event of a crash, the first thing you should do after restarting Cinelerra is select File $\rightarrow$ Load backup in order to load the backup. This will start Cinelerra at the point in your editing operations directly before the program crashed. It is important after a crash to restart Cinelerra without performing any editing operations as you will overwrite the backup. Note that the backup.xml file is always a single file which means that when you are working with two instances of Cinelerra open at the same time, they use the same backup file. In this case, the last operation made in whatever instance will overwrite the backup. + \item[Loading the backup] There is one special XML file on disk at all times. + + After every editing operation, Cinelerra saves the current project to a backup in \texttt{\$HOME/.bcast/backup.xml}. + In the event of a crash, the first thing you should do after restarting Cinelerra is select File $\rightarrow$ Load backup in order to load the backup. + This will start Cinelerra at the point in your editing operations directly before the program crashed. + It is important after a crash to restart Cinelerra without performing any editing operations as you will overwrite the backup. + Note that the backup.xml file is always a single file which means that when you are working with two instances of Cinelerra open at the same time, they use the same backup file. + In this case, the last operation made in whatever instance will overwrite the backup. \end{description} \subsection{Sort within Sort in File Load Dialog}% @@ -214,7 +242,7 @@ There are several icon buttons at the top on the right hand side of the Load win \begin{figure}[htpb] \centering - \includegraphics[width=0.8\linewidth]{images/load-size.png} + \includegraphics[width=0.9\linewidth]{images/load-size.png} \caption{Load windows with various Numeric Sizes} \label{fig:load-size} \end{figure} @@ -230,11 +258,11 @@ Why is this mentioned here? So many programs have been written whose functional \item[Enable] there will be a check mark if the item is currently enabled. If you disable it, it will not be used to probe the media to determine what it is. Double left mouse click will toggle the enabled/disabled state of the highlighted item. If both FFMPEG Early/Late are enabled, the FFMPEG code could be run twice if the 1\textsuperscript{st} FFMPEG run failed (but so will the 2\textsuperscript{nd}!). \end{description} -The default setup is set to duplicate the past expected behavior with the exception that CR2 for Raw Camera mode is disabled. Changes made in the settings will be retained in the .bcast5 file. +The default setup is set to duplicate the past expected behavior with the exception that CR2 for Raw Camera mode is disabled. Changes made in the settings will be retained in the \texttt{.bcast5} file. \begin{figure}[htpb] \centering - \includegraphics[width=0.7\linewidth]{images/probe.png} + \includegraphics[width=0.9\linewidth]{images/probe.png} \caption{Three example of Probes window} \label{fig:probe} \end{figure} @@ -312,24 +340,30 @@ Originally, the easiest way to maintain a project for moving to another computer \item[Reload project] when checked, after the save option the new saved project will be loaded. Default is not to do so. \end{description} -\noindent Keep in mind that to maintain the integrity of your project xml file for easy moving to another computer, do not delete the symbolic links. You will want to use \textit{cp -a} to maintain the links for moving to a USB key or another computer. +\noindent Keep in mind that to maintain the integrity of your project xml file for easy moving to another computer, do not delete the symbolic links. You will want to use \texttt{cp\,-a} to maintain the links for moving to a USB key or another computer. \subsection{Information about Backups and Perpetual Session}% \label{sub:information_backups_perpetual_session} In an effort to minimize loss of work due to user, hardware, or software issues, cinelerra has some automatic backup capabilities. -Cinelerra automatically saves every \textit{editing operation} to the current project on disk continuously to a file named \$HOME/.bcast5/backup.xml. In the unlikely event of a crash, when you restart cinelerra, you should select File $\rightarrow$ Load backup in order to continue with the operations that were recorded before the crash. If you have more than 1 instance of Cinelerra running, only the last editing operation made in whichever instance it was last made, will overwrite the backup. +Cinelerra automatically saves every \textit{editing operation} to the current project on disk continuously to a file named \texttt{\$HOME/.bcast5/backup.xml}. In the unlikely event of a crash, when you restart cinelerra, you should select File $\rightarrow$ Load backup in order to continue with the operations that were recorded before the crash. If you have more than 1 instance of Cinelerra running, only the last editing operation made in whichever instance it was last made, will overwrite the backup. -There is still 1 more backup that may save you. If for some reason you forgot to use \textit{Load backup} immediately when restarting, you have a second chance to use File $\rightarrow$ Load and select \$HOME/.bcast5/backup.prev as long as you only loaded a different file and have performed no editing operations. This same file is also used by multiple instances of cinelerra. +There is still 1 more backup that may save you. If for some reason you forgot to use \textit{Load backup} immediately when restarting, you have a second chance to use File $\rightarrow$ Load and select \texttt{\$HOME/.bcast5/backup.prev} as long as you only loaded a different file and have performed no editing operations. This same file is also used by multiple instances of cinelerra. -\textbf{Perpetual session} is very useful for working on a project over many days so you can just quit before shutting down and the next time you start up Cinelerra you will be right back where you left off. You will retain all of your undo’s and redo’s. The binary file name is \$HOME/.bcast5/perpetual.dat and as long as Settings $\rightarrow$ Preferences, the Appearance tab has the Flag \textit{Perpetual session} set this capability takes effect. It is very important to understand that this is not the same as the continuously editing- operation-updated backup.xml file. The perpetual.dat file is \textit{only} updated when you Quit cinelerra in the normal manner. Which means if you interrupt the program, or kill it, or there is a segv or system crash, the perpetual.dat file will only reflect the state of your project from when you last started cinelerra and none of the editing/undo’s/redo’s you executed during the current session which was not ended normally. +\textbf{Perpetual session} is very useful for working on a project over many days so you can just quit before shutting down and the next time you start up Cinelerra you will be right back where you left off. +You will retain all of your undo’s and redo’s. +The binary file name is \texttt{\$HOME/.bcast5/perpetual.dat} and as long as Settings $\rightarrow$ Preferences, the Appearance tab has the Flag \textit{Perpetual session} set this capability takes effect. +It is very important to understand that this is not the same as the continuously editing- operation-updated backup.xml file. +The perpetual.dat file is \textit{only} updated when you Quit cinelerra in the normal manner. +Which means if you interrupt the program, or kill it, or there is a segv or system crash, the perpetual.dat file will only reflect the state of your project from when you last started cinelerra and none of the editing/undo’s/redo’s you executed during the current session which was not ended normally. +\vspace{1ex} -\noindent \vspace{1ex} Some notes to keep in mind about Perpetual session are: +Some notes to keep in mind about Perpetual session are: \begin{itemize} \item when you Quit in the normal manner, it does not have to ask whether or not to save a backup - \item takes disk space in .bcast5 area and this could get really big + \item takes disk space in \texttt{.bcast5} area and this could get really big \item after you complete a project, it is advisable to turn off the Perpetual session flag before quitting so that when you start a new project, you can start with a fresh perpetual.dat by turning the flag on or after stopping cinelerra, delete the current \$HOME/.bcast5/perpetual.dat file