Projects
Multimedia
h264enc
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 392
View file
h264enc.spec
Changed
@@ -1,7 +1,7 @@ # norootforbuild Name: h264enc -Version: 10.4.5 +Version: 10.4.6 Release: 1 License: GPL-2.0+ @@ -58,6 +58,15 @@ %changelog +* Mon Sep 21 2015 Grozdan Nikolov <neutrino8@gmail.com> 10.4.6 + * Clean up the config file a bit + * Added support for setting the MAX_AMOUNT_SUBS and MAX_AMOUNT_AUD_TRACKS + to "auto". When set to "auto" it will as for as many audio tracks/subs + as detected + * New variable in the config file, MAX_AMOUNT_EXT_SUBS, for setting + the amount of times we get asked for importing external subs into + mkv/mp4/ogm + * Mon Sep 14 2015 Grozdan Nikolov <neutrino8@gmail.com> 10.4.5 * Fixed a small issue in the detection of aspect ratio when forcing it
View file
h264enc-10.4.5.tar.gz/doc/ChangeLog -> h264enc-10.4.6.tar.gz/doc/ChangeLog
Changed
@@ -1,3 +1,12 @@ +2015-09-21 - h264enc 10.4.6 + * Clean up the config file a bit + * Added support for setting the MAX_AMOUNT_SUBS and MAX_AMOUNT_AUD_TRACKS + to "auto". When set to "auto" it will as for as many audio tracks/subs + as detected + * New variable in the config file, MAX_AMOUNT_EXT_SUBS, for setting + the amount of times we get asked for importing external subs into + mkv/mp4/ogm + 2015-09-14 - h264enc 10.4.5 * Fixed a small issue in the detection of aspect ratio when forcing it
View file
h264enc-10.4.5.tar.gz/h264enc -> h264enc-10.4.6.tar.gz/h264enc
Changed
@@ -1,5 +1,5 @@ #!/usr/bin/env bash -# $Id: h264enc, v 10.4.5, 2015/09/14, gn Exp $ +# $Id: h264enc, v 10.4.6, 2015/09/21, gn Exp $ # # Encode BDs/DVDs/VCDs/video files to the H.264/AVC/MPEG-4 Part 10 # video format using MEncoder from MPlayer @@ -23,8 +23,8 @@ shopt -u expand_aliases export PATH=$PATH:/usr/local/bin -version=10.4.5 -configversion=35 +version=10.4.6 +configversion=36 green() { echo -e "\e[1;32m$1\e[0;39;49m"; } @@ -54,61 +54,6 @@ # # Version: $configversion - do not modify or remove this line! # -# This file is used by the h264enc script and contains the -# paths to the programs needed for its correct operation. -# The user can use it to modify the path to the various programs -# in case one or more of these programs is not in a standard location -# and connot be found by the system. It can also be used in -# case the user has multiple executables of the same program but -# wants to use a specific executable for the job. -# Note that this file cannot be used to store encoding settings -# or other parameters! They will be ignored. Everything after -# a # sign is a comment. -# -# The EDITOR variable is used to set the preferred text editor for -# editing the config file through the terminal. It defaults to the -# nano text editor. -# -# The ALLOW_* variables can be used to enable or disable specific -# audio/video filters and containers. Setting a variable to 'n' will -# skip asking questions about the specific filter/container. -# -# The DEFAULT_VID_BITRATE, DEFAULT_VID_CRFQP and DEFAULT_AUD_CODEC are -# self-explanatory. The first one sets the default bitrate, the second -# one the default CRF or QP value and the last one allows you to set -# the default audio codec. -# -# The DEFAULT_OUTPUT variable can be used to provide a custom output -# directory for your encodes. If left empty, h264enc defaults to your -# home dir for output. If set, h264enc checks for it and will create -# the directory if it's not present. The DEFAULT_OUTPUT variable can be -# overwritten on the command line, meaning that if it's set but the -# user provides a path on the command line, that path will be used -# instead. -# -# The TEMPDIR variable below can be used to change the location -# of the temporary directory used by h264enc. If unset, h264enc -# will default to /home/username/.h264enc/job<PID> -# If used, you must provide the full path to a directory. If the -# directory is missing, h264enc will create it. -# -# The MPLAYEROPTS variable can be used to set other mplayer options. -# Be careful which options you use as they may introduce problems -# when using the script. -# -# The PRIORITY variable is used to set a 'nice' value for the encoding -# process. The values one can use are between -20 and 19 where -20 -# will give the highest possible priority and 19 the least favorable -# one. Please note that only root can set/use a negative nice value. -# Regular users can only use/set values 0 to 19. If the variable is -# empty, then the default nice value of 0 is used. If the variable -# contains a negative value but the script is ran with normal user -# privileges, h264enc will print a notice and exit. -# -# The DVD_DEVICE and CDROM_DEVICE variables can be used to specify a -# preferred device to encode from. Note that only block devices are -# supported in these variables. CDROM_DEVICE is used for (S)VCD encoding -# # h264enc can also send mails if configured to do so. There are four # variables that need to be set in the mail settings below: # MAILNOTIFY # Enable/disable sending mail with y or n @@ -136,7 +81,8 @@ # If one or more of the below # variables is set to "y", it -# disables the specific function +# disables globally the specific +# function DISABLE_ALL_VID_FILTERS="n" DISABLE_ALL_AUD_FILTERS="n" DISABLE_VID_CROP_FILTER="n" @@ -175,13 +121,23 @@ ALLOW_AUD_PAN="y" # Amount of audio tracks to support -# Any non-zero value will do +# Any non-zero value will do. Set it +# to "auto" to ask for as many as +# detected audio tracks MAX_AMOUNT_AUD_TRACKS="2" # Amount of subtitles to support -# Any non-zero value will do +# Any non-zero value will do. Set +# it to "auto" to ask for as many +# as detected subtitles MAX_AMOUNT_SUBS="2" +# Max amount of external subs to +# support (for mkv/mp4/ogm importing) +# NOTE: setting it to "auto" is +# not supported! +MAX_AMOUNT_EXT_SUBS="2" + # Containers ALLOW_MKV_MUXING="y" ALLOW_MP4_MUXING="y" @@ -1329,19 +1285,28 @@ esac case "$MAX_AMOUNT_AUD_TRACKS" in - [a-zA-Z]*|0|"") + [1-9]*|auto) true ;; + *) error "-> Please check the value of 'MAX_AMOUNT_AUD_TRACKS' in '$H264ENCDIR/config'" exit_func 1 ;; esac case "$MAX_AMOUNT_SUBS" in - [a-zA-Z]*|0|"") + [1-9]*|auto) true ;; + *) error "-> Please check the value of 'MAX_AMOUNT_SUBS' in '$H264ENCDIR/config'" exit_func 1 ;; esac +case "$MAX_AMOUNT_EXT_SUBS" in + [a-zA-Z]*|0|"") + error "-> Please check the value of 'MAX_AMOUNT_EXT_SUBS' in '$H264ENCDIR/config'" + exit_func 1 + ;; +esac + # x264 tune/profile case "$4" in -t|-pf) @@ -2786,10 +2751,19 @@ brown "Available Subtitles On Disc" brown "~~~~~~~~~~~~~~~~~~~~~~~~~~~" if [ ! -z "$SUBS" ]; then + SUBT="$(echo "$SUBS" | wc -l)" green "$SUBS" else + SUBT="0" error "-> No subtitles available or failed to detect them!" fi + if [ "$MAX_AMOUNT_SUBS" = "auto" ]; then + if [ "$SUBT" = "0" ]; then + MAX_AMOUNT_SUBS="2" + else + MAX_AMOUNT_SUBS="$SUBT" + fi + fi echo } @@ -2868,7 +2842,7 @@ fi ;; import-external) - for i in $(eval echo "{1..$MAX_AMOUNT_SUBS}"); do + for i in $(eval echo "{1..$MAX_AMOUNT_EXT_SUBS}"); do printf "Provide the Subtitle file (Sub $i) [press 'Enter' to skip]: " read -e subfile[i] if [ ! -z "${subfile[i]}" ]; then @@ -5135,8 +5109,10 @@ echo echo "$AUDSTREAMS" | sed -e 's|^audio stream|Audio track|g' -e 's|format:|Format:|g' -e 's|language:|Language:|g' \ -e 's|aid:|Audio ID:|g' -e 's|ac3|AC-3|g' -e 's|dts|DTS|g' -e 's|lpcm|LPCM|g' -e 's|pcm|PCM|g' -e 's|\.$||g' + ATRKS="$(echo "$AUDSTREAMS" | wc -l)" else error "-> Could not detect any audio tracks!" + ATRKS="0" fi ;; file|bd) @@ -5145,7 +5121,9 @@ TRKS="$(grep '^\[lavf\]' "$AUDTRKS" | awk '{print $4}' | grep 'audio' | wc -l)" if [ "$TRKS" = "0" ]; then error "-> Could not detect any audio tracks and info!" + ATRKS="0" else + ATRKS="$TRKS" TRKID="$(($TRKS-1))" for i in $(eval echo "{0..$TRKID}"); do AUDINFO="$TEMPDIR/audinfo" @@ -5197,6 +5175,13 @@ ;; esac echo + if [ "$MAX_AMOUNT_AUD_TRACKS" = "auto" ]; then + if [ "$ATRKS" = "0" ]; then + MAX_AMOUNT_AUD_TRACKS="2" + else + MAX_AMOUNT_AUD_TRACKS="$ATRKS" + fi + fi for i in $(eval echo "{1..$MAX_AMOUNT_AUD_TRACKS}"); do if [ "$i" = "1" ]; then case "$source" in @@ -7720,7 +7705,7 @@ # Input type agnostic. Only # allow supported subtitle formats # by MKV. Others will be skipped - for i in $(eval echo "{1..$MAX_AMOUNT_SUBS}"); do + for i in $(eval echo "{1..$MAX_AMOUNT_EXT_SUBS}"); do if [ ! -z "${EXTSUB[i]}" ]; then case "$(echo "${EXTSUB[i]##*.}" | tr '[:upper:]' '[:lower:]')" in idx|srt|ass|ssa|sup|mks) @@ -8182,7 +8167,7 @@ # Input type agnostic. Only # allow supported subtitle formats # by MP4. Others will be skipped - for i in $(eval echo "{1..$MAX_AMOUNT_SUBS}"); do + for i in $(eval echo "{1..$MAX_AMOUNT_EXT_SUBS}"); do if [ ! -z "${EXTSUB[i]}" ]; then case "$(echo "${EXTSUB[i]##*.}" | tr '[:upper:]' '[:lower:]')" in idx|srt|ttxt) @@ -8756,7 +8741,7 @@ # Input type agnostic. Only # allow supported subtitle formats # by OGM. Others will be skipped - for i in $(eval echo "{1..$MAX_AMOUNT_SUBS}"); do + for i in $(eval echo "{1..$MAX_AMOUNT_EXT_SUBS}"); do if [ ! -z "${EXTSUB[i]}" ]; then case "$(echo "${EXTSUB[i]##*.}" | tr '[:upper:]' '[:lower:]')" in srt|SRT)
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.