DTS Audio for android == LAWSUIT

How do you deal with DTS Audio?


  • Total voters
    193
Search This thread

indianajonesilm

New member
Sep 15, 2012
2
0
Now that MX Player 1.7 was released with instructions on how to build a custom FFmpeg with DTS support,has anyone tried it out?
 

koljanowak

Member
Sep 15, 2012
7
6
I've build ffmpeg for mxplayer successfully for my Nexus 7. MKV with DTS plays fine now.

However, there is a small detail missing in the Howto. Building as described leads to a working ffmpeg version which still doesn't handle DTS. One has to remove the following three lines from config-ffmpeg.sh:

Code:
--disable-demuxer=dts \
--disable-parser=dca \
--disable-decoder=dca \
 

koljanowak

Member
Sep 15, 2012
7
6
Did you copy all five .so files

Code:
libavcodec.so
libavformat.so
libavutil.so
libswresample.so
libswscale.so

into a folder on your device? And have you selected that folder in MX Player as "Custom codec"? And after a restart of MX Player, is the folder name still shown under "Custom codec"?
 

LoganMcClay

Senior Member
Dec 2, 2009
89
21
I've build ffmpeg for mxplayer successfully for my Nexus 7. MKV with DTS plays fine now.

However, there is a small detail missing in the Howto. Building as described leads to a working ffmpeg version which still doesn't handle DTS. One has to remove the following three lines from config-ffmpeg.sh:

Code:
--disable-demuxer=dts \
--disable-parser=dca \
--disable-decoder=dca \

Hi,

I don't get it, trying to compile ffmpeg for an hour and I get stuck on some parameters in build-ffmpeg.sh... What shoud TARGET1 & TARGET2 point to ? Tried to give there the *.so found in the unpacked codecs APK and that's a no-go...
Also, this part :
Code:
cp libavutil/libavutil.so $TARGET1/
cp libavutil/libavutil.so $TARGET2/
cp libswresample/libswresample.so $TARGET1/
cp libswresample/libswresample.so $TARGET2/
cp libavcodec/libavcodec.so $TARGET1/
cp libavcodec/libavcodec.so $TARGET2/
cp libavformat/libavformat.so $TARGET1/
cp libavformat/libavformat.so $TARGET2/
cp libswscale/libswscale.so $TARGET1/
cp libswscale/libswscale.so $TARGET2/
is trying to copy files that doesn't exist... Maybe because first part isn't set correctly.

koljanowak, can you point me how you've done it ?

Thanks by advance :fingers-crossed:
 

jebise101

Senior Member
Jan 22, 2010
931
121
Hi,

I don't get it, trying to compile ffmpeg for an hour and I get stuck on some parameters in build-ffmpeg.sh... What shoud TARGET1 & TARGET2 point to ? Tried to give there the *.so found in the unpacked codecs APK and that's a no-go...
Also, this part :
Code:
cp libavutil/libavutil.so $TARGET1/
cp libavutil/libavutil.so $TARGET2/
cp libswresample/libswresample.so $TARGET1/
cp libswresample/libswresample.so $TARGET2/
cp libavcodec/libavcodec.so $TARGET1/
cp libavcodec/libavcodec.so $TARGET2/
cp libavformat/libavformat.so $TARGET1/
cp libavformat/libavformat.so $TARGET2/
cp libswscale/libswscale.so $TARGET1/
cp libswscale/libswscale.so $TARGET2/
is trying to copy files that doesn't exist... Maybe because first part isn't set correctly.

koljanowak, can you point me how you've done it ?

Thanks by advance :fingers-crossed:

you have to set the target folders so output of the codecs

I replaced $target1 to /usr/src/android-ndk-r8b/T1=../libs/armeabi-v7a/neon and do the same for $Target2 but point it to a different folder.

What I don't get is what does it need to Target folders, I tried both codecs folders and they both play DTS on H/W+ only
 

LoganMcClay

Senior Member
Dec 2, 2009
89
21
Sorry but don't undestand what you did.

That's for instance what i've set for now, but doesn't work :

build-ffmpeg.sh
Code:
case $1 in
	neon)
		TARGET1=/home/vmware/Documents/ffmpeg/ffmpeg_v7_neon__1_7.apk_FILES/lib/armeabi
		TARGET2=/home/vmware/Documents/ffmpeg/ffmpeg_v7_neon__1_7.apk_FILES/output
		;;

Do you say you've modified it that way ?

Code:
case $1 in
	neon)
		/usr/src/android-ndk-r8b/T1=../libs/armeabi-v7a/neon
		/usr/src/android-ndk-r8b/T2=../libs/output/ffmpeg_v7_neon/armeabi
		;;
 

jebise101

Senior Member
Jan 22, 2010
931
121
Sorry but don't undestand what you did.

That's for instance what i've set for now, but doesn't work :

build-ffmpeg.sh
Code:
case $1 in
	neon)
		TARGET1=/home/vmware/Documents/ffmpeg/ffmpeg_v7_neon__1_7.apk_FILES/lib/armeabi
		TARGET2=/home/vmware/Documents/ffmpeg/ffmpeg_v7_neon__1_7.apk_FILES/output
		;;

Do you say you've modified it that way ?

Code:
case $1 in
	neon)
		/usr/src/android-ndk-r8b/T1=../libs/armeabi-v7a/neon
		/usr/src/android-ndk-r8b/T2=../libs/output/ffmpeg_v7_neon/armeabi
		;;

I messed up the end as you can see below, but it generated the 5 *.so files in both T1/T2 directories, and I just manually created the lib folder and moved them to the appropriate folders. What I do not understand why it generates target1/target2 directories with the same *.so files when only one folder with the so files are required. So is the S3 armeabi-v7a or armeabi?

Code:
build-ffmpeg.sh: line 10: /usr/src/android-ndk-r8b/T1=../libs/armeabi-v7a/neon: No such file or directory
build-ffmpeg.sh: line 11: /usr/src/android-ndk-r8b/T2=../libs/output/ffmpeg_v7_neon/armeabi: No such file or directory
 
Last edited:

koljanowak

Member
Sep 15, 2012
7
6
Hi,
Code:
cp libavutil/libavutil.so $TARGET1/
cp libavutil/libavutil.so $TARGET2/
cp libswresample/libswresample.so $TARGET1/
cp libswresample/libswresample.so $TARGET2/
cp libavcodec/libavcodec.so $TARGET1/
cp libavcodec/libavcodec.so $TARGET2/
cp libavformat/libavformat.so $TARGET1/
cp libavformat/libavformat.so $TARGET2/
cp libswscale/libswscale.so $TARGET1/
cp libswscale/libswscale.so $TARGET2/
Those target directories are irrelevant for our use case. Placing the .so in different target directories is a part of the MX Player build process, which leads to an APK containing different versions of ffmpeg for all supported CPU types. We need to build only for our own CPU type and then copy the five .so files by hand to a folder of our own choosing on the device.

Only the first four commands in build-ffmpeg.sh are relevant, and you can even enter them by hand:
Code:
cd ffmpeg
../config-ffmpeg.sh $1
make clean
make -j8
You must insert your architecture (neon, tegra2, v6_vfp, v6, v5te, x86, mips) as argument to config-ffmpeg.sh (replacing $1). And of course you have to make the necessary changes in config-ffmpeg.sh beforehand, which is
- change "NDK=..." to point to where you extracted your NDK,
- delete "-DMXTECHS" and "-lmxutil", as mentioned on the MX Player Howto page,
- delete the three lines disabling DTS and DCA, as mentioned in my first post.
 
Last edited:
  • Like
Reactions: LoganMcClay

LoganMcClay

Senior Member
Dec 2, 2009
89
21
Those target directories are irrelevant for our use case. Placing the .so in different target directories is a part of the MX Player build process, which leads to an APK containing different versions of ffmpeg for all supported CPU types. We need to build only for our own CPU type and then copy the five .so files by hand to a folder of our own choosing on the device.

Only the first four commands in build-ffmpeg.sh are relevant, and you can even enter them by hand:
Code:
cd ffmpeg
../config-ffmpeg.sh $1
make clean
make -j8
You must insert your architecture (neon, tegra2, v6_vfp, v6, v5te, x86, mips) as argument to config-ffmpeg.sh (replacing $1). And of course you have to make the necessary changes in config-ffmpeg.sh beforehand, which is
- change "NDK=..." to point to where you extracted your NDK,
- delete "-DMXTECHS" and "-lmxutil", as mentioned on the MX Player Howto page,
- delete the three lines disabling DTS and DCA, as mentioned in my first post.

Thanks, got it working :)
Anyway, it seems to work also with the one posted a little above on MX google groups even on different arch (tried on HTC HD2 NANDroid, Asus Transformer Prime and Samsung Galaxy S3). In configuration>Codecs>Custom codecs I just pointed the "libavcodec.so" file.
That way, we don't need to compile it for each and every platform ;)
 
Last edited:

koljanowak

Member
Sep 15, 2012
7
6
That way, we don't need to compile it for each and every platform ;)
Maybe, but it depends on how those architectures are related. A more modern ARM CPU will execute code for older ARMs, but you may miss optimizations for your CPU this way, and this could impact performance and/or battery life. Or worse, if you use code which was compiled for a more modern ARM CPU than yours, the code may contain instructions which don't work on your CPU. Also, ARM, x86 and MIPS and are not related at all and are completely incompatible.
 
Last edited:

LoganMcClay

Senior Member
Dec 2, 2009
89
21
Maybe, but it depends on how those architectures are related. A more modern ARM CPU will execute code for older ARMs, but you may miss optimizations for your CPU this way, and this could impact performance and/or battery life. Or worse, if you use code which was compiled for a more modern ARM CPU than yours, the code may contain instructions which don't work on your CPU. Also, ARM, x86 and MIPS and are not related at all and are completely incompatible.

Right, I haven't tested that far. What I was saying is it's just decoding fine on a bunch of different ARM processors i've tested.
 

cook

Senior Member
Mar 7, 2008
183
32
Hello,

Is someone can post compiled versions for neon and for tegra2 ?

Thanks
 

koljanowak

Member
Sep 15, 2012
7
6
It looks like I'm not so new anymore:

mxplayer-v1-7-ffmpeg-2012-09-16-neon.zip (md5: e5bf7c05c680006d81fbccefb79fc713)
-> https://anonfiles.com/file/e5bf7c05c680006d81fbccefb79fc713
mxplayer-v1-7-ffmpeg-2012-09-16-tegra2.zip (md5: c64f7dc461d3f4c2bbda08c726f478c9)
-> https://anonfiles.com/file/c64f7dc461d3f4c2bbda08c726f478c9
mxplayer-v1-7-ffmpeg-2012-09-16-v6_vfp.zip (md5: 553367b419e6c855b6eb32f7abd35ec1)
-> https://anonfiles.com/file/553367b419e6c855b6eb32f7abd35ec1
mxplayer-v1-7-ffmpeg-2012-09-16-v6.zip (md5: 342a2a8bda3f9a8ebd5b62e95a8593a2)
-> https://anonfiles.com/file/342a2a8bda3f9a8ebd5b62e95a8593a2
mxplayer-v1-7-ffmpeg-2012-09-16-v5te.zip (md5: 6ea66726b362a73e9b962be7a05af3a6)
-> https://anonfiles.com/file/6ea66726b362a73e9b962be7a05af3a6
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 8
    DTS audio *used* to work outofthebox in both DicePlayer (my old favorite), and in MX Player (my new fav), but both of them REMOVED the dts codec a few months ago apparently because of the threat of lawsuits from using unlicensed code.
    (UPDATE: DicePlayer dev juami posted below that they were refused even the option to buy a license for DTS, because they prefer to deal with the big industry players instead; also, DicePlayer can still play dts IF you install an external codec plug-in)

    Just curious what most people are doing out there in order to play their mkv videos with the very common DTS audio track (vs the less common AAC/MP3/etc audio tracks). Re-encoding phone-friendly versions with HandBrake; using an old app with DTS support; using a PAID app that paid the licensing fee (can't find one), or, something else...

    EDIT: I'm going to keep a list here of players that are known to support DTS or not:

    DTS IS SUPPORTED OTTB (for now):
    VLC Beta - (h/w 1080p decode works! - BEST option, but, the app must be sideloaded, since it shows as incompatible with the US S3 in the Play store. See Time_Zone's post below for the attached VLC apk. Thanks!)
    BS Player - (s/w ONLY (eats battery): h/w mode always falls back to s/w mode, but dts is ok. 720p s/w == ok; 1080p s/w == CPU can't keep up; too choppy)
    Rock Player - (s/w ONLY (eats battery): no DTS when in h/w video playback mode, and s/w playback is blocky crap. Also, the app fails to playback a video when sent a video intent to play from another app)

    DTS NOT SUPPORTED:
    Video Player default - (Touchwiz, AOSP (CM10, AOKP, ...))
    MX Player - (updated versions removed codec; google for old apk version)
    Dice Player - (updated versions removed codec; google for old apk version (2.0.6), or try searching XDA for external plug-in support instead.)
    Mobo Player
    5
    Awesome. I'll give it try, even through from what I've read the beta is still very buggy & laggy.

    Wonder how long they'll "get away with it" before removing DTS support too.

    EDIT: VLC beta is currently incompatible with the US SGS3

    huh... This one seems to be working for me...
    5
    It looks like I'm not so new anymore:

    mxplayer-v1-7-ffmpeg-2012-09-16-neon.zip (md5: e5bf7c05c680006d81fbccefb79fc713)
    -> https://anonfiles.com/file/e5bf7c05c680006d81fbccefb79fc713
    mxplayer-v1-7-ffmpeg-2012-09-16-tegra2.zip (md5: c64f7dc461d3f4c2bbda08c726f478c9)
    -> https://anonfiles.com/file/c64f7dc461d3f4c2bbda08c726f478c9
    mxplayer-v1-7-ffmpeg-2012-09-16-v6_vfp.zip (md5: 553367b419e6c855b6eb32f7abd35ec1)
    -> https://anonfiles.com/file/553367b419e6c855b6eb32f7abd35ec1
    mxplayer-v1-7-ffmpeg-2012-09-16-v6.zip (md5: 342a2a8bda3f9a8ebd5b62e95a8593a2)
    -> https://anonfiles.com/file/342a2a8bda3f9a8ebd5b62e95a8593a2
    mxplayer-v1-7-ffmpeg-2012-09-16-v5te.zip (md5: 6ea66726b362a73e9b962be7a05af3a6)
    -> https://anonfiles.com/file/6ea66726b362a73e9b962be7a05af3a6
    4
    The impression I got is that DicePlayer switched from AdSupported&Paid versions to DonationWare in preparation of becoming AbandonWare. In any case, they removed DTS, so it's out of the running, and from the comments I read about the external dts workaround you mentioned: it doesn't work as well. VLC wins for now. Thanks, though.

    That is your impression. but I am working for upgrading diceplayer. We do not adandon diceplayer. I am very upset and feel that I should really adondon diceplayer. Why do I do bothering jobs like supporting JB and fixing bugs and adding external codec features.

    removing DTS is another problems. MX also remove DTS. we have same situations.

    did you copy libffmpeg.so to /sdcard ( root of internal storage memory ). and enable custom plug-in and restart diceplayer?