nova-video-player / aos-AVP

NOVA opeN sOurce Video plAyer: main repository to build them all
Apache License 2.0
3.49k stars 201 forks source link

Playback not smooth on Sony TV with AC3 5.1 audio tracks #333

Open lys1980 opened 4 years ago

lys1980 commented 4 years ago

With my Sony Bravia 4k TV most of h264 mkv files are not smooth, with annoying stutter/judder effect.. No problem with MX player.. Could you fix this issue? Thank you

sigpi007 commented 4 years ago

I have same issue. VLC plays videos smooth like butter with hardware decoding. Nova and Archos (last versions) have issues with same videos. If I set Nova (and Archos) to “force software decoding” it gets rid of the stutter, but just isn’t quite as smooth as other players. (I’d just set up Nova to use an external player like VLC, but there are issues passing files on my NAS to another player when mapping with SMB authentication.

sigpi007 commented 4 years ago

Also... even though I can get rid of the studded in Nova using software decoding... ALL of my files have a timing issue syncing audio and video. I literally have to adjust ever file, and the delay is not consistent from file to file.

lys1980 commented 4 years ago

I tried to use "force software decoding" but the issue still remains

courville commented 4 years ago

Thanks for reporting the issue on Sony 4k TV based on MTK chipset. Could you please disclose the exact hardware, android version, let me know if audio passthrough is used. If you can share a very typical H264 file highlighting the issue to software@courville.org (or the detailed filename so that I can retrieve it), I will try to get access to such a TV and debug. Also when you go in settings and click 8 times on "force sw decoding" you get access to decoder choice and audio interface choice, could you let me know if you pick audiotrack or opensles it makes a difference in terms of A/V sync? Thank you

lys1980 commented 4 years ago

I clik 8 times and picked audiotrck or opensles and no improvement.. Then I picked Android Media Player decoder and the issue is gone.. Even if seeking forward is not behaving correctly (image stand still until the audio is synced.. Then it starts playing the movie).. Passthrough is disabled and Im playing a file thru SMB v1

lys1980 commented 4 years ago

P_20200516_145323

lys1980 commented 4 years ago

I have sent an email to courville with an example file that have issues

Erdie1980 commented 4 years ago

I have a Sony Bravia 4k with Android TV too. For me it helped to enable the option "Automatically switch Framerate" (translated from the German interface, not sure how it is really called in english). This option was also available in the old Archos player, but strangly enough I never had to enable it there.

sigpi007 commented 4 years ago

I have the Sony tv model xbr55x950g (if that helps).

Android kernel version 4.9.125.

6860A705-C315-4916-89FA-DA22F124D6B9 93BB9DE4-9884-4CD4-9297-CA8D91321035

sigpi007 commented 4 years ago

Ok... I’ve narrowed down the issue. It seems to be related to any video using an AC3 audio track. I have some files that have two audio tracks... AC3 and AAC. The AAC plays fine. Switching to the AC3 track causes issues.

On the AC3 audio track, if Software decoding is forced in preferences, the audio and video are wildly out of sync. (I’m talking like almost 1-2 seconds). If the force SW decoding is NOT checked, then the audio and video play in sync, but the video plays back choppy, like it misses a frame every second.

I did the SW 8x trick to select the different audio codecs. Both had the same issues for AC3 tracks.

I tried different files... some old SD files and some recent LARGE HD files. Size of file or resolution didn’t matter. Always the issue was whether or not the audio file was using AC3.

I tried files that had Digital 5.1 audio tracks... no issue.

I tried files with extensions of .mp4, .mkv, and .m4v. All had the same issue with AC3 tracks only.

Hope this helps. I have a lot of files that have AC3 passthru I think. :-(

courville commented 4 years ago

@sigpi007 thanks for the investigation. One point of clarification: do you confirm that you have NOT selected audio passthrough (state deactivated) in the settings?

mschumacher69 commented 4 years ago

@lys1980 @sigpi007 how do you access this system info menu on Sony Bravia Android TV?

lys1980 commented 4 years ago

@courville Yes I can confirm that audio passthrough is NOT selected

courville commented 4 years ago

Thus @sigpi007 = @lys1980 right (I need to keep track...). @lys1980 since I poke in the dark here (I cannot reproduce on all the hardwares I have), I would like to check if this is not a recent regression from the fix that we did on the DTS. Could you please check this apk: https://drive.google.com/file/d/1fx6xeDsHNZpjcHjWLybvBsZX90sVnJUz/view?usp=sharing (apk named Video-OLDAVOS). If this is not better please realign on this latest build afterwards (that has also some A/V sync modifications): https://drive.google.com/file/d/1Oy80AwqOILMMK7TIkd2Ba77C4u9eQ5T9/view?usp=sharing (apk named Video-NEWAVOS). Please let me know your feedback and thank you for your testing.

lys1980 commented 4 years ago

sorry @courville , i have answered to a question you asked to @sigpi007 (we are not the same person).

Anyway, i tried both OLDAVOS and NEWAVOS, but the issue still remains, i didn't notice any difference.

courville commented 4 years ago

@lys1980, I just tested several videos on the same sony TV (at least same mt5891 cpu) and it plays smooth on the files I have tested so far. Could you please share a file with me software@courville.org that I would play via usb stick to check? (KD-65XF8596 version 8.0.0 build OPR2.170623.027.S30665451)

lys1980 commented 4 years ago

I have sent you an email.. Anyway, as I stated before, if I choose Android Media Player decoder it plays smooth

courville commented 4 years ago

@lys1980 thx for sharing the file. I have seen your comment about Android MediaPlayer. However nova does not use it (since it is very limited in multimedia scope). Hence I need to reproduce somehow what you see.

sigpi007 commented 4 years ago

Sorry about lag in response. Can only check in every few days since my kids hog the TV.

I can confirm that I had Audio Passthrough set to Mode 2. I tried setting to Disabled (same exact symptoms) and Mode 1 (awful white noise sound immediately starting video).

I’ll try the APKs if I can. I have OLDAVOS and will test that first. Never sideloaded an APK on this TV before.

courville commented 4 years ago

OK I can reproduce the issue on a Sony TV. Behavior is linked to Sony and not MTK CPU (I checked on a firetv4k too). I confirm that it happens with AC3 5.1 files 48kHz but not with AAC 5.1 files 48kHz. I do not witness any underrun on audio though. Buffer fill is always >95% too. I have not an easy access to such hardware for now. Debug will take some time.

courville commented 4 years ago

@sigpi007 @lys1980 after some analysis I suspect a potential regression. Could you please test this apk and report if it is any better? https://drive.google.com/file/d/1GuBxjKSEf5O-ChYSF98DdhXFlnEvOFDc/view?usp=sharing

Note to self: avos to 72156d4e27c531d92ddca3d795792a34acf8e2af

courville commented 4 years ago

Uploaded another apk at same link that is more likely to solve the issue.

See https://github.com/nova-video-player/aos-AVP/issues/258

lys1980 commented 4 years ago

Unfortunately I'm not at home these weeks..so I can't test it.. Will do ASAP and will let you know

Il giorno venerdì 12 giugno 2020, CourvilleSoftware < notifications@github.com> ha scritto:

Uploaded another apk at same link that is more likely to solve the issue.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/nova-video-player/aos-AVP/issues/333#issuecomment-643434376, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOE6DT6TDH7VNYTNAM2KAL3RWJ27PANCNFSM4MNI4HDQ .

sigpi007 commented 4 years ago

@courville I just installed the apk from the most recent link. It is MARKEDLY better than before. I did not see a difference when the app was set to HW decoding (AV sync good, but same stutter for video). But SW decoding was nicely in sync for AV. Still isn’t as nice as having HW decoding (cause play back can look much smoother as with VLC’s HW decoding.).

BUT.... suffice it to say that movies with AC3 tracks are watchable again!

sigpi007 commented 4 years ago

Also... it took me some time to test this because I had never sideloaded an app before on a TV. So I had to get some things configured first. Now that this is done, I can test more APKs quicker if needed. Thanks so much for your help.

courville commented 4 years ago

@sigpi007 thanks for the testing and confirmation. I will deploy the apk for all. This is an issue though that HW decoding is nok.

lys1980 commented 4 years ago

Anyway.. I remember that in my case, in all previous versions, using sw decoder was much worse than hw decoder

sigpi007 commented 4 years ago

@sigpi007 thanks for the testing and confirmation. I will deploy the apk for all. This is an issue though that HW decoding is nok.

@courville Sorry, not quite sure I follow what you mean here?? I think your essentially saying this is something we can’t fix for hardware decoding? Would make sense I guess. Just weird that VLC allows HW decoding just fine.

courville commented 4 years ago

@sigpi007 to be clear HW decoding should always be used. I deployed the new apk because it solves already some of the issues seen but not all cf. https://github.com/nova-video-player/aos-AVP/issues/347 Two issues are connected (Philips or Sony = MTK CPU and AndroidTV however MTK firestick is shows no issue).

sigpi007 commented 4 years ago

Gotcha. Let me know if you need me to test anything else. Happy to help

lys1980 commented 4 years ago

Sorry for late reply.. I was away from home... I tested the last version and unfortunately the issue still persists..