Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve DTS audio track search #119

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions mkvdts2ac3.sh
Original file line number Diff line number Diff line change
Expand Up @@ -401,11 +401,11 @@ doprint $"WORKING DIRECTORY: $WD"
if [ -z $DTSTRACK ]; then
doprint ""
doprint $"Find first DTS track in MKV file."
doprint "> mkvmerge -i \"$MKVFILE\" | grep -m 1 \"${AUDIOTRACKPREFIX}DTS)\" | cut -d ":" -f 1 | cut -d \" \" -f 3"
doprint "> mkvmerge -i \"$MKVFILE\" | grep -m 1 \"${AUDIOTRACKPREFIX}DTS\" | cut -d ":" -f 1 | cut -d \" \" -f 3"
DTSTRACK="DTSTRACK" #Value for debugging
dopause
if [ $EXECUTE = 1 ]; then
DTSTRACK=$(mkvmerge -i "$MKVFILE" | grep -m 1 "${AUDIOTRACKPREFIX}DTS)" | cut -d ":" -f 1 | cut -d " " -f 3)
DTSTRACK=$(mkvmerge -i "$MKVFILE" | grep -m 1 "${AUDIOTRACKPREFIX}DTS" | cut -d ":" -f 1 | cut -d " " -f 3)

# Check to make sure there is a DTS track in the MVK
if [ -z $DTSTRACK ]; then
Expand All @@ -418,11 +418,11 @@ else
# Checks to make sure the command line argument track id is valid
doprint ""
doprint $"Checking to see if DTS track specified via arguments is valid."
doprint "> mkvmerge -i \"$MKVFILE\" | grep \"Track ID $DTSTRACK: ${AUDIOTRACKPREFIX}DTS)\""
doprint "> mkvmerge -i \"$MKVFILE\" | grep \"Track ID $DTSTRACK: ${AUDIOTRACKPREFIX}DTS\""
VALID=$"VALID" #Value for debugging
dopause
if [ $EXECUTE = 1 ]; then
VALID=$(mkvmerge -i "$MKVFILE" | grep "Track ID $DTSTRACK: ${AUDIOTRACKPREFIX}DTS)")
VALID=$(mkvmerge -i "$MKVFILE" | grep "Track ID $DTSTRACK: ${AUDIOTRACKPREFIX}DTS")

if [ -z "$VALID" ]; then
error $"Track ID '$DTSTRACK' is not a DTS track and/or does not exist."
Expand Down