ffmprovisr/index.html
2015-11-18 18:13:00 -05:00

202 lines
9.7 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html>
<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">
<link href='http://fonts.googleapis.com/css?family=Montserrat:400,700' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Sanchez' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/css.css">
<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>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
</head>
<div class="container">
<div class="text-center">
<h1>➺ ffmprovisr ❥</h1>
<br/>
</div>
<!-- BUTTONS! -->
<div class="row">
<div class="well col-md-3 col-md-offset-0">
<br>
<h5>Making FFmpeg easier</h5>
<p>FFmpeg is a powerful framework for manipulating audiovisual files. Unfortunately, it also has a steep learning curve, especially for users unfamiliar with the command line. This app helps users through the bash command generation process so that more people can reap the benefits of the FFmpeg library. </p>
<p>This project is very much a work in progress. Each button displays a form to help fulfill a popular user request. To use, click on the button and fill out the form. After clicking the Generate button, a command line will appear in the box below. That line can be copied and pasted into a Terminal, with the assumption that the video file is located in the same directory that the user currently is in.</p>
<p>For FFmpeg basics, check out their <a href="https://www.ffmpeg.org/">official website.</a></p>
<p>For bash and command line basics, try the <a href="http://cli.learncodethehardway.org/book/">Command Line Crash Course</a></p>
</div>
<div class="well col-md-6 col-md-offset-2">
<h3>What do you want to do?</h3>
<h5>Select from the following.</h5>
<!-- sample example -->
<span data-toggle="modal" data-target=".example"><button type="button" class="btn btn-default" data-toggle="tooltip" data-placement="bottom" title="Displays information about a media file">Sample example</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 example" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<!-- where the text goes -->
<div class="well">
<h2>ffmpeg -i [sample file path]</h2>
</div>
<div class="well">
<ul>
<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 class="well">
<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>
</div>
</div>
</div>
</div>
<!-- ends sample example -->
<!-- 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>
<div class="modal fade one_thumbnail" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<!-- where the text goes -->
<div class="well">
<h2>ffmpeg -i [file path] -ss 00:00:20 -f image2 -vframes 1 thumb.png</h2>
</div>
<div class="well">
<p>This command will grab a thumbnail 20 seconds into the video.</p>
</div>
<div class="well">
<ul>
<li>ffmpeg: calls the program</li>
<li>-i for input</li>
<li>-ss 00:00:20: seeks video file to 20 seconds into the video </li>
<li>-f image2: Forces the file format. image2 is an image file demuxer.</li>
<li>-vframes 1: sets the number of frames (in this example, one frame)</li>
<li>thumb.png: output name and format</li>
</ul>
</div>
</div>
</div>
</div>
<!-- ends One thumbnail -->
<!-- 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>
<div class="modal fade multi_thumbnail" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<!-- where the text goes -->
<div class="well">
<h3>Many thumbnails</h3>
<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>
<ul>
<li>ffmpeg: calls the program</li>
<li>-i for input</li>
<li>-ss 00:00:20: seeks video file to 20 seconds into the video</li>
<li>-f image2: Forces the file format. image2 is an image file demuxer</li>
<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>
<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>
</ul>
</div>
</div>
</div>
</div>
<!-- ends Multi thumbnail -->
<!-- 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>
<div class="modal fade pull_specs" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<!-- where the text goes -->
<div class="well">
<h3>Join multiple files together</h3>
<p><code>ffprobe -i filename.avi -show_format -show_streams -print_format xml</code></p>
</div>
<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>
</div>
<ul>
<li>ffprobe: calls the program</li>
<li>-i: tells ffprobe to expect input files</li>
<li>-show_format: outputs file container</li>
<li>-show_streams: outputs audio and video codec</li>
<li>-show_data: adds “hexdump” to show_streams command output</li>
<li>-print_format: Set the output printing format (in this example “xml”)</li>
</ul>
</div>
</div>
</div>
</div>
<!-- ends Pull specs -->
<!-- Join files together -->
<span data-toggle="modal" data-target=".pull_specs"><button type="button" class="btn btn-default" data-toggle="tooltip" data-placement="bottom" title="Join files together">Concatenate two or more files into a single file</button></span>
<div class="modal fade pull_specs" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<!-- where the text goes -->
<div class="well">
<h2>ffmpeg -f concat -i mylist.txt -c copy [output]</h2>
</div>
<div class="well">
<p>This command takes two or more files of the same filetype and joins them together to make a single file. All that the program needs is a list specifying the files that should be concatenated. However, it only works if the files to be combined have the exact same codec and technical specifications. </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>
</div>
<div class="well">
<ul>
<li>ffmpeg: calls the program</li>
<li>-f: forces the input file format</li>
<li>concat: ffmpegs concatenate command</li>
<li>-i: tells ffmpeg to expect input files</li>
<li>mylist.txt: a text file indicating the list of files to be concatenated. Should be formatted as:</li>
<li><li>file [path to file 1]</li></li>
<li><li>file [path to file 2]</li></li>
<li>-c copy: specifies the encoder for the output file by telling the program to copy the codecs of the original files and use them for the output file</li>
<li>[output]: desired filename for the output file</li>
</ul>
</div>
</div>
</div>
</div>
<!-- ends Join files together -->
</div> <!-- end this well (and this ends well) -->
</div> <!-- row -->
<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></p>
</div>
</body>
</html>