دانلود کتاب BASH SCRIPT EXAMPLE : ffmpeg AVI (ANY) to MP4 : Some Notes.
by Chickita
|
عنوان فارسی: BASH SCRIPT EXAMPLE: ffmpeg AVI (ANY) to MP4: Some Notes. |
دانلود کتاب
جزییات کتاب
Some users in our group mentioned that:
#1.) Replacing `pwd` (= “$(PWD)”) with “/some/path” does not work. Ooops.
INPUT_DIR=`pwd` # "$(PWD)" can be replaced with "/path/to/input/directory"
This is because of shell parser, which parse all input file as a one single line and ffmpeg tokenize it into several pieces by splitting it by spaces.
Solution:
Anyway you have to invoke the script for any location.
So, better would be invoking the script from the same directory as input files.
`pwd` = “$(PWD)” works perfect as desired from same directory as input files.
May Bash shopt globstar work!?!
Where as,
OUTPUT_DIR=`pwd` # "$(PWD)" can be replaced with "/path/to/input/directory"
works perfect for “/any/desired/output/directory”
#2.) Older versions of ffmpeg and ffprobe might not work as well.
As the script found to be working perfectly (and well-tested) on any version(s) later than 3.4.2+
where aac encoder has stable release and it no longer requires -strict option.
Rest every things work as desired.
Notes:
ffmpeg can be replace with handbrake-cli if you successfully format and supply correct options.
(Some of you might have already did it, I know.)
As script has been already released under GNU/GPL v 2,
You have more than four freedom to enjoy. More precisely.
The freedom to run the program as you wish, for any purpose (freedom 0).
The freedom to study how the program works, and change it so it does your computing as you wish (freedom 1). Access to the source code is a precondition for this.
The freedom to redistribute copies so you can help others (freedom 2).
The freedom to distribute copies of your modified versions to others (freedom 3). By doing this you can give the whole community a chance to benefit from your changes. Access to the source code is a precondition for this.
Additional freedom you have is:
You can encode, watch and listen anything you want. But faster in several batches.
Happy encoding!!!