ffmprovisr/index.html

419 lines
20 KiB
HTML
Raw Normal View History

2015-03-21 01:32:55 +01:00
<!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">
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=Sanchez' 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>
<div class="container">
<div class="text-center">
<h1>➺ ffmprovisr ❥</h1>
<br/>
</div>
2015-03-21 01:53:24 +01:00
<!-- BUTTONS! -->
2015-03-21 01:32:55 +01:00
<div class="row">
2015-03-21 05:15:06 +01:00
<div class="well col-md-3 col-md-offset-0">
2015-03-21 02:14:04 +01:00
<br>
2015-03-21 05:15:06 +01:00
<h5>Making FFmpeg easier</h5>
2015-03-21 03:33:41 +01:00
<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>
2015-03-21 05:15:06 +01:00
<div class="well col-md-6 col-md-offset-2">
2015-03-21 03:33:41 +01:00
<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 -->
2015-11-18 23:42:33 +01:00
<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>
2015-11-18 22:53:51 +01:00
<!-- Change the above data-target field, the button text, and the below div class (the word after modal fade) -->
2015-11-18 21:00:17 +01:00
<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 -->
2015-03-21 01:32:55 +01:00
<div class="well">
2015-11-19 00:14:37 +01:00
<h3>Sample example</h3>
<p>
<code>ffmpeg -i [sample file path]</code>
</p>
2015-11-19 00:39:08 +01:00
<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>
2015-11-19 00:55:53 +01:00
2015-11-18 19:39:56 +01:00
<ul>
2015-11-18 19:52:01 +01:00
<li>ffmpeg : starts the command</li>
<li>-i : i for info dudes!</li>
<li>[sample file path] : path to sample file</li>
2015-11-18 19:39:56 +01:00
</ul>
2015-11-19 00:14:37 +01:00
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 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">
<!-- where the text goes -->
<div class="well">
<h3>WAV to MP3</h3>
<p>
<code>ffmpeg -i [inputfile.wav] -sample_fmt s16p -ar 44100 [outputfile.mp3]</code>
</p>
<p>This will convert your wav files to mp3s.</p>
<ul>
<li>ffmpeg : starts the command</li>
<li>-i for input</li>
<li>[inputfile.wav] : file you would like to convert to mp3</li>
<li>-sample_fmt s16p: sample format. This will give you 16 bit audio (To see a list of supported sample formats, type: ffmpeg -sample_fmts)</li>
<li>-ar 44100 : audio sampling frequency</li>
<li>[outputfile.mp3] : outputname and format</li>
</ul>
</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">
<!-- where the text goes -->
<div class="well">
2015-11-19 01:02:43 +01:00
<h3>Create Bash Script named “Rewrap.MXF.sh” to do Batch FFMPEG Processing</h3>
2015-11-19 00:55:53 +01:00
<p>
2015-11-19 01:02:43 +01:00
<code>for f in *.MXF; do ffmpeg -i "$f" -acodec copy -vcodec copy "${f%.MXF}.mov"; done</code>
2015-11-19 00:55:53 +01:00
</p>
<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>
<ul>
<li>-acodec copy (copy audio codec)</li>
<li>-vcodec copy (copy video codec)</li>
</ul>
<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">
<!-- where the text goes -->
<div class="well">
<h3>Create frame md5s</h3>
<p>
<code>ffmpeg -i [inputfile.extension] -an -f framemd5 [outputfile.framemd5]</code>
</p>
<p>This will create an md5 checksum per frame</p>
<ul>
<li>ffmpeg: starts the command</li>
<li>-i for input</li>
<li>[inputfile.extension]: the file you want to create framemd5 checksums for</li>
<li>-an: ignores the audio track</li>
<li>-f framemed5: file type</li>
<li>[outputfile.framemd5]: output name and format</li>
</ul>
</div>
</div>
</div>
</div>
<!-- ends Create frame md5s -->
2015-11-19 01:16:15 +01:00
<!-- Transcode to ProRes -->
<span data-toggle="modal" data-target=".to_prores"><button type="button" class="btn btn-default" data-toggle="tooltip" data-placement="bottom" title="This will create an md5 checksum per frame">Transcode to ProRes</button></span>
<div class="modal fade to_prores" 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>Transcode into a deinterlaced Apple ProRes LT</h3>
<p>
<code>ffmpeg -i input.mov -vcodec prores -profile:v 1 -acodec pcm_s16le -vf yadif output.mov</code>
</p>
<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>
<ul>
<li>ffmpeg: Calls the program ffmpeg</li>
<li>-i: Tells ffmpeg to expect an input file</li>
<li>[inputfile]: Specifies the name and location of the file you want to transcode into ProRes</li>
<li>-vcodec prores: Tells ffmpeg to transcode the video stream into Apple ProRes</li>
<li>-profile:v 1: Declares profile of Apple ProRes you want to use. The profiles are explained below:</li>
<ul>
<li>0 : ProRes422 (Proxy)</li>
<li>1 : ProRes422 (LT)</li>
<li>2 : ProRes422 (Normal)</li>
<li>3 : ProRes422 (HQ)</li>
</ul>
<li>-acodec pcm_s16le: Tells ffmpeg to encode the audio stream in 16-bit Linear PCM</li>
<li>-vf yadif: Runs a deinterlacing video filter (yet another deinterlacing filter) on the new file</li>
<li>[output.mov]: Specifies the name, location, and extension of the new ProRes file</li>
</ul>
</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-03-21 01:32:55 +01:00
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>
<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>
<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>
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">
<!-- where the text goes -->
<div class="well">
2015-11-19 00:09:37 +01:00
<h3>Many thumbnails</h3>
<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>
<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 -->
2015-11-18 20:30:34 +01:00
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">
<!-- where the text goes -->
<div class="well">
2015-11-19 00:21:48 +01:00
<h3>Pull specs from video file</h3>
2015-11-19 00:13:00 +01:00
<p><code>ffprobe -i filename.avi -show_format -show_streams -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>
2015-11-18 23:51:59 +01:00
<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>
2015-11-18 23:49:57 +01:00
<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 -->
2015-11-19 00:04:06 +01:00
<!-- Join files together -->
2015-11-19 00:17:44 +01:00
<span data-toggle="modal" data-target=".join_files"><button type="button" class="btn btn-default" data-toggle="tooltip" data-placement="bottom" title="Concatenate two or more files into a single file">Join files together</button></span>
2015-11-19 00:04:06 +01:00
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">
<!-- where the text goes -->
<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 copy [output] </code></p>
2015-11-19 00:04:06 +01:00
<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>
<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>
2015-11-19 00:25:55 +01:00
<ul>
2015-11-19 00:26:38 +01:00
<li>file [path to file 1]</li>
<li>file [path to file 2]</li>
2015-11-19 00:25:55 +01:00
</ul>
2015-11-19 00:13:00 +01:00
<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>
2015-11-19 00:04:06 +01:00
</ul>
</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 00:25:55 +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">
<!-- where the text goes -->
<div class="well">
<h3>Excerpt from beginning</h3>
<p><code>ffmpeg -i [input file] -t 5 -c copy [output]</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>
<ul>
<li>ffmpeg: Calls the program ffmpeg</li>
<li>-i: Tells ffmpeg to expect input files</li>
<li>[input file]: Specifies the location of the file you want to capture a clip from</li>
<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>
<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>
<li>[output]: Specifies the filename and location for the new file</li>
</ul>
</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">
<!-- where the text goes -->
<div class="well">
<h3>Excerpt from middle</h3>
<p><code>ffmpeg -i [input file] -ss 5 -t 5 -c copy [output]</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>
<ul>
<li>ffmpeg: Calls the program ffmpeg</li>
<li>-i: Tells ffmpeg to expect input files</li>
<li>[input file]: Specifies the location of the file you want to capture a clip from</li>
<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>
<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>
<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>
<li>[output]: Specifies the filename and location for the new file</li>
</ul>
</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">
<!-- where the text goes -->
<div class="well">
<h3>Excerpt to end</h3>
<p><code>ffmpeg -i [input file] -ss 5 -c copy [output]</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>
<ul>
<li>ffmpeg: Calls the program ffmpeg</li>
<li>-i: Tells ffmpeg to expect input files</li>
<li>[input file]: Specifies the location of the file you want to capture a clip from</li>
<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>
<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>
<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>
<li>[output]: Specifies the filename and location for the new file</li>
</ul>
</div>
</div>
</div>
</div>
<!-- ends Excerpt to end -->
2015-11-19 00:25:55 +01:00
2015-11-18 21:00:17 +01:00
</div> <!-- end this well (and this ends well) -->
</div> <!-- row -->
2015-11-18 20:30:34 +01:00
2015-03-21 01:32:55 +01:00
2015-03-21 05:15:06 +01:00
<div class="footer text-center">
2015-11-18 19:52:01 +01:00
<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>
2015-03-21 01:32:55 +01:00
</div>
</body>
2015-11-19 00:04:06 +01:00
</html>