merge conflict thanks reto!

This commit is contained in:
Ashley Blewer 2015-12-01 20:47:00 -05:00
commit 0cc2a1fedf

View File

@ -31,7 +31,7 @@
<h5>Making FFmpeg Easier</h5> <h5>Making FFmpeg Easier</h5>
<p>FFmpeg is a powerful tool for manipulating audiovisual files. Unfortunately, it also has a steep learning curve, especially for users unfamiliar with a command line interface. This app helps users through the command generation process so that more people can reap the benefits of FFmpeg.</p> <p>FFmpeg is a powerful tool for manipulating audiovisual files. Unfortunately, it also has a steep learning curve, especially for users unfamiliar with a command line interface. This app helps users through the command generation process so that more people can reap the benefits of FFmpeg.</p>
<p>Each button displays helpful information about how to perform a wide variety of tasks using FFmpeg. To use this site, click on the task you would like to perform. A new window will open up with a sample command and a description of how that command works. You can copy this command and understand how the command works with a breakdown of each of the flags.</p> <p>Each button displays helpful information about how to perform a wide variety of tasks using FFmpeg. To use this site, click on the task you would like to perform. A new window will open up with a sample command and a description of how that command works. You can copy this command and understand how the command works with a breakdown of each of the flags.</p>
<p>For FFmpeg basics, check out the program's <a href="https://www.ffmpeg.org/" target="_blank">official website</a>.</p> <p>For FFmpeg basics, check out the programs <a href="https://www.ffmpeg.org/" target="_blank">official website</a>.</p>
<p>For Bash and command line basics, try the <a href="http://cli.learncodethehardway.org/book/" target="_blank">Command Line Crash Course</a>.</p> <p>For Bash and command line basics, try the <a href="http://cli.learncodethehardway.org/book/" target="_blank">Command Line Crash Course</a>.</p>
</div> </div>
@ -48,19 +48,14 @@ Change the above data-target field, the button text, and the below div class (th
where the text goes where the text goes
<div class="well"> <div class="well">
<h3>*****Longer title*****</h3> <h3>*****Longer title*****</h3>
<p> <code>ffmpeg -i <i>input_file</i></code> *****code goes here***** <i>output_file</i></p>
<p> <p>This is all about info! This is all about info! This is all about info! This is all about info! This is all about info! This is all about info! This is all about info! This is all about info! This is all about info! This is all about info! This is all about info! This is all about info! This is all about info! This is all about info!</p>
<code>ffmpeg -i [sample file path]</code> <dl>
</p> <dt>ffmpeg</dt><dd>starts the command</dd>
<dt>-i <i>input file</i></dt><dd>path, name and extension of the input file</dd>
<p>This is all about info! This is all about info! This is all about info! This is all about info! This is all about info! This is all about info! This is all about info! This is all about info! This is all about info! This is all about info! This is all about info! This is all about info! This is all about info! This is all about info! </p> <dt>*****parameter*****</dt><dd>*****comments*****</dd>
<dt><i>output file</i></dt><dd>path, name and extension of the output file</dd>
<ul> </dl>
<li>ffmpeg : starts the command</li>
<li>-i : i for info dudes!</li>
<li>[sample file path] : path to sample file</li>
</ul>
</div> </div>
</div> </div>
</div> </div>
@ -201,14 +196,14 @@ Change the above data-target field, the button text, and the below div class (th
<h3>One thumbnail</h3> <h3>One thumbnail</h3>
<p><code>ffmpeg -i [file path] -ss 00:00:20 -f image2 -vframes 1 thumb.png</code></p> <p><code>ffmpeg -i [file path] -ss 00:00:20 -f image2 -vframes 1 thumb.png</code></p>
<p>This command will grab a thumbnail 20 seconds into the video.</p> <p>This command will grab a thumbnail 20 seconds into the video.</p>
<ul> <dl>
<li>ffmpeg: calls the program</li> <dt>ffmpeg</dt><dd>starts the command</dd>
<li>-i for input</li> <dt>-i <i>input file</i></dt><dd>path, name and extension of the input file</dd>
<li>-ss 00:00:20: seeks video file to 20 seconds into the video </li> <dt>-ss <i>00:00:20</i></dt><dd>seeks video file to 20 seconds into the video</dd>
<li>-f image2: Forces the file format. image2 is an image file demuxer.</li> <dt>-f image2</dt><dd>Forces the file format. image2 is an image file demuxer.</dd>
<li>-vframes 1: sets the number of frames (in this example, one frame)</li> <dt>-vframes <i>1</i></dt><dd>sets the number of frames (in this example, one frame)</dd>
<li>thumb.png: output name and format</li> <dt><i>output file</i></dt><dd>path, name and extension of the output file</dd>
</ul> </dl>
</div> </div>
</div> </div>
</div> </div>
@ -224,40 +219,37 @@ Change the above data-target field, the button text, and the below div class (th
<h3>Many thumbnails</h3> <h3>Many thumbnails</h3>
<p><code>ffmpeg -i {path/inputfile.extension} -f image2 -vf fps=fps=1/60 out%d.png</code></p> <p><code>ffmpeg -i {path/inputfile.extension} -f image2 -vf fps=fps=1/60 out%d.png</code></p>
<p>This will grab a thumbnail every minute and output sequential png files.</p> <p>This will grab a thumbnail every minute and output sequential png files.</p>
<ul> <dl>
<li>ffmpeg: calls the program</li> <dt>ffmpeg</dt><dd>starts the command</dd>
<li>-i for input</li> <dt>-i <i>input file</i></dt><dd>path, name and extension of the input file</dd>
<li>-ss 00:00:20: seeks video file to 20 seconds into the video</li> <dt>-ss <i>00:00:20</i></dt><dd>seeks video file to 20 seconds into the video</dd>
<li>-f image2: Forces the file format. image2 is an image file demuxer</li> <dt>-f image2</dt><dd>Forces the file format. image2 is an image file demuxer.</dd>
<li>-vf fps=fps=1/60: -vf is an alias for -filter:v, which creates a filtergraph to use for the streams. The rest of the command identifies filtering by frames per second, and sets the frames per second at 1/60 (which is one per minute).</li> <dt>-vf fps=fps=1/60</dt><dd>-vf is an alias for -filter:v, which creates a filtergraph to use for the streams. The rest of the command identifies filtering by frames per second, and sets the frames per second at 1/60 (which is one per minute).</dd>
<li>out%d.png: Names the output file. The %d is a regular expression that adds a number (d is for digit) and increments with each frame (out1.png, out2.png, out3.png…)</li> <dt><i>output file</i></dt><dd>path, name and extension of the output file. In the example out%d.png where %d is a regular expression that adds a number (d is for digit) and increments with each frame (out1.png, out2.png, out3.png…).</dd>
</ul> </dl>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<!-- ends Multi thumbnail --> <!-- ends Multi thumbnail -->
<!-- ##### RK: TO BE COMPLETED: -i "$f" ##### -->
<!-- Generate thumbnails --> <!-- Generate thumbnails -->
<span data-toggle="modal" data-target=".thumbnails"><button type="button" class="btn btn-default" data-toggle="tooltip" data-placement="bottom" title="Generate thumbnails from a video at regular intervals">Generate thumbnails</button></span> <span data-toggle="modal" data-target=".thumbnails"><button type="button" class="btn btn-default" data-toggle="tooltip" data-placement="bottom" title="Generate thumbnails from a video at regular intervals">Generate thumbnails</button></span>
<div class="modal fade thumbnails" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel"> <div class="modal fade thumbnails" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel">
<div class="modal-dialog modal-lg"> <div class="modal-dialog modal-lg">
<div class="modal-content"> <div class="modal-content">
<div class="well"> <div class="well">
<h3> Generate thumbnails from a video at regular intervals</h3> <h3> Generate thumbnails from a video at regular intervals</h3>
<p><code>ffmpeg -i [inputfile] -ss 00:12.235 -i "$f" -vframes 1 [outputfile]</code></p> <p><code>ffmpeg -i <i>input_file</i> -ss <i>00:12.235</i> -i "$f" -vframes 1 <i>output_file</i></code></p>
<p>Create one thumbnail in JPEG format from a video file at a specific time. In this example: 0hours:0minutes:12sec.235msec</p> <p>Create one thumbnail in JPEG format from a video file at a specific time. In this example: 0hours:0minutes:12sec.235msec</p>
<ul> <dl>
<li>ffmpeg: Calls the program ffmpeg</li> <dt>ffmpeg</dt><dd>starts the command</dd>
<li>-i: for input video file</li> <dt>-i <i>input_file</i></dt><dd>path, name and extension of the input file</dd>
<li>[inputfile]: Specifies the file that you want to create a thumbnail from</li> <dt>-vframes <i>1</i></dt><dd>Tells ffmpeg to create a still image from file.</dd>
<li>-vframes: Tells ffmpeg to create a still image from file</li> <dt>-ss <i>00:12.235</i></dt><dd>Specifies the specific point in input file where the still will be captured.</dd>
<li>-ss: Specifies the specific point in input file where the still will be captured</li> <dt><i>output_file</i></dt><dd>path, name and extension of the output file</dd>
<li>[outputfile]: Specifies the desired name, location, and format of the image</li> </dl>
</ul>
</div> </div>
</div> </div>
</div> </div>
@ -269,20 +261,19 @@ Change the above data-target field, the button text, and the below div class (th
<div class="modal fade pull_specs" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel"> <div class="modal fade pull_specs" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel">
<div class="modal-dialog modal-lg"> <div class="modal-dialog modal-lg">
<div class="modal-content"> <div class="modal-content">
<!-- where the text goes -->
<div class="well"> <div class="well">
<h3>Pull specs from video file</h3> <h3>Pull specs from video file</h3>
<p><code>ffprobe -i filename.avi -show_format -show_streams -print_format xml</code></p> <p><code>ffprobe -i <i>input_file</i> -show_format -show_streams -show_data -print_format xml</code></p>
<p>This command extracts technical metadata from a video file and displays it in xml. </p> <p>This command extracts technical metadata from a video file and displays it in xml. </p>
<p>ffmpeg documentation on ffprobe (full list of flags, commands, <a href="https://www.ffmpeg.org/ffprobe.html">https://www.ffmpeg.org/ffprobe.html</a>) </p> <p>ffmpeg documentation on ffprobe (full list of flags, commands, <a href="https://www.ffmpeg.org/ffprobe.html" target="_blank">www.ffmpeg.org/ffprobe.html</a>) </p>
<ul> <dl>
<li>ffprobe: calls the program</li> <dt>ffprobe</dt><dd>starts the command</dd>
<li>-i: tells ffprobe to expect input files</li> <dt>-i <i>input_file</i></dt><dd>path, name and extension of the input file</dd>
<li>-show_format: outputs file container</li> <dt>-show_format</dt><dd>outputs file container informations</dd>
<li>-show_streams: outputs audio and video codec</li> <dt>-show_streams</dt><dd>outputs audio and video codec informations</dd>
<li>-show_data: adds “hexdump” to show_streams command output</li> <dt>-show_data</dt><dd>adds “hexdump” to show_streams command output</dd>
<li>-print_format: Set the output printing format (in this example “xml”; other formats are “json” and “flat”)</li> <dt>-print_format</dt><dd>Set the output printing format (in this example “xml”; other formats are “json” and “flat”)</dd>
</ul> </dl>
</div> </div>
</div> </div>
</div> </div>
@ -296,22 +287,21 @@ Change the above data-target field, the button text, and the below div class (th
<div class="modal-content"> <div class="modal-content">
<div class="well"> <div class="well">
<h3>Join files together</h3> <h3>Join files together</h3>
<p><code>ffmpeg -f concat -i mylist.txt -c copy [output] </code></p> <p><code>ffmpeg -f concat -i mylist.txt -c:a copy -c:v copy <i>output_file</i></code></p>
<p>This command takes two or more files of the same file type and joins them together to make a single file. All that the program needs is a text file with a list specifying the files that should be joined. However, it only works properly if the files to be combined have the exact same codec and technical specifications. Be careful, ffmpeg may appear to have successfully joined two video files with different codecs, but may only bring over the audio from the second file or have other weird behaviors. Dont use this command for joining files with different codecs and technical specs and always preview your resulting video file!</p> <p>This command takes two or more files of the same file type and joins them together to make a single file. All that the program needs is a text file with a list specifying the files that should be joined. However, it only works properly if the files to be combined have the exact same codec and technical specifications. Be careful, ffmpeg may appear to have successfully joined two video files with different codecs, but may only bring over the audio from the second file or have other weird behaviors. Dont use this command for joining files with different codecs and technical specs and always preview your resulting video file!</p>
<p>ffmpeg documentation on concatenating files (full list of flags, commands, <a href="https://trac.ffmpeg.org/wiki/Concatenate">https://trac.ffmpeg.org/wiki/Concatenate</a>) </p> <p>ffmpeg documentation on concatenating files (full list of flags, commands, <a href="https://trac.ffmpeg.org/wiki/Concatenate">https://trac.ffmpeg.org/wiki/Concatenate</a>) </p>
<ul> <dl>
<li>ffmpeg: calls the program</li> <dt>ffmpeg</dt><dd>starts the command</dd>
<li>-f: forces ffmpeg to keep the same file format of the joined files</li> <dt>-f concat</dt><dd>forces ffmpeg to concatenate the files and to keep the same file format</dd>
<li>concat: ffmpegs concatenate command. This tells ffmpeg to join the files.</li> <dt>-i <i>mylist.txt</i></dt><dd>path, name and extension of the input file. This text file contains the list of files to be concatenated and should be formatted as follows:
<li>-i: tells ffmpeg to expect input files</li> <pre><i>path_name_and_extension_to_the_first_file
<li>mylist.txt: specifies the location of a text file with a list of files to be concatenated. You should create a text file that is formatted as follows: path_name_and_extension_to_the_second_file
<ul> . . .
<li>file [path to file 1]</li> path_name_and_extension_to_the_last_file</i></pre></dd>
<li>file [path to file 2]</li> <dt>-c:a copy</dt><dd>the audio codec is copied</dd>
</ul></li> <dt>-c:v copy</dt><dd>the video codec is copied</dd>
<li>-c copy: specifies the encoder for the output file by telling ffmpeg to copy the codecs of the original files and use them for the output file</li> <dt><i>output_file</i></dt><dd>path, name and extension of the output file</dd>
<li>[output]: specifies the filename and location for the output file</li> </dl>
</ul>
</div> </div>
</div> </div>
</div> </div>
@ -325,16 +315,16 @@ Change the above data-target field, the button text, and the below div class (th
<div class="modal-content"> <div class="modal-content">
<div class="well"> <div class="well">
<h3>Excerpt from beginning</h3> <h3>Excerpt from beginning</h3>
<p><code>ffmpeg -i [input file] -t 5 -c copy [output]</code></p> <p><code>ffmpeg -i <i>input_file</i> -t <i>5</i> -c:v copy -c:a copy <i>output_file</i></code></p>
<p>This command captures a certain portion of a video file, starting from the beginning and continuing for the amount of time (in seconds) specified in the script. This can be used to create a preview file, or to remove unwanted content from the end of the file. To be more specific, use timecode, such as 00:00:05. </p> <p>This command captures a certain portion of a video file, starting from the beginning and continuing for the amount of time (in seconds) specified in the script. This can be used to create a preview file, or to remove unwanted content from the end of the file. To be more specific, use timecode, such as 00:00:05.</p>
<ul> <dl>
<li>ffmpeg: Calls the program ffmpeg</li> <dt>ffmpeg</dt><dd>starts the command</dd>
<li>-i: Tells ffmpeg to expect input files</li> <dt>-i <i>input_file</i></dt><dd>path, name and extension of the input file</dd>
<li>[input file]: Specifies the location of the file you want to capture a clip from</li> <dt>-t <i>5</i></dt><dd>Tells ffmpeg to stop copying from the input file after a certain time, and specifies the number of seconds after which to stop copying. In this case, 5 seconds is specified.</dd>
<li>-t 5: Tells ffmpeg to stop copying from the input file after a certain time, and specifies the number of seconds after which to stop copying. In this case, 5 seconds is specified</li> <dt>-c:a copy</dt><dd>the audio codec is copied</dd>
<li>-c copy: Specifies the encoder for the output file by telling ffmpeg to copy the codecs of the original file and use them for the new output file</li> <dt>-c:v copy</dt><dd>the video codec is copied</dd>
<li>[output]: Specifies the filename and location for the new file</li> <dt><i>output_file</i></dt><dd>path, name and extension of the output file</dd>
</ul> </dl>
</div> </div>
</div> </div>
</div> </div>
@ -348,17 +338,17 @@ Change the above data-target field, the button text, and the below div class (th
<div class="modal-content"> <div class="modal-content">
<div class="well"> <div class="well">
<h3>Excerpt from middle</h3> <h3>Excerpt from middle</h3>
<p><code>ffmpeg -i [input file] -ss 5 -t 5 -c copy [output]</code></p> <p><code>ffmpeg -i <i>input_file</i> -ss <i>5</i> -t <i>10</i> -c:v copy -c:a copy <i>output_file</i></code></p>
<p>This command captures a certain portion of a video file, starting from a designated point in the file and taking an excerpt as long as the amount of time (in seconds) specified in the script. This can be used to create a preview or clip out a desired segment. To be more specific, use timecode, such as 00:00:05.</p> <p>This command captures a certain portion of a video file, starting from a designated point in the file and taking an excerpt as long as the amount of time (in seconds) specified in the script. This can be used to create a preview or clip out a desired segment. To be more specific, use timecode, such as 00:00:05.</p>
<ul> <dl>
<li>ffmpeg: Calls the program ffmpeg</li> <dt>ffmpeg</dt><dd>starts the command</dd>
<li>-i: Tells ffmpeg to expect input files</li> <dt>-i <i>input_file</i></dt><dd>path, name and extension of the input file</dd>
<li>[input file]: Specifies the location of the file you want to capture a clip from</li> <dt>-ss <i>5</i></dt><dd>Tells ffmpeg what timecode in the file to look for to start copying, and specifies the number of seconds into the video that ffmpeg should start copying. To be more specific, you can use timecode such as 00:00:05.</dd>
<li>-ss 5: Tells ffmpeg what timecode in the file to look for to start copying, and specifies the number of seconds into the video that ffmpeg should start copying. To be more specific, you can use timecode such as 00:00:05</li> <dt>-t <i>10</i></dt><dd>Tells ffmpeg to stop copying from the input file after a certain time, and specifies the number of seconds after which to stop copying. In this case, 10 seconds is specified.</dd>
<li>-t 5: Tells ffmpeg to stop copying from the input file after a certain time, and specifies the number of seconds after which to stop copying. In this case, 5 seconds is specified</li> <dt>-c:a copy</dt><dd>the audio codec is copied</dd>
<li>-c copy: Specifies the encoder for the output file by telling ffmpeg to copy the codecs of the original file and use them for the new output file</li> <dt>-c:v copy</dt><dd>the video codec is copied</dd>
<li>[output]: Specifies the filename and location for the new file</li> <dt><i>output_file</i></dt><dd>path, name and extension of the output file</dd>
</ul> </dl>
</div> </div>
</div> </div>
</div> </div>
@ -372,17 +362,16 @@ Change the above data-target field, the button text, and the below div class (th
<div class="modal-content"> <div class="modal-content">
<div class="well"> <div class="well">
<h3>Excerpt to end</h3> <h3>Excerpt to end</h3>
<p><code>ffmpeg -i [input file] -ss 5 -c copy [output]</code></p> <p><code>ffmpeg -i <i>input_file</i> -ss <i>5</i> -c:v copy -c:a copy <i>output_file</i></code></p>
<p>This command copies a video file starting from a specified time, removing the first few seconds from the output. This can be used to create an excerpt, or remove unwanted content from the beginning of a video file.</p> <p>This command copies a video file starting from a specified time, removing the first few seconds from the output. This can be used to create an excerpt, or remove unwanted content from the beginning of a video file.</p>
<ul> <dl>
<li>ffmpeg: Calls the program ffmpeg</li> <dt>ffmpeg</dt><dd>starts the command</dd>
<li>-i: Tells ffmpeg to expect input files</li> <dt>-i <i>input_file</i></dt><dd>path, name and extension of the input file</dd>
<li>[input file]: Specifies the location of the file you want to capture a clip from</li> <dt>-ss <i>5</i></dt><dd>Tells ffmpeg what timecode in the file to look for to start copying, and specifies the number of seconds into the video that ffmpeg should start copying. To be more specific, you can use timecode such as 00:00:05.</dd>
<li>-ss 5: Tells ffmpeg what timecode in the file to look for to start copying, and specifies the number of seconds into the video that ffmpeg should start copying. To be more specific, you can use timecode such as 00:00:05</li> <dt>-c:a copy</dt><dd>the audio codec is copied</dd>
<li>-t 5: Tells ffmpeg to stop copying from the input file after a certain time, and specifies the number of seconds after which to stop copying. In this case, 5 seconds is specified</li> <dt>-c:v copy</dt><dd>the video codec is copied</dd>
<li>-c copy: Specifies the encoder for the output file by telling ffmpeg to copy the codecs of the original file and use them for the new output file</li> <dt><i>output_file</i></dt><dd>path, name and extension of the output file</dd>
<li>[output]: Specifies the filename and location for the new file</li> </dl>
</ul>
</div> </div>
</div> </div>
</div> </div>
@ -396,73 +385,71 @@ Change the above data-target field, the button text, and the below div class (th
<div class="modal-content"> <div class="modal-content">
<div class="well"> <div class="well">
<h3>Split audio and video tracks</h3> <h3>Split audio and video tracks</h3>
<p><code>ffmpeg -i [input file] -map 0:0 [video output file] -map 0:1 [audio output file] </code></p> <p><code>ffmpeg -i <i>input_file</i> -map <i>0:0 video_output_file</i> -map <i>0:1 audio_output_file</i></code></p>
<p>This command splits the original input file into a video and audio stream. The -map command identifies which streams are mapped to which file. To ensure that youre mapping the right streams to the right file, run ffprobe before writing the script to identify which stream is 0:0, which is 0:1, etc.</p> <p>This command splits the original input file into a video and audio stream. The -map command identifies which streams are mapped to which file. To ensure that youre mapping the right streams to the right file, run ffprobe before writing the script to identify which stream is 0:0 and which is 0:1.</p>
<ul> <dl>
<li>ffmpeg: calls the program</li> <dt>ffmpeg</dt><dd>starts the command</dd>
<li>-i: tells ffmpeg to expect input file</li> <dt>-i <i>input_file</i></dt><dd>path, name and extension of the input file</dd>
<li>[input file]: the file you want to split</li> <dt>-map <i>0:0</i></dt><dd>grabs the first streams (0:0) and maps it into:</dd>
<li>-map 0:0: tells ffmpeg to grab one of the streams, and identifies the first stream (stream 0:0) to map</li> <dt><i>video_output_file</i></dt><dd>path, name and extension of the video output file</dd>
<li>[video output file]: desired filename for the video output file</li> <dt>-map <i>0:1</i></dt><dd>grabs the second streams (0:1) and maps it into:</dd>
<li>-map 0:1: tells ffmpeg to grab one of the streams, and identifies the second stream (stream 0:1) to map</li> <dt><i>audio_output_file</i></dt><dd>path, name and extension of the audio output file</dd>
<li>[audio output file]: desired filename for the audio output file</li> </dl>
</ul>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<!-- ends Split audio and video tracks --> <!-- ends Split audio and video tracks -->
<!-- Transcode to h.264 --> <!-- Transcode to H.264 -->
<span data-toggle="modal" data-target=".transcode_h264"><button type="button" class="btn btn-default" data-toggle="tooltip" data-placement="bottom" title="Transcode to an h.264 access file">Transcode to h.264</button></span> <span data-toggle="modal" data-target=".transcode_h264"><button type="button" class="btn btn-default" data-toggle="tooltip" data-placement="bottom" title="Transcode to an H.264 access file">Transcode to h.264</button></span>
<div class="modal fade transcode_h264" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel"> <div class="modal fade transcode_h264" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel">
<div class="modal-dialog modal-lg"> <div class="modal-dialog modal-lg">
<div class="modal-content"> <div class="modal-content">
<div class="well"> <div class="well">
<h3>Transcode to h.264</h3> <h3>Transcode to H.264</h3>
<p><code>ffmpeg -i [input file] -c:v libx264 -c:a copy [output file.mp4]</code></p> <p><code>ffmpeg -i <i>input_file</i> -c:v <i>libx264</i> -c:a copy <i>output_file</i></code></p>
<p>This command takes an input file and transcodes it to h.264 with an .mp4 wrapper, keeping the audio the same codec as the original. The libx264 codec defaults to a “medium” preset for compression quality and a CRF of 23. CRF stands for constant rate factor and determines the quality and file size of the resulting h.264 video. A low CRF means high quality and large file size; a high CRF means the opposite.</p> <p>This command takes an input file and transcodes it to H.264 with an .mp4 wrapper, keeping the audio the same codec as the original. The libx264 codec defaults to a “medium” preset for compression quality and a CRF of 23. CRF stands for constant rate factor and determines the quality and file size of the resulting H.264 video. A low CRF means high quality and large file size; a high CRF means the opposite.</p>
<ul> <dl>
<li>ffmpeg: Calls the program ffmpeg</li> <dt>ffmpeg</dt><dd>starts the command</dd>
<li>-i: Tells ffmpeg to expect an input file</li> <dt>-i <i>input_file</i></dt><dd>path, name and extension of the input file</dd>
<li>[input file]: Tells ffmpeg the location of the file you want to process</li> <dt>-c:v libx264</dt><dd>tells ffmpeg to change the video codec of the file to H.264</dd>
<li>-c:v libx264: Tells ffmpeg to change the video codec of the file to h264</li> <dt>-c:a copy</dt><dd>tells ffmpeg not to change the audio codec</dd>
<li>-c:a copy: tells ffmpeg not to change the audio codec</li> <dt><i>output_file</i></dt><dd>path, name and extension of the output file</dd>
<li>[output file.mp4]: Specifies the name and location of the new file, including the desired codec extension</li> </dl>
</ul>
<p>In order to use the same basic command to make a higher quality file, you can add some of these presets:</p> <p>In order to use the same basic command to make a higher quality file, you can add some of these presets:</p>
<p><code>ffmpeg -i [input file] -vcodec libx264 -acodec copy -preset veryslow -crf 18 [output file.mp4]</code></p> <p><code>ffmpeg -i <i>input_file</i> -c:v libx264 -preset veryslow -crf 18 -c:a copy <i>output_file</i></code></p>
<ul> <dl>
<li>-preset veryslow: This option tells ffmpeg to use the slowest preset possible for the best compression quality</li> <dt>-preset <i>veryslow</i></dt><dd>This option tells ffmpeg to use the slowest preset possible for the best compression quality.</dd>
<li>-crf 18: Specifying a lower CRF will make a larger file with better visual quality</li> <dt>-crf <i>18</i></dt><dd>Specifying a lower CRF will make a larger file with better visual quality.</dd>
</ul> </dl>
<p>libx264 also defaults to 4:2:2 chroma subsampling. Some versions of Quicktime can't read x264 files in 4:2:2. In order to allow the video to play in all Quicktime players, you can specify 4:2:0 chroma subsampling instead:</p> <p>libx264 also defaults to 4:2:2 chroma subsampling. Some versions of QuickTime cant read H.264 files in 4:2:2. In order to allow the video to play in all QuickTime players, you can specify 4:2:0 chroma subsampling instead:</p>
<p><code>ffmpeg -i [input file] -c:v libx264 -pix_fmt yuv420p -c:a copy -preset veryslow -crf 18 [output file.mp4]</code></p> <p><code>ffmpeg -i <i>input_file</i> -c:v libx264 -pix_fmt yuv420p -preset veryslow -crf 18 -c:a copy <i>output_file</i></code></p>
<ul> <dl>
<li>-pix_fmt yuv420p: Specifies a pixel format of YUV 4:2:0 to allow the file to play in a standard Quicktime player</li> <dt>-pix_fmt <i>yuv420p</i></dt><dd>Specifies a pixel format of YUV 4:2:0 to allow the file to play in a standard QuickTime player.</dd>
</ul> </dl>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<!-- ends Transcode to h.264 --> <!-- ends Transcode to H.264 -->
<!-- H.264 from DCP --> <!-- H.264 from DCP -->
<span data-toggle="modal" data-target=".dcp_to_h264"><button type="button" class="btn btn-default" data-toggle="tooltip" data-placement="bottom" title="Transcode from DCP to an h.264 access file">H.264 from DCP</button></span> <span data-toggle="modal" data-target=".dcp_to_h264"><button type="button" class="btn btn-default" data-toggle="tooltip" data-placement="bottom" title="Transcode from DCP to an H.264 access file">H.264 from DCP</button></span>
<div class="modal fade dcp_to_h264" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel"> <div class="modal fade dcp_to_h264" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel">
<div class="modal-dialog modal-lg"> <div class="modal-dialog modal-lg">
<div class="modal-content"> <div class="modal-content">
<div class="well"> <div class="well">
<h3>H.264 from DCP</h3> <h3>H.264 from DCP</h3>
<p><code>ffmpeg -i video.mxf -i audio.mxf -c:v libx264 -pix_fmt yuv420p output.mp4</code></p> <p><code>ffmpeg -i <i>input_file</i>.mxf -c:v <i>libx264</i> -pix_fmt <i>yuv420p output_file</i></code></p>
<p>This will transcode mxf wrapped video and audio files to an h.264 encoded .mp4 file. Please note this only works for non-encrypted DCPs.</p> <p>This will transcode mxf wrapped video and audio files to an H.264 encoded .mp4 file. Please note this only works for non-encrypted DCPs.</p>
<ul> <dl>
<li>ffmpeg: Calls the program ffmpeg</li> <dt>ffmpeg</dt><dd>starts the command</dd>
<li>-i: for input video file and audio file</li> <dt>-i <i>input_file</i></dt><dd>path and name of the video input file. This extension must be .mxf</dd>
<li>-c:v: transcodes video to h.264</li> <dt>-c:v <i>libx264</i></dt><dd>transcodes video to H.264</dd>
<li>-pix_fmt: sets pixel format to yuv420p</li> <dt>-pix_fmt <i>yuv420p</i></dt><dd>sets pixel format to yuv420p</dd>
<li>[output.mp4] states out filename and extension</li> <dt><i>output_file</i></dt><dd>path, name and extension of the output file</dd>
</ul> </dl>
</div> </div>
</div> </div>
</div> </div>
@ -477,31 +464,30 @@ Change the above data-target field, the button text, and the below div class (th
<div class="well"> <div class="well">
<h3>Create ISO files for DVD access</h3> <h3>Create ISO files for DVD access</h3>
<p>Create an ISO file that can be used to burn a DVD. Please note, you will have to install dvdauthor. To install dvd author using Homebrew run: <code>brew install dvdauthor</code></p> <p>Create an ISO file that can be used to burn a DVD. Please note, you will have to install dvdauthor. To install dvd author using Homebrew run: <code>brew install dvdauthor</code></p>
<p><code>ffmpeg -i [inputfile.extension] -aspect 4:3 -target ntsc-dvd [outputfile.mpg]</code></p> <p><code>ffmpeg -i <i>input_file</i> -aspect <i>4:3</i> -target <i>ntsc-dvd output_file</i>.mpg</code></p>
<p>This command will take any file and create an MPEG file that dvdauthor can use to create an ISO.</p> <p>This command will take any file and create an MPEG file that dvdauthor can use to create an ISO.</p>
<ul> <dl>
<li>ffmpeg: Calls the program ffmpeg</li> <dt>ffmpeg</dt><dd>starts the command</dd>
<li>-i: for input video file and audio file</li> <dt>-i <i>input_file</i></dt><dd>path, name and extension of the input file</dd>
<li>[inputfile.extension]: Specifies the location of the file you that you want to transcode into an MPEG</li> <dt>-aspect <i>4:3</i></dt><dd>declares the aspect ratio of the resulting video file. You can also use 16:9.</dd>
<li>-aspect 4:3: Declares the aspect ratio of the resulting video file. You can also use 16:9.</li> <dt>-target <i>ntsc-dvd</i></dt><dd>specifies the region for your DVD. This could be also pal-dvd.</dd>
<li>-target [DVD region]: Specifies the region for your DVD. This could be ntsc-dvd or pal-dvd</li> <dt><i>output_file</i>.mpg</dt><dd>path and name of the output file. The extension must be .mpg</dd>
<li>outputfile.mpg: Specifies the name and location of your output file</li> </dl>
</ul>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<!-- ends Create ISO --> <!-- ends Create ISO -->
<!-- NTSC to h264 --> <!-- NTSC to H.264 -->
<span data-toggle="modal" data-target=".ntsc_to_h264"><button type="button" class="btn btn-default" data-toggle="tooltip" data-placement="bottom" title="Upscaled, Pillar-boxed HD H.264 Access Files from SD NTSC source">NTSC to h264</button></span> <span data-toggle="modal" data-target=".ntsc_to_h264"><button type="button" class="btn btn-default" data-toggle="tooltip" data-placement="bottom" title="Upscaled, Pillar-boxed HD H.264 Access Files from SD NTSC source">NTSC to H.264</button></span>
<div class="modal fade ntsc_to_h264" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel"> <div class="modal fade ntsc_to_h264" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel">
<div class="modal-dialog modal-lg"> <div class="modal-dialog modal-lg">
<div class="modal-content"> <div class="modal-content">
<div class="well"> <div class="well">
<h3>Upscaled, Pillar-boxed HD H.264 Access Files from SD NTSC source</h3> <h3>Upscaled, Pillar-boxed HD H.264 Access Files from SD NTSC source</h3>
<p><code>ffmpeg -i [inputfile] -c:v libx264 -pix_fmt yuv420p -filter:v "scale=1440:1080, pad=1920:1080:240:0" -vf yadif [outputfile]</code></p> <p><code>ffmpeg -i <i>input_file</i> -c:v libx264 -pix_fmt yuv420p -filter:v "scale=1440:1080, pad=1920:1080:240:0" -vf yadif <i>output_file</i></code></p>
<p>Pad without specifying pad width, just put the input video in the middle of the output: pad=1920:1080:(ow-iw)/2:(oh-ih)/2</p> <p>Pad without specifying pad width, just put the input video in the middle of the output: <code>pad=1920:1080:(ow-iw)/2:(oh-ih)/2</code></p>
<dl> <dl>
<dt>ffmpeg</dt><dd>Calls the program ffmpeg</dd> <dt>ffmpeg</dt><dd>Calls the program ffmpeg</dd>
<dt>-i</dt><dd>for input video file and audio file</dd> <dt>-i</dt><dd>for input video file and audio file</dd>
@ -509,14 +495,57 @@ Change the above data-target field, the button text, and the below div class (th
<dt>-pix_fmt yuv420p</dt><dd> specifies a pixel format of YUV 4:2:0</dd> <dt>-pix_fmt yuv420p</dt><dd> specifies a pixel format of YUV 4:2:0</dd>
<dt>-filter:v</dt><dd>calls an option to apply a filter to the video stream. scale=1440:1080, pad=1920:1080:240:0": does the math! resizes the video frame then pads the area around the 4:3 aspect to complete 16:9.</dd> <dt>-filter:v</dt><dd>calls an option to apply a filter to the video stream. scale=1440:1080, pad=1920:1080:240:0": does the math! resizes the video frame then pads the area around the 4:3 aspect to complete 16:9.</dd>
<dt>-vf yadif</dt><dd>deinterlaces the file (optional)</dd> <dt>-vf yadif</dt><dd>deinterlaces the file (optional)</dd>
<dt><i>output_file</i></dt><dd>path, name and extension of the output file</dd>
</dl> </dl>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<!-- ends NTSC to h264 --> <!-- ends NTSC to H.264 -->
</div> <!-- end this well (and this ends well) --> <!-- 4:3 to 16:9 -->
<span data-toggle="modal" data-target=".SD_HD"><button type="button" class="btn btn-default" data-toggle="tooltip" data-placement="bottom" title="Transform 4:3 aspect ratio into 16:9 with pillarbox">4:3 to 16:9</button></span>
<div class="modal fade SD_HD" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="well">
<h3>Transform 4:3 aspect ratio into 16:9 with pillarbox</h3>
<p>Transform a video file with 4:3 aspect ratio into a video file with 16:9 aspect ration by correct pillarboxing.</p>
<p><code>ffmpeg -i <i>input_file</i> -filter:v "pad=ih*16/9:ih:(ow-iw)/2:(oh-ih)/2" <i>output_file</i></code></p>
<dl>
<dt>ffmpeg</dt><dd>starts the command</dd>
<dt>-i <i>input_file</i></dt><dd>path, name and extension of the input file</dd>
<dt>-filter:v "pad=ih*16/9:ih:(ow-iw)/2:(oh-ih)/2"</dt><dd>video padding<br/>This resolution independent formula is actually padding any aspect ratio into 16:9 by pillarboxing, because the video filter uses relative values for input width (iw), input height (ih), output width (ow) and output height (oh).</dd>
<dt><i>output_file</i>.mpg</dt><dd>path and name of the output file</dd>
</dl>
</div>
</div>
</div>
</div>
<!-- ends 4:3 to 16:9 -->
<!-- 16:9 to 4:3 -->
<span data-toggle="modal" data-target=".HD_SD"><button type="button" class="btn btn-default" data-toggle="tooltip" data-placement="bottom" title="Transform 16:9 aspect ratio video into 4:3 with letterbox">16:9 to 4:3</button></span>
<div class="modal fade HD_SD" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="well">
<h3>Transform 16:9 aspect ratio video into 4:3 with letterbox</h3>
<p>Transform a video file with 16:9 aspect ratio into a video file with 4:3 aspect ration by correct letterboxing.</p>
<p><code>ffmpeg -i <i>input_file</i> -filter:v "pad=iw:iw*3/4:(ow-iw)/2:(oh-ih)/2" <i>output_file</i></code></p>
<dl>
<dt>ffmpeg</dt><dd>starts the command</dd>
<dt>-i <i>input_file</i></dt><dd>path, name and extension of the input file</dd>
<dt>-filter:v "pad=iw:iw*3/4:(ow-iw)/2:(oh-ih)/2"</dt><dd>video padding<br/>This resolution independent formula is actually padding any aspect ratio into 4:3 by letterboxing, because the video filter uses relative values for input width (iw), input height (ih), output width (ow) and output height (oh).</dd>
<dt><i>output_file</i>.mpg</dt><dd>path and name of the output file</dd>
</dl>
</div>
</div>
</div>
</div>
<!-- ends 16:9 to 4:3 -->
</div> <!-- end "well col-md-6 col-md-offset-2" -->
</div> <!-- row --> </div> <!-- row -->
<div class="footer text-center"> <div class="footer text-center">