From a3bcc48a013a4085e8c8010e7194bd03ad8d3149 Mon Sep 17 00:00:00 2001
From: Reto Kromer This will convert your Matroska (MKV) files to MP4 files. Before encoding, you’ll need to establish which of the .VOB files on the DVD or .iso contain the content that you wish to encode. Inside the VIDEO_TS directory, you will see a series of files with names like VTS_01_0.VOB, VTS_01_1.VOB, etc. Some of the .VOB files will contain menus, special features, etc, so locate the ones that contain target content by playing them back in VLC. “Rewrap-MXF.sh” contains the following text: Note: 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. Note: 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. Modify the script as needed to perform different transcodes, or to use with ffprobe. :) The basic pattern will look similar to this: The basic pattern will look similar to this: e.g., if an input file is bestmovie002.avi, its output will be bestmovie002_suffix.avi.
` but not for `` and ``, I suggest to use only the official HTML 5.1 writing. I have seen that modern parsers can handle this easily. (This answers also a question asked, I guess, by @kfrn.)
---
index.html | 74 +++++++++++++++++++++++++++---------------------------
1 file changed, 37 insertions(+), 37 deletions(-)
diff --git a/index.html b/index.html
index cbcc420..e2033e7 100644
--- a/index.html
+++ b/index.html
@@ -90,7 +90,7 @@
+
The extension for the QuickTime container is .mov
.
+
Note that sadly MP4 cannot contain sound encoded by a PCM (Pulse-Code Modulation) audio codec
@@ -220,13 +220,13 @@
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).
+
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).
For silent videos you can replace -c:a copy
by -an
.
@@ -249,8 +249,8 @@
Three filters are applied:
+
Three filters are applied:
scale=1440:1080
) works for both upscaling and downscaling. We use the Lanczos scaling algorithm (flags=lanczos
), which is slower but gives better results than the default bilinear algorithm.pad=1920:1080:240:0
) completes the transformation from SD to HD.
+
For silent videos you can replace -c:a copy
with -an
.
@@ -326,13 +326,13 @@
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).
+
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).
For silent videos you can replace -c:a copy
by -an
.
@@ -356,7 +356,7 @@
+
The extension for the Matroska container is .mkv
.
- Note that sadly MP4 cannot contain sound encoded by a PCM (Pulse-Code Modulation) audio codec.
+
+ Note that sadly MP4 cannot contain sound encoded by a PCM (Pulse-Code Modulation) audio codec.
For silent videos you can replace -c:a aac
by -an
.
+
The extension for the MP4 container is .mp4
.image2
specifies the image file demuxer.
+
(The quotation marks are necessary for the above "glob" pattern!)
@@ -710,19 +710,19 @@
- -i concat:VTS_01_1.VOB\|VTS_01_2.VOB\|VTS_01_3.VOB
+
+ -i concat:VTS_01_1.VOB\|VTS_01_2.VOB\|VTS_01_3.VOB
The backslash is simply an escape character for the pipe (|).
+
Note: watch out when using -ss
with -c copy
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.for file in *.MXF; do ffmpeg -i "$file" -map 0 -c copy "${file%.MXF}.mov"; done
-
-
+
The word ‘file’ is an arbitrary variable which will represent each .MXF file in turn as it is looped over.
+
Per Bash syntax, within the command the variable is referred to by “$file”. 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.
+
Execute the .sh file with the command sh Rewrap-MXF.sh
.
+
for item in *.ext; do ffmpeg -i $item (ffmpeg options here) "${item%.ext}_suffix.ext"
+
This text file contains the list of files to be concatenated and should be formatted as follows:
file './first_file.ext'
file './second_file.ext'
. . .
file './last_file.ext'
-In the above, file is simply the word "file". Straight apostrophes ('like this') rather than curved quotation marks (‘like this’) must be used to enclose the file paths.
-Note: If specifying absolute file paths in the .txt file, add -safe 0
before the input file.
+In the above, file is simply the word "file". Straight apostrophes ('like this') rather than curved quotation marks (‘like this’) must be used to enclose the file paths.
+Note: If specifying absolute file paths in the .txt file, add -safe 0
before the input file.
e.g.: ffmpeg -f concat -safe 0 -i mylist.txt -c copy output_file
ffmpeg -f concat -safe 0 -i mylist.txt -c copy output_file
ffplay -framerate 5 input_file_%06d.ext
Notes:
@@ -1090,8 +1090,8 @@ e.g.:ffmpeg -f concat -safe 0 -i mylist.txt -c copy output_file
ffmpeg starts the command
-i input_file path, name and extension of the input file
- -filter:v "hflip,vflip" flips the image horizontally and vertically
By using only one of the parameters hflip or vflip for filtering the image is flipped on that axis only. The quote marks are not mandatory.
- -c:a copy re-encodes using the same audio codec
+ -filter:v "hflip,vflip" flips the image horizontally and vertically
By using only one of the parameters hflip or vflip for filtering the image is flipped on that axis only. The quote marks are not mandatory.
+ -c:a copy re-encodes using the same audio codec
For silent videos you can replace -c:a copy
by -an
.
output_file path, name and extension of the output file
@@ -1228,7 +1228,7 @@ e.g.: ffmpeg -f concat -safe 0 -i mylist.txt -c copy output_fileffmpegstarts the command
-f image2 forces the image file de-muxer for single image files
-framerate 24 Sets the input framerate to 24 fps. The image2 demuxer defaults to 25 fps.
- -i input_file path, name and extension of the input file
+ -i input_file path, name and extension of the input file
This must match the naming convention actually used! The regex %06d matches six digits long numbers, possibly with leading zeroes. This allows to read in ascending order, one image after the other, the full sequence inside one folder. For image sequences starting with 086400 (i.e. captured with a timecode starting at 01:00:00:00 and at 24 fps), add the flag -start_number 086400
before -i input_file_%06d.ext
. The extension for TIFF files is .tif or maybe .tiff; the extension for DPX files is .dpx (or eventually .cin for old files).
-c:v v210 encodes an uncompressed 10-bit video stream
-an copy no audio
@@ -1279,7 +1279,7 @@ e.g.: ffmpeg -f concat -safe 0 -i mylist.txt -c copy output_file
ffmpeg starts the command
-i input_file path, name and extension of the input file
- -filter:v setfield=tff Sets the field order to top field first. Use setfield=bff
for bottom field first.
+ -filter:v setfield=tff Sets the field order to top field first. Use setfield=bff
for bottom field first.
-c:v prores Tells ffmpeg to transcode the video stream into Apple ProRes 422. Experiment with using other codecs.
output_file path, name and extension of the output file
@@ -1343,13 +1343,13 @@ e.g.: ffmpeg -f concat -safe 0 -i mylist.txt -c copy output_file-hCall the help option
type=name
Tells ffmpeg which kind of option you want, for example:
-
- encoder=libx264
- decoder=mp3
- muxer=matroska
- demuxer=mov
- filter=crop
-
+
+ encoder=libx264
+ decoder=mp3
+ muxer=matroska
+ demuxer=mov
+ filter=crop
+