ffmprovisr/index.html

558 lines
35 KiB
HTML
Raw Normal View History

2015-03-21 01:32:55 +01:00
<!DOCTYPE html>
2015-11-27 08:56:09 +01:00
<html lang="en">
2015-03-21 01:32:55 +01:00
<head>
<title>ffmprovisr</title>
<meta charset="utf-8">
<link href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet">
<link href="http://maxcdn.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css" rel="stylesheet">
2015-03-21 03:33:41 +01:00
<link href='http://fonts.googleapis.com/css?family=Montserrat:400,700' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Merriweather:400,700' rel='stylesheet' type='text/css'>
2015-03-21 01:32:55 +01:00
<link rel="stylesheet" href="css/bootstrap.min.css">
2015-03-21 02:05:44 +01:00
<link rel="stylesheet" href="css/css.css">
2015-03-21 01:32:55 +01:00
<link href="css/jquery.steps.css" rel="stylesheet" >
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="js/js.js"></script>
2015-03-21 01:32:55 +01:00
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
</head>
2015-11-27 08:56:09 +01:00
<body>
<div class="container">
2015-03-21 01:32:55 +01:00
2015-11-27 19:52:24 +01:00
<div class="text-center">
<h1>➺ ffmprovisr ❥</h1>
</div>
2015-03-21 01:32:55 +01:00
2015-03-21 01:53:24 +01:00
<!-- BUTTONS! -->
2015-03-21 01:32:55 +01:00
<div class="row">
2015-11-27 19:52:24 +01:00
<div class="well col-md-3 col-md-offset-0">
<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>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 programs <a href="https://www.ffmpeg.org/" target="_blank">official website</a>.</p>
2015-11-27 19:57:51 +01:00
<p>For Bash and command line basics, try the <a href="http://cli.learncodethehardway.org/book/" target="_blank">Command Line Crash Course</a>.</p>
2015-11-27 19:52:24 +01:00
</div>
2015-03-21 03:33:41 +01:00
2015-11-27 19:52:24 +01:00
<div class="well col-md-6 col-md-offset-2">
<h3>What do you want to do?</h3>
<h5>Select from the following.</h5>
2015-03-21 01:32:55 +01:00
2015-11-18 19:39:56 +01:00
<!-- sample example -->
<!-- <span data-toggle="modal" data-target=".*****unique name*****"><button type="button" class="btn btn-default" data-toggle="tooltip" data-placement="bottom" title="*****Hover-over description*****">*****Small title****</button></span>
Change the above data-target field, the button text, and the below div class (the word after modal fade)
<div class="modal fade *****unique name*****" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel">
2015-11-18 21:00:17 +01:00
<div class="modal-dialog modal-lg">
<div class="modal-content">
where the text goes
2015-03-21 01:32:55 +01:00
<div class="well">
<h3>*****Longer title*****</h3>
<p> <code>ffmpeg -i <i>input_file</i></code> *****code goes here***** <i>output_file</i></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>
<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>*****parameter*****</dt><dd>*****comments*****</dd>
<dt><i>output file</i></dt><dd>path, name and extension of the output file</dd>
</dl>
2015-03-22 19:54:44 +01:00
</div>
</div>
2015-11-18 21:00:17 +01:00
</div>
</div> -->
2015-11-18 20:30:34 +01:00
<!-- ends sample example -->
2015-03-22 19:54:44 +01:00
2015-11-19 01:53:15 +01:00
<!-- Create GIF -->
<span data-toggle="modal" data-target=".create_gif"><button type="button" class="btn btn-default" data-toggle="tooltip" data-placement="bottom" title="Create a GIF from a video">Create GIF</button></span>
<div class="modal fade create_gif" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="well">
<h3>Create GIF</h3>
2015-11-26 21:43:16 +01:00
<p>Part 1: Create 3 second clip from an existing source file (no audio necessary)</p>
2015-11-27 19:52:24 +01:00
<p><code>ffmpeg -ss HH:MM:SS -i <i>input</i> -c:v copy -c:a copy -t 3 <i>output</i></code></p>
2015-11-27 20:51:17 +01:00
<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>-ss <i>HH:MM:SS</i></dt><dd>starting point of the gif</dd>
<dt>-t <i>3</i></dt><dd>number of seconds after the starting point repeated in the gif (here 3; can be specified also with a full timestamp, i.e. here 00:00:03)</dd>
<dt><i>output file</i></dt><dd>path, name and extension of the output file</dd>
</dl>
2015-11-19 01:53:15 +01:00
<p>Part 2: Make the gif</p>
2015-11-27 19:52:24 +01:00
<p><code>ffmpeg -i <i>input</i> -vf scale=500:-1 -t 10 -r 30 <i>output.gif</i></code></p>
2015-11-27 20:51:17 +01:00
<dl>
<dt>ffmpeg</dt><dd>starts the command</dd>
<dt>-vf scale=<i>width</i>:<i>height</i></dt><dd>in pixels (a negative number keeps it in proportion)</dd>
<dt>-t <i>10</i></dt><dd>running time in seconds (here 10)</dd>
<dt>-r <i>30</i></dt><dd>run at 30 fps (frames per second)</dd>
<dt><i>output file</i></dt><dd>path, name and extension of the output file</dd>
</dl>
2015-11-19 01:53:15 +01:00
</div>
</div>
</div>
</div>
<!-- ends Create GIF -->
2015-11-19 00:39:08 +01:00
<!-- WAV to MP3 -->
<span data-toggle="modal" data-target=".wav_to_mp3"><button type="button" class="btn btn-default" data-toggle="tooltip" data-placement="bottom" title="Converts WAV to MP3">WAV to MP3</button></span>
<div class="modal fade wav_to_mp3" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="well">
<h3>WAV to MP3</h3>
2015-11-27 19:52:24 +01:00
<p><code>ffmpeg -i [inputfile.wav] -sample_fmt s16p -ar 44100 [outputfile.mp3]</code></p>
2015-11-19 00:39:08 +01:00
<p>This will convert your wav files to mp3s.</p>
2015-11-27 20:51:17 +01:00
<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>-sample_fmt <i>s16p</i></dt><dd>sample format. This will give you 16 bit audio (To see a list of supported sample formats, type: <code>ffmpeg -sample_fmts</code>)</dd>
<dt>-ar <i>44100</i></dt><dd>Sets the audio sampling frequency to 44.1 kHz (CD quality).</dd>
<dt><i>output file</i></dt><dd>path, name and extension of the output file</dd>
</dl>
2015-11-19 00:39:08 +01:00
</div>
</div>
</div>
</div>
<!-- ends WAV to MP3 -->
2015-11-19 00:55:53 +01:00
<!-- batch processing -->
<span data-toggle="modal" data-target=".batch_processing"><button type="button" class="btn btn-default" data-toggle="tooltip" data-placement="bottom" title="FFMPEG batch processing within a single folder">Batch processing</button></span>
<div class="modal fade batch_processing" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="well">
2015-11-27 19:52:24 +01:00
<h3>Create Bash Script named “Rewrap.MXF.sh” to do Batch FFmpeg Processing</h3>
<p><code>for f in *.MXF; do ffmpeg -i "$f" -c:a copy -c:v copy "${f%.MXF}.mov"; done</code></p>
2015-11-19 00:55:53 +01:00
<p>Re-wrap .MFX files in a specified directory to .mov files by using this code within a .sh file. The shell script (.sh file) and all MXF files must be contained in the same directory, and the script must be run from the directory itself (cd ~/Desktop/MXF_file_directory). Execute .sh file with the command <code>sh Rewrap-MXF.sh</code></p>
2015-12-02 02:48:25 +01:00
<dl>
2015-12-03 17:11:58 +01:00
<dt>-c:a copy</dt><dd>copy audio codec</dd>
<dt>-c:v copy</dt><dd>copy video codec</dd>
2015-12-02 02:48:25 +01:00
</dl>
2015-11-19 00:55:53 +01:00
<p>Modify the ffmpeg script as needed to perform different transcodes :)</p>
</div>
</div>
</div>
</div>
<!-- ends batch processing -->
2015-11-19 01:02:43 +01:00
<!-- Create frame md5s -->
<span data-toggle="modal" data-target=".create_frame_md5s"><button type="button" class="btn btn-default" data-toggle="tooltip" data-placement="bottom" title="This will create an md5 checksum per frame">Create frame md5s</button></span>
<div class="modal fade create_frame_md5s" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="well">
<h3>Create frame md5s</h3>
2015-11-27 19:52:24 +01:00
<p><code>ffmpeg -i [inputfile.extension] -an -f framemd5 [outputfile.framemd5]</code></p>
2015-11-19 01:02:43 +01:00
<p>This will create an md5 checksum per frame</p>
2015-11-27 20:51:17 +01:00
<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>-an</dt><dd>ignores the audio stream (audio no)</dd>
<dt>-f framemed5</dt><dd>file type</dd>
<dt><i>output file</i></dt><dd>path, name and extension of the output file</dd>
</dl>
2015-11-19 01:02:43 +01:00
</div>
</div>
</div>
</div>
<!-- ends Create frame md5s -->
2015-11-19 01:16:15 +01:00
<!-- Transcode to ProRes -->
2015-11-19 01:29:52 +01:00
<span data-toggle="modal" data-target=".to_prores"><button type="button" class="btn btn-default" data-toggle="tooltip" data-placement="bottom" title="This will transcode to deinterlaced Apple ProRes LT">Transcode to ProRes</button></span>
2015-11-19 01:16:15 +01:00
<div class="modal fade to_prores" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="well">
<h3>Transcode into a deinterlaced Apple ProRes LT</h3>
2015-11-27 19:52:24 +01:00
<p><code>ffmpeg -i input.mov -c:v prores -profile:v 1 -c:a pcm_s16le -vf yadif output.mov</code></p>
2015-11-19 01:16:15 +01:00
<p>This command transcodes an input file (input.mov) into a deinterlaced Apple ProRes LT .mov file with 16-bit linear PCM encoded audio. The file is deinterlaced using the yadif (Yet Another De-Interlacing Filter) command.</p>
2015-11-27 20:51:17 +01:00
<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>-c:v prores</dt><dd>Tells ffmpeg to transcode the video stream into Apple ProRes 422</dd>
<dt>-profile:v <i>1</i></dt><dd>Declares profile of ProRes you want to use. The profiles are explained below:
2015-11-19 01:16:15 +01:00
<ul>
2015-11-27 19:52:24 +01:00
<li>0 = ProRes 422 (Proxy)</li>
<li>1 = ProRes 422 (LT)</li>
<li>2 = ProRes 422 (Standard)</li>
<li>3 = ProRes 422 (HQ)</li>
2015-11-27 20:51:17 +01:00
</ul></dd>
<dt>-c:a pcm_s16le</dt><dd>Tells ffmpeg to encode the audio stream in 16-bit linear PCM</dd>
<dt>-vf yadif</dt><dd>Runs a deinterlacing video filter (yet another deinterlacing filter) on the new file</dd>
<dt><i>output file</i></dt><dd>path, name and extension of the output file</dd>
</dl>
2015-11-19 01:16:15 +01:00
</div>
</div>
</div>
</div>
<!-- ends Transcode to ProRes -->
2015-11-18 21:00:17 +01:00
<!-- One thumbnail -->
<span data-toggle="modal" data-target=".one_thumbnail"><button type="button" class="btn btn-default" data-toggle="tooltip" data-placement="bottom" title="Export one thumbnail per video file">One thumbnail</button></span>
2015-11-18 21:00:17 +01:00
<div class="modal fade one_thumbnail" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="well">
2015-11-19 00:14:37 +01:00
<h3>One thumbnail</h3>
2015-11-27 19:52:24 +01:00
<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>
<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>-ss <i>00:00:20</i></dt><dd>seeks video file to 20 seconds into the video</dd>
<dt>-f image2</dt><dd>Forces the file format. image2 is an image file demuxer.</dd>
<dt>-vframes <i>1</i></dt><dd>sets the number of frames (in this example, one frame)</dd>
<dt><i>output file</i></dt><dd>path, name and extension of the output file</dd>
</dl>
</div>
</div>
2015-11-18 21:00:17 +01:00
</div>
</div>
<!-- ends One thumbnail -->
2015-11-18 20:30:34 +01:00
2015-11-18 22:46:46 +01:00
<!-- Multi thumbnail -->
<span data-toggle="modal" data-target=".multi_thumbnail"><button type="button" class="btn btn-default" data-toggle="tooltip" data-placement="bottom" title="Export many thumbnails per video file">Many thumbnails</button></span>
2015-11-18 22:46:46 +01:00
<div class="modal fade multi_thumbnail" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="well">
2015-11-19 00:09:37 +01:00
<h3>Many thumbnails</h3>
2015-11-27 19:52:24 +01:00
<p><code>ffmpeg -i {path/inputfile.extension} -f image2 -vf fps=fps=1/60 out%d.png</code></p>
2015-11-18 22:46:46 +01:00
<p>This will grab a thumbnail every minute and output sequential png files.</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>-ss <i>00:00:20</i></dt><dd>seeks video file to 20 seconds into the video</dd>
<dt>-f image2</dt><dd>Forces the file format. image2 is an image file demuxer.</dd>
<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>
<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>
</dl>
2015-11-18 22:46:46 +01:00
</div>
</div>
</div>
</div>
<!-- ends Multi thumbnail -->
2015-11-18 20:30:34 +01:00
<!-- ##### RK: TO BE COMPLETED: -i "$f" ##### -->
2015-11-26 01:29:55 +01:00
<!-- 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>
<div class="modal fade thumbnails" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="well">
<h3> Generate thumbnails from a video at regular intervals</h3>
<p><code>ffmpeg -i <i>input_file</i> -ss <i>00:12.235</i> -i "$f" -vframes 1 <i>output_file</i></code></p>
2015-11-26 01:29:55 +01:00
<p>Create one thumbnail in JPEG format from a video file at a specific time. In this example: 0hours:0minutes:12sec.235msec</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>-vframes <i>1</i></dt><dd>Tells ffmpeg to create a still image from file.</dd>
<dt>-ss <i>00:12.235</i></dt><dd>Specifies the specific point in input file where the still will be captured.</dd>
<dt><i>output_file</i></dt><dd>path, name and extension of the output file</dd>
</dl>
2015-11-26 01:29:55 +01:00
</div>
</div>
</div>
</div>
<!-- ends Generate thumbnails -->
2015-11-18 23:49:57 +01:00
<!-- Pull specs -->
<span data-toggle="modal" data-target=".pull_specs"><button type="button" class="btn btn-default" data-toggle="tooltip" data-placement="bottom" title="Pull specs from video file">Pull specs</button></span>
2015-11-18 23:49:57 +01:00
<div class="modal fade pull_specs" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="well">
2015-11-19 00:21:48 +01:00
<h3>Pull specs from video file</h3>
<p><code>ffprobe -i <i>input_file</i> -show_format -show_streams -show_data -print_format xml</code></p>
2015-11-18 23:49:57 +01:00
<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" target="_blank">www.ffmpeg.org/ffprobe.html</a>) </p>
<dl>
<dt>ffprobe</dt><dd>starts the command</dd>
<dt>-i <i>input_file</i></dt><dd>path, name and extension of the input file</dd>
<dt>-show_format</dt><dd>outputs file container informations</dd>
<dt>-show_streams</dt><dd>outputs audio and video codec informations</dd>
<dt>-show_data</dt><dd>adds “hexdump” to show_streams command output</dd>
<dt>-print_format</dt><dd>Set the output printing format (in this example “xml”; other formats are “json” and “flat”)</dd>
</dl>
2015-11-18 23:49:57 +01:00
</div>
</div>
</div>
</div>
<!-- ends Pull specs -->
2015-11-19 00:04:06 +01:00
<!-- Join files together -->
<span data-toggle="modal" data-target=".join_files"><button type="button" class="btn btn-default" data-toggle="tooltip" data-placement="bottom" title="Join (concatenate) two or more files into a single file">Join files together</button></span>
2015-11-19 00:16:53 +01:00
<div class="modal fade join_files" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel">
2015-11-19 00:04:06 +01:00
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="well">
2015-11-19 00:21:48 +01:00
<h3>Join files together</h3>
<p><code>ffmpeg -f concat -i mylist.txt -c:a copy -c:v copy <i>output_file</i></code></p>
2015-11-27 19:52:24 +01:00
<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>
2015-11-19 00:04:06 +01:00
<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>
<dl>
<dt>ffmpeg</dt><dd>starts the command</dd>
<dt>-f concat</dt><dd>forces ffmpeg to concatenate the files and to keep the same file format</dd>
<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:
<pre><i>path_name_and_extension_to_the_first_file
path_name_and_extension_to_the_second_file
. . .
path_name_and_extension_to_the_last_file</i></pre></dd>
<dt>-c:a copy</dt><dd>the audio codec is copied</dd>
<dt>-c:v copy</dt><dd>the video codec is copied</dd>
<dt><i>output_file</i></dt><dd>path, name and extension of the output file</dd>
</dl>
2015-11-19 00:04:06 +01:00
</div>
</div>
</div>
</div>
2015-11-19 00:05:05 +01:00
<!-- ends Join files together -->
2015-11-19 00:04:06 +01:00
2015-11-19 01:13:26 +01:00
<!-- Excerpt from beginning -->
<span data-toggle="modal" data-target=".excerpt_from_start"><button type="button" class="btn btn-default" data-toggle="tooltip" data-placement="bottom" title="Create an excerpt, starting from the beginning of the file">Excerpt from beginning</button></span>
<div class="modal fade excerpt_from_start" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="well">
<h3>Excerpt from beginning</h3>
<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>
<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>-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>
<dt>-c:a copy</dt><dd>the audio codec is copied</dd>
<dt>-c:v copy</dt><dd>the video codec is copied</dd>
<dt><i>output_file</i></dt><dd>path, name and extension of the output file</dd>
</dl>
2015-11-19 01:13:26 +01:00
</div>
</div>
</div>
</div>
<!-- ends Excerpt from beginning -->
<!-- Excerpt from middle -->
<span data-toggle="modal" data-target=".excerpt_from_middle"><button type="button" class="btn btn-default" data-toggle="tooltip" data-placement="bottom" title="Capture five seconds from the middle of a video file">Excerpt from middle</button></span>
<div class="modal fade excerpt_from_middle" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="well">
<h3>Excerpt from middle</h3>
<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>
2015-11-27 19:52:24 +01:00
<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>
<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>-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>
<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>
<dt>-c:a copy</dt><dd>the audio codec is copied</dd>
<dt>-c:v copy</dt><dd>the video codec is copied</dd>
<dt><i>output_file</i></dt><dd>path, name and extension of the output file</dd>
</dl>
2015-11-19 01:13:26 +01:00
</div>
</div>
</div>
</div>
<!-- ends Excerpt from middle -->
<!-- Excerpt to end -->
<span data-toggle="modal" data-target=".excerpt_to_end"><button type="button" class="btn btn-default" data-toggle="tooltip" data-placement="bottom" title="Create a new video file with the first five seconds trimmed off the original">Excerpt to end</button></span>
<div class="modal fade excerpt_to_end" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="well">
<h3>Excerpt to end</h3>
<p><code>ffmpeg -i <i>input_file</i> -ss <i>5</i> -c:v copy -c:a copy <i>output_file</i></code></p>
2015-11-19 01:13:26 +01:00
<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>
<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>-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>
<dt>-c:a copy</dt><dd>the audio codec is copied</dd>
<dt>-c:v copy</dt><dd>the video codec is copied</dd>
<dt><i>output_file</i></dt><dd>path, name and extension of the output file</dd>
</dl>
2015-11-19 01:13:26 +01:00
</div>
</div>
</div>
</div>
<!-- ends Excerpt to end -->
2015-11-19 00:25:55 +01:00
2015-11-19 01:25:39 +01:00
<!-- Split audio and video tracks -->
<span data-toggle="modal" data-target=".split_audio_video"><button type="button" class="btn btn-default" data-toggle="tooltip" data-placement="bottom" title="Create separate audio and video tracks from an audiovisual file">Split audio and video tracks</button></span>
<div class="modal fade split_audio_video" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="well">
<h3>Split audio and video tracks</h3>
<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>
2015-12-01 15:26:32 +01:00
<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>
<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>
2015-12-01 15:26:32 +01:00
<dt>-map <i>0:0</i></dt><dd>grabs the first streams (0:0) and maps it into:</dd>
<dt><i>video_output_file</i></dt><dd>path, name and extension of the video output file</dd>
2015-12-01 15:26:32 +01:00
<dt>-map <i>0:1</i></dt><dd>grabs the second streams (0:1) and maps it into:</dd>
<dt><i>audio_output_file</i></dt><dd>path, name and extension of the audio output file</dd>
</dl>
2015-11-19 01:25:39 +01:00
</div>
</div>
</div>
</div>
<!-- ends Split audio and video tracks -->
<!-- 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>
2015-11-19 02:00:26 +01:00
<div class="modal fade transcode_h264" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="well">
<h3>Transcode to H.264</h3>
<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>
<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>-c:v libx264</dt><dd>tells ffmpeg to change the video codec of the file to H.264</dd>
<dt>-c:a copy</dt><dd>tells ffmpeg not to change the audio codec</dd>
<dt><i>output_file</i></dt><dd>path, name and extension of the output file</dd>
</dl>
2015-11-19 02:00:26 +01:00
<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 <i>input_file</i> -c:v libx264 -preset veryslow -crf 18 -c:a copy <i>output_file</i></code></p>
<dl>
<dt>-preset <i>veryslow</i></dt><dd>This option tells ffmpeg to use the slowest preset possible for the best compression quality.</dd>
<dt>-crf <i>18</i></dt><dd>Specifying a lower CRF will make a larger file with better visual quality. 18 is often considered a “visually lossless” compression.</dd>
</dl>
<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 <i>input_file</i> -c:v libx264 -pix_fmt yuv420p -preset veryslow -crf 18 -c:a copy <i>output_file</i></code></p>
<dl>
<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>
</dl>
2015-11-19 02:00:26 +01:00
</div>
</div>
</div>
</div>
<!-- ends Transcode to H.264 -->
2015-11-19 02:00:26 +01:00
2015-11-26 01:24:57 +01:00
<!-- 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>
2015-11-26 01:20:37 +01:00
<div class="modal fade dcp_to_h264" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="well">
2015-11-26 01:28:03 +01:00
<h3>H.264 from DCP</h3>
<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>
<dl>
<dt>ffmpeg</dt><dd>starts the command</dd>
<dt>-i <i>input_file</i></dt><dd>path and name of the video input file. This extension must be .mxf</dd>
2015-11-30 20:46:19 +01:00
<dt>-c:v <i>libx264</i></dt><dd>transcodes video to H.264</dd>
<dt>-pix_fmt <i>yuv420p</i></dt><dd>sets pixel format to yuv420p</dd>
<dt><i>output_file</i></dt><dd>path, name and extension of the output file</dd>
</dl>
2015-11-26 01:20:37 +01:00
</div>
</div>
</div>
</div>
2015-11-26 01:24:57 +01:00
<!-- ends H.264 from DCP -->
2015-11-26 01:20:37 +01:00
2015-11-26 01:38:01 +01:00
<!-- Create ISO -->
<span data-toggle="modal" data-target=".create_iso"><button type="button" class="btn btn-default" data-toggle="tooltip" data-placement="bottom" title="Create ISO files for DVD access">Create ISO</button></span>
<div class="modal fade create_iso" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="well">
<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><code>ffmpeg -i <i>input_file</i> -aspect <i>4:3</i> -target <i>ntsc-dvd output_file</i>.mpg</code></p>
2015-11-26 01:38:01 +01:00
<p>This command will take any file and create an MPEG file that dvdauthor can use to create an ISO.</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>-aspect <i>4:3</i></dt><dd>declares the aspect ratio of the resulting video file. You can also use 16:9.</dd>
<dt>-target <i>ntsc-dvd</i></dt><dd>specifies the region for your DVD. This could be also pal-dvd.</dd>
<dt><i>output_file</i>.mpg</dt><dd>path and name of the output file. The extension must be .mpg</dd>
</dl>
2015-11-26 01:38:01 +01:00
</div>
</div>
</div>
</div>
<!-- ends Create ISO -->
<!-- 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 H.264</button></span>
2015-11-26 02:26:49 +01:00
<div class="modal fade ntsc_to_h264" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="well">
<h3>Upscaled, Pillar-boxed HD H.264 Access Files from SD NTSC source</h3>
<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: <code>pad=1920:1080:(ow-iw)/2:(oh-ih)/2</code></p>
<dl>
<dt>ffmpeg</dt><dd>Calls the program ffmpeg</dd>
<dt>-i</dt><dd>for input video file and audio file</dd>
<dt>-c:v libx264</dt><dd>encodes video stream with libx264 (h264)</dd>
2015-12-02 02:44:08 +01:00
<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. The very same scaling filter also downscales a bigger image size into HD.</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>
2015-11-26 02:26:49 +01:00
</div>
</div>
</div>
</div>
<!-- ends NTSC to H.264 -->
2015-11-26 02:26:49 +01:00
2015-11-28 22:22:31 +01:00
<!-- 4:3 to 16:9 -->
2015-11-28 22:28:55 +01:00
<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">
2015-11-28 22:22:31 +01:00
<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>
2015-11-30 20:46:19 +01:00
<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>
2015-11-28 22:22:31 +01:00
<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 -->
2015-11-29 09:50:12 +01:00
<!-- 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>
2015-11-30 20:46:19 +01:00
<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>
2015-11-29 09:50:12 +01:00
<dt><i>output_file</i>.mpg</dt><dd>path and name of the output file</dd>
</dl>
2015-11-26 02:26:49 +01:00
</div>
</div>
</div>
</div>
2015-11-29 09:50:12 +01:00
<!-- ends 16:9 to 4:3 -->
2015-11-26 02:26:49 +01:00
</div> <!-- end "well col-md-6 col-md-offset-2" -->
2015-11-18 21:00:17 +01:00
</div> <!-- row -->
2015-11-18 20:30:34 +01:00
2015-11-27 19:52:24 +01:00
<div class="footer text-center">
<p>Made with ♥ at <a href="http://wiki.curatecamp.org/index.php/Association_of_Moving_Image_Archivists_%26_Digital_Library_Federation_Hack_Day_2015">AMIA #AVhack15</a>! Contribute to the project via <a href="https://github.com/amiaopensource/ffmprovisr">our Github page</a>!</p>
</div>
2015-03-21 01:32:55 +01:00
2015-11-27 19:52:24 +01:00
</div> <!-- class="container" -->
</body>
2015-11-19 00:04:06 +01:00
</html>