DS214play, Apple TV and DTS: my solution

Discussion room for Video Station package
Forum rules
1) This is a user forum for Synology users to share experience/help out each other: if you need direct assistance from the Synology technical support team, please use the following form:

https://account.synology.com/support/su ... p?lang=enu



2) To avoid putting users' DiskStation at risk, please don't paste links to any patches provided by our Support team as we will systematically remove them. Our Support team will provide the correct patch for your DiskStation model.
jeppo77
Beginner
Beginner
Posts: 28
Joined: Mon Feb 17, 2014 11:37 am

DS214play, Apple TV and DTS: my solution

Unread post by jeppo77 » Mon Feb 17, 2014 1:35 pm

Hi

----------------
UPDATE Aug 10th:
For possible Realtime Dts transcoding to the Apple TV:
See http://forum.synology.com/enu/viewtopic ... 45#p334454
----------------

I am using an Apple TV to play movies from my DS214play.

I both love them, and as many of you, I am annoyed with the lack of DTS support. Both of these devices don’t support it, so I decided to actually start seeing DTS as the problem, and not the devices.

So I wrote a script for the Synology which goes over all MKVs in a folder recursively, detects which audio they have, and if it’s DTS, it converts it to AC3. It leaves the video untouched.
I added this to my Synology task scheduler, it runs every night, or whenever I press the “run” button. You can also start the conversion as soon as download station finishes a download, look here http://forum.synology.com/enu/viewtopic ... 71#p336471



download here: (update 15/5/2014) NEW VERSIONS: SEE BELOW
https://drive.google.com/file/d/0B-VmPh ... sp=sharing

Beware that the original MKV file is overwritten (since I don’t care about DTS anyway).
The script also cleans up other files such as *sample*, *.txt, *.nfo ...

Possibly you need to make the script executable, for example

Code: Select all

chmod +x /volume1/video/tools/convert_mkv_ac3.sh
The script takes the folder to parse as input.

e.g. This is what I have in my task scheduler:

Code: Select all

/volume1/video/tools/convert_mkv_ac3.sh /volume1/video/movies/ > /volume1/video/tools/log-movies
Script Requirements:
ffmpeg and ffprobe from http://ffmpeg.gusari.org/static/32bit/
(SO THIS ONLY WORKS ON AN INTEL CPU BASED NAS like the ds214play)
update the location of both in the shell script. Default is /volume1/video/tools/ffmpeg and /volume1/video/tools/ffprobe.

The script comes as is, use at your own risk. If you improve it, please let me know.

EDIT (4/8/2014)
While the above script actually just changes the audio to AC3 and the output format is still MKV, I wrote another script which converts all MKVs to MP4 with an AC3 5.1 and AAC stereo stream, no matter which streams are present in the MKV file. It deletes the original MKV file. I actually made this script so that I can download all my movies to my IPad/IPhone using the DS Video app.

download here: (update 19/8/2014)
https://drive.google.com/file/d/0B-VmPh ... sp=sharing
(note that the subtitle streams need to be converted to an mp4 compatible format. This does not always work, so some conversions might fail)
See also http://forum.synology.com/enu/viewtopic ... 30#p323628

EDIT:
Bjorn added more detailed instructions for the original script, in Dutch, here: http://blog.mobile-harddisk.nl/tutorial ... ds214play/

EDIT 4/4/2014:
s4nder converted the script to output AAC (chromecast compatible): http://pastebin.com/pbDu93ft
See his post for more info, it needs a bit different handling: http://forum.synology.com/enu/viewtopic ... 24#p315332
Last edited by jeppo77 on Tue Aug 19, 2014 12:28 pm, edited 16 times in total.

User avatar
bjorn
Student
Student
Posts: 64
Joined: Wed Mar 28, 2007 12:32 pm
Location: The Netherlands

Re: DS214play, Apple TV and DTS: my solution

Unread post by bjorn » Wed Feb 19, 2014 12:19 pm

Thanks! Trying it now. If this works I'll publish it on blog.mobile-harddisk.nl (of course referring to this topic).
Björn | Mobile-Harddisk.nl

jeppo77
Beginner
Beginner
Posts: 28
Joined: Mon Feb 17, 2014 11:37 am

Re: DS214play, Apple TV and DTS: my solution

Unread post by jeppo77 » Wed Feb 19, 2014 1:34 pm

bjorn wrote:Thanks! Trying it now. If this works I'll publish it on blog.mobile-harddisk.nl (of course referring to this topic).
Thanks Bjorn, I edited the 1st post with a link to your blog.

User avatar
bjorn
Student
Student
Posts: 64
Joined: Wed Mar 28, 2007 12:32 pm
Location: The Netherlands

Re: DS214play, Apple TV and DTS: my solution

Unread post by bjorn » Wed Feb 19, 2014 1:39 pm

Thanks. Works like a charm :)
Björn | Mobile-Harddisk.nl

User avatar
Wilkovf
Beginner
Beginner
Posts: 25
Joined: Mon Jun 03, 2013 4:45 pm
Location: Hardenberg
Contact:

Re: DS214play, Apple TV and DTS: my solution

Unread post by Wilkovf » Thu Feb 20, 2014 3:50 pm

wow great,

Does it work for other DS's than DS214play?
DS1817+ & DS115 for backup.
Shadowfax ICT, specialize in Synology and networks
www.shadowfax.nl

jeppo77
Beginner
Beginner
Posts: 28
Joined: Mon Feb 17, 2014 11:37 am

Re: DS214play, Apple TV and DTS: my solution

Unread post by jeppo77 » Thu Feb 20, 2014 4:06 pm

Wilkovf wrote:Does it work for other DS's than DS214play?
I haven't tried. But if you find a version of ffmpeg and ffprobe that runs on whatever processor you have in your NAS, it might work. The DS214play has an Intel inside.

User avatar
bjorn
Student
Student
Posts: 64
Joined: Wed Mar 28, 2007 12:32 pm
Location: The Netherlands

Re: DS214play, Apple TV and DTS: my solution

Unread post by bjorn » Thu Feb 20, 2014 7:48 pm

It should work on other intel based synology's like the DS7xx and DS15xx although these models don't have the transcoding chip of the ds214play and will always have a hard time transcoding anything over 720p. Even 720p stutters a lot on my 1512+.
Björn | Mobile-Harddisk.nl

User avatar
Wilkovf
Beginner
Beginner
Posts: 25
Joined: Mon Jun 03, 2013 4:45 pm
Location: Hardenberg
Contact:

Re: DS214play, Apple TV and DTS: my solution

Unread post by Wilkovf » Thu Feb 20, 2014 8:34 pm

Had not much trouble with DS713+ and Apple TV.
DS1817+ & DS115 for backup.
Shadowfax ICT, specialize in Synology and networks
www.shadowfax.nl

oRBIT
Ace
Ace
Posts: 786
Joined: Tue Oct 18, 2011 2:17 pm
Location: Gothenburg, Sweden

Re: DS214play, Apple TV and DTS: my solution

Unread post by oRBIT » Fri Feb 21, 2014 10:27 am

Very interesting. You should do a standard "App" to use within DSM for this purpose. :)
DS918+ (12B RAM, 6TB WD RED, 2x3TB WD RED WD30EFRX-68EUZN0)

My Synology blog: http://synofan.blogspot.se

User avatar
Wilkovf
Beginner
Beginner
Posts: 25
Joined: Mon Jun 03, 2013 4:45 pm
Location: Hardenberg
Contact:

Re: DS214play, Apple TV and DTS: my solution

Unread post by Wilkovf » Sat Mar 01, 2014 4:25 pm

The script stops after converting one file, can it run on all folders?
DS1817+ & DS115 for backup.
Shadowfax ICT, specialize in Synology and networks
www.shadowfax.nl

jeppo77
Beginner
Beginner
Posts: 28
Joined: Mon Feb 17, 2014 11:37 am

Re: DS214play, Apple TV and DTS: my solution

Unread post by jeppo77 » Sat Mar 01, 2014 4:36 pm

Wilkovf wrote:The script stops after converting one file, can it run on all folders?
Sure, it will parse all subfolders in the folder you give as parameter. So adjust this to the root of your movies.
The script searches for MKVs only.

User avatar
bjorn
Student
Student
Posts: 64
Joined: Wed Mar 28, 2007 12:32 pm
Location: The Netherlands

Re: DS214play, Apple TV and DTS: my solution

Unread post by bjorn » Sat Mar 01, 2014 4:44 pm

on my DS1512+ it also processes only one movie at the time with /volume1/video as path given. It stops after processing one movie, and running the exact same command again results in doing the next movie.
Björn | Mobile-Harddisk.nl

jeppo77
Beginner
Beginner
Posts: 28
Joined: Mon Feb 17, 2014 11:37 am

Re: DS214play, Apple TV and DTS: my solution

Unread post by jeppo77 » Sun Mar 02, 2014 10:05 pm

bjorn wrote:on my DS1512+ it also processes only one movie at the time with /volume1/video as path given. It stops after processing one movie, and running the exact same command again results in doing the next movie.
You're right, I didn't notice it. It seems ffmpeg is using stdin and screwing up the loop in the script. I updated the link in post 1, it should be fixed now :D . Let me know if it works ok.

arisetobe
I'm New!
I'm New!
Posts: 3
Joined: Tue Mar 11, 2014 4:43 pm

Re: DS214play, Apple TV and DTS: my solution

Unread post by arisetobe » Tue Mar 11, 2014 5:02 pm

Hi, thank you very much for this script!
However I got a problem with it. It writes
-----> audio is ac3
-----> no processing needed.
However I know that the file has 2 audio streams (different languages) one of them is indeed ac3, but the other is DTS for sure.

Right now I am processing a file, after editing convert.ch by removing ac3 from
case "$audio" in
aac|alac|mp3|mp2 )
It has started to process a file now, but I don't know what result might be.. Most likely it will just leave only one stream..

Do you think the script supports several streams? Or if not, do you think it might be hard to edit it to support it?

jeppo77
Beginner
Beginner
Posts: 28
Joined: Mon Feb 17, 2014 11:37 am

Re: DS214play, Apple TV and DTS: my solution

Unread post by jeppo77 » Wed Mar 12, 2014 9:30 am

arisetobe wrote: Do you think the script supports several streams? Or if not, do you think it might be hard to edit it to support it?
The script is indeed limited to one stream. Personally I only need one stream, so I don't think I'm going to update the script. But feel free to change it yourself and share it with us. :wink:

But why would you want to change a movie with AC3+DTS to AC3+AC3?

Post Reply

Return to “Video Station”