From 0904ffc312e974674113294b4e8e1ff3ca343acb Mon Sep 17 00:00:00 2001 From: q3aql Date: Sun, 12 Mar 2023 15:33:06 +0100 Subject: [PATCH] Fix video & audio track detection (wrappers) --- wrapper/ks-av1-wrapper | 16 ++++++++-------- wrapper/ks-av1s-wrapper | 16 ++++++++-------- wrapper/ks-avi-wrapper | 16 ++++++++-------- wrapper/ks-mp4-wrapper | 16 ++++++++-------- wrapper/ks-mp4k-wrapper | 16 ++++++++-------- wrapper/ks-mp4s-wrapper | 16 ++++++++-------- wrapper/ks-vob-wrapper | 13 +++++-------- 7 files changed, 53 insertions(+), 56 deletions(-) diff --git a/wrapper/ks-av1-wrapper b/wrapper/ks-av1-wrapper index 494fb7b..a5d4254 100755 --- a/wrapper/ks-av1-wrapper +++ b/wrapper/ks-av1-wrapper @@ -2,12 +2,12 @@ ############################################################### # ks-av1-wrapper (ks-tools) - Wrapper for ks-av1 # -# Date: 10-03-2023 # +# Date: 12-03-2023 # # Author: q3aql # # Contact: q3aql@duck.com # ############################################################### VERSION="8.5-dev" -M_DATE="100323" +M_DATE="120323" # Conversion parameters ks_mp4_to_wrap="/usr/bin/ks-av1" @@ -129,7 +129,7 @@ function showInfo() { # Syntax: showVideoDefault function showVideoDefault() { # Check de video track by default - video_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Video:" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | head -1) + video_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Video:" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | cut -d "[" -f 1 | head -1) if [ -z "${video_default}" ] ; then video_default="0:0" else @@ -147,9 +147,9 @@ function showVideoDefault() { # Syntax: showAudioDefault function showAudioDefault() { # Check the audio track by default - audio_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Audio:" | grep "(${default_lang_audio})" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | head -1) + audio_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Audio:" | grep "(${default_lang_audio})" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | cut -d "[" -f 1 | head -1) if [ -z "${audio_default}" ] ; then - audio_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Audio:" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | head -1) + audio_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Audio:" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | cut -d "[" -f 1 | head -1) if [ -z "${audio_default}" ] ; then audio_default="0:1" else @@ -175,11 +175,11 @@ function showAudioDefault() { # Syntax: showSubtitleDefault function showSubtitleDefault() { # Check the subtitle track by default - subtitle_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Subtitle:" | grep "(${default_lang_subt})" | grep "(forced)" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | head -1) + subtitle_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Subtitle:" | grep "(${default_lang_subt})" | grep "(forced)" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | cut -d "[" -f 1 | head -1) if [ -z "${subtitle_default}" ] ; then - subtitle_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Subtitle:" | grep "(${default_lang_subt})" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | head -1) + subtitle_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Subtitle:" | grep "(${default_lang_subt})" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | cut -d "[" -f 1 | head -1) if [ -z "${subtitle_default}" ] ; then - subtitle_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Subtitle:" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | head -1) + subtitle_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Subtitle:" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | cut -d "[" -f 1 | head -1) if [ -z "${subtitle_default}" ] ; then subtitle_default="0:3" else diff --git a/wrapper/ks-av1s-wrapper b/wrapper/ks-av1s-wrapper index 006bf83..50c4fcc 100755 --- a/wrapper/ks-av1s-wrapper +++ b/wrapper/ks-av1s-wrapper @@ -2,12 +2,12 @@ ############################################################### # ks-av1s-wrapper (ks-tools) - Wrapper for ks-av1s # -# Date: 10-03-2023 # +# Date: 12-03-2023 # # Author: q3aql # # Contact: q3aql@duck.com # ############################################################### VERSION="8.5-dev" -M_DATE="100323" +M_DATE="120323" # Conversion parameters ks_mp4s_to_wrap="/usr/bin/ks-av1s" @@ -129,7 +129,7 @@ function showInfo() { # Syntax: showVideoDefault function showVideoDefault() { # Check de video track by default - video_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Video:" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | head -1) + video_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Video:" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | cut -d "[" -f 1 | head -1) if [ -z "${video_default}" ] ; then video_default="0:0" else @@ -147,9 +147,9 @@ function showVideoDefault() { # Syntax: showAudioDefault function showAudioDefault() { # Check the audio track by default - audio_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Audio:" | grep "(${default_lang_audio})" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | head -1) + audio_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Audio:" | grep "(${default_lang_audio})" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | cut -d "[" -f 1 | head -1) if [ -z "${audio_default}" ] ; then - audio_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Audio:" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | head -1) + audio_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Audio:" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | cut -d "[" -f 1 | head -1) if [ -z "${audio_default}" ] ; then audio_default="0:1" else @@ -175,11 +175,11 @@ function showAudioDefault() { # Syntax: showSubtitleDefault function showSubtitleDefault() { # Check the subtitle track by default - subtitle_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Subtitle:" | grep "(${default_lang_subt})" | grep "(forced)" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | head -1) + subtitle_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Subtitle:" | grep "(${default_lang_subt})" | grep "(forced)" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | cut -d "[" -f 1 | head -1) if [ -z "${subtitle_default}" ] ; then - subtitle_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Subtitle:" | grep "(${default_lang_subt})" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | head -1) + subtitle_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Subtitle:" | grep "(${default_lang_subt})" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | cut -d "[" -f 1 | head -1) if [ -z "${subtitle_default}" ] ; then - subtitle_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Subtitle:" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | head -1) + subtitle_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Subtitle:" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | cut -d "[" -f 1 | head -1) if [ -z "${subtitle_default}" ] ; then subtitle_default="0:3" else diff --git a/wrapper/ks-avi-wrapper b/wrapper/ks-avi-wrapper index 8eb5d89..17ea715 100755 --- a/wrapper/ks-avi-wrapper +++ b/wrapper/ks-avi-wrapper @@ -2,12 +2,12 @@ ############################################################### # ks-avi-wrapper (ks-tools) - Wrapper for ks-avi # -# Date: 10-03-2023 # +# Date: 12-03-2023 # # Author: q3aql # # Contact: q3aql@duck.com # ############################################################### VERSION="8.5-dev" -M_DATE="100323" +M_DATE="120323" # Conversion parameters ks_avi_to_wrap="/usr/bin/ks-avi" @@ -129,7 +129,7 @@ function showInfo() { # Syntax: showVideoDefault function showVideoDefault() { # Check de video track by default - video_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Video:" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | head -1) + video_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Video:" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | cut -d "[" -f 1 | head -1) if [ -z "${video_default}" ] ; then video_default="0:0" else @@ -147,9 +147,9 @@ function showVideoDefault() { # Syntax: showAudioDefault function showAudioDefault() { # Check the audio track by default - audio_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Audio:" | grep "(${default_lang_audio})" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | head -1) + audio_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Audio:" | grep "(${default_lang_audio})" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | cut -d "[" -f 1 | head -1) if [ -z "${audio_default}" ] ; then - audio_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Audio:" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | head -1) + audio_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Audio:" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | cut -d "[" -f 1 | head -1) if [ -z "${audio_default}" ] ; then audio_default="0:1" else @@ -175,11 +175,11 @@ function showAudioDefault() { # Syntax: showSubtitleDefault function showSubtitleDefault() { # Check the subtitle track by default - subtitle_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Subtitle:" | grep "(${default_lang_subt})" | grep "(forced)" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | head -1) + subtitle_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Subtitle:" | grep "(${default_lang_subt})" | grep "(forced)" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | cut -d "[" -f 1 | head -1) if [ -z "${subtitle_default}" ] ; then - subtitle_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Subtitle:" | grep "(${default_lang_subt})" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | head -1) + subtitle_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Subtitle:" | grep "(${default_lang_subt})" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | cut -d "[" -f 1 | head -1) if [ -z "${subtitle_default}" ] ; then - subtitle_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Subtitle:" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | head -1) + subtitle_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Subtitle:" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | cut -d "[" -f 1 | head -1) if [ -z "${subtitle_default}" ] ; then subtitle_default="0:3" else diff --git a/wrapper/ks-mp4-wrapper b/wrapper/ks-mp4-wrapper index faeba28..06d5c66 100755 --- a/wrapper/ks-mp4-wrapper +++ b/wrapper/ks-mp4-wrapper @@ -2,12 +2,12 @@ ############################################################### # ks-mp4-wrapper (ks-tools) - Wrapper for ks-mp4 # -# Date: 10-03-2023 # +# Date: 12-03-2023 # # Author: q3aql # # Contact: q3aql@duck.com # ############################################################### VERSION="8.5-dev" -M_DATE="100323" +M_DATE="120323" # Conversion parameters ks_mp4_to_wrap="/usr/bin/ks-mp4" @@ -129,7 +129,7 @@ function showInfo() { # Syntax: showVideoDefault function showVideoDefault() { # Check de video track by default - video_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Video:" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | head -1) + video_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Video:" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | cut -d "[" -f 1 | head -1) if [ -z "${video_default}" ] ; then video_default="0:0" else @@ -147,9 +147,9 @@ function showVideoDefault() { # Syntax: showAudioDefault function showAudioDefault() { # Check the audio track by default - audio_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Audio:" | grep "(${default_lang_audio})" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | head -1) + audio_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Audio:" | grep "(${default_lang_audio})" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | cut -d "[" -f 1 | head -1) if [ -z "${audio_default}" ] ; then - audio_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Audio:" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | head -1) + audio_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Audio:" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | cut -d "[" -f 1 | head -1) if [ -z "${audio_default}" ] ; then audio_default="0:1" else @@ -175,11 +175,11 @@ function showAudioDefault() { # Syntax: showSubtitleDefault function showSubtitleDefault() { # Check the subtitle track by default - subtitle_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Subtitle:" | grep "(${default_lang_subt})" | grep "(forced)" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | head -1) + subtitle_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Subtitle:" | grep "(${default_lang_subt})" | grep "(forced)" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | cut -d "[" -f 1 | head -1) if [ -z "${subtitle_default}" ] ; then - subtitle_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Subtitle:" | grep "(${default_lang_subt})" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | head -1) + subtitle_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Subtitle:" | grep "(${default_lang_subt})" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | cut -d "[" -f 1 | head -1) if [ -z "${subtitle_default}" ] ; then - subtitle_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Subtitle:" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | head -1) + subtitle_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Subtitle:" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | cut -d "[" -f 1 | head -1) if [ -z "${subtitle_default}" ] ; then subtitle_default="0:3" else diff --git a/wrapper/ks-mp4k-wrapper b/wrapper/ks-mp4k-wrapper index e2afb46..3a74000 100755 --- a/wrapper/ks-mp4k-wrapper +++ b/wrapper/ks-mp4k-wrapper @@ -2,12 +2,12 @@ ############################################################### # ks-mp4k-wrapper (ks-tools) - Wrapper for ks-mp4k # -# Date: 10-03-2023 # +# Date: 12-03-2023 # # Author: q3aql # # Contact: q3aql@duck.com # ############################################################### VERSION="8.5-dev" -M_DATE="100323" +M_DATE="120323" # Conversion parameters ks_mp4k_to_wrap="/usr/bin/ks-mp4k" @@ -129,7 +129,7 @@ function showInfo() { # Syntax: showVideoDefault function showVideoDefault() { # Check de video track by default - video_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Video:" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | head -1) + video_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Video:" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | cut -d "[" -f 1 | head -1) if [ -z "${video_default}" ] ; then video_default="0:0" else @@ -147,9 +147,9 @@ function showVideoDefault() { # Syntax: showAudioDefault function showAudioDefault() { # Check the audio track by default - audio_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Audio:" | grep "(${default_lang_audio})" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | head -1) + audio_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Audio:" | grep "(${default_lang_audio})" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | cut -d "[" -f 1 | head -1) if [ -z "${audio_default}" ] ; then - audio_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Audio:" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | head -1) + audio_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Audio:" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | cut -d "[" -f 1 | head -1) if [ -z "${audio_default}" ] ; then audio_default="0:1" else @@ -175,11 +175,11 @@ function showAudioDefault() { # Syntax: showSubtitleDefault function showSubtitleDefault() { # Check the subtitle track by default - subtitle_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Subtitle:" | grep "(${default_lang_subt})" | grep "(forced)" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | head -1) + subtitle_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Subtitle:" | grep "(${default_lang_subt})" | grep "(forced)" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | cut -d "[" -f 1 | head -1) if [ -z "${subtitle_default}" ] ; then - subtitle_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Subtitle:" | grep "(${default_lang_subt})" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | head -1) + subtitle_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Subtitle:" | grep "(${default_lang_subt})" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | cut -d "[" -f 1 | head -1) if [ -z "${subtitle_default}" ] ; then - subtitle_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Subtitle:" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | head -1) + subtitle_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Subtitle:" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | cut -d "[" -f 1 | head -1) if [ -z "${subtitle_default}" ] ; then subtitle_default="0:3" else diff --git a/wrapper/ks-mp4s-wrapper b/wrapper/ks-mp4s-wrapper index d9cdd13..ddda1ba 100755 --- a/wrapper/ks-mp4s-wrapper +++ b/wrapper/ks-mp4s-wrapper @@ -2,12 +2,12 @@ ############################################################### # ks-mp4s-wrapper (ks-tools) - Wrapper for ks-mp4s # -# Date: 10-03-2023 # +# Date: 12-03-2023 # # Author: q3aql # # Contact: q3aql@duck.com # ############################################################### VERSION="8.5-dev" -M_DATE="100323" +M_DATE="120323" # Conversion parameters ks_mp4s_to_wrap="/usr/bin/ks-mp4s" @@ -129,7 +129,7 @@ function showInfo() { # Syntax: showVideoDefault function showVideoDefault() { # Check de video track by default - video_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Video:" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | head -1) + video_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Video:" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | cut -d "[" -f 1 | head -1) if [ -z "${video_default}" ] ; then video_default="0:0" else @@ -147,9 +147,9 @@ function showVideoDefault() { # Syntax: showAudioDefault function showAudioDefault() { # Check the audio track by default - audio_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Audio:" | grep "(${default_lang_audio})" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | head -1) + audio_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Audio:" | grep "(${default_lang_audio})" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | cut -d "[" -f 1 | head -1) if [ -z "${audio_default}" ] ; then - audio_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Audio:" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | head -1) + audio_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Audio:" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | cut -d "[" -f 1 | head -1) if [ -z "${audio_default}" ] ; then audio_default="0:1" else @@ -175,11 +175,11 @@ function showAudioDefault() { # Syntax: showSubtitleDefault function showSubtitleDefault() { # Check the subtitle track by default - subtitle_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Subtitle:" | grep "(${default_lang_subt})" | grep "(forced)" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | head -1) + subtitle_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Subtitle:" | grep "(${default_lang_subt})" | grep "(forced)" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | cut -d "[" -f 1 | head -1) if [ -z "${subtitle_default}" ] ; then - subtitle_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Subtitle:" | grep "(${default_lang_subt})" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | head -1) + subtitle_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Subtitle:" | grep "(${default_lang_subt})" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | cut -d "[" -f 1 | head -1) if [ -z "${subtitle_default}" ] ; then - subtitle_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Subtitle:" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | head -1) + subtitle_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Subtitle:" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | cut -d "[" -f 1 | head -1) if [ -z "${subtitle_default}" ] ; then subtitle_default="0:3" else diff --git a/wrapper/ks-vob-wrapper b/wrapper/ks-vob-wrapper index 477a46d..2ec8198 100755 --- a/wrapper/ks-vob-wrapper +++ b/wrapper/ks-vob-wrapper @@ -2,21 +2,18 @@ ############################################################### # ks-vob-wrapper (ks-tools) - Wrapper for ks-vob # -# Date: 10-03-2023 # +# Date: 12-03-2023 # # Author: q3aql # # Contact: q3aql@duck.com # ############################################################### VERSION="8.5-dev" -M_DATE="100323" +M_DATE="120323" # Conversion parameters ks_vob_to_wrap="/usr/bin/ks-vob" p_ffmpeg="ffmpeg -i" p_ffmpeg_patched="-max_muxing_queue_size 9999" rel_size="720x480" -configFolder=${HOME}/.ks-tools -configFile=${configFolder}/ks-vob -source ${configFile} # Check cygwin alias (for Windows) if [ -f "/usr/bin/cygwin-alias.sh" ] ; then @@ -67,7 +64,7 @@ function showInfo() { # Syntax: showVideoDefault function showVideoDefault() { # Check de video track by default - video_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Video:" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | head -1) + video_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Video:" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | cut -d "[" -f 1 | head -1) if [ -z "${video_default}" ] ; then video_default="0:0" else @@ -85,9 +82,9 @@ function showVideoDefault() { # Syntax: showAudioDefault function showAudioDefault() { # Check the audio track by default - audio_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Audio:" | grep "(${default_lang_audio})" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | head -1) + audio_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Audio:" | grep "(${default_lang_audio})" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | cut -d "[" -f 1 | head -1) if [ -z "${audio_default}" ] ; then - audio_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Audio:" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | head -1) + audio_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Audio:" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | cut -d "[" -f 1 | head -1) if [ -z "${audio_default}" ] ; then audio_default="0:1" else