Projects
Multimedia
ffx264
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 18
View file
ffx264.changes
Changed
@@ -1,4 +1,20 @@ ------------------------------------------------------------------- +Mon Nov 14 09:18:00 UTC 2016 - neutrino8@opensuse.org + +- Update to version 3.1.7 + * Set default amount of subtitles to 1 instead of exiting when no + value is given + * Allow the user to choose the amount of audio tracks he wants at + run time instead of requiring it to be set in the config file. + This removes config file var MAX_AUD_TRACKS and bumps up version + to 27 + * Renamed array variables audmapval and submapval to audindex and + subindex since we're not mapping but specifying the audio/sub + index id with these vars + * Fixed a possible case where audio params weren't cleared in + case the nosound option was chosen + +------------------------------------------------------------------- Sun Nov 13 11:36:00 UTC 2016 - neutrino8@opensuse.org - Update to version 3.1.6
View file
ffx264.spec
Changed
@@ -17,7 +17,7 @@ Name: ffx264 -Version: 3.1.6 +Version: 3.1.7 Release: 0 Summary: A small shell script for encoding to H.264 with ffmpeg License: GPL-2.0+
View file
ffx264-3.1.6.tar.gz/ChangeLog -> ffx264-3.1.7.tar.gz/ChangeLog
Changed
@@ -1,3 +1,17 @@ +2016-11-14 - ffx264 3.1.7 + * Set default amount of subtitles to 1 instead of exiting when no + value is given + * Allow the user to choose the amount of audio tracks he wants at + run time instead of requiring it to be set in the config file. + This removes config file var MAX_AUD_TRACKS and bumps up version + to 27 + * Renamed array variables audmapval and submapval to audindex and + subindex since we're not mapping but specifying the audio/sub + index id with these vars + * Fixed a possible case where audio params weren't cleared in + case the nosound option was chosen + * A few other small tweaks + 2016-11-13 - ffx264 3.1.6 * Added support for batch encoding mode, to be activated with the new -b option. It's used to encode directories with video files
View file
ffx264-3.1.6.tar.gz/ffx264 -> ffx264-3.1.7.tar.gz/ffx264
Changed
@@ -2,8 +2,8 @@ # # Small script to encode to H.264/AVC video using FFmpeg and libx264. # Author: Grozdan "microchip" Nikolov <neutrino8@opensuse.org> -# Version: 3.1.6 -# Date: 2016-11-13 +# Version: 3.1.7 +# Date: 2016-11-14 # # ffx264 is free software ; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -23,10 +23,10 @@ brown() { echo -e "\e[0;33m$1\e[0;39;49m"; } error() { echo -e "\e[1;31m$1\e[0;39;49m"; } -version="3.1.6" +version="3.1.7" CFG="$HOME/.ffx264" -cfgversion="26" +cfgversion="27" genconfig_func() { cat<<EOF>>"$CFG" @@ -90,12 +90,6 @@ AUD_VOLUME="y" AUD_RESAMPLE="y" -# Max amount of audio tracks to support -# Any non-zero value will do. Set it -# to "auto" to ask for as many as -# detected audio tracks -MAX_AUD_TRACKS="2" - # Enable subtitles support? # Note: not all containers support # all types of subs! @@ -254,31 +248,11 @@ esac done -if [ ! -z "$PRSTFILE" ]; then - if [ ! -z "$vpreset" -o ! -z "$vtune" ]; then - if [ ! -z "$(grep '^X264PARAMS' "$PRSTFILE")" ]; then - echo - error "-> x264 presets/tune profiles are mutually exclusive with custom presets!" - echo - error "-> If you want to use a custom configuration file, don't add or comment" - error " out the X264PARAMS variable in it. Then you can use the built-in" - error " presets/tuning with that file." - echo - exit 1 - fi - fi -else +if [ ! -z "$vtune" ]; then if [ -z "$vpreset" ]; then - if [ -f "$CFG" -a -z "$(grep '^X264PARAMS' "$CFG")" ]; then - echo - error "-> The X264PARAMS variable is commented out" - error " or missing from '$CFG'" - echo - error "-> Regenerating config file!" - rm -f "$CFG" - genconfig_func - echo - fi + error "-> Tune profiles require a preset to be used!" + error "-> Use: $(basename $0) -h" + exit 1 fi fi @@ -315,7 +289,37 @@ source "$CFG" fi -test ! -z "$PRSTFILE" && source "$PRSTFILE" +if [ ! -z "$PRSTFILE" ]; then + if [ ! -z "$vpreset" ]; then + if [ ! -z "$(grep '^X264PARAMS' "$PRSTFILE")" ]; then + error "-> x264 presets/tune profiles are mutually exclusive with custom presets!" + error "-> If you want to use a custom configuration file, don't add or comment" + error " out the X264PARAMS variable in it. Then you can use the built-in" + error " presets/tuning with that file." + echo + exit 1 + fi + else + if [ -z "$(grep '^X264PARAMS' "$PRSTFILE")" ]; then + error "-> The X264PARAMS variable is commented out or missing in your file!" + error "-> Please at least add to the file: X264PARAMS=\"ref=4\" (for example)" + echo + exit 1 + fi + fi + source "$PRSTFILE" +else + if [ -z "$vpreset" ]; then + if [ -f "$CFG" -a -z "$(grep '^X264PARAMS' "$CFG")" ]; then + error "-> The X264PARAMS variable is commented out" + error " or missing in '$CFG'" + error "-> Regenerating config file!" + echo + rm -f "$CFG" + genconfig_func + fi + fi +fi if [ ! -z "$FFMPEG" ]; then if [ ! -x "$FFMPEG" ]; then @@ -1072,36 +1076,40 @@ video_subtitles_func() { case "$1" in infile) - printf "How many Subtitles to Copy?: " + printf "How many Subtitles to Copy? [0-inf - default is 1]: " read subcp case "$subcp" in + 0) SUBCP="0" ;; [1-9]*) SUBCP="$subcp" ;; - ""|*) - error "-> Invalid or no value given!" + "") SUBCP="1" ;; + *) + error "-> Invalid value!" exit 1 ;; esac - for i in $(eval echo "{1..$SUBCP}"); do - submapval[i]="$(($i-1))" - printf "Sub $i: Specify a Subtitle to Copy [example: 0:2]: " - read subnr[i] - if [ ! -z "${subnr[i]}" ]; then - printf "Sub $i: Specify the 3-letter Language Code for Metadata [press 'Enter' to skip]: " - read slang[i] - if [ ! -z "${slang[i]}" ]; then - sublang[i]="-metadata:s:s:${submapval[i]} language=${slang[i]}" + if [ "$SUBCP" != "0" ]; then + for i in $(eval echo "{1..$SUBCP}"); do + subindex[i]="$(($i-1))" + printf "Sub $i: Specify a Subtitle to Copy [example: 0:2]: " + read subnr[i] + if [ ! -z "${subnr[i]}" ]; then + printf "Sub $i: Specify the 3-letter Language Code for Metadata [press 'Enter' to skip]: " + read slang[i] + if [ ! -z "${slang[i]}" ]; then + sublang[i]="-metadata:s:s:${subindex[i]} language=${slang[i]}" + fi + subcopy[i]="-map ${subnr[i]} -c:s:${subindex[i]} copy ${sublang[i]}" + # Workaround for an ffmpeg disposition issue + # where in some cases it sets subsequent tracks + # as default. + test "$i" = "1" && sdis="default" || sdis="none" + subdis[i]="-disposition:s:${subindex[i]} $sdis" + else + error "-> No value given!" + exit 1 fi - subcopy[i]="-map ${subnr[i]} -c:s:${submapval[i]} copy ${sublang[i]}" - # Workaround for an ffmpeg disposition issue - # where in some cases it sets subsequent tracks - # as default. - test "$i" = "1" && sdis="default" || sdis="none" - subdis[i]="-disposition:s:${submapval[i]} $sdis" - else - error "-> No value given!" - exit 1 - fi - done + done + fi test "$subopt" = "2" && echo ;; ext) @@ -1128,38 +1136,42 @@ esac done fi - printf "How many External Subtitles to Add?: " + printf "How many External Subtitles to Add? [0-inf - default is 1]: " read subext case "$subext" in + 0) SUBEXT="0" ;; [1-9]*) SUBEXT="$subext" ;; - ""|*) - error "-> Invalid or no value given!" + "") SUBEXT="1" ;; + *) + error "-> Invalid value!" exit 1 ;; esac - for i in $(eval echo "{1..$SUBEXT}"); do - test ! -z "${submapval[*]}" && submap[i]="$((${submapval[-1]}+$i))" || submap[i]="$(($i-1))" - printf "Sub $i: Specify the Subtitle File: " - read -e sub[i] - if [ ! -f "${sub[i]}" ]; then - error "-> No such file!" - exit 1 - else - printf "Sub $i: Specify the 3-letter Language Code for Metadata [press 'Enter' to skip]: " - read slng[i] - if [ ! -z "${slng[i]}" ]; then - sublng[i]="-metadata:s:s:${submap[i]} language=${slng[i]}" - fi - EXTSUBS[i]="-i \"${sub[i]}\"" - if [ ! -z "${submapval[*]}" ]; then - sdispo="none" + if [ "$SUBEXT" != "0" ]; then + for i in $(eval echo "{1..$SUBEXT}"); do + test ! -z "${subindex[*]}" && subidx[i]="$((${subindex[-1]}+$i))" || subidx[i]="$(($i-1))" + printf "Sub $i: Specify the Subtitle File: " + read -e subfile[i] + if [ ! -f "${subfile[i]}" ]; then + error "-> No such file!" + exit 1 else - test "$i" = "1" && sdispo="default" || sdispo="none" + printf "Sub $i: Specify the 3-letter Language Code for Metadata [press 'Enter' to skip]: " + read slng[i] + if [ ! -z "${slng[i]}" ]; then + sublng[i]="-metadata:s:s:${subidx[i]} language=${slng[i]}" + fi + EXTSUBS[i]="-i \"${subfile[i]}\"" + if [ ! -z "${subindex[*]}" ]; then + sdispo="none" + else + test "$i" = "1" && sdispo="default" || sdispo="none" + fi + subdispo[i]="-disposition:s:${subidx[i]} $sdispo" + subcpy[i]="-map $i:0 -c:s:${subidx[i]} copy ${sublng[i]}" fi - subdispo[i]="-disposition:s:${submap[i]} $sdispo" - subcpy[i]="-map $i:0 -c:s:${submap[i]} copy ${sublng[i]}" - fi - done + done + fi ;; esac } @@ -1215,42 +1227,41 @@ sleep 1 AUDTRKS="$($FFPROBE -i "$input" 2>&1 | grep 'Stream #' | grep 'Audio' | sed 's| ||g')" if [ ! -z "$AUDTRKS" ]; then - green "$AUDTRKS" ATRKS="$(echo "$AUDTRKS" | wc -l)" + green "$AUDTRKS" + echo + green "-> Detected $ATRKS audio tracks" else error "-> Could not detect any audio tracks!" - ATRKS="0" fi echo -if [ "$MAX_AUD_TRACKS" = "auto" ]; then - test "$ATRKS" = "0" && MAX_AUD_TRACKS="1" || MAX_AUD_TRACKS="$ATRKS" -fi +printf "How many Audio Tracks to Encode or Copy? [0-inf - default is 1]: " +read atracks +case "$atracks" in + 0) audparams[1]="-an"; ATRACKS="0" ;; + [1-9]*) ATRACKS="$atracks" ;; + "") ATRACKS="1" ;; + *) + error "-> Invalid value!" + exit 1 + ;; +esac -for i in $(eval echo "{1..$MAX_AUD_TRACKS}"); do - audmapval[i]="$(($i-1))" - if [ "$i" = "1" -a "$ATRKS" != "0" ]; then - defaudtrk="default is 0:1" - else - defaudtrk="press 'Enter' to skip" - fi - printf "Track $i: Specify the Audio Track to Encode or Copy [$defaudtrk]: " - read astream[i] - if [ -z "${astream[1]}" -a "$ATRKS" != "0" ]; then - astream[1]="0:1" - fi - if [ ! -z "${astream[i]}" ]; then +if [ "$ATRACKS" != "0" ]; then + for i in $(eval echo "{1..$ATRACKS}"); do + audindex[i]="$(($i-1))" + printf "Track $i: Specify the Audio Track to Encode or Copy [default is 0:1]: " + read astream[i] + test -z "${astream[i]}" && atrack[i]="0:1" || atrack[i]="${astream[i]}" printf "Track $i: Specify the 3-letter Language Code for Metadata [press 'Enter' to skip]: " read alang[i] if [ ! -z "${alang[i]}" ]; then - audlang[i]="-metadata:s:a:${audmapval[i]} language=${alang[i]}" + audlang[i]="-metadata:s:a:${audindex[i]} language=${alang[i]}" fi - fi -done - -test -z "$(echo "${astream[*]}" | sed 's| ||g')" && audparams[1]="-an" - -if [ "${audparams[1]}" != "-an" ]; then + audmap[i]="-map ${atrack[i]}" + done + echo brown " Available Audio Codecs" brown " ~~~~~~~~~~~~~~~~~~~~~~" @@ -1267,18 +1278,14 @@ echo " PCM -----> Channels Support: 8 (ffmpeg max)" echo " COPY ----> Channels Support: depends on audio codec" echo " NOSOUND -> Channels Support: N/A" -fi - -for i in $(eval echo "{1..$MAX_AUD_TRACKS}"); do - if [ ! -z "${astream[i]}" ]; then + + for i in $(eval echo "{1..$ATRACKS}"); do echo - audmap[i]="-map ${astream[i]}" - # Workaround for an ffmpeg disposition issue # where in some cases it flags subsequent # tracks as default. test "$i" = "1" && adis="default" || adis="none" - auddis[i]="-disposition:a:${audmapval[i]} $adis" + auddis[i]="-disposition:a:${audindex[i]} $adis" printf "Track $i: Specify the Audio Codec [default is AC3]: " read acodec[i] @@ -1369,16 +1376,16 @@ fi ;; nosound) - audparams[1]="-an" - abitrate[1]="0" # nosound takes precedence so # clear any audio options given - if [ $i -ge 2 ]; then - for t in $(eval echo "{2..$MAX_AUD_TRACKS}"); do - audparams[t]= - auddis[t]= - done - fi + for t in $(eval echo "{1..$ATRACKS}"); do + audparams[t]= + auddis[t]= + done + echo + error "-> NOSOUND chosen. Clearing all other audio options!" + audparams[1]="-an" + abitrate[1]="0" break ;; *) @@ -1445,13 +1452,13 @@ exit 1 ;; esac - audprofile[i]="-profile:a:${audmapval[i]} ${aacprof[i]} -afterburner:a:${audmapval[i]} 1" + audprofile[i]="-profile:a:${audindex[i]} ${aacprof[i]} -afterburner:a:${audindex[i]} 1" ;; flac) printf "Track $i: Specify the FLAC Compression Level [${abropts[i]} - default is ${abrdef[i]}]: " read abr[i] test -z "${abr[i]}" && acomplevel[i]="${abrdef[i]}" || acomplevel[i]="${abr[i]}" - audcomplevel[i]="-compression_level:a:${audmapval[i]} ${acomplevel[i]}" + audcomplevel[i]="-compression_level:a:${audindex[i]} ${acomplevel[i]}" abtrmeta[i]="@ CL ${acomplevel[i]}" ;; pcm) @@ -1474,7 +1481,7 @@ printf "Track $i: Specify the Audio Bitrate in kbps [${abropts[i]} - default is ${abrdef[i]}]: " read abr[i] test -z "${abr[i]}" && abitrate[i]="${abrdef[i]}k" || abitrate[i]="${abr[i]}k" - audbtr[i]="-b:a:${audmapval[i]} ${abitrate[i]}" + audbtr[i]="-b:a:${audindex[i]} ${abitrate[i]}" abtrmeta[i]="@ $(echo "${abitrate[i]}" | sed 's|k||') kbps" ;; esac @@ -1566,8 +1573,8 @@ ;; esac - audmeta[i]="-metadata:s:a:${audmapval[i]} title=\"${ameta[i]} ${achmeta[i]} ${abtrmeta[i]}\"" - audchan[i]="-ac:a:${audmapval[i]} ${ach[i]} -channel_layout:a:${audmapval[i]} \"${chlayout[i]}\"" + audmeta[i]="-metadata:s:a:${audindex[i]} title=\"${ameta[i]} ${achmeta[i]} ${abtrmeta[i]}\"" + audchan[i]="-ac:a:${audindex[i]} ${ach[i]} -channel_layout:a:${audindex[i]} \"${chlayout[i]}\"" if [ "$AUD_NORMALIZE" = "y" ]; then printf "Track $i: Normalize the Audio Volume? [y/N]: " @@ -1595,7 +1602,7 @@ echo green "-> Track $i: detecting audio sample rate..." sleep 1 - aid[i]="$(($(echo "${astream[i]}" | awk -F: '{print $2}')-1))" + aid[i]="$(($(echo "${atrack[i]}" | awk -F: '{print $2}')-1))" ASR[i]="$($FFPROBE -i "$input" -show_streams -select_streams a:${aid[i]} 2>&1 | sed -n 's|^sample_rate=||p')" if [ ! -z "${ASR[i]}" ]; then green "-> Track $i: detected ${ASR[i]} Hz" @@ -1781,13 +1788,12 @@ afilters[i]="$(echo "${aresample[i]}${anormalize[i]}${avolume[i]}$atempo" | sed 's|,$||')" - test ! -z "${afilters[i]}" && audfilters[i]="-filter:a:${audmapval[i]} ${afilters[i]}" + test ! -z "${afilters[i]}" && audfilters[i]="-filter:a:${audindex[i]} ${afilters[i]}" fi - audparams[i]="${audmap[i]} -c:a:${audmapval[i]} ${acdc[i]} ${audprofile[i]} ${audcomplevel[i]} ${audbtr[i]} ${audchan[i]} ${audfilters[i]} ${audlang[i]} ${audmeta[i]}" - - fi -done + audparams[i]="${audmap[i]} -c:a:${audindex[i]} ${acdc[i]} ${audprofile[i]} ${audcomplevel[i]} ${audbtr[i]} ${audchan[i]} ${audfilters[i]} ${audlang[i]} ${audmeta[i]}" + done +fi if [ ! -z "$skipsetpts" ]; then echo @@ -1820,9 +1826,9 @@ error "-> Skipping bitrate calculation!" else # Audio copy, get bitrate - for i in $(eval echo "{1..$MAX_AUD_TRACKS}"); do + for i in $(eval echo "{1..$ATRACKS}"); do if [ "${acodec[i]}" = "copy" ]; then - aid[i]="$(($(echo "${astream[i]}" | awk -F: '{print $2}')-1))" + aid[i]="$(($(echo "${atrack[i]}" | awk -F: '{print $2}')-1))" abtr[i]="$($FFPROBE -i "$input" -show_streams -select_streams a:${aid[i]} 2>&1 | sed -n 's|^bit_rate=||p')" case "${abtr[i]}" in [1-9]*) abitrate[i]="$((${abtr[i]}/1000))" ;; @@ -1846,18 +1852,6 @@ ;; esac -test "$METADATA" = "n" && MDATA="-map_metadata -1" - -test "$CHAPS" = "n" && CHPS="-map_chapters -1" - -vidfilters="$(echo "$deinterlace$crop$deblock$denoise$scale$rotate$setpts$fps" | sed 's|,$||')" - -test ! -z "$vidfilters" && vfilters="-vf $vidfilters" - -test ! -z "$vpreset" && X264PARAMS=":force-cfr=1:threads=auto$colorprim$interlaced $vpreset" || X264PARAMS=":$X264PARAMS$colorprim" - -test ! -z "$COMMENT" && METACOMMENT="-metadata comment=\"$COMMENT\"" - # Small counter :) counter_func() { for i in 5 4 3 2 1 0; do @@ -1891,12 +1885,24 @@ if [ -z "$batchmode" ]; then - OUTFILE="$(dirname "$OUTPUT")/$(basename "${OUTPUT%.*}" | sed 's| |_|g')" + OUTFILE="$(dirname "$OUTPUT")/$(basename "${OUTPUT%.*}" | sed 's| |_|g').sh" else - OUTFILE="$(dirname "$OUTPUT")/$(basename $0)_batch$$" + OUTFILE="$(dirname "$OUTPUT")/$(basename $0)_batch$$.sh" input="\$i" fi +test "$METADATA" = "n" && MDATA="-map_metadata -1" + +test "$CHAPS" = "n" && CHPS="-map_chapters -1" + +vidfilters="$(echo "$deinterlace$crop$deblock$denoise$scale$rotate$setpts$fps" | sed 's|,$||')" + +test ! -z "$vidfilters" && vfilters="-vf $vidfilters" + +test ! -z "$vpreset" && X264PARAMS=":force-cfr=1:threads=auto$colorprim$interlaced $vpreset $vtune" || X264PARAMS=":$X264PARAMS$colorprim" + +test ! -z "$COMMENT" && METACOMMENT="-metadata comment=\"$COMMENT\"" + encoder_func() { case "$1" in 1p|crf) @@ -1905,53 +1911,53 @@ OPTS2="${audparams[*]} ${auddis[*]} ${subcopy[*]} ${subcpy[*]} ${subdis[*]} ${subdispo[*]} $strict $movflags $METACOVER \"$OUTPUT\"" ;; 2p) - passone="stats=\"$OUTFILE.log\":pass=1:bitrate=$vbitrate" - passtwo="stats=\"$OUTFILE.log\":pass=2:bitrate=$vbitrate" + passone="stats=\"${OUTFILE%.*}.log\":pass=1:bitrate=$vbitrate" + passtwo="stats=\"${OUTFILE%.*}.log\":pass=2:bitrate=$vbitrate" OPTS1="-map 0:0" OPTS2="-an -f null -y /dev/null" OPTS3="${EXTSUBS[*]} -map 0:0 -disposition:v:0 default $ofps $annexb $NOSUBS $MDATA $CHPS $METATITLE $METAGENRE $METAYEAR $METACOMMENT $vfilters $sws" OPTS4="${audparams[*]} ${auddis[*]} ${subcopy[*]} ${subcpy[*]} ${subdis[*]} ${subdispo[*]} $strict $movflags $METACOVER \"$OUTPUT\"" ;; esac - echo "nice -n $NICE $FFMPEG -i \"$input\" $OPTS1 -c:v libx264 -x264opts $pmode$passone$X264PARAMS $vtune $OPTS2" + echo "nice -n $NICE $FFMPEG -i \"$input\" $OPTS1 -c:v libx264 -x264opts $pmode$passone$X264PARAMS $OPTS2" case "$1" in 2p) echo - echo "nice -n $NICE $FFMPEG -i \"$input\" $OPTS3 -c:v libx264 -x264opts $passtwo$X264PARAMS $vtune $OPTS4" + echo "nice -n $NICE $FFMPEG -i \"$input\" $OPTS3 -c:v libx264 -x264opts $passtwo$X264PARAMS $OPTS4" ;; esac } -echo "#!/usr/bin/env bash" > "$OUTFILE.sh" -echo "" >> "$OUTFILE.sh" +echo "#!/usr/bin/env bash" > "$OUTFILE" +echo "" >> "$OUTFILE" if [ ! -z "$batchmode" ]; then - echo "$CHDIR" >> "$OUTFILE.sh" - echo "" >> "$OUTFILE.sh" - echo "$FORLOOP_START" >> "$OUTFILE.sh" - echo "$CHKFILE_START" >> "$OUTFILE.sh" + echo "$CHDIR" >> "$OUTFILE" + echo "" >> "$OUTFILE" + echo "$FORLOOP_START" >> "$OUTFILE" + echo "$CHKFILE_START" >> "$OUTFILE" fi -encoder_func $encmode >> "$OUTFILE.sh" -echo "" >> "$OUTFILE.sh" +encoder_func $encmode >> "$OUTFILE" +echo "" >> "$OUTFILE" if [ ! -z "$extracon" ]; then - echo "grn() { echo -e \"\e[1;32m\$1\e[0;39;49m\"; }" >> "$OUTFILE.sh" - echo "red() { echo -e \"\e[1;31m\$1\e[0;39;49m\"; }" >> "$OUTFILE.sh" + echo "green() { echo -e \"\e[1;32m\$1\e[0;39;49m\"; }" >> "$OUTFILE" + echo "red() { echo -e \"\e[1;31m\$1\e[0;39;49m\"; }" >> "$OUTFILE" for i in $extracon; do - echo "" >> "$OUTFILE.sh" - echo "echo" >> "$OUTFILE.sh" - echo "grn \"-> Converting to $i...\"" >> "$OUTFILE.sh" - echo "" >> "$OUTFILE.sh" + echo "" >> "$OUTFILE" + echo "echo" >> "$OUTFILE" + echo "green \"-> Remuxing to $i...\"" >> "$OUTFILE" + echo "" >> "$OUTFILE" case "$i" in - avi|m2ts|mts|ts) echo "$FFMPEG -i \"$OUTPUT\" -map 0 -c copy -bsf:v h264_mp4toannexb \"${OUTPUT%.*}.$i\" >/dev/null 2>&1" >> "$OUTFILE.sh" ;; - *) echo "$FFMPEG -i \"$OUTPUT\" -map 0 -c copy \"${OUTPUT%.*}.$i\" >/dev/null 2>&1" >> "$OUTFILE.sh" ;; + avi|m2ts|mts|ts) echo "$FFMPEG -i \"$OUTPUT\" -map 0 -c copy -bsf:v h264_mp4toannexb \"${OUTPUT%.*}.$i\" >/dev/null 2>&1" >> "$OUTFILE" ;; + *) echo "$FFMPEG -i \"$OUTPUT\" -map 0 -c copy \"${OUTPUT%.*}.$i\" >/dev/null 2>&1" >> "$OUTFILE" ;; esac - echo "test \"\$?\" = \"0\" && grn \"-> Done\" || red \"-> Failed!\"" >> "$OUTFILE.sh" + echo "test \"\$?\" = \"0\" && green \"-> Done\" || red \"-> Failed!\"" >> "$OUTFILE" done - echo "echo" >> "$OUTFILE.sh" + echo "echo" >> "$OUTFILE" fi if [ ! -z "$batchmode" ]; then - echo "$CHKFILE_END" >> "$OUTFILE.sh" - echo "$FORLOOP_END" >> "$OUTFILE.sh" + echo "$CHKFILE_END" >> "$OUTFILE" + echo "$FORLOOP_END" >> "$OUTFILE" fi -chmod +x "$OUTFILE.sh" +chmod +x "$OUTFILE" -source "$OUTFILE.sh" +source "$OUTFILE"
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
.