Compare commits

...

21 Commits

Author SHA1 Message Date
Reto Kromer
0a6204264c Merge pull request #210 from kfrn/gh-pages
Normalise filename extensions (except VOB) to lower-case
2017-07-15 09:36:17 +02:00
Kieran O'Leary
c835746c24 change codec explanation for field order (#205)
* change codec explanation for field order

* add ffv1
2017-07-15 09:35:41 +02:00
kfrn
86e53b92c8 Normalise filename extensions (except VOB) to lower-case 2017-07-15 13:39:57 +12:00
Katherine Frances Nagels
41423e0917 Merge pull request #202 from amiaopensource/colorspace-link
convert colourspace - fix ffmpeg link
2017-07-15 11:51:12 +12:00
Reto Kromer
9a0875b692 use official naming 2017-07-14 10:57:41 +02:00
Reto Kromer
0473e85448 Merge pull request #203 from amiaopensource/trimming-map 2017-07-14 10:31:34 +02:00
Reto Kromer
b57349a3ec > should be encoded (#201) 2017-07-13 12:31:56 +02:00
Kieran O'Leary
9f3b56305c Merge pull request #204 from amiaopensource/aspect-ration
fixes aspect ration typo
2017-07-13 09:46:34 +01:00
Kieran O'Leary
5593b86ab7 fixes aspect ration typo 2017-07-12 23:33:37 +01:00
Kieran O'Leary
3544828fb1 adds -map 0 to trimming recipes, #196 2017-07-12 23:28:03 +01:00
Kieran O'Leary
c8691285cc convert colourspace - fix ffmpeg link 2017-07-12 22:56:07 +01:00
bturkus
e4a660967b Update index.html 2017-07-12 22:31:04 +02:00
bturkus
86138a55e1 Update index.html 2017-07-12 22:31:04 +02:00
bturkus
4c14af3209 add eia608 gif 2017-07-12 22:31:04 +02:00
Reto Kromer
8d18077af5 Merge pull request #198 from amiaopensource/update 2017-07-08 20:10:06 +02:00
Reto Kromer
8871868eda Merge pull request #199 from amiaopensource/little_changes 2017-07-08 17:01:07 +02:00
Reto Kromer
e1fb86ec94 Merge pull request #200 from amiaopensource/little_changes-1 2017-07-08 17:00:41 +02:00
Reto Kromer
7fe503d324 uniform 2017-07-08 12:48:15 +02:00
Reto Kromer
513631c80b uniform 2017-07-08 12:48:02 +02:00
Reto Kromer
22ff2368ad uniform 2017-07-08 11:19:09 +02:00
Kieran O'Leary
c81827d98f temporal difference - typo fix 2017-06-17 17:23:14 +01:00
6 changed files with 71 additions and 41 deletions

BIN
img/eia608.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 MiB

View File

@@ -396,7 +396,7 @@
<div class="modal-content"> <div class="modal-content">
<div class="well"> <div class="well">
<h3>Transform 4:3 aspect ratio into 16:9 with pillarbox</h3> <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>Transform a video file with 4:3 aspect ratio into a video file with 16:9 aspect ratio 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" -c:a copy <i>output_file</i></code></p> <p><code>ffmpeg -i <i>input_file</i> -filter:v "pad=ih*16/9:ih:(ow-iw)/2:(oh-ih)/2" -c:a copy <i>output_file</i></code></p>
<dl> <dl>
<dt>ffmpeg</dt><dd>starts the command</dd> <dt>ffmpeg</dt><dd>starts the command</dd>
@@ -420,7 +420,7 @@
<div class="modal-content"> <div class="modal-content">
<div class="well"> <div class="well">
<h3>Transform 16:9 aspect ratio video into 4:3 with letterbox</h3> <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>Transform a video file with 16:9 aspect ratio into a video file with 4:3 aspect ratio 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" -c:a copy <i>output_file</i></code></p> <p><code>ffmpeg -i <i>input_file</i> -filter:v "pad=iw:iw*3/4:(ow-iw)/2:(oh-ih)/2" -c:a copy <i>output_file</i></code></p>
<dl> <dl>
<dt>ffmpeg</dt><dd>starts the command</dd> <dt>ffmpeg</dt><dd>starts the command</dd>
@@ -576,7 +576,7 @@
<p><span class="beware"></span> Using this command it is possible to add Rec.709 tags to a file that is actually Rec.601 (etc), so apply with caution!</p> <p><span class="beware"></span> Using this command it is possible to add Rec.709 tags to a file that is actually Rec.601 (etc), so apply with caution!</p>
<p>These commands are relevant for H.264 and H.265 videos, encoded with <code>libx264</code> and <code>libx265</code> respectively.</p> <p>These commands are relevant for H.264 and H.265 videos, encoded with <code>libx264</code> and <code>libx265</code> respectively.</p>
<p><b>Note</b>: If you wish to embed colourspace metadata <i>without</i> changing to another colourspace, omit <code>-vf colormatrix=src:dst</code>. However, since it is <code>libx264</code>/<code>libx265</code> that writes the metadata, its not possible to add these tags without reencoding the video stream.</p> <p><b>Note</b>: If you wish to embed colourspace metadata <i>without</i> changing to another colourspace, omit <code>-vf colormatrix=src:dst</code>. However, since it is <code>libx264</code>/<code>libx265</code> that writes the metadata, its not possible to add these tags without reencoding the video stream.</p>
<p>For all possible values for <code>-color_primaries</code>, <code>-color_trc</code>, and <code>-colorspace</code>, see the ffmpeg documentation on <a href="./index.html#Codec-Options" target="_blank">codec options</a>.</p> <p>For all possible values for <code>-color_primaries</code>, <code>-color_trc</code>, and <code>-colorspace</code>, see the ffmpeg documentation on <a href="https://www.ffmpeg.org/ffmpeg-codecs.html#Codec-Options" target="_blank">codec options</a>.</p>
<hr> <hr>
<p id="fn1" class="footnote">1. Out of step with the regular pattern, <code>-color_trc</code> doesnt accept <code>bt470bg</code>; it is instead here referred to directly as gamma.<br> <p id="fn1" class="footnote">1. Out of step with the regular pattern, <code>-color_trc</code> doesnt accept <code>bt470bg</code>; it is instead here referred to directly as gamma.<br>
In the Rec.601 standard, 525-line/NTSC and 625-line/PAL video have assumed gammas of 2.2 and 2.8 respectively. <a href="#ref1" title="Jump back."></a></p> In the Rec.601 standard, 525-line/NTSC and 625-line/PAL video have assumed gammas of 2.2 and 2.8 respectively. <a href="#ref1" title="Jump back."></a></p>
@@ -809,7 +809,7 @@
<dt>-i <i>input01</i> -i <i>input02</i></dt><dd>Designates the files to use for inputs one and two respectively</dd> <dt>-i <i>input01</i> -i <i>input02</i></dt><dd>Designates the files to use for inputs one and two respectively</dd>
<dt>-filter_complex</dt><dd>Lets ffmpeg know we will be using a complex filter (this must be used for multiple inputs)</dd> <dt>-filter_complex</dt><dd>Lets ffmpeg know we will be using a complex filter (this must be used for multiple inputs)</dd>
<dt>[0:v:0]tblend=all_mode=difference128[a]</dt><dd>Applies the tblend filter (with the settings all_mode and difference128) to the first video stream from the first input and assigns the result to the output [a]</dd> <dt>[0:v:0]tblend=all_mode=difference128[a]</dt><dd>Applies the tblend filter (with the settings all_mode and difference128) to the first video stream from the first input and assigns the result to the output [a]</dd>
<dt>[1:v:0]tblend=all_mode=difference128[a]</dt><dd>Applies the tblend filter (with the settings all_mode and difference128) to the first video stream from the second input and assigns the result to the output [b]</dd> <dt>[1:v:0]tblend=all_mode=difference128[b]</dt><dd>Applies the tblend filter (with the settings all_mode and difference128) to the first video stream from the second input and assigns the result to the output [b]</dd>
<dt>[a][b]hstack[out]</dt><dd>Takes the outputs from the previous steps ([a] and [b] and uses the hstack (horizontal stack) filter on them to create the side by side output. This output is then named [out])</dd> <dt>[a][b]hstack[out]</dt><dd>Takes the outputs from the previous steps ([a] and [b] and uses the hstack (horizontal stack) filter on them to create the side by side output. This output is then named [out])</dd>
<dt>-map [out]</dt><dd>Maps the output of the filter chain</dd> <dt>-map [out]</dt><dd>Maps the output of the filter chain</dd>
<dt>-f nut</dt><dd>Sets the format for the output video stream to <a href="https://www.ffmpeg.org/ffmpeg-formats.html#nut" target="_blank">Nut</a></dd> <dt>-f nut</dt><dd>Sets the format for the output video stream to <a href="https://www.ffmpeg.org/ffmpeg-formats.html#nut" target="_blank">Nut</a></dd>
@@ -924,13 +924,14 @@
<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 <i>input_file</i> -t <i>5</i> -c copy <i>output_file</i></code></p> <p><code>ffmpeg -i <i>input_file</i> -t <i>5</i> -c copy -map 0 <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>
<dl> <dl>
<dt>ffmpeg</dt><dd>starts the command</dd> <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>-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>-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 copy</dt><dd>use stream copy mode to re-mux instead of re-encode</dd> <dt>-c copy</dt><dd>use stream copy mode to re-mux instead of re-encode</dd>
<dt>-map 0</dt><dd>Tells ffmpeg to map all streams of the input to the output.</dd>
<dt><i>output_file</i></dt><dd>path, name and extension of the output file</dd> <dt><i>output_file</i></dt><dd>path, name and extension of the output file</dd>
</dl> </dl>
<p class="link"></p> <p class="link"></p>
@@ -947,7 +948,7 @@
<div class="modal-content"> <div class="modal-content">
<div class="well"> <div class="well">
<h3>Trim a video without re-encoding</h3> <h3>Trim a video without re-encoding</h3>
<p><code>ffmpeg -i <i>input_file</i> -ss 00:02:00 -to 00:55:00 -c copy <i>output_file</i></code></p> <p><code>ffmpeg -i <i>input_file</i> -ss 00:02:00 -to 00:55:00 -c copy -map 0 <i>output_file</i></code></p>
<p>This command allows you to create an excerpt from a video file without re-encoding the image data.</p> <p>This command allows you to create an excerpt from a video file without re-encoding the image data.</p>
<dl> <dl>
<dt>ffmpeg</dt><dd>starts the command</dd> <dt>ffmpeg</dt><dd>starts the command</dd>
@@ -955,6 +956,7 @@
<dt>-ss 00:02:00</dt><dd>sets in point at 00:02:00</dd> <dt>-ss 00:02:00</dt><dd>sets in point at 00:02:00</dd>
<dt>-to 00:55:00</dt><dd>sets out point at 00:55:00</dd> <dt>-to 00:55:00</dt><dd>sets out point at 00:55:00</dd>
<dt>-c copy</dt><dd>use stream copy mode (no re-encoding)<br> <dt>-c copy</dt><dd>use stream copy mode (no re-encoding)<br>
<dt>-map 0</dt><dd>Tells ffmpeg to map all streams of the input to the output.</dd>
<i>Note:</i> watch out when using <code>-ss</code> with <code>-c copy</code> if the source is encoded with an interframe codec (e.g., H.264). Since ffmpeg must split on i-frames, it will seek to the nearest i-frame to begin the stream copy.</dd> <i>Note:</i> watch out when using <code>-ss</code> with <code>-c copy</code> if the source is encoded with an interframe codec (e.g., H.264). Since ffmpeg must split on i-frames, it will seek to the nearest i-frame to begin the stream copy.</dd>
<dt><i>output_file</i></dt><dd>path, name and extension of the output file</dd> <dt><i>output_file</i></dt><dd>path, name and extension of the output file</dd>
</dl> </dl>
@@ -978,13 +980,14 @@
<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 <i>input_file</i> -ss <i>5</i> -c copy <i>output_file</i></code></p> <p><code>ffmpeg -i <i>input_file</i> -ss <i>5</i> -c copy -map 0 <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>
<dl> <dl>
<dt>ffmpeg</dt><dd>starts the command</dd> <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>-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>-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 copy</dt><dd>use stream copy mode to re-mux instead of re-encode</dd> <dt>-c copy</dt><dd>use stream copy mode to re-mux instead of re-encode</dd>
<dt>-map 0</dt><dd>Tells ffmpeg to map all streams of the input to the output.</dd>
<dt><i>output_file</i></dt><dd>path, name and extension of the output file</dd> <dt><i>output_file</i></dt><dd>path, name and extension of the output file</dd>
</dl> </dl>
<p class="link"></p> <p class="link"></p>
@@ -1001,13 +1004,14 @@
<div class="modal-content"> <div class="modal-content">
<div class="well"> <div class="well">
<h3>Excerpt from end</h3> <h3>Excerpt from end</h3>
<p><code>ffmpeg -sseof <i>-5</i> -i <i>input_file</i> -c copy <i>output_file</i></code></p> <p><code>ffmpeg -sseof <i>-5</i> -i <i>input_file</i> -c copy -map 0 <i>output_file</i></code></p>
<p>This command copies a video file starting from a specified time before the end of the file, removing everything before from the output. This can be used to create an excerpt, or extract content from the end of a video file (e.g. for extracting the closing credits).</p> <p>This command copies a video file starting from a specified time before the end of the file, removing everything before from the output. This can be used to create an excerpt, or extract content from the end of a video file (e.g. for extracting the closing credits).</p>
<dl> <dl>
<dt>ffmpeg</dt><dd>starts the command</dd> <dt>ffmpeg</dt><dd>starts the command</dd>
<dt>-sseof <i>-5</i></dt><dd>This parameter must stay before the input file. It tells ffmpeg what timecode in the file to look for to start copying, and specifies the number of seconds from the end of the video that ffmpeg should start copying. The end of the file has index 0 and the minus sign is needed to reference earlier portions. To be more specific, you can use timecode such as -00:00:05. Note that in most file formats it is not possible to seek exactly, so ffmpeg will seek to the closest point before.</dd> <dt>-sseof <i>-5</i></dt><dd>This parameter must stay before the input file. It tells ffmpeg what timecode in the file to look for to start copying, and specifies the number of seconds from the end of the video that ffmpeg should start copying. The end of the file has index 0 and the minus sign is needed to reference earlier portions. To be more specific, you can use timecode such as -00:00:05. Note that in most file formats it is not possible to seek exactly, so ffmpeg will seek to the closest point before.</dd>
<dt>-i <i>input_file</i></dt><dd>path, name and extension of the input file</dd> <dt>-i <i>input_file</i></dt><dd>path, name and extension of the input file</dd>
<dt>-c copy</dt><dd>use stream copy mode to re-mux instead of re-encode</dd> <dt>-c copy</dt><dd>use stream copy mode to re-mux instead of re-encode</dd>
<dt>-map 0</dt><dd>Tells ffmpeg to map all streams of the input to the output.</dd>
<dt><i>output_file</i></dt><dd>path, name and extension of the output file</dd> <dt><i>output_file</i></dt><dd>path, name and extension of the output file</dd>
</dl> </dl>
<p class="link"></p> <p class="link"></p>
@@ -1218,20 +1222,20 @@
<div class="modal-content"> <div class="modal-content">
<div class="well"> <div class="well">
<h3>Create Bash script to batch process with ffmpeg</h3> <h3>Create Bash script to batch process with ffmpeg</h3>
<p>Bash scripts are plain text files saved with a .sh extension. This entry explains how they work with the example of a bash script named “Rewrap-MXF.sh”, which rewraps .MXF files in a given directory to .MOV files.</p> <p>Bash scripts are plain text files saved with a .sh extension. This entry explains how they work with the example of a bash script named “Rewrap-MXF.sh”, which rewraps .mxf files in a given directory to .mov files.</p>
<p>“Rewrap-MXF.sh” contains the following text:</p> <p>“Rewrap-MXF.sh” contains the following text:</p>
<p><code>for file in *.MXF; do ffmpeg -i "$file" -map 0 -c copy "${file%.MXF}.mov"; done</code></p> <p><code>for file in *.mxf; do ffmpeg -i "$file" -map 0 -c copy "${file%.mxf}.mov"; done</code></p>
<dl> <dl>
<dt>for file in *.MXF</dt><dd>starts the loop, and states what the input files will be. Here, the ffmpeg command within the loop will be applied to all files with an extension of .MXF.<br> <dt>for file in *.mxf</dt><dd>starts the loop, and states what the input files will be. Here, the ffmpeg command within the loop will be applied to all files with an extension of .mxf.<br>
The word file is an arbitrary variable which will represent each .MXF file in turn as it is looped over.</dd> The word file is an arbitrary variable which will represent each .mxf file in turn as it is looped over.</dd>
<dt>do ffmpeg -i "$file"</dt><dd>carry out the following ffmpeg command for each input file.<br> <dt>do ffmpeg -i "$file"</dt><dd>carry out the following ffmpeg command for each input file.<br>
Per Bash syntax, within the command the variable is referred to by <b>“$file”</b>. The dollar sign is used to reference the variable file, and the enclosing quotation marks prevents reinterpretation of any special characters that may occur within the filename, ensuring that the original filename is retained.</dd> Per Bash syntax, within the command the variable is referred to by <b>“$file”</b>. The dollar sign is used to reference the variable file, and the enclosing quotation marks prevents reinterpretation of any special characters that may occur within the filename, ensuring that the original filename is retained.</dd>
<dt>-map 0</dt><dd>retain all streams</dd> <dt>-map 0</dt><dd>retain all streams</dd>
<dt>-c copy</dt><dd>enable stream copy (no re-encode)</dd> <dt>-c copy</dt><dd>enable stream copy (no re-encode)</dd>
<dt>"${file%.MXF}.mov";</dt><dd>retaining the original file name, set the output file wrapper as .mov</dd> <dt>"${file%.mxf}.mov";</dt><dd>retaining the original file name, set the output file wrapper as .mov</dd>
<dt>done</dt><dd>complete; all items have been processed.</dd> <dt>done</dt><dd>complete; all items have been processed.</dd>
</dl> </dl>
<p><b>Note</b>: the shell script (.sh file) and all .MXF files to be processed must be contained within the same directory, and the script must be run from that directory.<br> <p><b>Note</b>: the shell script (.sh file) and all .mxf files to be processed must be contained within the same directory, and the script must be run from that directory.<br>
Execute the .sh file with the command <code>sh Rewrap-MXF.sh</code>.</p> Execute the .sh file with the command <code>sh Rewrap-MXF.sh</code>.</p>
<p>Modify the script as needed to perform different transcodes, or to use with ffprobe. :)</p> <p>Modify the script as needed to perform different transcodes, or to use with ffprobe. :)</p>
<p>The basic pattern will look similar to this:<br> <p>The basic pattern will look similar to this:<br>
@@ -1469,6 +1473,36 @@ foreach ($file in $inputfiles) {
</div> </div>
<!-- ends QCTools Report (no audio) --> <!-- ends QCTools Report (no audio) -->
<!-- Read/Extract EIA-608 Closed Captions -->
<span data-toggle="modal" data-target="#readeia608"><button type="button" class="btn btn-default" data-toggle="tooltip" data-placement="bottom" title="Read or extract EIA-608 (Line 21) closed captioning">Read/Extract EIA-608 Closed Captioning</button></span>
<div id="readeia608" class="modal fade" tabindex="-1" role="dialog">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="well">
<h3>Read/Extract EIA-608 (Line 21) closed captioning</h3>
<p><code>ffprobe -f lavfi -i movie=<i>input_file</i>,readeia608 -show_entries frame=pkt_pts_time:frame_tags=lavfi.readeia608.0.line,lavfi.readeia608.0.cc,lavfi.readeia608.1.line,lavfi.readeia608.1.cc -of csv > <i>input_file</i>.csv</code></p>
<p>This command uses FFmpeg's <a href="https://ffmpeg.org/ffmpeg-filters.html#readeia608" target="_blank">readeia608</a> filter to extract the hexidecimal values hidden within <a href="https://en.wikipedia.org/wiki/EIA-608" target="_blank">EIA-608 (Line 21)</a> Closed Captioning, outputting a csv file. For more information about EIA-608, check out Adobe's <a href="https://www.adobe.com/content/dam/Adobe/en/devnet/video/pdfs/introduction_to_closed_captions.pdf" target="_blank">Introduction to Closed Captions</a>.</p>
<p>If hex isn't your thing, closed captioning <a href="http://www.theneitherworld.com/mcpoodle/SCC_TOOLS/DOCS/CC_CHARS.HTML" target="_blank">character</a> and <a href="http://www.theneitherworld.com/mcpoodle/SCC_TOOLS/DOCS/CC_CODES.HTML" target="_blank">code</a> sets can be found in the documentation for SCTools.</p>
<dl>
<dt>ffprobe</dt><dd>starts the command</dd>
<dt>-f lavfi</dt><dd>tells ffprobe to use the <a href="http://ffmpeg.org/ffmpeg-devices.html#lavfi" target="_blank">libavfilter</a> input virtual device</a></dd>
<dt>-i <i>input_file</i></dt><dd>input file and parameters</dd>
<dt>readeia608 -show_entries frame=pkt_pts_time:frame_tags=lavfi.readeia608.0.line,lavfi.readeia608.0.cc,lavfi.readeia608.1.line,lavfi.readeia608.1.cc -of csv</dt><dd>specifies the first two lines of video in which EIA-608 data (hexidecimal byte pairs) are identifiable by ffprobe, outputting comma separated values (CSV)</dt>
<dt>&gt;</dt><dd>redirects the standard output (the data created by ffprobe about the video)</dt>
<dt><i>output_file</i>.csv</dt><dd>names the CSV output file</dt>
</dl>
<div class="sample-image">
<h4>Example</h4>
<p>Side-by-side video with true EIA-608 captions on the left, zoomed in view of the captions on the right (with hex values represented). To achieve something similar with your own captioned video, try out the EIA608/VITC viewer in <a href="https://github.com/bavc/qctools" target="_blank">QCTools</a>.</p>
<img src="img/eia608.gif" alt="GIF of Closed Captions">
</div>
<p class="link"></p>
</div>
</div>
</div>
</div>
<!-- ends Read/Extract EIA-608 Closed Captions -->
</div> </div>
<div class="well"> <div class="well">
<h4>Test files</h4> <h4>Test files</h4>
@@ -2053,12 +2087,12 @@ e.g.: <code>ffmpeg -f concat -safe 0 -i mylist.txt -c copy <i>output_file</i></c
<div class="modal-content"> <div class="modal-content">
<div class="well"> <div class="well">
<h3>Change field order of an interlaced video</h3> <h3>Change field order of an interlaced video</h3>
<p><code>ffmpeg -i <i>input_file</i> -c:v prores -filter:v setfield=tff <i>output_file</i></code></p> <p><code>ffmpeg -i <i>input_file</i> -c:v <i>video_codec</i> -filter:v setfield=tff <i>output_file</i></code></p>
<dl> <dl>
<dt>ffmpeg</dt><dd>starts the command</dd> <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>-i <i>input_file</i></dt><dd>path, name and extension of the input file</dd>
<dt>-filter:v <i>setfield=tff</i></dt><dd>Sets the field order to top field first. Use <code>setfield=bff</code> for bottom field first.</dd> <dt>-filter:v <i>setfield=tff</i></dt><dd>Sets the field order to top field first. Use <code>setfield=bff</code> for bottom field first.</dd>
<dt>-c:v prores</dt><dd>Tells ffmpeg to transcode the video stream into Apple ProRes 422. Experiment with using other codecs.</dd> <dt>-c:v <i>video_codec</i></dt><dd>As a video filter is used, it is not possible to use <code>-c copy</code>. The video must be re-encoded with whatever video codec is chosen, e.g. <code>ffv1</code>, <code>v210</code> or <code>prores</code>.</dd>
<dt><i>output_file</i></dt><dd>path, name and extension of the output file</dd> <dt><i>output_file</i></dt><dd>path, name and extension of the output file</dd>
</dl> </dl>
<p class="link"></p> <p class="link"></p>

View File

@@ -32,7 +32,7 @@ To contribute to this project directly (and more quickly), clone this repository
#### Make a request #### Make a request
If you are having trouble with coding it yourself or with github, feel free to [submit an issue](https://github.com/amiaopensource/ffmprovisr/issues) with the kind of command you would like to see added to the site. If you are having trouble with coding it yourself or with GitHub, feel free to [submit an issue](https://github.com/amiaopensource/ffmprovisr/issues) with the kind of command you would like to see added to the site.
#### General help #### General help

View File

@@ -1,19 +1,19 @@
#!/usr/bin/env bash #!/usr/bin/env bash
SCRIPT=$(basename "${0}") SCRIPT=$(basename "${0}")
VERSION='2017-04-17' VERSION='2017-07-08'
AUTHOR='ffmprovisr' AUTHOR='ffmprovisr'
RED='\033[1;31m' RED='\033[1;31m'
BLUE='\033[1;34m' BLUE='\033[1;34m'
NC='\033[0m' NC='\033[0m'
if [[ ${OSTYPE} = "cygwin" ]] || [ ! $(which diff) ]; then if [[ "${OSTYPE}" = "cygwin" ]] || [ ! $(which diff) ]; then
echo -e "${RED}Error: 'diff' is not installed by default. Please install 'diffutils' from Cygwin.${NC}" echo -e "${RED}Error: 'diff' is not installed by default. Please install 'diffutils' from Cygwin.${NC}"
exit 1 exit 1
fi fi
_output_prompt(){ _output_prompt(){
cat <<EOF cat <<EOF
Usage: ${SCRIPT} -h | -i <av_file> -m <md5_file> Usage: ${SCRIPT} -i <av_file> -m <md5_file> | -h
EOF EOF
exit 1 exit 1
} }
@@ -21,13 +21,11 @@ EOF
_output_help(){ _output_help(){
cat <<EOF cat <<EOF
Syntax: Syntax:
${SCRIPT}
Prompts a short help message.
${SCRIPT} -h
This help.
${SCRIPT} -i <av_file> -m <md5_file> ${SCRIPT} -i <av_file> -m <md5_file>
Pass to the script the audio-visual file and the corresponding MD5 Pass to the script the audio-visual file and the corresponding MD5
file to check. file to check.
${SCRIPT} -h
This help.
Dependency: Dependency:
ffmpeg ffmpeg
About: About:
@@ -40,11 +38,11 @@ EOF
unset input_file unset input_file
unset input_hash unset input_hash
while getopts ":hi:m:" opt; do while getopts ":i:m:h" opt; do
case "${opt}" in case "${opt}" in
i) input_file=${OPTARG} ;;
m) input_hash=${OPTARG} ;;
h) _output_help ;; h) _output_help ;;
i) input_file=$OPTARG ;;
m) input_hash=$OPTARG ;;
:) echo -e "${RED}Error: option -${OPTARG} requires an argument${NC}" ; _output_prompt ;; :) echo -e "${RED}Error: option -${OPTARG} requires an argument${NC}" ; _output_prompt ;;
*) echo -e "${RED}Error: bad option -${OPTARG}${NC}" ; _output_prompt ;; *) echo -e "${RED}Error: bad option -${OPTARG}${NC}" ; _output_prompt ;;
esac esac
@@ -59,12 +57,12 @@ else
md5_tmp="${HOME}/$(basename "${input_hash}").tmp" md5_tmp="${HOME}/$(basename "${input_hash}").tmp"
fi fi
# Find audio frame size for hash calculation # Find audio frame size for hash calculation
unset sample_rate
sample_rate=$(grep -v '^#' "${input_hash}" | head -n 1 | tr -d ' ' | cut -d',' -f4) sample_rate=$(grep -v '^#' "${input_hash}" | head -n 1 | tr -d ' ' | cut -d',' -f4)
ffmpeg -i "${input_file}" -loglevel 0 -af "asetnsamples=n='$sample_rate'" -f framemd5 -vn "${md5_tmp}" ffmpeg -i "${input_file}" -loglevel 0 -af "asetnsamples=n='$sample_rate'" -f framemd5 -vn "${md5_tmp}"
[[ ! -f ${md5_tmp} ]] && { echo -e "${RED}Error: '${input_file}' is not a valid audio-visual file.${NC}" ; _output_prompt ; } [[ ! -f ${md5_tmp} ]] && { echo -e "${RED}Error: '${input_file}' is not a valid audio-visual file.${NC}" ; _output_prompt ; }
unset old_file unset old_file
unset tmp_file unset tmp_file
unset sample_rate
old_file=$(grep -v '^#' "${input_hash}") old_file=$(grep -v '^#' "${input_hash}")
tmp_file=$(grep -v '^#' "${md5_tmp}") tmp_file=$(grep -v '^#' "${md5_tmp}")
if [[ "${old_file}" = "${tmp_file}" ]]; then if [[ "${old_file}" = "${tmp_file}" ]]; then

View File

@@ -1,19 +1,19 @@
#!/usr/bin/env bash #!/usr/bin/env bash
SCRIPT=$(basename "${0}") SCRIPT=$(basename "${0}")
VERSION='2017-04-17' VERSION='2017-07-08'
AUTHOR='ffmprovisr' AUTHOR='ffmprovisr'
RED='\033[1;31m' RED='\033[1;31m'
BLUE='\033[1;34m' BLUE='\033[1;34m'
NC='\033[0m' NC='\033[0m'
if [[ ${OSTYPE} = "cygwin" ]] || [ ! $(which diff) ]; then if [[ "${OSTYPE}" = "cygwin" ]] || [ ! $(which diff) ]; then
echo -e "${RED}Error: 'diff' is not installed by default. Please install 'diffutils' from Cygwin.${NC}" echo -e "${RED}Error: 'diff' is not installed by default. Please install 'diffutils' from Cygwin.${NC}"
exit 1 exit 1
fi fi
_output_prompt(){ _output_prompt(){
cat <<EOF cat <<EOF
Usage: ${SCRIPT} -h | -i <av_file> -m <md5_file> Usage: ${SCRIPT} -i <av_file> -m <md5_file> | -h
EOF EOF
exit 1 exit 1
} }
@@ -21,13 +21,11 @@ EOF
_output_help(){ _output_help(){
cat <<EOF cat <<EOF
Syntax: Syntax:
${SCRIPT}
Prompts a short help message.
${SCRIPT} -h
This help.
${SCRIPT} -i <av_file> -m <md5_file> ${SCRIPT} -i <av_file> -m <md5_file>
Pass to the script the audio-visual file and the corresponding MD5 Pass to the script the audio-visual file and the corresponding MD5
file to check. file to check.
${SCRIPT} -h
This help.
Dependency: Dependency:
ffmpeg ffmpeg
About: About:
@@ -40,11 +38,11 @@ EOF
unset input_file unset input_file
unset input_hash unset input_hash
while getopts ":hi:m:" opt; do while getopts ":i:m:h" opt; do
case "${opt}" in case "${opt}" in
i) input_file=${OPTARG} ;;
m) input_hash=${OPTARG} ;;
h) _output_help ;; h) _output_help ;;
i) input_file=$OPTARG ;;
m) input_hash=$OPTARG ;;
:) echo -e "${RED}Error: option -${OPTARG} requires an argument${NC}" ; _output_prompt ;; :) echo -e "${RED}Error: option -${OPTARG} requires an argument${NC}" ; _output_prompt ;;
*) echo -e "${RED}Error: bad option -${OPTARG}${NC}" ; _output_prompt ;; *) echo -e "${RED}Error: bad option -${OPTARG}${NC}" ; _output_prompt ;;
esac esac
@@ -53,7 +51,7 @@ done
[[ -z "${#}" || ! ${input_file} || ! ${input_hash} ]] && _output_prompt [[ -z "${#}" || ! ${input_file} || ! ${input_hash} ]] && _output_prompt
echo -e "${BLUE}Please wait...${NC}" echo -e "${BLUE}Please wait...${NC}"
unset md5_tmp unset md5_tmp
if [[ $OSTYPE = "cygwin" ]]; then if [[ "${OSTYPE}" = "cygwin" ]]; then
md5_tmp="${USERPROFILE}/$(basename "${input_hash}").tmp" md5_tmp="${USERPROFILE}/$(basename "${input_hash}").tmp"
else else
md5_tmp="${HOME}/$(basename "${input_hash}").tmp" md5_tmp="${HOME}/$(basename "${input_hash}").tmp"

View File

@@ -2,7 +2,7 @@
# This allows to open ffmprovisr locally from the terminal. # This allows to open ffmprovisr locally from the terminal.
if [[ ${OSTYPE} = "darwin"* ]] ; then if [[ "$(uname -s)" = "Darwin" ]] ; then
default_browser=$(plutil -convert json ~/Library/Preferences/com.apple.LaunchServices/com.apple.launchservices.secure.plist -r -o - | grep https -b1 | tail -n1 | cut -d'"' -f4) default_browser=$(plutil -convert json ~/Library/Preferences/com.apple.LaunchServices/com.apple.launchservices.secure.plist -r -o - | grep https -b1 | tail -n1 | cut -d'"' -f4)
if [ -d /usr/local/Cellar/ffmprovisr ] ; then if [ -d /usr/local/Cellar/ffmprovisr ] ; then
ffmprovisr_path=$(find /usr/local/Cellar/ffmprovisr -iname 'index.html' | sort -M | tail -n1) ffmprovisr_path=$(find /usr/local/Cellar/ffmprovisr -iname 'index.html' | sort -M | tail -n1)
@@ -15,7 +15,7 @@ if [[ ${OSTYPE} = "darwin"* ]] ; then
else else
open "${ffmprovisr_path}" open "${ffmprovisr_path}"
fi fi
elif [[ ${OSTYPE} = "linux-gnu" ]] ; then elif [[ "$(uname -s)" = "Linux" ]] ; then
if [ -d ~/.linuxbrew/Cellar/ffmprovisr ] ; then if [ -d ~/.linuxbrew/Cellar/ffmprovisr ] ; then
ffmprovisr_path=$(find ~/.linuxbrew/Cellar/ffmprovisr -iname 'index.html' | sort -M | tail -n1) ffmprovisr_path=$(find ~/.linuxbrew/Cellar/ffmprovisr -iname 'index.html' | sort -M | tail -n1)
fi fi