Open KeyserSoze1 opened 8 years ago
looks interesting, I've always wondered why dolby_digital_plus_channel_check_lossless-DWEU.mkv detected an ac3 then quickly switched to eac3.
That was one of the reasons I was surprised this was never handled in the past. Just ignore the substream and send as AC3.
As you can see there's not a lot of code modifications for this. It's an easy test. Turn off EAC3 passthrough. Turn on AC3 passthrough and try an example like the one you mentioned and make sure you get AC3.
Any caveats to doing a vanilla android build and installing on a FireTV? Looks like mrmc.tv is no longer a valid domain? Just trying to grab the dependency tarballs. Is there another location to grab them?
yea, woke up to mrmc.tv domain is down :( try kodi's repo, push comes to shove, google for the tar ball, fetch and stick it into the depends download cache dir. --with-tarballs sets that, default is prefix/xbmc-tarballs
for android, this is the configure line I use to setup depends
./configure --with-tarballs=/home/davilla/xbmc-tarballs --host=arm-linux-androideabi --with-sdk=android-21 --with-sdk-path=/home/davilla/android/android-sdk-linux --with-ndk=/home/davilla/android/android-ndk-r11b --with-toolchain=/home/davilla/android/toolchains/android-21 --prefix=/home/davilla/mrmc-depends
You're speaking about 2 different issues ;) AC3 is detected first because EAC3 data is in a substream, i.e. if you only parse 1 packet for sync, you'll never detect EAC3 on 1st pass.
Is this PR working in the current state? You'd have to ignore the EAC3 substream packets, wouldn't you?
So I'm attempting to determine if it's working or not now. I have intended it to be fully working :) I haven't tested anything yet. Hope to find out soon.
My understanding of EAC3 is that the first packet can be EAC3. If bsid > 10 and stream type is 0 or 2 indicates an EAC3 only main stream. That's my understanding of the spec. I hate spec docs since they are always open to interpretation anyway. I haven't seen any that actually do this though. Although my search has not been extensive. You could probably force this by encoding an EAC3 5.1 file outside of the max bitrate of AC3 which I believe is possible.
And yes this patch is intended to skip the substream packets and is really it's sole purpose.
mrmc.tv domain is back up.
So it's compiling but it looks like something has changed. The samples I have, have an original codec hint of EAC3 then switch to AC3 on the first frame then back to EAC3 when the substream is detected. I have some ideas on how to fix this but will need to test. I at least have a working build chain and can test now.
So the testing has not gone well. I can't get DD/DD+ passthrough to work at all right now and I've even removed my build and am running vanilla 2.6.3 from the amazon store. I get some sporadic sound but my receiver constantly goes between "No Stream" to "Dolby Digital". Not sure if I screwed something up on my end or not but it's not working for me right now. It looks like this should work but I'm not having any luck getting any significant testing done. Any chance someone has some spare cycles to build my branch which has been updated to 2.6.3 and see if it's something on my end?
MrMC for fireOS is out now so I can play
sort of works but it messes up eac3 with real 8 channnel
Interesting. Thanks for taking a look. Any chance you can post an apk for me to look at?
2.7.0 source code has been pushed out. This has the AC3 fix so you can continue your investigation
Thanks. I'll try to look at this soon. I just got back to it. I've rebased onto the latest and should be able to test soon.
I want to apologize for letting this fall through the cracks. I've been busy with other projects and never got back to this. I'll try to push it up the list but no promises. It's not exactly a major enhancement anyway.
This is an initial pull request to gauge interest in this. I haven't done any testing. I haven't even got a working build chain yet.
This allows for AC3 passthrough on EAC3 streams that have an AC3 main frame. Examples of when this is useful. 1). FireTV gen 1 and anything with an optical can now passthrough AC3 from an EAC3 that has an AC3 main frame. 2). HDMI connected to a TV that supports decoding AC3 but not EAC3.
I haven't looked at this recently. But last time I checked, most examples of DD+ use AC3 as the main stream and the substreams have additional information to add channels and sometimes replace existing channels in the main stream to get to 7.1. An AC3 main stream is not required however so an EAC3 only stream would not work and this PR should prevent any passthrough from happening in that case.
My experience in the past with EAC3 files that contain an AC3 main frame is that the initial codec hint for these come out as AC3 and once the substream is detected a codec switch happens to EAC3.
This modification prevents the codec switch from happening when EAC3 passthrough is not supported but AC3 is.
I'm definitely open to suggestions and mostly want to thank this group for the effort they have done on this. Thoughts?