Projects
Multimedia
ffxvid
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 75
View file
ffxvid.changes
Changed
@@ -1,4 +1,16 @@ ------------------------------------------------------------------- +Fri Oct 25 05:31:00 UTC 2019 - neutrino8@opensuse.org + +- Update to version 1.5.5 + * Detect audio bit depth and add it to the audio metadata + * Added detection for DTS Express and DTS-HD HR for audio copy + * Use -show_entries instead of -show_streams for detecting + audio properties with ffprobe. Removes piping to grep and awk + * Support setting the FLAC bit depth for encoding + * Minor restructuring and variables renaming in the audio code + * Updated the man page + +------------------------------------------------------------------- Thu Oct 24 05:20:00 UTC 2019 - neutrino8@opensuse.org - Update to version 1.5.4
View file
ffxvid.spec
Changed
@@ -17,7 +17,7 @@ Name: ffxvid -Version: 1.5.4 +Version: 1.5.5 Release: 0 Summary: A small shell script for encoding to Xvid with FFmpeg License: GPL-2.0+ @@ -51,7 +51,7 @@ %files %defattr(-,root,root) %{_bindir}/%{name} -%{_mandir}/man1/%{name}.1%{ext_man} +%{_mandir}/man1/%{name}.1.gz %doc AUTHORS ChangeLog LICENSE README *.txt %changelog
View file
ffxvid-1.5.4.tar.gz/ChangeLog -> ffxvid-1.5.5.tar.gz/ChangeLog
Changed
@@ -1,3 +1,12 @@ +2019-10-25 - ffxvid 1.5.5 + * Detect audio bit depth and add it to the audio metadata + * Added detection for DTS Express and DTS-HD HR for audio copy + * Use -show_entries instead of -show_streams for detecting + audio properties with ffprobe. Removes piping to grep and awk + * Support setting the FLAC bit depth for encoding + * Minor restructuring and variables renaming in the audio code + * Updated the man page + 2019-10-24 - ffxvid 1.5.4 * Add constant/non-constant matrix option to the video_csmisc_func() function
View file
ffxvid-1.5.4.tar.gz/ffxvid -> ffxvid-1.5.5.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.5.4 -# Date: 2019-10-24 +# Version: 1.5.5 +# Date: 2019-10-25 # # 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,7 +24,7 @@ brown() { echo -e "\e[0;33m$1\e[0;39;49m"; } error() { echo -e "\e[1;31m$1\e[0;39;49m"; } -version="1.5.4" +version="1.5.5" CFG="$HOME/.ffxvid" cfgversion="14" @@ -2220,32 +2220,32 @@ case "${acodec[i]}" in ac3) acdc[i]="ac3" - ameta[i]="AC-3" + acdcmeta[i]="AC-3" abropts[i]="192/384/448/640" abrdef[i]="640" ;; eac3) acdc[i]="eac3" - ameta[i]="E-AC-3" + acdcmeta[i]="E-AC-3" abropts[i]="32-6144" abrdef[i]="960" ;; truehd) acdc[i]="truehd" - ameta[i]="TrueHD" + acdcmeta[i]="TrueHD" abropts[i]="1000-18000" abrdef[i]="5000" skiptfs="1" ;; dts) acdc[i]="dca" - ameta[i]="DTS" + acdcmeta[i]="DTS" abropts[i]="754/1509" abrdef[i]="1509" ;; aac) acdc[i]="aac" - ameta[i]="LC-AAC" + acdcmeta[i]="LC-AAC" abropts[i]="32-512" abrdef[i]="448" ;; @@ -2256,56 +2256,56 @@ ;; mp3) acdc[i]="libmp3lame" - ameta[i]="MP3" + acdcmeta[i]="MP3" abropts[i]="32-320" abrdef[i]="320" ;; libopus) acdc[i]="libopus" - ameta[i]="Opus" + acdcmeta[i]="Opus" abropts[i]="6-512" abrdef[i]="320" ;; opus) acdc[i]="opus" - ameta[i]="Opus" + acdcmeta[i]="Opus" abropts[i]="6-512" abrdef[i]="192" ;; vorbis) acdc[i]="libvorbis" - ameta[i]="Vorbis" + acdcmeta[i]="Vorbis" abropts[i]="6-500" abrdef[i]="320" ;; wmav1) acdc[i]="wmav1" - ameta[i]="WMAv1" + acdcmeta[i]="WMAv1" abropts[i]="64-320" abrdef[i]="192" ;; wmav2) acdc[i]="wmav2" - ameta[i]="WMAv2" + acdcmeta[i]="WMAv2" abropts[i]="64-320" abrdef[i]="192" ;; flac) acdc[i]="flac" - ameta[i]="FLAC" + acdcmeta[i]="FLAC" abropts[i]="0-12" abrdef[i]="5" skiptfs="1" ;; alac) acdc[i]="alac" - ameta[i]="ALAC" + acdcmeta[i]="ALAC" abropts[i]="0-12" abrdef[i]="5" skiptfs="1" ;; pcm) - ameta[i]="PCM" + acdcmeta[i]="PCM" skiptfs="1" ;; copy) @@ -2376,15 +2376,23 @@ done if [ "${acodec[i]}" != "copy" ]; then + aid[i]="$(($(echo "${atrack[i]}" | awk -F: '{print $2}')-1))" + test "${aid[i]}" = "-1" && aid[i]="0" + GETAUDBD[i]="$($FFPROBE -i "$input" -v quiet -select_streams a:${aid[i]} -show_entries stream=bits_per_raw_sample -of default=noprint_wrappers=1:nokey=1 | tail -1)" + if [ ! -z "${GETAUDBD[i]}" ]; then + case "${GETAUDBD[i]}" in + [1-9]*) abdmeta[i]=", ${GETAUDBD[i]} bits src" ;; + esac + fi case "${acodec[i]}" in fdk*) printf "Track $i: Which AAC Profile to Use? [LC/HE/HEv2/LD - default is LC]: " read aprof[i] case "${aprof[i]}" in - lc|LC|"") ameta[i]="LC-AAC"; aacprof[i]="aac_low" ;; - he|HE) ameta[i]="HE-AACv1"; aacprof[i]="aac_he" ;; - hev2|HEv2|HEV2) ameta[i]="HE-AACv2"; aacprof[i]="aac_he_v2" ;; - ld|LD) ameta[i]="LD-AAC"; aacprof[i]="aac_ld" ;; + lc|LC|"") acdcmeta[i]="LC-AAC"; aacprof[i]="aac_low" ;; + he|HE) acdcmeta[i]="HE-AACv1"; aacprof[i]="aac_he" ;; + hev2|HEv2|HEV2) acdcmeta[i]="HE-AACv2"; aacprof[i]="aac_he_v2" ;; + ld|LD) acdcmeta[i]="LD-AAC"; aacprof[i]="aac_ld" ;; *) error "- Invalid AAC profile!" exit 1 @@ -2398,15 +2406,30 @@ read abr[i] test -z "${abr[i]}" && acomplevel[i]="${abrdef[i]}" || acomplevel[i]="${abr[i]}" audcomplevel[i]="-compression_level:a:${audindex[i]} ${acomplevel[i]}" - abtrmeta[i]="@ CL ${acomplevel[i]}" + case "${acodec[i]}" in + flac) + printf "Track $i: Which FLAC Bit Depth to Use? [16/24 - default is 24]: " + read fbd[i] + case "${fbd[i]}" in + 16) flacbd[i]="s16"; abdmeta[i]=", 16 bits" ;; + 24|"") flacbd[i]="s32"; abdmeta[i]=", 24 bits" ;; + *) + error "-> Unsupported FLAC Bit Depth!" + exit 1 + ;; + esac + audbd[i]="-sample_fmt ${flacbd[i]}" + ;; + esac + abtrmeta[i]=" @ CL ${acomplevel[i]}" ;; pcm) - printf "Track $i: Which PCM Bit Depth to use? [16/24/32 - default is 24]: " + printf "Track $i: Which PCM Bit Depth to Use? [16/24/32 - default is 24]: " read pcmbd[i] case "${pcmbd[i]}" in - 16) acdc[i]="pcm_s16le"; abtrmeta[i]="(16 bit)" ;; - 24|"") acdc[i]="pcm_s24le"; abtrmeta[i]="(24 bit)" ;; - 32) acdc[i]="pcm_s32le"; abtrmeta[i]="(32 bit)" ;; + 16) acdc[i]="pcm_s16le"; abdmeta[i]=", 16 bits" ;; + 24|"") acdc[i]="pcm_s24le"; abdmeta[i]=", 24 bits" ;; + 32) acdc[i]="pcm_s32le"; abdmeta[i]=", 32 bits" ;; *) error "-> Unsupported PCM Bit Depth!" exit 1 @@ -2421,7 +2444,7 @@ read abr[i] test -z "${abr[i]}" && abitrate[i]="${abrdef[i]}k" || abitrate[i]="${abr[i]}k" audbtr[i]="-b:a:${audindex[i]} ${abitrate[i]}" - abtrmeta[i]="@ $(echo "${abitrate[i]}" | sed 's|k||') kbps" + abtrmeta[i]=" @ $(echo "${abitrate[i]}" | sed 's|k||') kbps" ;; esac @@ -2531,18 +2554,18 @@ printf "Track $i: Specify the Audio Channel Layout [default is 10]: " read achanlayout[i] case "${achanlayout[i]}" in - 0) achlayout[i]="mono"; achmeta[i]="Mono" ;; - 1) achlayout[i]="stereo"; achmeta[i]="Stereo" ;; - 2) achlayout[i]="3.0"; achmeta[i]="3.0" ;; - 3) achlayout[i]="3.0(back)"; achmeta[i]="3.0" ;; - 4) achlayout[i]="quad"; achmeta[i]="Quad" ;; - 5) achlayout[i]="quad(side)"; achmeta[i]="Quad(side)" ;; - 6) achlayout[i]="4.0"; achmeta[i]="4.0" ;; - 7) achlayout[i]="4.1"; achmeta[i]="4.1" ;; - 8) achlayout[i]="5.0"; achmeta[i]="5.0" ;; - 9) achlayout[i]="5.0(side)"; achmeta[i]="5.0(side)" ;; - 10|"") achlayout[i]="5.1"; achmeta[i]="5.1" ;; - 11) achlayout[i]="5.1(side)"; achmeta[i]="5.1(side)" ;; + 0) achlayout[i]="mono"; achmeta[i]=" Mono" ;; + 1) achlayout[i]="stereo"; achmeta[i]=" Stereo" ;; + 2) achlayout[i]="3.0"; achmeta[i]=" 3.0" ;; + 3) achlayout[i]="3.0(back)"; achmeta[i]=" 3.0(back)" ;; + 4) achlayout[i]="quad"; achmeta[i]=" Quad" ;; + 5) achlayout[i]="quad(side)"; achmeta[i]=" Quad(side)" ;; + 6) achlayout[i]="4.0"; achmeta[i]=" 4.0" ;; + 7) achlayout[i]="4.1"; achmeta[i]=" 4.1" ;; + 8) achlayout[i]="5.0"; achmeta[i]=" 5.0" ;; + 9) achlayout[i]="5.0(side)"; achmeta[i]=" 5.0(side)" ;; + 10|"") achlayout[i]="5.1"; achmeta[i]=" 5.1" ;; + 11) achlayout[i]="5.1(side)"; achmeta[i]=" 5.1(side)" ;; *) error "-> Invalid option!" exit 1 @@ -2557,11 +2580,11 @@ printf "Track $i: Specify the Audio Channel Layout [default is 4]: " read achanlayout[i] case "${achanlayout[i]}" in - 0) achlayout[i]="mono"; achmeta[i]="Mono" ;; - 1) achlayout[i]="stereo"; achmeta[i]="Stereo" ;; - 2) achlayout[i]="quad(side)"; achmeta[i]="Quad(side)" ;; - 3) achlayout[i]="5.0(side)"; achmeta[i]="5.0(side)" ;; - 4|"") achlayout[i]="5.1(side)"; achmeta[i]="5.1(side)" ;; + 0) achlayout[i]="mono"; achmeta[i]=" Mono" ;; + 1) achlayout[i]="stereo"; achmeta[i]=" Stereo" ;; + 2) achlayout[i]="quad(side)"; achmeta[i]= "Quad(side)" ;; + 3) achlayout[i]="5.0(side)"; achmeta[i]=" 5.0(side)" ;; + 4|"") achlayout[i]="5.1(side)"; achmeta[i]=" 5.1(side)" ;; *) error "-> Invalid option!" exit 1 @@ -2577,20 +2600,20 @@ printf "Track $i: Specify the Audio Channel Layout [default is 11]: " read achanlayout[i] case "${achanlayout[i]}" in - 0) achlayout[i]="mono"; achmeta[i]="Mono" ;; - 1) achlayout[i]="stereo"; achmeta[i]="Stereo" ;; - 2) achlayout[i]="3.0"; achmeta[i]="3.0" ;; - 3) achlayout[i]="3.0(back)"; achmeta[i]="3.0(back)" ;; - 4) achlayout[i]="4.0"; achmeta[i]="4.0" ;; - 5) achlayout[i]="quad"; achmeta[i]="Quad" ;; - 6) achlayout[i]="quad(side)"; achmeta[i]="Quad(side)" ;; - 7) achlayout[i]="5.0"; achmeta[i]="5.0" ;; - 8) achlayout[i]="5.0(side)"; achmeta[i]="5.0(side)" ;; - 9) achlayout[i]="5.1"; achmeta[i]="5.1" ;; - 10) achlayout[i]="5.1(side)"; achmeta[i]="5.1(side)" ;; - 11|"") achlayout[i]="7.1"; achmeta[i]="7.1" ;; - 12) achlayout[i]="7.1(wide)"; achmeta[i]="7.1(wide)" ;; - 13) achlayout[i]="7.1(wide-side)"; achmeta[i]="7.1(wide-side)" ;; + 0) achlayout[i]="mono"; achmeta[i]=" Mono" ;; + 1) achlayout[i]="stereo"; achmeta[i]=" Stereo" ;; + 2) achlayout[i]="3.0"; achmeta[i]=" 3.0" ;; + 3) achlayout[i]="3.0(back)"; achmeta[i]=" 3.0(back)" ;; + 4) achlayout[i]="4.0"; achmeta[i]=" 4.0" ;; + 5) achlayout[i]="quad"; achmeta[i]=" Quad" ;; + 6) achlayout[i]="quad(side)"; achmeta[i]=" Quad(side)" ;; + 7) achlayout[i]="5.0"; achmeta[i]=" 5.0" ;; + 8) achlayout[i]="5.0(side)"; achmeta[i]=" 5.0(side)" ;; + 9) achlayout[i]="5.1"; achmeta[i]=" 5.1" ;; + 10) achlayout[i]="5.1(side)"; achmeta[i]=" 5.1(side)" ;; + 11|"") achlayout[i]="7.1"; achmeta[i]=" 7.1" ;; + 12) achlayout[i]="7.1(wide)"; achmeta[i]=" 7.1(wide)" ;; + 13) achlayout[i]="7.1(wide-side)"; achmeta[i]=" 7.1(wide-side)" ;; *) error "-> Invalid option!" exit 1 @@ -2606,14 +2629,14 @@ printf "Track $i: Specify the Audio Channel Layout [default is 6]: " read achanlayout[i] case "${achanlayout[i]}" in - 0) achlayout[i]="mono"; achmeta[i]="Mono" ;; - 1) achlayout[i]="stereo"; achmeta[i]="Stereo" ;; - 2) achlayout[i]="3.0"; achmeta[i]="3.0" ;; - 3) achlayout[i]="4.0"; achmeta[i]="4.0" ;; - 4) achlayout[i]="5.0"; achmeta[i]="5.0" ;; - 5) achlayout[i]="5.1"; achmeta[i]="5.1" ;; - 6|"") achlayout[i]="7.1"; achmeta[i]="7.1" ;; - 7) achlayout[i]="7.1(wide)"; achmeta[i]="7.1(wide)" ;; + 0) achlayout[i]="mono"; achmeta[i]=" Mono" ;; + 1) achlayout[i]="stereo"; achmeta[i]=" Stereo" ;; + 2) achlayout[i]="3.0"; achmeta[i]=" 3.0" ;; + 3) achlayout[i]="4.0"; achmeta[i]=" 4.0" ;; + 4) achlayout[i]="5.0"; achmeta[i]=" 5.0" ;; + 5) achlayout[i]="5.1"; achmeta[i]=" 5.1" ;; + 6|"") achlayout[i]="7.1"; achmeta[i]=" 7.1" ;; + 7) achlayout[i]="7.1(wide)"; achmeta[i]=" 7.1(wide)" ;; *) error "-> Invalid option!" exit 1 @@ -2629,17 +2652,17 @@ printf "Track $i: Specify the Audio Channel Layout [default is 10]: " read achanlayout[i] case "${achanlayout[i]}" in - 0) achlayout[i]="mono"; achmeta[i]="Mono" ;; - 1) achlayout[i]="stereo"; achmeta[i]="Stereo" ;; - 2) achlayout[i]="3.0"; achmeta[i]="3.0" ;; - 3) achlayout[i]="quad"; achmeta[i]="Quad" ;; - 4) achlayout[i]="quad(side)"; achmeta[i]="Quad(side)" ;; - 5) achlayout[i]="5.0"; achmeta[i]="5.0" ;; - 6) achlayout[i]="5.0(side)"; achmeta[i]="5.0(side)" ;; - 7) achlayout[i]="5.1"; achmeta[i]="5.1" ;; - 8) achlayout[i]="5.1(side)"; achmeta[i]="5.1(side)" ;; - 9) achlayout[i]="6.1"; achmeta[i]="6.1" ;; - 10|"") achlayout[i]="7.1"; achmeta[i]="7.1" ;; + 0) achlayout[i]="mono"; achmeta[i]=" Mono" ;; + 1) achlayout[i]="stereo"; achmeta[i]=" Stereo" ;; + 2) achlayout[i]="3.0"; achmeta[i]=" 3.0" ;; + 3) achlayout[i]="quad"; achmeta[i]=" Quad" ;; + 4) achlayout[i]="quad(side)"; achmeta[i]=" Quad(side)" ;; + 5) achlayout[i]="5.0"; achmeta[i]=" 5.0" ;; + 6) achlayout[i]="5.0(side)"; achmeta[i]=" 5.0(side)" ;; + 7) achlayout[i]="5.1"; achmeta[i]=" 5.1" ;; + 8) achlayout[i]="5.1(side)"; achmeta[i]=" 5.1(side)" ;; + 9) achlayout[i]="6.1"; achmeta[i]=" 6.1" ;; + 10|"") achlayout[i]="7.1"; achmeta[i]=" 7.1" ;; *) error "-> Invalid option!" exit 1 @@ -2655,15 +2678,15 @@ printf "Track $i: Specify the Audio Channel Layout [default is 8]: " read achanlayout[i] case "${achanlayout[i]}" in - 0) achlayout[i]="mono"; achmeta[i]="Mono" ;; - 1) achlayout[i]="stereo"; achmeta[i]="Stereo" ;; - 2) achlayout[i]="3.0"; achmeta[i]="3.0" ;; - 3) achlayout[i]="quad"; achmeta[i]="Quad" ;; - 4) achlayout[i]="5.0"; achmeta[i]="5.0" ;; - 5) achlayout[i]="5.1"; achmeta[i]="5.1" ;; - 6) achlayout[i]="6.1"; achmeta[i]="6.1" ;; - 7) achlayout[i]="7.0"; achmeta[i]="7.0" ;; - 8|"") achlayout[i]="7.1"; achmeta[i]="7.1" ;; + 0) achlayout[i]="mono"; achmeta[i]=" Mono" ;; + 1) achlayout[i]="stereo"; achmeta[i]=" Stereo" ;; + 2) achlayout[i]="3.0"; achmeta[i]=" 3.0" ;; + 3) achlayout[i]="quad"; achmeta[i]=" Quad" ;; + 4) achlayout[i]="5.0"; achmeta[i]=" 5.0" ;; + 5) achlayout[i]="5.1"; achmeta[i]=" 5.1" ;; + 6) achlayout[i]="6.1"; achmeta[i]=" 6.1" ;; + 7) achlayout[i]="7.0"; achmeta[i]=" 7.0" ;; + 8|"") achlayout[i]="7.1"; achmeta[i]=" 7.1" ;; *) error "-> Invalid option!" exit 1 @@ -2677,8 +2700,8 @@ printf "Track $i: Specify the Audio Channel Layout [default is 1]: " read achanlayout[i] case "${achanlayout[i]}" in - 0) achlayout[i]="mono"; achmeta[i]="Mono" ;; - 1|"") achlayout[i]="stereo"; achmeta[i]="Stereo" ;; + 0) achlayout[i]="mono"; achmeta[i]=" Mono" ;; + 1|"") achlayout[i]="stereo"; achmeta[i]=" Stereo" ;; *) error "-> Invalid option!" exit 1 @@ -2693,9 +2716,9 @@ printf "Track $i: Specify the Audio Channel Layout [default is 2]: " read achanlayout[i] case "${achanlayout[i]}" in - 0) achlayout[i]="stereo"; achmeta[i]="Stereo" ;; - 1) achlayout[i]="5.0"; achmeta[i]="5.0" ;; - 2|"") achlayout[i]="5.1"; achmeta[i]="5.1" ;; + 0) achlayout[i]="stereo"; achmeta[i]=" Stereo" ;; + 1) achlayout[i]="5.0"; achmeta[i]=" 5.0" ;; + 2|"") achlayout[i]="5.1"; achmeta[i]=" 5.1" ;; *) error "-> Invalid option!" exit 1 @@ -2711,23 +2734,23 @@ printf "Track $i: Specify the Audio Channel Layout [default is 14]: " read achanlayout[i] case "${achanlayout[i]}" in - 0) achlayout[i]="mono"; achmeta[i]="Mono" ;; - 1) achlayout[i]="stereo"; achmeta[i]="Stereo" ;; - 2) achlayout[i]="3.0"; achmeta[i]="3.0" ;; - 3) achlayout[i]="quad"; achmeta[i]="Quad" ;; - 4) achlayout[i]="quad(side)"; achmeta[i]="Quad(side)" ;; - 5) achlayout[i]="5.0"; achmeta[i]="5.0" ;; - 6) achlayout[i]="5.0(side)"; achmeta[i]="5.0(side)" ;; - 7) achlayout[i]="5.1"; achmeta[i]="5.1" ;; - 8) achlayout[i]="5.1(side)"; achmeta[i]="5.1(side)" ;; - 9) achlayout[i]="6.1"; achmeta[i]="6.1" ;; - 10) achlayout[i]="6.1(front)"; achmeta[i]="6.1(front)" ;; - 11) achlayout[i]="6.1(back)"; achmeta[i]="6.1(back)" ;; - 12) achlayout[i]="7.0"; achmeta[i]="7.0" ;; - 13) achlayout[i]="7.0(front)"; achmeta[i]="7.0(front)" ;; - 14|"") achlayout[i]="7.1"; achmeta[i]="7.1" ;; - 15) achlayout[i]="7.1(wide)"; achmeta[i]="7.1(wide)" ;; - 16) achlayout[i]="7.1(wide-side)"; achmeta[i]="7.1(wide-side)" ;; + 0) achlayout[i]="mono"; achmeta[i]=" Mono" ;; + 1) achlayout[i]="stereo"; achmeta[i]=" Stereo" ;; + 2) achlayout[i]="3.0"; achmeta[i]=" 3.0" ;; + 3) achlayout[i]="quad"; achmeta[i]=" Quad" ;; + 4) achlayout[i]="quad(side)"; achmeta[i]=" Quad(side)" ;; + 5) achlayout[i]="5.0"; achmeta[i]=" 5.0" ;; + 6) achlayout[i]="5.0(side)"; achmeta[i]=" 5.0(side)" ;; + 7) achlayout[i]="5.1"; achmeta[i]=" 5.1" ;; + 8) achlayout[i]="5.1(side)"; achmeta[i]=" 5.1(side)" ;; + 9) achlayout[i]="6.1"; achmeta[i]=" 6.1" ;; + 10) achlayout[i]="6.1(front)"; achmeta[i]=" 6.1(front)" ;; + 11) achlayout[i]="6.1(back)"; achmeta[i]=" 6.1(back)" ;; + 12) achlayout[i]="7.0"; achmeta[i]=" 7.0" ;; + 13) achlayout[i]="7.0(front)"; achmeta[i]=" 7.0(front)" ;; + 14|"") achlayout[i]="7.1"; achmeta[i]=" 7.1" ;; + 15) achlayout[i]="7.1(wide)"; achmeta[i]=" 7.1(wide)" ;; + 16) achlayout[i]="7.1(wide-side)"; achmeta[i]=" 7.1(wide-side)" ;; *) error "-> Invalid option!" exit 1 @@ -2743,14 +2766,14 @@ printf "Track $i: Specify the Audio Channel Layout [default is 7]: " read achanlayout[i] case "${achanlayout[i]}" in - 0) achlayout[i]="mono"; achmeta[i]="Mono" ;; - 1) achlayout[i]="stereo"; achmeta[i]="Stereo" ;; - 2) achlayout[i]="3.0"; achmeta[i]="3.0" ;; - 3) achlayout[i]="4.0"; achmeta[i]="4.0" ;; - 4) achlayout[i]="5.0"; achmeta[i]="5.0" ;; - 5) achlayout[i]="5.1"; achmeta[i]="5.1" ;; - 6) achlayout[i]="6.1(back)"; achmeta[i]="6.1(back)" ;; - 7|"") achlayout[i]="7.1(wide)"; achmeta[i]="7.1(wide)" ;; + 0) achlayout[i]="mono"; achmeta[i]=" Mono" ;; + 1) achlayout[i]="stereo"; achmeta[i]=" Stereo" ;; + 2) achlayout[i]="3.0"; achmeta[i]=" 3.0" ;; + 3) achlayout[i]="4.0"; achmeta[i]=" 4.0" ;; + 4) achlayout[i]="5.0"; achmeta[i]=" 5.0" ;; + 5) achlayout[i]="5.1"; achmeta[i]=" 5.1" ;; + 6) achlayout[i]="6.1(back)"; achmeta[i]=" 6.1(back)" ;; + 7|"") achlayout[i]="7.1(wide)"; achmeta[i]=" 7.1(wide)" ;; *) error "-> Invalid option!" exit 1 @@ -2766,26 +2789,26 @@ printf "Track $i: Specify the Audio Channel Layout [default is 17]: " read achanlayout[i] case "${achanlayout[i]}" in - 0) achlayout[i]="mono"; achmeta[i]="Mono" ;; - 1) achlayout[i]="stereo"; achmeta[i]="Stereo" ;; - 2) achlayout[i]="2.1"; achmeta[i]="2.1" ;; - 3) achlayout[i]="3.0"; achmeta[i]="3.0" ;; - 4) achlayout[i]="quad"; achmeta[i]="Quad" ;; - 5) achlayout[i]="quad(side)"; achmeta[i]="Quad(side)" ;; - 6) achlayout[i]="5.0"; achmeta[i]="5.0" ;; - 7) achlayout[i]="5.0(side)"; achmeta[i]="5.0(side)" ;; - 8) achlayout[i]="5.1"; achmeta[i]="5.1" ;; - 9) achlayout[i]="5.1(side)"; achmeta[i]="5.1(side)" ;; - 10) achlayout[i]="6.0"; achmeta[i]="6.0" ;; - 11) achlayout[i]="6.0(front)"; achmeta[i]="6.0(front)" ;; - 12) achlayout[i]="6.1"; achmeta[i]="6.1" ;; - 13) achlayout[i]="6.1(front)"; achmeta[i]="6.1(front)" ;; - 14) achlayout[i]="6.1(back)"; achmeta[i]="6.1(back)" ;; - 15) achlayout[i]="7.0"; achmeta[i]="7.0" ;; - 16) achlayout[i]="7.0(front)"; achmeta[i]="7.0(front)" ;; - 17|"") achlayout[i]="7.1"; achmeta[i]="7.1" ;; - 18) achlayout[i]="7.1(wide)"; achmeta[i]="7.1(wide)" ;; - 19) achlayout[i]="7.1(wide-side)"; achmeta[i]="7.1(wide-side)" ;; + 0) achlayout[i]="mono"; achmeta[i]=" Mono" ;; + 1) achlayout[i]="stereo"; achmeta[i]=" Stereo" ;; + 2) achlayout[i]="2.1"; achmeta[i]=" 2.1" ;; + 3) achlayout[i]="3.0"; achmeta[i]=" 3.0" ;; + 4) achlayout[i]="quad"; achmeta[i]=" Quad" ;; + 5) achlayout[i]="quad(side)"; achmeta[i]=" Quad(side)" ;; + 6) achlayout[i]="5.0"; achmeta[i]=" 5.0" ;; + 7) achlayout[i]="5.0(side)"; achmeta[i]=" 5.0(side)" ;; + 8) achlayout[i]="5.1"; achmeta[i]=" 5.1" ;; + 9) achlayout[i]="5.1(side)"; achmeta[i]=" 5.1(side)" ;; + 10) achlayout[i]="6.0"; achmeta[i]=" 6.0" ;; + 11) achlayout[i]="6.0(front)"; achmeta[i]=" 6.0(front)" ;; + 12) achlayout[i]="6.1"; achmeta[i]=" 6.1" ;; + 13) achlayout[i]="6.1(front)"; achmeta[i]=" 6.1(front)" ;; + 14) achlayout[i]="6.1(back)"; achmeta[i]=" 6.1(back)" ;; + 15) achlayout[i]="7.0"; achmeta[i]=" 7.0" ;; + 16) achlayout[i]="7.0(front)"; achmeta[i]=" 7.0(front)" ;; + 17|"") achlayout[i]="7.1"; achmeta[i]=" 7.1" ;; + 18) achlayout[i]="7.1(wide)"; achmeta[i]=" 7.1(wide)" ;; + 19) achlayout[i]="7.1(wide-side)"; achmeta[i]=" 7.1(wide-side)" ;; *) error "-> Invalid option!" exit 1 @@ -2828,10 +2851,9 @@ echo green "-> Track $i: detecting audio sample rate..." sleep 1 - aid[i]="$(($(echo "${atrack[i]}" | awk -F: '{print $2}')-1))" - ASR[i]="$($FFPROBE -i "$input" -v quiet -select_streams a:${aid[i]} -show_entries stream=sample_rate -of default=noprint_wrappers=1:nokey=1 | tail -1)" - if [ ! -z "${ASR[i]}" ]; then - green "-> Track $i: detected ${ASR[i]} Hz" + GETAUDSR[i]="$($FFPROBE -i "$input" -v quiet -select_streams a:${aid[i]} -show_entries stream=sample_rate -of default=noprint_wrappers=1:nokey=1 | tail -1)" + if [ ! -z "${GETAUDSR[i]}" ]; then + green "-> Track $i: detected ${GETAUDSR[i]} Hz" else error "-> Track $i: could not detect the audio sample rate!" fi @@ -3022,18 +3044,18 @@ ;; esac aresample[i]="aresample=${audhz[i]}," - abtrmeta[i]="${abtrmeta[i]}, ${audhz[i]} Hz" + ahzmeta[i]=", ${audhz[i]} Hz" fi fi if [ -z "${audhz[i]}" ]; then - GETAUDSR[i]="$($FFPROBE -i "$input" -v quiet -select_streams a:${audindex[i]} -show_streams -of default=noprint_wrappers=1 | grep '^sample_rate' | awk -F= '{print $2}')" + GETAUDSR[i]="$($FFPROBE -i "$input" -v quiet -select_streams a:${aid[i]} -show_entries stream=sample_rate -of default=noprint_wrappers=1:nokey=1 | tail -1)" case "${GETAUDSR[i]}" in - [1-9]*) abtrmeta[i]="${abtrmeta[i]}, ${GETAUDSR[i]} Hz" ;; + [1-9]*) ahzmeta[i]=", ${GETAUDSR[i]} Hz" ;; esac fi - audmeta[i]="-metadata:s:a:${audindex[i]} title=\"${ameta[i]} ${achmeta[i]} ${abtrmeta[i]}\"" + audmeta[i]="-metadata:s:a:${audindex[i]} title=\"${acdcmeta[i]}${achmeta[i]}${abtrmeta[i]}${abdmeta[i]}${ahzmeta[i]}\"" audchan[i]="-ac:a:${audindex[i]} ${ach[i]} -channel_layout:a:${audindex[i]} \"${achlayout[i]}\"" afilters[i]="$(echo "${aresample[i]}${anormalize[i]}${avolume[i]}$atempo" | sed 's|,$||')" @@ -3041,18 +3063,19 @@ test ! -z "${afilters[i]}" && audfilters[i]="-filter:a:${audindex[i]} ${afilters[i]}" else if [ -z "$batchmode" ]; then - aindex[i]="$(($(echo "${atrack[i]}" | awk -F: '{print $2}')-1))" - test "${aindex[i]}" = "-1" && aindex[i]="0" + aid[i]="$(($(echo "${atrack[i]}" | awk -F: '{print $2}')-1))" + test "${aid[i]}" = "-1" && aid[i]="0" - GETAUDCDC[i]="$($FFPROBE -i "$input" -v quiet -select_streams a:${aindex[i]} -show_streams -of default=noprint_wrappers=1 | grep '^codec_name' | awk -F= '{print $2}')" + GETAUDCDC[i]="$($FFPROBE -i "$input" -v quiet -select_streams a:${aid[i]} -show_entries stream=codec_name -of default=noprint_wrappers=1:nokey=1 | tail -1)" if [ ! -z "${GETAUDCDC[i]}" ]; then - GETAUDBTR[i]="$($FFPROBE -i "$input" -v quiet -select_streams a:${aindex[i]} -show_streams -of default=noprint_wrappers=1 | grep '^bit_rate' | awk -F= '{print $2}')" - GETAUDSR[i]="$($FFPROBE -i "$input" -v quiet -select_streams a:${aindex[i]} -show_streams -of default=noprint_wrappers=1 | grep '^sample_rate' | awk -F= '{print $2}')" - GETAUDCL[i]="$($FFPROBE -i "$input" -v quiet -select_streams a:${aindex[i]} -show_streams -of default=noprint_wrappers=1 | grep '^channel_layout' | awk -F= '{print $2}')" + GETAUDBTR[i]="$($FFPROBE -i "$input" -v quiet -select_streams a:${aid[i]} -show_entries stream=bit_rate -of default=noprint_wrappers=1:nokey=1 | tail -1)" + GETAUDBD[i]="$($FFPROBE -i "$input" -v quiet -select_streams a:${aid[i]} -show_entries stream=bits_per_raw_sample -of default=noprint_wrappers=1:nokey=1 | tail -1)" + GETAUDSR[i]="$($FFPROBE -i "$input" -v quiet -select_streams a:${aid[i]} -show_entries stream=sample_rate -of default=noprint_wrappers=1:nokey=1 | tail -1)" + GETAUDCL[i]="$($FFPROBE -i "$input" -v quiet -select_streams a:${aid[i]} -show_entries stream=channel_layout -of default=noprint_wrappers=1:nokey=1 | tail -1)" get_audio_profile_func() { - GETAUDPROF[i]="$($FFPROBE -i "$input" -v quiet -select_streams a:${aindex[i]} -show_streams -of default=noprint_wrappers=1 | grep '^profile' | awk -F= '{print $2}')" + GETAUDPROF[i]="$($FFPROBE -i "$input" -v quiet -select_streams a:${aid[i]} -show_entries stream=profile -of default=noprint_wrappers=1:nokey=1 | tail -1)" } case "${GETAUDCDC[i]}" in @@ -3063,6 +3086,8 @@ get_audio_profile_func case "${GETAUDPROF[i]}" in "DTS-HD MA") GETAUDCDC[i]="DTS-HD MA" ;; + "DTS Express") GETAUDCDC[i]="DTS Express" ;; + "DTS-HD HRA") GETAUDCDC[i]="DTS-HD HR" ;; DTS-ES) GETAUDCDC[i]="DTS-ES" ;; *) GETAUDCDC[i]="DTS" ;; esac @@ -3093,37 +3118,40 @@ case "${GETAUDCL[i]}" in [1-9]*|mono|stereo|unknown|N/A|"") case "${GETAUDCL[i]}" in - mono) audchmeta[i]=" Mono" ;; - stereo) audchmeta[i]=" Stereo" ;; + mono) achmeta[i]=" Mono" ;; + stereo) achmeta[i]=" Stereo" ;; unknown|N/A|"") - GETAUDCH[i]="$($FFPROBE -i "$input" -v quiet -select_streams a:${aindex[i]} -show_streams -of default=noprint_wrappers=1 | grep '^channels' | awk -F= '{print $2}')" + GETAUDCH[i]="$($FFPROBE -i "$input" -v quiet -select_streams a:${aid[i]} -show_entries stream=channels -of default=noprint_wrappers=1:nokey=1 | tail -1)" case "${GETAUDCH[i]}" in - 1) audchmeta[i]=" Mono" ;; - 2) audchmeta[i]=" Stereo" ;; - 3) audchmeta[i]=" 2.1/3.0" ;; - 4) audchmeta[i]=" Quad" ;; - 5) audchmeta[i]=" 4.1/5.0" ;; - 6) audchmeta[i]=" 5.1/6.0" ;; - 7) audchmeta[i]=" 6.1/7.0" ;; - 8) audchmeta[i]=" 7.1" ;; + 1) achmeta[i]=" Mono" ;; + 2) achmeta[i]=" Stereo" ;; + 3) achmeta[i]=" 2.1/3.0" ;; + 4) achmeta[i]=" Quad" ;; + 5) achmeta[i]=" 4.1/5.0" ;; + 6) achmeta[i]=" 5.1/6.0" ;; + 7) achmeta[i]=" 6.1/7.0" ;; + 8) achmeta[i]=" 7.1" ;; esac ;; - *) audchmeta[i]=" ${GETAUDCL[i]}" ;; + *) achmeta[i]=" ${GETAUDCL[i]}" ;; esac ;; esac case "${GETAUDBTR[i]}" in - [1-9]*) audbtrmeta[i]=" @ $(($(echo "${GETAUDBTR[i]}")/1000)) kbps" ;; + [1-9]*) abtrmeta[i]=" @ $(($(echo "${GETAUDBTR[i]}")/1000)) kbps" ;; + esac + case "${GETAUDBD[i]}" in + [1-9]*) abdmeta[i]=", ${GETAUDBD[i]} bits" ;; esac case "${GETAUDSR[i]}" in - [1-9]*) audsrmeta[i]=", ${GETAUDSR[i]} Hz" ;; + [1-9]*) asrmeta[i]=", ${GETAUDSR[i]} Hz" ;; esac - audmeta[i]="-metadata:s:a:${audindex[i]} title=\"${GETAUDCDC[i]}${audchmeta[i]}${audbtrmeta[i]}${audsrmeta[i]}\"" + audmeta[i]="-metadata:s:a:${audindex[i]} title=\"${GETAUDCDC[i]}${achmeta[i]}${abtrmeta[i]}${abdmeta[i]}${asrmeta[i]}\"" fi fi fi - audparams[i]="${audmap[i]} -c:a:${audindex[i]} ${acdc[i]} ${audprofile[i]} ${audcomplevel[i]} ${audbtr[i]} ${audchan[i]} ${auddialnorm[i]} ${audfilters[i]} ${audlang[i]} ${audmeta[i]} ${auddispo[i]}" + audparams[i]="${audmap[i]} -c:a:${audindex[i]} ${acdc[i]} ${audprofile[i]} ${audcomplevel[i]} ${audbtr[i]} ${audchan[i]} ${audbd[i]} ${auddialnorm[i]} ${audfilters[i]} ${audlang[i]} ${audmeta[i]} ${auddispo[i]}" done fi @@ -3325,15 +3353,16 @@ echo "echo" >> "$OUTFILE" echo "green \"-> Remuxing to $i...\"" >> "$OUTFILE" case "$i" in - wmv) vflags="-fflags +genpts"; MKVCOVER2="" ;; + wmv) vflags="-fflags +genpts"; color=""; MKVCOVER2="" ;; mov) vflags=""; color="$colr"; MKVCOVER2="" ;; mkv) vflags="" + color="" if [ ! -z "$MP4COVER" ]; then MKVCOVER2="-attach \"$(readlink -e "$cover")\" -metadata:s:t mimetype=\"image/$img\"" fi ;; - *) vflags=""; MKVCOVER2="" ;; + *) vflags=""; color=""; MKVCOVER2="" ;; esac if [ "$subparams" != "-sn" ]; then case "$i" in
View file
ffxvid-1.5.4.tar.gz/ffxvid.1 -> ffxvid-1.5.5.tar.gz/ffxvid.1
Changed
@@ -3,7 +3,7 @@ .de IPs .IP "\\$1" .. -.TH ffxvid 1 "Oct 20, 2019" +.TH ffxvid 1 "Oct 24, 2019" .SH NAME ffxvid @@ -13,15 +13,14 @@ .br .SH DESCRIPTION -\fBffxvid\fR is a small, yet quite capable shell script for encoding to the MPEG4 Part 2/Xvid video -format using the FFmpeg encoder and libxvid library. \fBffxvid\fR supports mostly the -basic requirements for video encoding coupled with support for encoding multiple audio tracks +\fBffxvid\fR is a small yet quite capable shell script for encoding to the MPEG4 Part 2/Xvid video +format using the FFmpeg encoder and libxvid library. \fBffxvid\fR supports a wide range +of options for video encoding coupled with support for encoding multiple audio tracks and copying multiple subtitles. \fBffxvid\fR only supports as input video files so it is not possible to encode directly from a DVD/BD drive or an ISO image. .LP The script uses a configuration file stored in $HOME/.ffxvid where the user can set things up. -\fBffxvid\fR is interactive in nature but due to supporting mostly the basics, the user -can pass through it in under a minute. +\fBffxvid\fR is interactive in nature but the user can pass through it in under a few minutes. .SH REQUIREMENTS - FFmpeg with libxvid support
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
.