View previous topic :: View next topic |
Author |
Message |
Cr0t l33t
Joined: 27 Apr 2002 Posts: 944 Location: USA
|
Posted: Mon Feb 18, 2013 5:20 pm Post subject: raspberry pi dts to stereo decoding |
|
|
My raspberry pi is running debian, but all my movies/tv stuff sits on my gentoo fileserver. We have the raspberry pi setup upstairs in our bedroom and have only some cheap stereo speakers connected to it. The problem is that the raspberry pi cannot decode DTS via the hardware.
I wrote a script, which I run against the mkv file. The script decodes the DTS stereo into mp3 192 audio. A 1080 dts decoded mkv to 1080 mp3 mkv takes 1/20th of the time of the movie. Your mileage may vary...
Code: | #!/bin/bash
OUTPUT=`basename "$1"`
FILENAME=`echo "$OUTPUT"| tr '[A-Z]' '[a-z]' | sed s/dts/STEREO/g | rev | cut -b5- | rev`
EXTENSION=`echo "$OUTPUT" | rev | cut -c1-4 | rev`
DESTINATION="/home/cr0t/Files/usenet/UpStairs/"
SAVEIFS=$IFS
IFS=$(echo -en "\n\b")
for line in $@
do
ffmpeg -i "$1" -c:v copy -c:a libmp3lame -strict experimental -b:a 192 -ab 192k -ar 48000 -ac 2 -threads 0 -scodec copy $DESTINATION"$FILENAME"\_\_UpStairs$EXTENSION
done
IFS=$SAVEIFS |
I call the script UpStairs.sh. You can run it like "UpStairs.sh file.mkv" or "UpStairs file1.mkv file2.mkv". _________________ cya |
|
Back to top |
|
|
YourNameInHere n00b
Joined: 28 Mar 2007 Posts: 8
|
Posted: Wed Feb 20, 2013 10:39 am Post subject: |
|
|
@Cr0t
thx for sharing this.
I don't know if you already know the following:
https://github.com/JakeWharton/mkvdts2ac3
it's a bash-script (found a python-version also) like yours. It converts dts to ac3:
Code: | mkvdts2ac3 is a bash script which can be used for converting the DTS in Matroska (MKV) files to AC3. It provides you with a healthy set of options for controlling the resulting file. |
(Source: README.md from mkvdts2ac3)
YourNameInHere |
|
Back to top |
|
|
Cr0t l33t
Joined: 27 Apr 2002 Posts: 944 Location: USA
|
Posted: Thu Feb 21, 2013 1:56 am Post subject: |
|
|
YourNameInHere wrote: | @Cr0t
thx for sharing this.
I don't know if you already know the following:
https://github.com/JakeWharton/mkvdts2ac3
it's a bash-script (found a python-version also) like yours. It converts dts to ac3:
Code: | mkvdts2ac3 is a bash script which can be used for converting the DTS in Matroska (MKV) files to AC3. It provides you with a healthy set of options for controlling the resulting file. |
(Source: README.md from mkvdts2ac3)
YourNameInHere | my one replaces the soundtrack with an mp3 layer, which works great with omxplayer. The script you posted adds a track.
Great as well. _________________ cya |
|
Back to top |
|
|
|