Closed stari4ek closed 4 years ago
Are you using FLAG_ALLOW_NON_IDR_KEYFRAMES
when building the TsExtractor
? It plays fine for me with the flag set. Without it I just see a black screen. Please clarify. Thanks!
Note: I was testing on a model running L (API level 22) rather than M (API level 23).
This issue was reported by user, so I can not reproduce by myself (don't have Sony TV). But here it is what I have:
System: 3.10.79 (1.6.0.06.14.1.00) Sdk: 23 Device: BRAVIA_ATV2 Product: BRAVIA_ATV2_EU Manufacturer: Sony Model: BRAVIA 4K GB Resolution: 1920x1080
it's reproducible with my app (exoplayer v1, _WORKAROUND_ALLOW_NON_IDR_KEYFRAMES | WORKAROUND_DETECT_ACCESSUNITS)
it was reproduced by user with ExoPlayer demo based on v2:
branch: https://github.com/stari4ek/ExoPlayer/tree/tvirl/exoplayer-v2/issues/390
FLAG_ALLOW_NON_IDR_KEYFRAMES|FLAG_DETECT_ACCESS_UNITS (https://github.com/stari4ek/ExoPlayer/blob/tvirl/exoplayer-v2/issues/390/demo/src/main/java/com/google/android/exoplayer2/demo/PlayerActivityExt.java#L47)
debug apks: without extensions: https://drive.google.com/file/d/0Bww3WxdHUiM1WjhXUFluTVN0LTA/view?usp=drivesdk with extensions: https://drive.google.com/file/d/0Bww3WxdHUiM1bGhyMWY5dUJ0VTg/view?usp=drivesdk
Note: I have also made sure that FLAG_DETECT_ACCESS_UNITS was enabled as well. Still not reproducible.
Regarding the Android version being 22 instead of 23, I am inclined to discard the possibility of a regression issue if it plays well using other apps:
It could be device's performance, but same video using same decoder (OMX.MTK.VIDEO.DECODER.AVC) in 2 other apps is played well.
I also doubt it is the lack of flags, as this does not cause dropped frames. I can only think of a device model variation from what we have (could you please send the output of adb shell getprop ro.build.fingerprint
for that device?) or an APK difference. Please provide any information that might help us reproduce or understand the issue.
Since I don't own device I can not perform adb against it by myself. But, here is some additional info from MXPlayer's report (in initial comment):
Aplikacja: MX Player (1.8.16)
Producent: Sony
Model: BRAVIA 4K GB
Marka: Sony
Wersja: 6.0.1 (REL)
Kompilacja: Sony/BRAVIA_ATV2_EU/BRAVIA_ATV2:6.0.1/MMB29V.S50/1.6.0.06.14.1.00:user/release-keys
Jądro: Linux version 3.10.79 (root@BuildHost504) (gcc version 4.8.2 20131014 (prerelease) (Linaro GCC 4.8-2013.10) ) #1 SMP PREEMPT Mon Nov 14 15:14:14 JST 2016
CPU: 4 core(s) 0 Hz (family:1 features:2047)
Architektura procesora: 7 (os.arch: armv7l)
Funkcje procesora: swp half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt
Zarządca platformy: mt5891
Zestaw instrukcji: armeabi-v7a armeabi
Rozdzielczość: 1920 x 1080
Dostępne miejsce na ekranie(DIP): 960 x 540 (smallest: 540)
Tablet: false
Rozmiar ekranu: Large
Gęstość: 2.0 (320)
Skala czcionki: 1.0
Główny przycisk sprzętowy: true
Dotykowy ekran: false
TV: true (uiMode:20)
Ustawienia regionalne: pl_PL
BTW, Can you reproduce issue using provided APK from my previous comment? Cause it's exact demo APK user used on it's device and got problem. There is link to branch with exact sources it was built from. I can prepare diff/patch to see differences with mainline
Any other information except Build.FINGERPRINT which can be fetched in runtime and might help?
I tried the debug APK without extensions. Didn't reproduce.
This seems to be device-specific. We're looking into getting the problematic device but it may take a while.
just in case, this is how issue looks like:
@stari4ek If possible, please could you provide a photo of the label on the back panel of the TV with readable text? Apparently the build fingerprint does not provide enough information to know exactly what the device is.
@andrewlewis, Here it is: https://drive.google.com/file/d/0Bww3WxdHUiM1cWl0M0lGMzJEYkU/view?usp=drivesdk
I'd like to update the issue. It's still valid (even with recent sony update to android 7). Here are some reports:
System: 3.10.79 (1.6.0.26.02.1.00)
Sdk: 24
Device: BRAVIA_ATV2
Product: BRAVIA_ATV2_EU
Manufacturer: Sony
Model: BRAVIA 4K GB
System: 3.10.79 (3.865)
Sdk: 23
Device: SVP-DTV15
Product: SVP4KDTV15_EU
Manufacturer: Sony
Model: BRAVIA 4K 2015
2 Users confirmed that this issue takes place only when FLAG_DETECT_ACCESS_UNITS
is enabled.
Not sure if it's lack of cpu performance or device specific issue (nvidia shield has 5-10% of cpu utilization while playing samples with FLAG_DETECT_ACCESS_UNITS
enabled)
Detecting access units in H.264/AVC is relatively expensive because we have to unescape and parse slice headers to determine whether the NAL unit is the first VLC NAL unit of the picture.
Do you have the option of only using streams that include access unit delimiter NAL units and not using the flag?
I do not own or control media streams users can use. So probably the only solution is to provide control over workarounds as "extended" settings and select proper one by default.
Checked with xiaomi mibox - on test streams. FLAG_DETECT_ACCESS_UNITS adds ~10% of cpu utilization (~35-40% total) according to Android Studio's profiler. Not a big deal.
mibox has AMLogic S905X-H / Cortex A53 / 2GHz SVP4KDTV15_EU has Mediatek MT5891 / Cortex A53/ 1.1GHz.
Any chances that it's device specific bottleneck or it's just lack of single core raw cpu power?
I see the same issue on Mi Box + SHARP AQUOS TV. It is reproducible using ExoPlayer demo app (running on Mi Box) on following HLS asset (Sintel): https://bitdash-a.akamaihd.net/content/sintel/hls/playlist.m3u8 You have to plug HDMI cable out from the Mi Box and then plugin it in back. The video get staled in few to dosen seconds. It is almost always reproducible when doing these steps. ExoPlayer reports status of playback as BUFFERING before video stops and droppedFrames appears as well. The video doesn't resume automatically.
I suspect that the issue is somehow related to dolby streams. I can reproduce it only when "Surround sound" is turned on ("Auto" in my case), when I change it to "Never" then I can replug HDMI cable many times and video doesn't get staled. At least I haven't been able to get it staled. I also couldn't reproduce it on assets that have only stereo streams.
If you think that this is different bug then I can create separate ticket for this. Here is bugreport that I created after reproduction: https://drive.google.com/file/d/1QIAIVpIEdU6maTsHCsZ6IgVdyTlNwUFJ/view?usp=sharing I used ExoPlayer demo app built from r2.8.2 tag. These logs were printed when video got staled:
07-24 13:56:15.747 10186 5351 5351 D EventLogger: droppedFrames [51.71, 117.78, window=0, period=0, 7]
07-24 13:56:15.748 10186 5351 5351 D EventLogger: state [51.71, 117.78, window=0, period=0, true, BUFFERING]
07-24 13:56:15.751 1041 2678 2804 W AudioFlinger: moveEffectChain_l() effect chain for session 0 not on source thread 0xec36d000
Closing as part of a scrub of device specific issues that were filed more than 2 years ago.
It could be device's performance, but same video using same decoder (OMX.MTK.VIDEO.DECODER.AVC) in 2 other apps is played well.