X-Git-Url: https://zdv2.bktei.com/gitweb/BK-2020-03.git/blobdiff_plain/9a4c8b8875d41858afb24e33fd7672fb8771645b..0fc97e3eeb52abebc4d972e128ad206ab10386da:/user/mp3s_to_mkv.sh?ds=sidebyside diff --git a/user/mp3s_to_mkv.sh b/user/mp3s_to_mkv.sh index 7a89ed8..b788edb 100755 --- a/user/mp3s_to_mkv.sh +++ b/user/mp3s_to_mkv.sh @@ -4,7 +4,7 @@ # Example: mp3s_to_mkv.sh ./dir_source ./dir_output 48k # Depends: GNU Coreutils 8.32 (date), ffmpeg, ffprobe # Ref/Attrib: [1] FFmpeg Formats Documentation https://ffmpeg.org/ffmpeg-formats.html#toc-Metadata-2 -# Version: 0.1.0 +# Version: 0.1.2 # plumbing opus_bitrate="$3"; # e.g. "48k" @@ -51,7 +51,7 @@ get_media_length() { # Output: stdout: seconds (float) # Depends: ffprobe 4.1.8 # BK-2020-03: die() - local file_in + local file_in; file_in="$1"; if [[ ! -f $file_in ]]; then die "ERROR:Not a file:$file_in"; @@ -97,7 +97,7 @@ build_filelist_and_chapters() { echo "title=$(basename "$filename" .mp3)"; } >> "$file_chapters"; - chapter_start=$chapter_end + chapter_start=$chapter_end; done # Return to original dir @@ -114,7 +114,7 @@ ffmpeg_convert() { pushd "$dir_in" || die "FATAL:Directory error:$(pwd)"; # Concatenate mp3 files into a single WAV file - # Convert WAV to 48 kbps opus mkv file + # Convert WAV to opus mkv file ffmpeg -nostdin -f concat -safe 0 -i "$file_flist" -c:a pcm_s24le -rf64 auto -f wav - | \ ffmpeg -i - -i "$file_chapters" \ -map_metadata 1 -map_chapters 1 \ @@ -139,3 +139,6 @@ main() { }; # main program main "$@"; + +# Author: Steven Baltakatei Sandoval +# License: GPLv3+