Projects
Multimedia
ffxvid
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 64
View file
ffxvid.changes
Changed
@@ -1,4 +1,16 @@ ------------------------------------------------------------------- +Sun Oct 20 04:39:00 UTC 2019 - neutrino8@opensuse.org + +- Update to version 1.4.9 +* Added support for embedding of SRT/SSA/ASS subtitles + in the MP4/M4V container +* Moved back to MP4Box for adding cover art to MP4/M4V/MOV. + Apparently, after lots of testing, atomicparsley + creates files that hang during playback +* Cosmetics +* Updated the man page + +------------------------------------------------------------------- Sat Oct 19 07:16:00 UTC 2019 - neutrino8@opensuse.org - Update to version 1.4.8
View file
ffxvid.spec
Changed
@@ -17,7 +17,7 @@ Name: ffxvid -Version: 1.4.8 +Version: 1.4.9 Release: 0 Summary: A small shell script for encoding to H.264 with ffmpeg License: GPL-2.0+ @@ -27,7 +27,7 @@ Requires: ffmpeg Requires: bc Requires: MPlayer -Requires: AtomicParsley +Requires: gpac BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildArch: noarch
View file
ffxvid-1.4.8.tar.gz/ChangeLog -> ffxvid-1.4.9.tar.gz/ChangeLog
Changed
@@ -1,3 +1,12 @@ +2019-10-20 - ffxvid 1.4.9 + * Added support for embedding of SRT/SSA/ASS subtitles + in the MP4/M4V containers + * Moved back to MP4Box for adding cover art to MP4/M4V/MOV. + Apparently, after lots of testing, atomicparsley + creates files that hang during playback + * Cosmetics + * Updated the man page + 2019-10-19 - ffxvid 1.4.8 * Use atomicparsley to add cover art for the mp4/m4v containers. This removes dependence on MP4Box and
View file
ffxvid-1.4.8.tar.gz/ffxvid -> ffxvid-1.4.9.tar.gz/ffxvid
Changed
@@ -2,8 +2,8 @@ # # Small script to encode to Xvid video using FFmpeg. # Author: Grozdan "microchip" Nikolov <neutrino8@opensuse.org> -# Version: 1.4.8 -# Date: 2019-10-19 +# Version: 1.4.9 +# Date: 2019-10-20 # # ffx264 is free software ; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -24,10 +24,10 @@ brown() { echo -e "\e[0;33m$1\e[0;39;49m"; } error() { echo -e "\e[1;31m$1\e[0;39;49m"; } -version="1.4.8" +version="1.4.9" CFG="$HOME/.ffxvid" -cfgversion="12" +cfgversion="13" genconfig_func() { cat<<EOF>>"$CFG" @@ -122,7 +122,7 @@ FFMPEG="" FFPROBE="" MPLAYER="" -ATOMICPARSLEY="" +MP4BOX="" # Add a custom comment to your encodes # Leave empty to disable/ask each time @@ -324,17 +324,17 @@ fi fi -if [ ! -z "$ATOMICPARSLEY" ]; then - if [ ! -x "$ATOMICPARSLEY" ]; then - error "-> atomicparsley is missing from your system!" +if [ ! -z "$MP4BOX" ]; then + if [ ! -x "$MP4BOX" ]; then + error "-> MP4Box is missing from your system!" error "-> Check the config in '$CFG'" echo exit 1 fi else - ATOMICPARSLEY="$(which atomicparsley 2>/dev/null)" - if [ ! -x "$ATOMICPARSLEY" ]; then - error "-> atomicparsley is missing from your system!" + MP4BOX="$(which MP4Box 2>/dev/null)" + if [ ! -x "$MP4BOX" ]; then + error "-> MP4Box is missing from your system!" echo exit 1 fi @@ -594,7 +594,7 @@ fi case "$CONFMT" in - mkv|mp4|m4v) + mkv|mp4|m4v|mov) printf "Specify a Cover Image in JPG/PNG format [press 'Enter' to skip]: " read -e cover if [ ! -z "$cover" ]; then @@ -612,7 +612,7 @@ esac case "$CONFMT" in mkv) MKVCOVER="-attach \"$(readlink -e "$cover")\" -metadata:s:t mimetype=\"image/$img\"" ;; - mp4|m4v) MP4COVER="1" ;; + mp4|m4v|mov) MP4COVER="1" ;; esac fi fi @@ -1855,6 +1855,14 @@ exit 1 ;; esac + case "$CONFMT" in + mkv|mp4|m4v) true ;; + *) + error "-> The $CONFMT container doesn't support SRT/SSA/ASS subtitles!" + error "-> Supported containers are: mkv, mp4, m4v, m2ts, mts and ts" + exit 1 + ;; + esac if [ "$SUBCP" != "0" ]; then for i in $(eval echo "{1..$SUBCP}"); do subindex[i]="$(($i-1))" @@ -1868,7 +1876,11 @@ # where in some cases it flags subsequent tracks # as default. test "$i" = "1" && sdis="default" || sdis="none" - subcopy[i]="-map ${subnr[i]} -c:s:${subindex[i]} copy ${sublang[i]} -disposition:s:${subindex[i]} $sdis" + case "$CONFMT" in + mp4|m4v) submuxer_in="mov_text" ;; + *) submuxer_in="copy" ;; + esac + subcopy[i]="-map ${subnr[i]} -c:s:${subindex[i]} $submuxer_in ${sublang[i]} -disposition:s:${subindex[i]} $sdis" else error "-> No value given!" exit 1 @@ -1879,9 +1891,9 @@ ;; ext) case "$CONFMT" in - mkv) true ;; + mkv|mp4|m4v) true ;; *) - error "-> The $CONFMT container doesn't support srt/ssa subtitles!" + error "-> The $CONFMT container doesn't support SRT/SSA/ASS subtitles!" error "-> Supported containers are: mkv" exit 1 ;; @@ -1889,12 +1901,12 @@ if [ ! -z "$remuxcon" ]; then for i in $remuxcon; do case "$i" in - mkv) true ;; + mkv|mp4|m4v) true ;; *) echo error "-> Warning: One or more chosen additional container" - error " doesn't support srt/ssa subtitles!" - error "-> Remuxing will most likely fail!" + error " doesn't support SRT/SSA/ASS subtitles!" + error "-> Subtitles will be ignored during remuxing!" echo break ;; @@ -1929,8 +1941,12 @@ else test "$i" = "1" && sdispo="default" || sdispo="none" fi - EXTSUBS[i]="-i \"${subfile[i]}\"" - subcpy[i]="-map $i:0 -c:s:${subidx[i]} copy ${sublng[i]} -disposition:s:${subidx[i]} $sdispo" + case "$CONFMT" in + mp4|m4v) submuxer_ext="mov_text" ;; + *) submuxer_ext="copy" ;; + esac + EXTSUBS[i]="-i \"$(readlink -e "${subfile[i]}")\"" + subcpy[i]="-map $i:0 -c:s:${subidx[i]} $submuxer_ext ${sublng[i]} -disposition:s:${subidx[i]} $sdispo" fi done fi @@ -1956,10 +1972,10 @@ echo brown " Subtitles" brown " ~~~~~~~~~" - echo " 0 -> Copy subtitles from the input file" - echo " 1 -> Add external subtitle files (SRT/SSA only!)" - echo " 2 -> Copy subs from input file + add external ones (SRT/SSA only!)" - echo " 3 -> Hardcode a subtitle (text-based subs only!)" + echo " 0 -> Copy subtitles from the input file (SRT/SSA/ASS only!)" + echo " 1 -> Add external subtitle files (SRT/SSA/ASS only!)" + echo " 2 -> Copy subs from input file + add external ones (SRT/SSA/ASS only!)" + echo " 3 -> Hardcode a subtitle (SRT/SSA/ASS only!)" echo printf "Specify the Subtitle Option [press 'Enter' to skip]: " read subopt @@ -1990,8 +2006,8 @@ ;; 3) echo - echo " 0 -> Hardcode an External Subtitle (text-based subs only!)" - echo " 1 -> Hardcode an Embedded Subtitle (text-based subs only!)" + echo " 0 -> Hardcode an External Subtitle (SRT/SSA/ASS only!)" + echo " 1 -> Hardcode an Embedded Subtitle (SRT/SSA/ASS only!)" echo printf "Specify the Subtitle Option [press 'Enter' to skip]: " read sub @@ -3201,12 +3217,16 @@ encoder_func $encmode >> "$OUTFILE" echo "" >> "$OUTFILE" case "$CONFMT" in - mp4|m4v) + mp4|m4v|mov) if [ ! -z "$MP4COVER" ]; then echo "echo" >> "$OUTFILE" echo "green \"-> Adding cover image...\"" >> "$OUTFILE" - echo "$ATOMICPARSLEY \"$OUTPUT\" --artwork \"$(readlink -e "$cover")\" --overWrite >/dev/null 2>&1" >> "$OUTFILE" - echo "test \"\$?\" = \"0\" && green \"-> Done\" || red \"-> Failed!\"" >> "$OUTFILE" + echo "$MP4BOX -add \"$OUTPUT\" -itags cover=\"$(readlink -e "$cover")\":name=\"$(basename "${OUTPUT%.*}")\":genre=\"$genre\":created=\"$year\":comment=\"$COMMENT\" -mpeg4 -new \"${OUTPUT%.*}_COVER_$$.$CONFMT\" >/dev/null 2>&1" >> "$OUTFILE" + echo "RET=\$?" >> "$OUTFILE" + echo "test \"\$RET\" = \"0\" && green \"-> Done\" || red \"-> Failed!\"" >> "$OUTFILE" + echo "if [ \"\$RET\" = \"0\" ]; then" >> "$OUTFILE" + echo "mv -f \"${OUTPUT%.*}_COVER_$$.$CONFMT\" \"${OUTPUT%.*}.$CONFMT\"" >> "$OUTFILE" + echo "fi" >> "$OUTFILE" echo "echo" >> "$OUTFILE" echo "" >> "$OUTFILE" fi @@ -3227,16 +3247,32 @@ ;; *) vflags=""; MKVCOVER2="" ;; esac - echo "$FFMPEG $vflags -i \"$OUTPUT\" -map 0 -c copy $strict $MKVCOVER2 $METATITLE $METAGENRE $METAYEAR $METACOMMENT ${audmeta[*]} ${audlang[*]} ${sublang[*]} ${sublng[*]} \"${OUTPUT%.*}.$i\" >/dev/null 2>&1" >> "$OUTFILE" + if [ "$subparams" != "-sn" ]; then + case "$i" in + mp4|m4v) suboption="-c:s mov_text" ;; + mov|avi|wmv) suboption="-sn" ;; + *) + case "$(basename "${OUTPUT##*.}")" in + mp4|m4v) suboption="-c:s srt" ;; + *) suboption="-c:s copy" ;; + esac + ;; + esac + fi + echo "$FFMPEG $vflags -i \"$OUTPUT\" -map 0 -c:v copy -c:a copy $suboption $strict $MKVCOVER2 $METATITLE $METAGENRE $METAYEAR $METACOMMENT ${audmeta[*]} ${audlang[*]} ${sublang[*]} ${sublng[*]} \"${OUTPUT%.*}.$i\" >/dev/null 2>&1" >> "$OUTFILE" echo "test \"\$?\" = \"0\" && green \"-> Done\" || red \"-> Failed!\"" >> "$OUTFILE" case "$i" in - mp4|m4v) - if [ ! -z "$MKVCOVER" ]; then + mp4|m4v|mov) + if [ ! -z "$MKVCOVER" -o ! -z "$MP4COVER" ]; then echo "" >> "$OUTFILE" echo "echo" >> "$OUTFILE" echo "green \"-> Adding cover image...\"" >> "$OUTFILE" - echo "$ATOMICPARSLEY \"${OUTPUT%.*}.$i\" --artwork \"$(readlink -e "$cover")\" --overWrite >/dev/null 2>&1" >> "$OUTFILE" - echo "test \"\$?\" = \"0\" && green \"-> Done\" || red \"-> Failed!\"" >> "$OUTFILE" + echo "$MP4BOX -add \"${OUTPUT%.*}.$i\" -itags cover=\"$(readlink -e "$cover")\":name=\"$(basename "${OUTPUT%.*}")\":genre=\"$genre\":created=\"$year\":comment=\"$COMMENT\" -mpeg4 -new \"${OUTPUT%.*}_COVER_$$.$i\" >/dev/null 2>&1" >> "$OUTFILE" + echo "RET=\$?" >> "$OUTFILE" + echo "test \"\$RET\" = \"0\" && green \"-> Done\" || red \"-> Failed!\"" >> "$OUTFILE" + echo "if [ \"\$RET\" = \"0\" ]; then" >> "$OUTFILE" + echo "mv -f \"${OUTPUT%.*}_COVER_$$.$i\" \"${OUTPUT%.*}.$i\"" >> "$OUTFILE" + echo "fi" >> "$OUTFILE" fi ;; esac
View file
ffxvid-1.4.8.tar.gz/ffxvid.1 -> ffxvid-1.4.9.tar.gz/ffxvid.1
Changed
@@ -3,7 +3,7 @@ .de IPs .IP "\\$1" .. -.TH ffxvid 1 "Oct 19, 2019" +.TH ffxvid 1 "Oct 20, 2019" .SH NAME ffxvid @@ -30,7 +30,7 @@ .br - MPlayer (for crop preview only) .br -- atomicparsley, version 0.9.2 or higher (for mp4 cover art only) +- MP4Box from GPAC (for mp4/m4v/mov cover art only) .br - bc
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
.