dts problem workaround (linux)
Napsal: 17 srp 2010, 00:11
dts convert do ac3, postup pre linux
prerequisites:
1. mkvtoolnix - Matroska tools
2. libdca - DTS to WAV decoder
3. aften - WAV to AC3 encoder
postup:
ak je prvy track dts, tak je to easy, prida sa novy ac3 track
chmod 755 mkvdts2ac3.sh
mkvdts2ac3.sh Some.Random.Movie.mkv
tu sa discardne prvy dts track a ostane len novy ac3
mkvdts2ac3.sh -n Some.Random.Movie.mkv
ine examples:
Specify an alternate directory to use for the temporary files. This can be useful when the partition your /tmp directory on is tiny.
mkvdts2ac3.sh -w /mnt/bigHDD Some.Random.Movie.mkv
Convert a different DTS track rather than the first one sequentially in the file. This will require you to check the output of a command like mkvmerge -i Some.Random.Movie.mkv which will give you the track ids of each file.
mkvdts2ac3.sh -t 4 Some.Random.Movie.mkv
If you want to retain the DTS track in an alternate location you can instruct the script not to delete it after the conversion.
mkvdts2ac3.sh -k Some.Random.Movie.mkv
If you want to keep the original file untouched (such as if you are still seeding it in a torrent) and your player supports external audio tracks you can choose to leave the converted AC3 track out of the file.
mkvdts2ac3.sh -e Some.Random.Movie.mkv
All of these examples only showcase the use of a single argument but they can be combined to achieve the desired result.
mkvdts2ac3.sh -d -t 3 -w /mnt/media/tmp/ Some.Random.Movie.mkv
If you're unsure of what any command will do run it with the --test argument to display a list of command execute. You can also use the --debug argument which will print out the commands and wait for the user to press the return key before running each.
$ mkvdts2ac3.sh --test -d -t 3 -w /mnt/media/tmp Some.Random.Movie.mkv
mkvdts2ac3-1.0.0 - by Jake Wharton <jakewharton@gmail.com>
MKVFILE: Some.Random.Movie.mkv
DTSFILE: /mnt/media/tmp/Some.Random.Movie.dts
AC3FILE: /mnt/media/tmp/Some.Random.Movie.ac3
NEWFILE: /mnt/media/tmp/Some.Random.Movie.new.mkv
Checking to see if DTS track specified via arguments is valid
> mkvmerge -i "Some.Random.Movie.mkv" | grep "Track ID 3: audio (A_DTS)"
Extract language from selected DTS track.
> mkvinfo "Some.Random.Movie.mkv" | grep -A 12 "Track number: 3" | tail -n 1 | cut -d" " -f5
Extract DTS file from MKV.
> mkvextract tracks "Some.Random.Movie.mkv" 3:"/mnt/media/tmp/Some.Random.Movie.dts"
Converting DTS to AC3.
> dcadec -o wavall "/mnt/media/tmp/Some.Random.Movie.dts" | aften - "/mnt/media/tmp/Some.Random.Movie.ac3"
Removing temporary DTS file.
> rm -f "/mnt/media/tmp/Some.Random.Movie.dts"
Running main remux.
> mkvmerge -o "/mnt/media/tmp/Some.Random.Movie.new.mkv" "Some.Random.Movie.mkv" --default-track 0 --language 0:DTSLANG "/mnt/media/tmp/Some.Random.Movie.ac3"
Removing temporary AC3 file.
> rm -f "/mnt/media/tmp/Some.Random.Movie.ac3"
Copying new file over the old one.
> cp "/mnt/media/tmp/Some.Random.Movie.new.mkv" "Some.Random.Movie.mkv"
Remove working file.
> rm -f "/mnt/media/tmp/Some.Random.Movie.new.mkv"
prerequisites:
1. mkvtoolnix - Matroska tools
2. libdca - DTS to WAV decoder
3. aften - WAV to AC3 encoder
postup:
ak je prvy track dts, tak je to easy, prida sa novy ac3 track
chmod 755 mkvdts2ac3.sh
mkvdts2ac3.sh Some.Random.Movie.mkv
tu sa discardne prvy dts track a ostane len novy ac3
mkvdts2ac3.sh -n Some.Random.Movie.mkv
ine examples:
Specify an alternate directory to use for the temporary files. This can be useful when the partition your /tmp directory on is tiny.
mkvdts2ac3.sh -w /mnt/bigHDD Some.Random.Movie.mkv
Convert a different DTS track rather than the first one sequentially in the file. This will require you to check the output of a command like mkvmerge -i Some.Random.Movie.mkv which will give you the track ids of each file.
mkvdts2ac3.sh -t 4 Some.Random.Movie.mkv
If you want to retain the DTS track in an alternate location you can instruct the script not to delete it after the conversion.
mkvdts2ac3.sh -k Some.Random.Movie.mkv
If you want to keep the original file untouched (such as if you are still seeding it in a torrent) and your player supports external audio tracks you can choose to leave the converted AC3 track out of the file.
mkvdts2ac3.sh -e Some.Random.Movie.mkv
All of these examples only showcase the use of a single argument but they can be combined to achieve the desired result.
mkvdts2ac3.sh -d -t 3 -w /mnt/media/tmp/ Some.Random.Movie.mkv
If you're unsure of what any command will do run it with the --test argument to display a list of command execute. You can also use the --debug argument which will print out the commands and wait for the user to press the return key before running each.
$ mkvdts2ac3.sh --test -d -t 3 -w /mnt/media/tmp Some.Random.Movie.mkv
mkvdts2ac3-1.0.0 - by Jake Wharton <jakewharton@gmail.com>
MKVFILE: Some.Random.Movie.mkv
DTSFILE: /mnt/media/tmp/Some.Random.Movie.dts
AC3FILE: /mnt/media/tmp/Some.Random.Movie.ac3
NEWFILE: /mnt/media/tmp/Some.Random.Movie.new.mkv
Checking to see if DTS track specified via arguments is valid
> mkvmerge -i "Some.Random.Movie.mkv" | grep "Track ID 3: audio (A_DTS)"
Extract language from selected DTS track.
> mkvinfo "Some.Random.Movie.mkv" | grep -A 12 "Track number: 3" | tail -n 1 | cut -d" " -f5
Extract DTS file from MKV.
> mkvextract tracks "Some.Random.Movie.mkv" 3:"/mnt/media/tmp/Some.Random.Movie.dts"
Converting DTS to AC3.
> dcadec -o wavall "/mnt/media/tmp/Some.Random.Movie.dts" | aften - "/mnt/media/tmp/Some.Random.Movie.ac3"
Removing temporary DTS file.
> rm -f "/mnt/media/tmp/Some.Random.Movie.dts"
Running main remux.
> mkvmerge -o "/mnt/media/tmp/Some.Random.Movie.new.mkv" "Some.Random.Movie.mkv" --default-track 0 --language 0:DTSLANG "/mnt/media/tmp/Some.Random.Movie.ac3"
Removing temporary AC3 file.
> rm -f "/mnt/media/tmp/Some.Random.Movie.ac3"
Copying new file over the old one.
> cp "/mnt/media/tmp/Some.Random.Movie.new.mkv" "Some.Random.Movie.mkv"
Remove working file.
> rm -f "/mnt/media/tmp/Some.Random.Movie.new.mkv"