Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Discussion & Documentation Documentation, Tips & Tricks
  • Search

raspberry pi dts to stereo decoding

Unofficial documentation for various parts of Gentoo Linux. Note: This is not a support forum.
Post Reply
Advanced search
3 posts • Page 1 of 1
Author
Message
Cr0t
l33t
l33t
User avatar
Posts: 945
Joined: Sat Apr 27, 2002 1:52 am
Location: USA

raspberry pi dts to stereo decoding

  • Quote

Post by Cr0t » Mon Feb 18, 2013 5:20 pm

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: Select all

#!/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
  • ©®0t
Top
YourNameInHere
n00b
n00b
Posts: 8
Joined: Wed Mar 28, 2007 1:34 pm

  • Quote

Post by YourNameInHere » Wed Feb 20, 2013 10:39 am

@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: Select all

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
Top
Cr0t
l33t
l33t
User avatar
Posts: 945
Joined: Sat Apr 27, 2002 1:52 am
Location: USA

  • Quote

Post by Cr0t » Thu Feb 21, 2013 1:56 am

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: Select all

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
  • ©®0t
Top
Post Reply

3 posts • Page 1 of 1

Return to “Documentation, Tips & Tricks”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Authors
Gentoo is a trademark of the Gentoo Foundation, Inc. and of Förderverein Gentoo e.V.
The contents of this document, unless otherwise expressly stated, are licensed under the CC-BY-SA-4.0 license.
The Gentoo Name and Logo Usage Guidelines apply.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy