#############################################################################
# Copyright (C) 2013 Dominik Rueß; info@dominik-ruess.de #
# #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
# the Free Software Foundation, either version 3 of the License, or #
# (at your option) any later version. #
# #
# This program is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
# GNU General Public License for more details. #
# #
# You should have received a copy of the GNU General Public License #
# along with this program. If not, see <http://www.gnu.org/licenses/>. #
#############################################################################
This script is indented to ease the conversion of videos to the H264 / MP4
format. It automated bit rate selection, re-sizing, mp3 re-encoding,
concatenation of multiple input videos, size adaptation of differently sized
input videos, etc.
If you like this script, consider donating to me at sourceforge (User 'domsen'):
http://sourceforge.net/donate/?user_id=4005050
If unsure, please double check with my projects.
### BUGS, IMPROVEMENTS
If you encounter bugs or want to suggest improvements, get in touch with me.
### REQUIREMENTS
- python3 (Should also work with python2)
- mencoder/mplayer
- H264 codec
- only if you want to use image files as input, any one of:
- PIL
- OpenCV
- ImageMagick
- None (but then make sure input images are all of same dimension)
### Platform
Since only calls to the python modules are implemented, as well as calls
to mencoder/mplayer, this script should work on any platform. I've tested
it with Ubuntu 13.10, only. I you experience problems with other platforms,
please let mit know.
### INSTALLATION
copy the script somewhere into the PATH environment
### INSTRUCTIONS
For an overview of the capabilities type:
convertToMP4 -h
The program will convert your videos to the H264-MP4 format:
1. Simply convert with the script:
convertToMP4 pathToFile
This will produce a converted video in the current directory. If you know
about the content of the video, have a look at the option
--motion-hint=[1,...,4]
The more movement there is in the video, the higher the motion hint number
you should choose.
2. Target a certain file size (e.g. for CD image creation):
convertToMP4 pathToFile --target-filesize XX
where XX is the target size in Megabytes. The script will compute the
necessary bit rates and perform the conversion.
3. Select a particular bitrate in kbit/s:
convertToMP4 pathToFile --bitrate XX
If you wish to create an output video consisting of back to back input video,
just provide the input videos on the command line.
- If the videos have different frame rates, the highest one will be selected
for the output video
- If the the input videos have different resolutions, the highest resolution
will be selected for the output video
For more help refer to the script help, with 'convertToMP4 -h'
### PROBLEMS
- sometimes, mencoder doesn't want to copy the sound file, in this situation try
to use --force-audio-reencode